diff options
author | Scott Moser <smoser@ubuntu.com> | 2018-12-20 17:22:45 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2018-12-20 17:22:45 +0000 |
commit | f55bb17ddb2fd64e039057bf7ee50951a0dc93e8 (patch) | |
tree | 967d6a6553d0d4839a125c2d9209df30e7092c17 /tests/unittests/test_ds_identify.py | |
parent | 26e95e95157d2dced6a8af9d766b93b7ae024d52 (diff) | |
download | vyos-cloud-init-f55bb17ddb2fd64e039057bf7ee50951a0dc93e8.tar.gz vyos-cloud-init-f55bb17ddb2fd64e039057bf7ee50951a0dc93e8.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': [ |