diff options
author | Scott Moser <smoser@ubuntu.com> | 2018-12-20 17:22:45 +0000 |
---|---|---|
committer | Kim Hagen <kim.sidney@gmail.com> | 2019-01-23 13:22:33 +0100 |
commit | d7952d075666122f480f0a5820ac01dfbaa7da1a (patch) | |
tree | e77a3057f3b90bb032dd2cc386b61d7a3978fd71 /tests/unittests/test_ds_identify.py | |
parent | c4da1a5cddacaa7c2a15df9170f21c3fce78fb15 (diff) | |
download | vyos-cloud-init-d7952d075666122f480f0a5820ac01dfbaa7da1a.tar.gz vyos-cloud-init-d7952d075666122f480f0a5820ac01dfbaa7da1a.zip |
Vmware: Add support for the com.vmware.guestInfo OVF transport.
This adds support for reading OVF information over the
'com.vmware.guestInfo' tranport. The current implementation requires
vmware-rpctool be installed in the system.
LP: #1807466
Diffstat (limited to 'tests/unittests/test_ds_identify.py')
-rw-r--r-- | tests/unittests/test_ds_identify.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/unittests/test_ds_identify.py b/tests/unittests/test_ds_identify.py index 80640f19..756b4fb4 100644 --- a/tests/unittests/test_ds_identify.py +++ b/tests/unittests/test_ds_identify.py @@ -138,6 +138,9 @@ class DsIdentifyBase(CiTestCase): {'name': 'detect_virt', 'RET': 'none', 'ret': 1}, {'name': 'uname', 'out': UNAME_MYSYS}, {'name': 'blkid', 'out': BLKID_EFI_ROOT}, + {'name': 'ovf_vmware_transport_guestinfo', + 'out': 'No value found', 'ret': 1}, + ] written = [d['name'] for d in mocks] @@ -475,6 +478,10 @@ class TestDsIdentify(DsIdentifyBase): """OVF is identified when iso9660 cdrom path contains ovf schema.""" self._test_ds_found('OVF') + def test_ovf_on_vmware_guestinfo_found(self): + """OVF guest info is found on vmware.""" + self._test_ds_found('OVF-guestinfo') + def test_ovf_on_vmware_iso_found_when_vmware_customization(self): """OVF is identified when vmware customization is enabled.""" self._test_ds_found('OVF-vmware-customization') @@ -773,6 +780,14 @@ VALID_CFG = { 'dev/sr0': 'pretend ovf iso has ' + OVF_MATCH_STRING + '\n', } }, + 'OVF-guestinfo': { + 'ds': 'OVF', + 'mocks': [ + {'name': 'ovf_vmware_transport_guestinfo', 'ret': 0, + 'out': '<?xml version="1.0" encoding="UTF-8"?>\n<Environment'}, + MOCK_VIRT_IS_VMWARE, + ], + }, 'ConfigDrive': { 'ds': 'ConfigDrive', 'mocks': [ |