summaryrefslogtreecommitdiff
path: root/cloudinit/sources
diff options
context:
space:
mode:
authorzsdc <taras@vyos.io>2020-09-16 19:35:38 +0300
committerzsdc <taras@vyos.io>2020-09-16 19:35:38 +0300
commit12a4c9c500695e160b4543f6c93a87c333f0a8ae (patch)
tree0ee3e5065b4a3aafda6e662d12a1ab2f60935aad /cloudinit/sources
parent76adf82b8a4dbcf636151d292175b7d1ac182fcf (diff)
downloadvyos-cloud-init-12a4c9c500695e160b4543f6c93a87c333f0a8ae.tar.gz
vyos-cloud-init-12a4c9c500695e160b4543f6c93a87c333f0a8ae.zip
cc_vyos: T2117: OVF datasource cleanup
The `DataSourceOVF.py` file was cleaned up from VyOS-specific changes. Also was changed related functionality in the `cc_vyos.py`: - in addition to limited metadata provided by Cloud-init, the function `get_properties` from the `DataSourceOVF.py` used to get unfiltered values from an OVF environment; - `set_tag` for the `interfaces ethernet` node was moved from multiple places to the `set_ipaddress` function; - multiple checks for 'null' value in OVF were replaced with the iteration via all values and replacing `null` with `None`. This allows using easier logic during values check; - simplified conversion of the values from OVF to an IP address; - added logging for all actions in the `set_config_ovf` function.
Diffstat (limited to 'cloudinit/sources')
-rw-r--r--cloudinit/sources/DataSourceOVF.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/cloudinit/sources/DataSourceOVF.py b/cloudinit/sources/DataSourceOVF.py
index 6a9a331d..e53d2eb1 100644
--- a/cloudinit/sources/DataSourceOVF.py
+++ b/cloudinit/sources/DataSourceOVF.py
@@ -436,8 +436,7 @@ def read_ovf_environment(contents):
cfg = {}
ud = None
cfg_props = ['password']
- md_props = ['seedfrom', 'local-hostname', 'public-keys', 'instance-id',
- 'ip0', 'netmask0', 'gateway', 'DNS', 'NTP', 'APIKEY' ,'APIPORT', 'APIDEBUG']
+ md_props = ['seedfrom', 'local-hostname', 'public-keys', 'instance-id']
for (prop, val) in props.items():
if prop == 'hostname':
prop = "local-hostname"