commit a5a5c5e060c37c4d0ec5fff125253ca02c1f1817 Author: Sam Morrison Date: Thu Oct 1 09:06:53 2020 +1000 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 diff --git a/trove/taskmanager/models.py b/trove/taskmanager/models.py index 9e3253f..5c0d28f 100755 --- a/trove/taskmanager/models.py +++ b/trove/taskmanager/models.py @@ -511,6 +511,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: