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
1diff --git a/tests/unittests/test_ds_identify.py b/tests/unittests/test_ds_identify.py
2index ad6c5cf..31cc622 100644
3--- a/tests/unittests/test_ds_identify.py
4+++ b/tests/unittests/test_ds_identify.py
5@@ -338,7 +338,7 @@ class TestDsIdentify(CiTestCase):
6 self._test_ds_found('OVF-vmware-customization')
7
8 def test_ovf_on_vmware_iso_found_by_cdrom_with_matching_fs_label(self):
9- """OVF is identified when iso9660 cdrom label has ovf-transport."""
10+ """OVF is identified by well-known iso9660 labels."""
11 ovf_cdrom_by_label = copy.deepcopy(VALID_CFG['OVF'])
12 # Unset matching cdrom ovf schema content
13 ovf_cdrom_by_label['files']['dev/sr0'] = 'No content match'
14@@ -346,10 +346,12 @@ class TestDsIdentify(CiTestCase):
15 ovf_cdrom_by_label, rc=RC_NOT_FOUND, policy_dmi="disabled")
16
17 # Add recognized labels
18- for valid_fs_label in ['ovf-transport', 'OVF-TRANSPORT']:
19+ valid_ovf_labels = ['ovf-transport', 'OVF-TRANSPORT',
20+ "OVFENV", "ovfenv"]
21+ for valid_ovf_label in valid_ovf_labels:
22 ovf_cdrom_by_label['mocks'][0]['out'] = blkid_out([
23 {'DEVNAME': 'sr0', 'TYPE': 'iso9660',
24- 'LABEL': valid_fs_label}])
25+ 'LABEL': valid_ovf_label}])
26 self._check_via_dict(
27 ovf_cdrom_by_label, rc=RC_FOUND, dslist=['OVF', DS_NONE])
28
29diff --git a/tools/ds-identify b/tools/ds-identify
30index 374c3ad..cd26824 100755
31--- a/tools/ds-identify
32+++ b/tools/ds-identify
33@@ -664,7 +664,9 @@ is_cdrom_ovf() {
34 esac
35
36 # fast path known 'OVF' labels
37- [ "$label" = "OVF-TRANSPORT" -o "$label" = "ovf-transport" ] && return 0
38+ case "$label" in
39+ OVF-TRANSPORT|ovf-transport|OVFENV|ovfenv) return 0;;
40+ esac
41
42 # explicitly skip known labels of other types. rd_rdfe is azure.
43 case "$label" in

Subscribers

People subscribed via source and target branches