summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorShixin Ruan <matboy_80@aliyun.com>2019-09-18 13:15:25 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-09-18 13:15:25 +0000
commit571f7c36e89f67f4c2d1cacfd8f9269bf864d560 (patch)
treeca88604c5f74aef35455e250dc781a4c1fc62f5b /tools
parent4df0065998961ad21a9b733fb23ae2ebd78b7380 (diff)
downloadvyos-cloud-init-571f7c36e89f67f4c2d1cacfd8f9269bf864d560.tar.gz
vyos-cloud-init-571f7c36e89f67f4c2d1cacfd8f9269bf864d560.zip
Add datasource for ZStack platform.
Zstack platform provides a AWS Ec2 metadata service, and identifies their platform to the guest by setting the 'chassis asset tag' to a string that ends with '.zstack.io'. LP: #1841181
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ds-identify5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/ds-identify b/tools/ds-identify
index 2447d14f..f76f2a6e 100755
--- a/tools/ds-identify
+++ b/tools/ds-identify
@@ -895,6 +895,11 @@ ec2_identify_platform() {
*.brightbox.com) _RET="Brightbox"; return 0;;
esac
+ local asset_tag="${DI_DMI_CHASSIS_ASSET_TAG}"
+ case "$asset_tag" in
+ *.zstack.io) _RET="ZStack"; return 0;;
+ esac
+
# AWS http://docs.aws.amazon.com/AWSEC2/
# latest/UserGuide/identify_ec2_instances.html
local uuid="" hvuuid="${PATH_SYS_HYPERVISOR}/uuid"