From 1f2144893df2fb79238ea22d84b9b5ee47f15ac0 Mon Sep 17 00:00:00 2001 From: MotoKen Date: Sat, 22 Dec 2012 13:58:53 +0800 Subject: Fix cloudpipe instances query. Filter out deleted instances in _get_all_cloudpipes. Fix bug 1092786. Change-Id: Ia714a1989f78728f8b3597d6f837b622427ac5b1 --- nova/api/openstack/compute/contrib/cloudpipe.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nova/api') 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] -- cgit