summaryrefslogtreecommitdiff
path: root/cloudinit/sources
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2016-03-23 16:56:02 -0500
committerRyan Harper <ryan.harper@canonical.com>2016-03-23 16:56:02 -0500
commit32e81553907eaba84345252527f208d29151620f (patch)
tree1acda38807c95da6931cef6dbf20c8a199acd4e7 /cloudinit/sources
parent6b79e2c6f9a7342163691be9e785cef1aa642541 (diff)
downloadvyos-cloud-init-32e81553907eaba84345252527f208d29151620f.tar.gz
vyos-cloud-init-32e81553907eaba84345252527f208d29151620f.zip
network_data: add link type 'phys', no need to reload json data
Diffstat (limited to 'cloudinit/sources')
-rw-r--r--cloudinit/sources/DataSourceConfigDrive.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py
index 15dddefe..db813f6e 100644
--- a/cloudinit/sources/DataSourceConfigDrive.py
+++ b/cloudinit/sources/DataSourceConfigDrive.py
@@ -147,10 +147,8 @@ class DataSourceConfigDrive(openstack.SourceMixin, sources.DataSource):
LOG.warn("Invalid content in vendor-data: %s", e)
self.vendordata_raw = None
- nd = results.get('networkdata')
- self.networkdata_pure = nd
try:
- self.network_json = util.load_json(nd)
+ self.network_json = results.get('networkdata')
except ValueError as e:
LOG.warn("Invalid content in network-data: %s", e)
self.network_json = None
@@ -389,7 +387,7 @@ def convert_network_data(network_json=None):
})
subnets.append(subnet)
cfg.update({'subnets': subnets})
- if link['type'] in ['ethernet', 'vif', 'ovs']:
+ if link['type'] in ['ethernet', 'vif', 'ovs', 'phy']:
cfg.update({
'type': 'physical',
'mac_address': link['ethernet_mac_address']})