summaryrefslogtreecommitdiffstats
path: root/nova/network/quantumv2/api.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-07-01 21:37:58 +0000
committerGerrit Code Review <review@openstack.org>2013-07-01 21:37:58 +0000
commita4d5ca1cb5e426cd187421b9e7e875442e81e5ae (patch)
tree7dde10a796a79deee80910c6be937066001f369f /nova/network/quantumv2/api.py
parent5f7e79cd75f9b6ac66ba98873465e2d908ccf973 (diff)
parent8f3b3db9b04bb5ff7b9486dc6fc211745b983855 (diff)
downloadnova-a4d5ca1cb5e426cd187421b9e7e875442e81e5ae.tar.gz
nova-a4d5ca1cb5e426cd187421b9e7e875442e81e5ae.tar.xz
nova-a4d5ca1cb5e426cd187421b9e7e875442e81e5ae.zip
Merge "Skip security group code when there is no network."
Diffstat (limited to 'nova/network/quantumv2/api.py')
-rw-r--r--nova/network/quantumv2/api.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/network/quantumv2/api.py b/nova/network/quantumv2/api.py
index c7f4ffd58..814b66ee0 100644
--- a/nova/network/quantumv2/api.py
+++ b/nova/network/quantumv2/api.py
@@ -182,6 +182,11 @@ class API(base.Base):
nets = self._get_available_networks(context, instance['project_id'],
net_ids)
+
+ if not nets:
+ LOG.warn(_("No network configured!"), instance=instance)
+ return []
+
security_groups = kwargs.get('security_groups', [])
security_group_ids = []