← Back to team overview

cloud-init-dev team mailing list archive

Re: [Merge] ~smoser/cloud-init:bug/1715241-openstack-maybe-on-non-intel into cloud-init:master

 


Diff comments:

> diff --git a/tests/unittests/test_ds_identify.py b/tests/unittests/test_ds_identify.py
> index 1a81a89..c389029 100644
> --- a/tests/unittests/test_ds_identify.py
> +++ b/tests/unittests/test_ds_identify.py
> @@ -261,6 +268,29 @@ class TestDsIdentify(CiTestCase):
>          self._check_via_dict(mydata, rc=RC_FOUND, dslist=['AliYun', DS_NONE],
>                               policy_dmi=policy)
>  
> +    def test_default_openstack_intel_is_found(self):
> +        """On Intel, openstack must be identified."""
> +        self._test_ds_found('OpenStack')
> +
> +    def test_openstack_on_non_intel_is_maybe(self):
> +        """On non-Intel, openstack without dmi info is maybe.
> +
> +        nova does not identify itself on platforms other than intel.
> +           https://bugs.launchpad.net/cloud-init/+bugs?field.tag=dsid-nova""";
> +
> +        data = VALID_CFG['OpenStack'].copy()
> +        del data['files'][P_PRODUCT_NAME]
> +        data.update({'policy_dmi': POLICY_FOUND_OR_MAYBE,
> +                     'policy_no_dmi': POLICY_FOUND_OR_MAYBE})
> +
> +        # this should show not found as default uname in tests is intel.
> +        # and intel openstack requires positive identification.
> +        self._check_via_dict(data, RC_NOT_FOUND, dslist=None)
> +
> +        # updating the uname to ppc64 though should get a maybe.
> +        data.update({'mocks': [MOCK_VIRT_IS_KVM, MOCK_UNAME_IS_PPC64]})
> +        self._check_via_dict(data, RC_FOUND, dslist=['OpenStack', 'None'])

Let's truly validate that this is a maybe instead of just found.
        (_, _, err, _, _) = self._check_via_dict(
            data, RC_FOUND, dslist=['OpenStack', 'None'])
        self.assertIn('maybe=OpenStack', err)

> +
>  
>  def blkid_out(disks=None):
>      """Convert a list of disk dictionaries into blkid content."""


-- 
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/330242
Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:bug/1715241-openstack-maybe-on-non-intel into cloud-init:master.


References