-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Identify Huawei Cloud as OpenStack #1689
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Good To Me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Good To Me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank your for this submission @ixjhuang. I agree to the general approach here, and I also confirm the github username ixjhuang has signed cloud-init's ContributorLicenseAgreement.
In order to accept this PR can you please perform the following:
- Add trailing comma in the apport.py module
- Make sure
tox -e do_format
passes on this branch - Add a comment to this PR with the output of the file
/run/cloud-init/ds-identify.log
for future reference of the detected platform information for Huawei
cloudinit/apport.py
Outdated
@@ -29,6 +29,7 @@ | |||
"DigitalOcean", | |||
"E24Cloud", | |||
"GCE - Google Compute Engine", | |||
"Huawei Cloud" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a trailing comma here
"Huawei Cloud" | |
"Huawei Cloud", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, thanks for your review @blackboxsw .
The code has been modified and I would like to confirm the third comment. In the output of file /run/cloud-init/ds-identify.log
already contains Huawei cloud information, do you mean to add some additional information?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ixjhuang this is perfect thank you. I wanted to see a point of reference for what ds-identify "sees" on Huawei platform in DMI_*
values. to confirm other environmental factors available on the platform.
458c4fc
to
38091a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @ixjhuang.
Looks like tox -e do_format
will suggest the following diff which wiould fail our CI
After this diff is applied I'll click the CI runner and this PR should be good to merge.
We may hold it a couple of days before merging because we are in the middle of a public release validation of version 22.3 and want to keep commits in tip of main stable for a couple of days to avoid release branch churn. Other than the formatting change. this looks good to me.
index c252eaae8..88e4f6c2e 100644
--- a/cloudinit/sources/DataSourceOpenStack.py
+++ b/cloudinit/sources/DataSourceOpenStack.py
@@ -32,9 +32,13 @@ 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"
-DMI_ASSET_TAG_HUAWEICLOUD = 'HUAWEICLOUD'
+DMI_ASSET_TAG_HUAWEICLOUD = "HUAWEICLOUD"
VALID_DMI_ASSET_TAGS = VALID_DMI_PRODUCT_NAMES
-VALID_DMI_ASSET_TAGS += [DMI_ASSET_TAG_HUAWEICLOUD, DMI_ASSET_TAG_OPENTELEKOM, DMI_ASSET_TAG_SAPCCLOUD]
+VALID_DMI_ASSET_TAGS += [
+ DMI_ASSET_TAG_HUAWEICLOUD,
+ DMI_ASSET_TAG_OPENTELEKOM,
+ DMI_ASSET_TAG_SAPCCLOUD,
+]
class DataSourceOpenStack(openstack.SourceMixin, sources.DataSource):
add Huawei Cloud as cloud provider
Thanks for your review and answers @blackboxsw . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!. thanks for the discussion here
Huawei Cloud is a international cloud provider and it runs OpenStack. Due to the commit 1efa8a0, we're not able to force the use of the OpenStack datasource. Detect OpenStack when DMI chassis_asset_tag is HUAWEICLOUD
Huawei Cloud is a international cloud provider and it runs OpenStack. Due to the commit 1efa8a0, we're not able to force the use of the OpenStack datasource. Detect OpenStack when DMI chassis_asset_tag is HUAWEICLOUD
Huawei Cloud is a international cloud provider and it runs OpenStack.
Due to the commit 1efa8a0, we're not able to force the use of the OpenStack datasource.
So we need to become an official provider.
Checklist: