# glance.common.location_strategy package

## Submodules

- glance.common.location_strategy.location_order module
  - `get_ordered_locations()`
  - `get_strategy_name()`
  - `init()`
- glance.common.location_strategy.store_type module
  - `get_ordered_locations()`
  - `get_strategy_name()`
  - `init()`

## Module contents

glance.common.location_strategy.choose_best_location(locations, **kwargs)

  Choose best location from image location list by configured strategy.

  Parameters:

    - locations – The original image location list.

    - kwargs – Strategy-specific arguments for under layer strategy module.

  Returns:

    The best location from image location list.

glance.common.location_strategy.get_ordered_locations(locations, **kwargs)

  Order image location list by configured strategy.

  Parameters:

    - locations – The original image location list.

    - kwargs – Strategy-specific arguments for under layer strategy module.

  Returns:

    The image location list with strategy-specific order.

glance.common.location_strategy.verify_location_strategy(conf=None, strategies={'location_order': <module 'glance.common.location_strategy.location_order' from '/build/glance-6AVoCm/glance-28.1.0/glance/common/location_strategy/location_order.py'>, 'store_type': <module 'glance.common.location_strategy.store_type' from '/build/glance-6AVoCm/glance-28.1.0/glance/common/location_strategy/store_type.py'>})

  Validate user configured ‘location_strategy’ option value.

this page last updated: 2026-03-19 01:38:33

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug