summaryrefslogtreecommitdiff
path: root/cloudinit/sources
diff options
context:
space:
mode:
authorAdrian Vladu <avladu@cloudbasesolutions.com>2020-10-15 22:39:09 +0300
committerGitHub <noreply@github.com>2020-10-15 15:39:09 -0400
commitd76d6e6749315634efe0494501270740e8fef206 (patch)
treeb70eef9adf2b414556154f1d2ec5c104a337944a /cloudinit/sources
parent3b05b1a6c58dfc7533a16f795405bda0e53aa9d8 (diff)
downloadvyos-cloud-init-d76d6e6749315634efe0494501270740e8fef206.tar.gz
vyos-cloud-init-d76d6e6749315634efe0494501270740e8fef206.zip
openstack: consider product_name as valid chassis tag (#580)
Consider valid product names as valid chassis asset tags when detecting OpenStack platform before crawling for OpenStack metadata. As `ds-identify` tool uses product name as valid chassis asset tags, let's replicate the behaviour in the OpenStack platform detection too. This change should be backwards compatible and a temporary fix for the current limitations on the OpenStack platform detection. LP: #1895976
Diffstat (limited to 'cloudinit/sources')
-rw-r--r--cloudinit/sources/DataSourceOpenStack.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/sources/DataSourceOpenStack.py b/cloudinit/sources/DataSourceOpenStack.py
index d4b43f44..0ede0a0e 100644
--- a/cloudinit/sources/DataSourceOpenStack.py
+++ b/cloudinit/sources/DataSourceOpenStack.py
@@ -32,7 +32,8 @@ DMI_ASSET_TAG_OPENTELEKOM = 'OpenTelekomCloud'
# See github.com/sapcc/helm-charts/blob/master/openstack/nova/values.yaml
# -> compute.defaults.vmware.smbios_asset_tag for this value
DMI_ASSET_TAG_SAPCCLOUD = 'SAP CCloud VM'
-VALID_DMI_ASSET_TAGS = [DMI_ASSET_TAG_OPENTELEKOM, DMI_ASSET_TAG_SAPCCLOUD]
+VALID_DMI_ASSET_TAGS = VALID_DMI_PRODUCT_NAMES
+VALID_DMI_ASSET_TAGS += [DMI_ASSET_TAG_OPENTELEKOM, DMI_ASSET_TAG_SAPCCLOUD]
class DataSourceOpenStack(openstack.SourceMixin, sources.DataSource):