diff options
author | Junjie Wang <jingni.wjj@alibaba-inc.com> | 2017-04-21 20:06:09 +0800 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-05-30 16:35:51 -0400 |
commit | 4a60af54957634920e84a928aa22b4fc9a6dfd11 (patch) | |
tree | 1aa31a796ae8b0f5f718b1be9ac79fec523b3023 /tools | |
parent | 16a7302f6acb69adb0aee75eaf12392fa3688853 (diff) | |
download | vyos-cloud-init-4a60af54957634920e84a928aa22b4fc9a6dfd11.tar.gz vyos-cloud-init-4a60af54957634920e84a928aa22b4fc9a6dfd11.zip |
AliYun: Enable platform identification and enable by default.
AliYun cloud platform is now identifying themselves by setting the dmi
product id to the well known value "Alibaba Cloud ECS". The changes here
identify that properly in tools/ds-identify and in the DataSourceAliYun.
Since the 'get_data' for AliYun now identifies itself correctly, we can
enable AliYun by default.
LP: #1638931
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/ds-identify | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/ds-identify b/tools/ds-identify index 74d26537..5fc500b9 100755 --- a/tools/ds-identify +++ b/tools/ds-identify @@ -110,7 +110,8 @@ DI_DSNAME="" # this has to match the builtin list in cloud-init, it is what will # be searched if there is no setting found in config. DI_DSLIST_DEFAULT="MAAS ConfigDrive NoCloud AltCloud Azure Bigstep \ -CloudSigma CloudStack DigitalOcean Ec2 GCE OpenNebula OpenStack OVF SmartOS" +CloudSigma CloudStack DigitalOcean AliYun Ec2 GCE OpenNebula OpenStack \ +OVF SmartOS" DI_DSLIST="" DI_MODE="" DI_ON_FOUND="" @@ -821,10 +822,11 @@ dscheck_OpenStack() { } dscheck_AliYun() { - # aliyun is not enabled by default (LP: #1638931) - # so if we are here, it is because the datasource_list was - # set to include it. Thus, 'maybe'. - return $DS_MAYBE + check_seed_dir "AliYun" meta-data user-data && return ${DS_FOUND} + if dmi_product_name_is "Alibaba Cloud ECS"; then + return $DS_FOUND + fi + return $DS_NOT_FOUND } dscheck_AltCloud() { |