From 4a60af54957634920e84a928aa22b4fc9a6dfd11 Mon Sep 17 00:00:00 2001 From: Junjie Wang Date: Fri, 21 Apr 2017 20:06:09 +0800 Subject: 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 --- tools/ds-identify | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tools') 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() { -- cgit v1.2.3