summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorChad Smith <chad.smith@canonical.com>2018-07-31 18:44:12 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2018-07-31 18:44:12 +0000
commit3cee0bf85fbf12d272422c8eeed63bf06e64570b (patch)
tree3292a36c5fea61d9b728476a51ee7cc41e4a9639 /cloudinit
parent361ae34d3fd2f5784ddac23c6650ac5a8f2e14cd (diff)
downloadvyos-cloud-init-3cee0bf85fbf12d272422c8eeed63bf06e64570b.tar.gz
vyos-cloud-init-3cee0bf85fbf12d272422c8eeed63bf06e64570b.zip
oracle: fix detect_openstack to report True on OracleCloud.com DMI data
The OpenStack datasource in 18.3 changed to detect data in the init-local stage instead of init-network and attempted to redetect OpenStackLocal datasource on Oracle across reboots. The function detect_openstack was added to quickly detect whether a platform is OpenStack based on dmi product_name or chassis_asset_tag and it was a bit too strict for Oracle in checking for 'OpenStack Nova'/'Compute' DMI product_name. Oracle's DMI product_name reports 'SAtandard PC (i440FX + PIIX, 1996)' and DMI chassis_asset_tag is 'OracleCloud.com'. detect_openstack function now adds 'OracleCloud.com' as a supported value 'OracleCloud.com' to valid chassis-asset-tags for the OpenStack datasource. LP: #1784685
Diffstat (limited to 'cloudinit')
-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 365af96a..b9ade90d 100644
--- a/cloudinit/sources/DataSourceOpenStack.py
+++ b/cloudinit/sources/DataSourceOpenStack.py
@@ -28,7 +28,8 @@ DMI_PRODUCT_NOVA = 'OpenStack Nova'
DMI_PRODUCT_COMPUTE = 'OpenStack Compute'
VALID_DMI_PRODUCT_NAMES = [DMI_PRODUCT_NOVA, DMI_PRODUCT_COMPUTE]
DMI_ASSET_TAG_OPENTELEKOM = 'OpenTelekomCloud'
-VALID_DMI_ASSET_TAGS = [DMI_ASSET_TAG_OPENTELEKOM]
+DMI_ASSET_TAG_ORACLE_CLOUD = 'OracleCloud.com'
+VALID_DMI_ASSET_TAGS = [DMI_ASSET_TAG_OPENTELEKOM, DMI_ASSET_TAG_ORACLE_CLOUD]
class DataSourceOpenStack(openstack.SourceMixin, sources.DataSource):