Skip to content

DigitalOcean list_images ignores the requested location #2256

Backlog

Description

@JayDev-27

Summary

The DigitalOcean driver's list_images(location=...) accepts a location, but still returns images from every region. The compatibility update in #2170 added the argument while leaving the method body unchanged.

Detailed information

Reproduced on trunk at b2e794de7aa46b6e2b2f7b9f6bbb610e23cd53d8 with Python 3.12.16 on Linux and Libcloud's existing DigitalOcean mock HTTP fixture.

Pass a location with ID nyc3 to list_images. The driver returns all three images in the fixture, although only one advertises availability in nyc3. The expected result is just the images whose region list contains nyc3. Omitting location should continue to return all images.

A small tested patch is ready. The reproduction used the repository's fixture and made no live DigitalOcean API calls. OpenAI Codex assisted with the reproduction and tests.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions