diff options
author | Scott Moser <smoser@ubuntu.com> | 2018-01-25 12:51:03 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2018-01-26 16:26:52 -0500 |
commit | 5e5dc9731f39e8b1df767fbaf850fbbd31355a1a (patch) | |
tree | 90be369c38226f7f02d335969fc87ed9d83afd73 /tests/unittests/test_ds_identify.py | |
parent | 1d8c327139a8c291eeb244ee1a6a8badd83e9e72 (diff) | |
download | vyos-cloud-init-5e5dc9731f39e8b1df767fbaf850fbbd31355a1a.tar.gz vyos-cloud-init-5e5dc9731f39e8b1df767fbaf850fbbd31355a1a.zip |
OVF: Extend well-known labels to include OVFENV.
Fujitsu Cloud Service attaches a ovf iso transport with a label
'OVFENV'. This seems to be a reasonable value as a label.
While the for bug 1731868 would likely fix cloud-init on fujitsu
cloud, this change will find it faster.
LP: #1698669
Diffstat (limited to 'tests/unittests/test_ds_identify.py')
-rw-r--r-- | tests/unittests/test_ds_identify.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/unittests/test_ds_identify.py b/tests/unittests/test_ds_identify.py index ad6c5cf4..31cc6223 100644 --- a/tests/unittests/test_ds_identify.py +++ b/tests/unittests/test_ds_identify.py @@ -338,7 +338,7 @@ class TestDsIdentify(CiTestCase): self._test_ds_found('OVF-vmware-customization') def test_ovf_on_vmware_iso_found_by_cdrom_with_matching_fs_label(self): - """OVF is identified when iso9660 cdrom label has ovf-transport.""" + """OVF is identified by well-known iso9660 labels.""" ovf_cdrom_by_label = copy.deepcopy(VALID_CFG['OVF']) # Unset matching cdrom ovf schema content ovf_cdrom_by_label['files']['dev/sr0'] = 'No content match' @@ -346,10 +346,12 @@ class TestDsIdentify(CiTestCase): ovf_cdrom_by_label, rc=RC_NOT_FOUND, policy_dmi="disabled") # Add recognized labels - for valid_fs_label in ['ovf-transport', 'OVF-TRANSPORT']: + valid_ovf_labels = ['ovf-transport', 'OVF-TRANSPORT', + "OVFENV", "ovfenv"] + for valid_ovf_label in valid_ovf_labels: ovf_cdrom_by_label['mocks'][0]['out'] = blkid_out([ {'DEVNAME': 'sr0', 'TYPE': 'iso9660', - 'LABEL': valid_fs_label}]) + 'LABEL': valid_ovf_label}]) self._check_via_dict( ovf_cdrom_by_label, rc=RC_FOUND, dslist=['OVF', DS_NONE]) |