summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-06-22 15:24:39 +0000
committerGerrit Code Review <review@openstack.org>2018-06-22 15:24:39 +0000
commit003ac57d9af74aa4658a7bf6cc6b6b3bafa58c11 (patch)
tree6099dd90d33d15ac3e24422d091181212709fd8e
parentdb4fd9a5f07e560ddc6814661067949294bd3608 (diff)
parentd422fb061f9077b35188fde3a6d1ac4df1b9d83b (diff)
downloadpython-novaclient-003ac57d9af74aa4658a7bf6cc6b6b3bafa58c11.tar.gz
Merge "Fix trusted-image-certificate-id help text"
-rw-r--r--doc/source/cli/nova.rst2
-rw-r--r--novaclient/v2/shell.py14
2 files changed, 11 insertions, 5 deletions
diff --git a/doc/source/cli/nova.rst b/doc/source/cli/nova.rst
index 70977b33..cd6d60ee 100644
--- a/doc/source/cli/nova.rst
+++ b/doc/source/cli/nova.rst
@@ -1011,7 +1011,7 @@ nova boot
[--config-drive <value>] [--poll] [--admin-pass <value>]
[--access-ip-v4 <value>] [--access-ip-v6 <value>]
[--description <description>]
- [--trusted-image-certificate-id]
+ [--trusted-image-certificate-id <trusted-image-certificate-id>]
<name>
Boot a new server.
diff --git a/novaclient/v2/shell.py b/novaclient/v2/shell.py
index c1c04435..99cc2f5a 100644
--- a/novaclient/v2/shell.py
+++ b/novaclient/v2/shell.py
@@ -515,8 +515,13 @@ def _boot(cs, args):
boot_kwargs['trusted_image_certificates'] = (
args.trusted_image_certificates)
elif utils.env('OS_TRUSTED_IMAGE_CERTIFICATE_IDS'):
- boot_kwargs["trusted_image_certificates"] = utils.env(
- 'OS_TRUSTED_IMAGE_CERTIFICATE_IDS').split(',')
+ if cs.api_version >= api_versions.APIVersion('2.63'):
+ boot_kwargs["trusted_image_certificates"] = utils.env(
+ 'OS_TRUSTED_IMAGE_CERTIFICATE_IDS').split(',')
+ else:
+ raise exceptions.UnsupportedAttribute(
+ "OS_TRUSTED_IMAGE_CERTIFICATE_IDS",
+ "2.63")
return boot_args, boot_kwargs
@@ -1924,8 +1929,9 @@ def do_rebuild(cs, args):
# confusion with unsetting the value.
kwargs['trusted_image_certificates'] = trusted_image_certificates
elif utils.env('OS_TRUSTED_IMAGE_CERTIFICATE_IDS'):
- raise exceptions.UnsupportedAttribute("trusted_image_certificates",
- "2.63")
+ raise exceptions.UnsupportedAttribute(
+ "OS_TRUSTED_IMAGE_CERTIFICATE_IDS",
+ "2.63")
server = server.rebuild(image, _password, **kwargs)
_print_server(cs, args, server)