summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/unittests/test_ds_identify.py11
-rwxr-xr-xtools/ds-identify4
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/unittests/test_ds_identify.py b/tests/unittests/test_ds_identify.py
index 9c5628e7..85999b7a 100644
--- a/tests/unittests/test_ds_identify.py
+++ b/tests/unittests/test_ds_identify.py
@@ -66,6 +66,7 @@ P_DSID_CFG = "etc/cloud/ds-identify.cfg"
MOCK_VIRT_IS_KVM = {'name': 'detect_virt', 'RET': 'kvm', 'ret': 0}
MOCK_VIRT_IS_VMWARE = {'name': 'detect_virt', 'RET': 'vmware', 'ret': 0}
+MOCK_VIRT_IS_XEN = {'name': 'detect_virt', 'RET': 'xen', 'ret': 0}
MOCK_UNAME_IS_PPC64 = {'name': 'uname', 'out': UNAME_PPC64EL, 'ret': 0}
@@ -291,6 +292,10 @@ class TestDsIdentify(CiTestCase):
"""On Intel, openstack must be identified."""
self._test_ds_found('OpenStack')
+ def test_openstack_open_telekom_cloud(self):
+ """Open Telecom identification."""
+ self._test_ds_found('OpenStack-OpenTelekom')
+
def test_openstack_on_non_intel_is_maybe(self):
"""On non-Intel, openstack without dmi info is maybe.
@@ -502,6 +507,12 @@ VALID_CFG = {
'policy_dmi': POLICY_FOUND_ONLY,
'policy_no_dmi': POLICY_FOUND_ONLY,
},
+ 'OpenStack-OpenTelekom': {
+ # OTC gen1 (Xen) hosts use OpenStack datasource, LP: #1756471
+ 'ds': 'OpenStack',
+ 'files': {P_CHASSIS_ASSET_TAG: 'OpenTelekomCloud\n'},
+ 'mocks': [MOCK_VIRT_IS_XEN],
+ },
'OVF-seed': {
'ds': 'OVF',
'files': {
diff --git a/tools/ds-identify b/tools/ds-identify
index e3f93c90..e2552c8b 100755
--- a/tools/ds-identify
+++ b/tools/ds-identify
@@ -894,6 +894,10 @@ dscheck_OpenStack() {
return ${DS_FOUND}
fi
+ if dmi_chassis_asset_tag_matches "OpenTelekomCloud"; then
+ return ${DS_FOUND}
+ fi
+
# LP: #1715241 : arch other than intel are not identified properly.
case "$DI_UNAME_MACHINE" in
i?86|x86_64) :;;