diff options
author | Ryan Harper <ryan.harper@canonical.com> | 2016-03-23 16:56:02 -0500 |
---|---|---|
committer | Ryan Harper <ryan.harper@canonical.com> | 2016-03-23 16:56:02 -0500 |
commit | 32e81553907eaba84345252527f208d29151620f (patch) | |
tree | 1acda38807c95da6931cef6dbf20c8a199acd4e7 /cloudinit/sources/DataSourceConfigDrive.py | |
parent | 6b79e2c6f9a7342163691be9e785cef1aa642541 (diff) | |
download | vyos-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/DataSourceConfigDrive.py')
-rw-r--r-- | cloudinit/sources/DataSourceConfigDrive.py | 6 |
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']}) |