From 6ee8a2c557ccdc8be54bcf8a8762800c10f3ef49 Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Tue, 9 Oct 2018 22:19:20 +0000 Subject: 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 --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'setup.py') 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' ], } ) -- cgit v1.2.3