Merge ~smoser/cloud-init:bug/1698669-ds-identify-fujitsu-ovf into cloud-init:master

Proposed by Scott Moser
Status: Merged
Merged at revision: 5e5dc9731f39e8b1df767fbaf850fbbd31355a1a
Proposed branch: ~smoser/cloud-init:bug/1698669-ds-identify-fujitsu-ovf
Merge into: cloud-init:master
Diff against target: 43 lines (+8/-4)
2 files modified
tests/unittests/test_ds_identify.py (+5/-3)
tools/ds-identify (+3/-1)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Ryan Harper Approve
Review via email: mp+336630@code.launchpad.net

Commit message

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

Description of the change

see commit message

To post a comment you must log in.
Revision history for this message
Ryan Harper (raharper) wrote :

You've an unrelated change to HACKING.rst

Revision history for this message
Ryan Harper (raharper) wrote :

One more question on the unitest. The change looks good though.

Revision history for this message
Scott Moser (smoser) wrote :

bah. thoght i had pushed the HACKING change upstream. I have now.

Revision history for this message
Scott Moser (smoser) :
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:e5e0df355907350809812569204bc9f2f05daa36
https://jenkins.ubuntu.com/server/job/cloud-init-ci/736/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    SUCCESS: MAAS Compatability Testing
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/736/rebuild

review: Approve (continuous-integration)
Revision history for this message
Ryan Harper (raharper) :
review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:2f9487708053ab048b544b5b614e83917e3172f5
https://jenkins.ubuntu.com/server/job/cloud-init-ci/741/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    SUCCESS: MAAS Compatability Testing
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/741/rebuild

review: Approve (continuous-integration)

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/tests/unittests/test_ds_identify.py b/tests/unittests/test_ds_identify.py
index ad6c5cf..31cc622 100644
--- a/tests/unittests/test_ds_identify.py
+++ b/tests/unittests/test_ds_identify.py
@@ -338,7 +338,7 @@ class TestDsIdentify(CiTestCase):
338 self._test_ds_found('OVF-vmware-customization')338 self._test_ds_found('OVF-vmware-customization')
339339
340 def test_ovf_on_vmware_iso_found_by_cdrom_with_matching_fs_label(self):340 def test_ovf_on_vmware_iso_found_by_cdrom_with_matching_fs_label(self):
341 """OVF is identified when iso9660 cdrom label has ovf-transport."""341 """OVF is identified by well-known iso9660 labels."""
342 ovf_cdrom_by_label = copy.deepcopy(VALID_CFG['OVF'])342 ovf_cdrom_by_label = copy.deepcopy(VALID_CFG['OVF'])
343 # Unset matching cdrom ovf schema content343 # Unset matching cdrom ovf schema content
344 ovf_cdrom_by_label['files']['dev/sr0'] = 'No content match'344 ovf_cdrom_by_label['files']['dev/sr0'] = 'No content match'
@@ -346,10 +346,12 @@ class TestDsIdentify(CiTestCase):
346 ovf_cdrom_by_label, rc=RC_NOT_FOUND, policy_dmi="disabled")346 ovf_cdrom_by_label, rc=RC_NOT_FOUND, policy_dmi="disabled")
347347
348 # Add recognized labels348 # Add recognized labels
349 for valid_fs_label in ['ovf-transport', 'OVF-TRANSPORT']:349 valid_ovf_labels = ['ovf-transport', 'OVF-TRANSPORT',
350 "OVFENV", "ovfenv"]
351 for valid_ovf_label in valid_ovf_labels:
350 ovf_cdrom_by_label['mocks'][0]['out'] = blkid_out([352 ovf_cdrom_by_label['mocks'][0]['out'] = blkid_out([
351 {'DEVNAME': 'sr0', 'TYPE': 'iso9660',353 {'DEVNAME': 'sr0', 'TYPE': 'iso9660',
352 'LABEL': valid_fs_label}])354 'LABEL': valid_ovf_label}])
353 self._check_via_dict(355 self._check_via_dict(
354 ovf_cdrom_by_label, rc=RC_FOUND, dslist=['OVF', DS_NONE])356 ovf_cdrom_by_label, rc=RC_FOUND, dslist=['OVF', DS_NONE])
355357
diff --git a/tools/ds-identify b/tools/ds-identify
index 374c3ad..cd26824 100755
--- a/tools/ds-identify
+++ b/tools/ds-identify
@@ -664,7 +664,9 @@ is_cdrom_ovf() {
664 esac664 esac
665665
666 # fast path known 'OVF' labels666 # fast path known 'OVF' labels
667 [ "$label" = "OVF-TRANSPORT" -o "$label" = "ovf-transport" ] && return 0667 case "$label" in
668 OVF-TRANSPORT|ovf-transport|OVFENV|ovfenv) return 0;;
669 esac
668670
669 # explicitly skip known labels of other types. rd_rdfe is azure.671 # explicitly skip known labels of other types. rd_rdfe is azure.
670 case "$label" in672 case "$label" in

Subscribers

People subscribed via source and target branches