diff options
author | Adrian Vladu <avladu@cloudbasesolutions.com> | 2020-10-15 22:39:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-15 15:39:09 -0400 |
commit | d76d6e6749315634efe0494501270740e8fef206 (patch) | |
tree | b70eef9adf2b414556154f1d2ec5c104a337944a /cloudinit/sources/DataSourceOpenStack.py | |
parent | 3b05b1a6c58dfc7533a16f795405bda0e53aa9d8 (diff) | |
download | vyos-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/DataSourceOpenStack.py')
-rw-r--r-- | cloudinit/sources/DataSourceOpenStack.py | 3 |
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): |