Compare commits

...

2 Commits

Author SHA1 Message Date
Jenkins
e55840dd82 Merge "Add a verification about the provider_id of plan" 2017-05-18 03:40:34 +00:00
chenying
74f828c876 Add a verification about the provider_id of plan
Change-Id: Ideb96b4d96fec673ffc0815d1f9840911c8afe70
Closes-Bug: #1686765
2017-05-16 22:20:08 +08:00

View File

@@ -142,6 +142,9 @@ def do_plan_list(cs, args):
help='The description of a plan.')
def do_plan_create(cs, args):
"""Creates a plan."""
if not uuidutils.is_uuid_like(args.provider_id):
raise exceptions.CommandError(
"Invalid provider id provided.")
plan_resources = _extract_resources(args)
_check_resources(cs, plan_resources)
plan_parameters = _extract_parameters(args)