cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #06650
Re: [Merge] ~ruansx/cloud-init:add-zstack-datasource into cloud-init:master
Some comments inline. I also updated your commit message a bit.
Diff comments:
> diff --git a/cloudinit/sources/DataSourceEc2.py b/cloudinit/sources/DataSourceEc2.py
> index 5c017bf..525121b 100644
> --- a/cloudinit/sources/DataSourceEc2.py
> +++ b/cloudinit/sources/DataSourceEc2.py
> @@ -477,10 +478,16 @@ def identify_brightbox(data):
> return CloudNames.BRIGHTBOX
>
>
> +def identify_zstack(data):
> + if data['asset_tag'].endswith('zstack.io'):
endswith .zstack.io (see below)
> + return CloudNames.ZStack
> +
> +
> def identify_platform():
> # identify the platform and return an entry in CloudNames.
> data = _collect_platform_data()
> - checks = (identify_aws, identify_brightbox, lambda x: CloudNames.UNKNOWN)
> + checks = (identify_aws, identify_brightbox, identify_zstack,
> + lambda x: CloudNames.UNKNOWN)
> for checker in checks:
> try:
> result = checker(data)
> diff --git a/tools/ds-identify b/tools/ds-identify
> index e0d4865..0a59416 100755
> --- a/tools/ds-identify
> +++ b/tools/ds-identify
> @@ -896,6 +896,12 @@ ec2_identify_platform() {
> *brightbox.com) _RET="Brightbox"; return 0;;
> esac
>
> + # ZStack https://bugs.launchpad.net/cloud-init/+bug/1841181
drop the bug reference here.
> + local asset_tag="${DI_DMI_CHASSIS_ASSET_TAG}"
> + case "$asset_tag" in
> + *zstack.io) _RET="ZStack"; return 0;;
if it works, i'd prefere '*.zstack.io' to '*zstack.io' as the latter inadvertantly matches "buzzstack.io".
And yes, we should fix brightbox above also.
> + esac
> +
> # AWS http://docs.aws.amazon.com/AWSEC2/
> # latest/UserGuide/identify_ec2_instances.html
> local uuid="" hvuuid="${PATH_SYS_HYPERVISOR}/uuid"
--
https://code.launchpad.net/~ruansx/cloud-init/+git/cloud-init/+merge/372445
Your team cloud-init Commiters is requested to review the proposed merge of ~ruansx/cloud-init:add-zstack-datasource into cloud-init:master.
References