summaryrefslogtreecommitdiff
path: root/cloudinit/sources/helpers/vmware
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2018-12-03 18:43:21 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2018-12-03 18:43:21 +0000
commitcb44ad6f42ac015d7d8eaf2ab0bb5ab125ed04b6 (patch)
tree20bf59cbcb6008aebf02af591ca82a7ebdddea1d /cloudinit/sources/helpers/vmware
parentbf7917159dbb292c9fcdef82b004e0f5ecb32c16 (diff)
downloadvyos-cloud-init-cb44ad6f42ac015d7d8eaf2ab0bb5ab125ed04b6.tar.gz
vyos-cloud-init-cb44ad6f42ac015d7d8eaf2ab0bb5ab125ed04b6.zip
ovf: Fix ovf network config generation gateway/routes
Move routes under the nic's subnet rather than use top-level ("global") route config ensuring all net renderers will provide the configured route. Also updated cloudinit/cmd/devel/net_convert.py:  - Add input type 'vmware-imc' for OVF customization config files  - Fix bug when output-type was netplan which invoked netplan   generate/apply and attempted to write to   /etc/netplan/50-cloud-init.yaml instead of joining with the   output directory. LP: #1806103
Diffstat (limited to 'cloudinit/sources/helpers/vmware')
-rw-r--r--cloudinit/sources/helpers/vmware/imc/config_nic.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/cloudinit/sources/helpers/vmware/imc/config_nic.py b/cloudinit/sources/helpers/vmware/imc/config_nic.py
index e1890e23..77cbf3b6 100644
--- a/cloudinit/sources/helpers/vmware/imc/config_nic.py
+++ b/cloudinit/sources/helpers/vmware/imc/config_nic.py
@@ -165,9 +165,8 @@ class NicConfigurator(object):
# Add routes if there is no primary nic
if not self._primaryNic and v4.gateways:
- route_list.extend(self.gen_ipv4_route(nic,
- v4.gateways,
- v4.netmask))
+ subnet.update(
+ {'routes': self.gen_ipv4_route(nic, v4.gateways, v4.netmask)})
return ([subnet], route_list)