diff options
author | Jenkins <jenkins@review.openstack.org> | 2011-10-12 17:14:18 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2011-10-12 17:14:18 +0000 |
commit | c0cf874acb3a67371ebbd5abbd274f61ffa09396 (patch) | |
tree | e37cf330b548da00cf4501de4b392af2164370fb /nova | |
parent | c12d610878cf9dd974d5811af20ff76635f60063 (diff) | |
parent | 7a2be6264d70faf7f97d12a3f8a252335268359f (diff) | |
download | nova-c0cf874acb3a67371ebbd5abbd274f61ffa09396.tar.gz nova-c0cf874acb3a67371ebbd5abbd274f61ffa09396.tar.xz nova-c0cf874acb3a67371ebbd5abbd274f61ffa09396.zip |
Merge "Update EC2 get_metadata calls to search 'deleted': False. Fixes nova smoke_tests!!!"
Diffstat (limited to 'nova')
-rw-r--r-- | nova/api/ec2/cloud.py | 4 | ||||
-rw-r--r-- | nova/compute/api.py | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index 759259519..b0130a0ad 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -285,7 +285,7 @@ class CloudController(object): def _get_mpi_data(self, context, project_id): result = {} - search_opts = {'project_id': project_id} + search_opts = {'project_id': project_id, 'deleted': False} for instance in self.compute_api.get_all(context, search_opts=search_opts): # only look at ipv4 addresses @@ -360,7 +360,7 @@ class CloudController(object): def get_metadata(self, address): ctxt = context.get_admin_context() - search_opts = {'fixed_ip': address} + search_opts = {'fixed_ip': address, 'deleted': False} try: instance_ref = self.compute_api.get_all(ctxt, search_opts=search_opts) diff --git a/nova/compute/api.py b/nova/compute/api.py index 1aafcdad0..655407b08 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -929,6 +929,9 @@ class API(base.Base): If there is no filter and the context is an admin, it will retreive all instances in the system. + + Deleted instances will be returned by default, unless there is a + search option that says otherwise. """ if search_opts is None: |