diff options
| author | Chris Behrens <cbehrens@codestud.com> | 2011-09-28 23:52:57 +0000 |
|---|---|---|
| committer | Chris Behrens <cbehrens@codestud.com> | 2011-09-28 23:52:57 +0000 |
| commit | bb410b3f1bbdebdbdf540a22cd37fc9526897fe1 (patch) | |
| tree | a4d32e35ad93fcf46b18399d553fe7bc1055b3f1 /nova/compute | |
| parent | ef22c0054ccb846dd7e81ba35f7e9c2b533d5ff7 (diff) | |
Change 'recurse_zones' to 'local_zone_only'.
Fixes bug 861753
Zone recursion should be the default and now 'recurse_zones' as an
optional search argument no longer makes sense. 'local_zone_only=True' can
now be specified to override the new default of recursing zones.
Change-Id: I5c3c849e9077117b2023f637b82831fa14b656b1
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index e40183a4b..7bf28d24e 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -959,7 +959,6 @@ class API(base.Base): 'name': 'display_name', 'instance_name': 'name', 'tenant_id': 'project_id', - 'recurse_zones': None, 'flavor': _remap_flavor_filter, 'fixed_ip': _remap_fixed_ip_filter} @@ -974,19 +973,18 @@ class API(base.Base): except KeyError: filters[opt] = value else: - if remap_object: - if isinstance(remap_object, basestring): - filters[remap_object] = value - else: - remap_object(value) + # Remaps are strings to translate to, or functions to call + # to do the translating as defined by the table above. + if isinstance(remap_object, basestring): + filters[remap_object] = value + else: + remap_object(value) - recurse_zones = search_opts.get('recurse_zones', False) - if 'reservation_id' in filters: - recurse_zones = True + local_zone_only = search_opts.get('local_zone_only', False) instances = self._get_instances_by_filters(context, filters) - if not recurse_zones: + if local_zone_only: return instances # Recurse zones. Send along the un-modified search options we received. |
