summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-06-03 15:06:55 -0400
committerScott Moser <smoser@ubuntu.com>2016-06-03 15:06:55 -0400
commit42a7d2b6d44be5fd6e41734902e08897b709015d (patch)
tree708baf3504e11a518de5618afebb0c61c99fd938
parentf495947a701d5629b6dbfd2ff9e01dad7bd5166b (diff)
downloadvyos-cloud-init-42a7d2b6d44be5fd6e41734902e08897b709015d.tar.gz
vyos-cloud-init-42a7d2b6d44be5fd6e41734902e08897b709015d.zip
config drive conversion: recognize 'bridge' as a physical type, fix mtu
the network json in openstack provides a type of 'bridge' when the underlying (host) type is a bridge. Silly, but we need to consider that a physical device as it will be for us. also, the 'mtu' will appear on the link, not on the route
-rw-r--r--cloudinit/sources/DataSourceConfigDrive.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py
index 3cc9155d..c87f57fd 100644
--- a/cloudinit/sources/DataSourceConfigDrive.py
+++ b/cloudinit/sources/DataSourceConfigDrive.py
@@ -293,6 +293,7 @@ def convert_network_data(network_json=None, known_macs=None):
'mac_address',
'subnets',
'params',
+ 'mtu',
],
'subnet': [
'type',
@@ -302,7 +303,6 @@ def convert_network_data(network_json=None, known_macs=None):
'metric',
'gateway',
'pointopoint',
- 'mtu',
'scope',
'dns_nameservers',
'dns_search',
@@ -342,7 +342,7 @@ def convert_network_data(network_json=None, known_macs=None):
})
subnets.append(subnet)
cfg.update({'subnets': subnets})
- if link['type'] in ['ethernet', 'vif', 'ovs', 'phy']:
+ if link['type'] in ['ethernet', 'vif', 'ovs', 'phy', 'bridge']:
cfg.update({
'type': 'physical',
'mac_address': link['ethernet_mac_address']})