summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceOVF.py
diff options
context:
space:
mode:
authorSankar Tanguturi <stanguturi@stanguturi-rhel>2016-02-18 18:31:07 -0800
committerSankar Tanguturi <stanguturi@stanguturi-rhel>2016-02-18 18:31:07 -0800
commitc5d2f79a982258d86181368b25ce6bc6638ef645 (patch)
treeb43be2d9ad68ef752fa53f53f69615ed39b0273c /cloudinit/sources/DataSourceOVF.py
parent0ce71cb8975e19677eea415101e15da5f4095cd5 (diff)
downloadvyos-cloud-init-c5d2f79a982258d86181368b25ce6bc6638ef645.tar.gz
vyos-cloud-init-c5d2f79a982258d86181368b25ce6bc6638ef645.zip
- Removed dmi_data function.
- Fixed few variable names. - Used util.subp methods for process related manipulations.
Diffstat (limited to 'cloudinit/sources/DataSourceOVF.py')
-rw-r--r--cloudinit/sources/DataSourceOVF.py20
1 files changed, 4 insertions, 16 deletions
diff --git a/cloudinit/sources/DataSourceOVF.py b/cloudinit/sources/DataSourceOVF.py
index 6d3bf7bb..72ba5aba 100644
--- a/cloudinit/sources/DataSourceOVF.py
+++ b/cloudinit/sources/DataSourceOVF.py
@@ -63,15 +63,11 @@ class DataSourceOVF(sources.DataSource):
}
(seedfile, contents) = get_ovf_env(self.paths.seed_dir)
- dmi_info = dmi_data()
- system_type = ""
- if dmi_info is None:
- LOG.debug("No dmidata utility found")
- else:
- (_, system_type) = dmi_info
-
- if 'vmware' in system_type.lower():
+ system_type = util.read_dmi_data("system-product-name")
+ if system_type is None:
+ LOG.debug("No system-product-name found")
+ elif 'vmware' in system_type.lower():
LOG.debug("VMware Virtual Platform found")
deployPkgPluginPath = search_file("/usr/lib/vmware-tools", "libdeployPkgPlugin.so")
if deployPkgPluginPath:
@@ -347,14 +343,6 @@ def get_properties(contents):
return props
-def dmi_data():
- sys_uuid = util.read_dmi_data("system-uuid")
- sys_type = util.read_dmi_data("system-product-name")
-
- if not sys_uuid or not sys_type:
- return None
-
- return (sys_uuid.lower(), sys_type)
def search_file(dirpath, filename):
if not dirpath or not filename: