summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorChad Smith <chad.smith@canonical.com>2018-10-09 22:19:20 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2018-10-09 22:19:20 +0000
commit6ee8a2c557ccdc8be54bcf8a8762800c10f3ef49 (patch)
tree7005f320fd82455b9c56bc3e9672fb096a5169e0 /setup.py
parentf0bc02d7e221c9aa5982b267739481420c761ead (diff)
downloadcloud-init-git-6ee8a2c557ccdc8be54bcf8a8762800c10f3ef49.tar.gz
tools: Add cloud-id command line utility
Add a quick cloud lookup utility in order to more easily determine the cloud on which an instance is running. The utility parses standardized attributes from /run/cloud-init/instance-data.json to print the canonical cloud-id for the instance. It uses known region maps if necessary to determine on which specific cloud the instance is running. Examples: aws, aws-gov, aws-china, rackspace, azure-china, lxd, openstack, unknown
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 5ed8eae2..ea37efc3 100755
--- a/setup.py
+++ b/setup.py
@@ -282,7 +282,8 @@ setuptools.setup(
cmdclass=cmdclass,
entry_points={
'console_scripts': [
- 'cloud-init = cloudinit.cmd.main:main'
+ 'cloud-init = cloudinit.cmd.main:main',
+ 'cloud-id = cloudinit.cmd.cloud_id:main'
],
}
)