Fixes bug 1572 by reading the neutron-availability-zone-hint from VIM
plugin configuration, which is then applied at network-creation time.
Note: this patch also fixes some formatting issues that black showed.
Change-Id: Iaf152657ae31748ea6b4a123e8b0a0d9513cb692
Signed-off-by: sousaedu <eduardo.sousa@canonical.com>
if self.config.get("disable_network_port_security"):
network_dict["port_security_enabled"] = False
+ if self.config.get("neutron_availability_zone_hints"):
+ hints = self.config.get("neutron_availability_zone_hints")
+
+ if isinstance(hints, str):
+ hints = [hints]
+
+ network_dict["availability_zone_hints"] = hints
+
new_net = self.neutron.create_network({"network": network_dict})
# print new_net
# create subnetwork, even if there is no profile