Merge "Handle case where no networks are selected at create"

This commit is contained in:
Zuul 2020-10-01 10:55:20 +00:00 committed by Gerrit Code Review
commit af83edd1c4
1 changed files with 3 additions and 0 deletions

View File

@ -524,6 +524,9 @@ class FreshInstanceTasks(FreshInstance, NotifyMixin, ConfigurationMixin):
self.id)
networks.append({"port-id": port_id})
if not CONF.management_networks and not networks:
return None
# Create port in the user defined network, associate floating IP if
# needed
if len(networks) > 1 or not CONF.management_networks: