diff options
| author | MotoKen <motokentsai@gmail.com> | 2012-12-22 13:58:53 +0800 |
|---|---|---|
| committer | MotoKen <motokentsai@gmail.com> | 2012-12-24 14:04:27 +0800 |
| commit | 1f2144893df2fb79238ea22d84b9b5ee47f15ac0 (patch) | |
| tree | 033798845fca5b67cff6eddd4d81c60ad3a149d3 /nova/api | |
| parent | 1836ede3c57ecb255fe9dcf0f2ea3c880af3d201 (diff) | |
| download | nova-1f2144893df2fb79238ea22d84b9b5ee47f15ac0.tar.gz nova-1f2144893df2fb79238ea22d84b9b5ee47f15ac0.tar.xz nova-1f2144893df2fb79238ea22d84b9b5ee47f15ac0.zip | |
Fix cloudpipe instances query.
Filter out deleted instances in _get_all_cloudpipes.
Fix bug 1092786.
Change-Id: Ia714a1989f78728f8b3597d6f837b622427ac5b1
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/contrib/cloudpipe.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/contrib/cloudpipe.py b/nova/api/openstack/compute/contrib/cloudpipe.py index 1b60f6c1f..bb3007735 100644 --- a/nova/api/openstack/compute/contrib/cloudpipe.py +++ b/nova/api/openstack/compute/contrib/cloudpipe.py @@ -74,7 +74,9 @@ class CloudpipeController(object): def _get_all_cloudpipes(self, context): """Get all cloudpipes""" - return [instance for instance in self.compute_api.get_all(context) + instances = self.compute_api.get_all(context, + search_opts={'deleted': False}) + return [instance for instance in instances if instance['image_ref'] == str(CONF.vpn_image_id) and instance['vm_state'] != vm_states.DELETED] |
