Merge "Add a verification about the provider_id of plan"

This commit is contained in:
Jenkins 2017-05-18 03:40:34 +00:00 committed by Gerrit Code Review
commit e55840dd82
1 changed files with 3 additions and 0 deletions

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)