diff options
author | Tomas Sedovic <tomas@sedovic.cz> | 2012-07-11 12:06:00 +0200 |
---|---|---|
committer | Tomas Sedovic <tomas@sedovic.cz> | 2012-07-11 12:06:00 +0200 |
commit | 72ce5af925e8dc3aa4dc9faebab7182113614dda (patch) | |
tree | 9f79a7a21402059b62d3b70e90d021025e83c9fc /bin | |
parent | 7b51f55e7eb8137cc5bb09617b024c8815f99e7c (diff) | |
download | heat-cfntools-72ce5af925e8dc3aa4dc9faebab7182113614dda.tar.gz |
Check for Glance creds before building the jeos
Fixes #7
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/heat-jeos | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/heat-jeos b/bin/heat-jeos index fdfa898..32c3ca9 100755 --- a/bin/heat-jeos +++ b/bin/heat-jeos @@ -106,6 +106,17 @@ def command_create(options, arguments): logging.error("This command must be run as root") sys.exit(1) + if options.register_with_glance: + client = get_glance_client(options) + try: + client.get_image('test') + except exception.NotFound: + pass + except Exception: + print("Cannot connect to Glance. Please verify that it's running " + "and check your credentials.") + sys.exit(1) + instance_type = 'gold' if options.gold else 'cfntools' oz_guest = get_oz_guest(tdl_path) |