Handle case where no networks are selected at create
Currently trove will error when no networks are selected and no management network is configured. This change will pass in None as the nics to nova server create which will let nova choose the network. Change-Id: Ica4f888bf1bc7b771cdfcb0af5c104b2aa6410fe Story: 2008213 Task: 40999
This commit is contained in:
parent
7e4927086d
commit
a5a5c5e060
|
@ -511,6 +511,9 @@ class FreshInstanceTasks(FreshInstance, NotifyMixin, ConfigurationMixin):
|
||||||
self.id)
|
self.id)
|
||||||
networks.append({"port-id": port_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
|
# Create port in the user defined network, associate floating IP if
|
||||||
# needed
|
# needed
|
||||||
if len(networks) > 1 or not CONF.management_networks:
|
if len(networks) > 1 or not CONF.management_networks:
|
||||||
|
|
Loading…
Reference in New Issue