diff --git a/zunclient/common/template_format.py b/zunclient/common/template_format.py index 0dfd8d65..9d678c3f 100644 --- a/zunclient/common/template_format.py +++ b/zunclient/common/template_format.py @@ -15,7 +15,6 @@ import json import yaml -from zunclient.i18n import _ yaml_loader = yaml.SafeLoader @@ -56,8 +55,5 @@ def parse(tmpl_str): else: if tpl is None: tpl = {} - # Looking for supported version keys in the loaded template - if not ('CapsuleTemplateFormatVersion' in tpl - or 'capsule_template_version' in tpl): - raise ValueError(_("Template format version not found.")) + return tpl diff --git a/zunclient/experimental/capsules.py b/zunclient/experimental/capsules.py index bae525ed..6dc2c445 100644 --- a/zunclient/experimental/capsules.py +++ b/zunclient/experimental/capsules.py @@ -17,7 +17,7 @@ from zunclient.common import utils from zunclient import exceptions -CREATION_ATTRIBUTES = ['spec'] +CREATION_ATTRIBUTES = ['template'] class Capsule(base.Resource): diff --git a/zunclient/experimental/capsules_shell.py b/zunclient/experimental/capsules_shell.py index 190d155c..1340d397 100644 --- a/zunclient/experimental/capsules_shell.py +++ b/zunclient/experimental/capsules_shell.py @@ -36,8 +36,9 @@ def do_capsule_create(cs, args): if args.template_file: template = template_utils.get_template_contents( args.template_file) - opts['spec'] = template + opts['template'] = template cs.capsules.create(**opts) + print("Request to create capsule has been accepted.") @utils.arg('--all-tenants',