Merge "Forbid users to create shares with the name "None""
This commit is contained in:
commit
f56e451d51
@ -884,6 +884,11 @@ def do_create(cs, args):
|
|||||||
share_network = None
|
share_network = None
|
||||||
if args.share_network:
|
if args.share_network:
|
||||||
share_network = _find_share_network(cs, args.share_network)
|
share_network = _find_share_network(cs, args.share_network)
|
||||||
|
|
||||||
|
if args.name == 'None':
|
||||||
|
raise exceptions.CommandError(
|
||||||
|
"Share name cannot be with the value 'None'")
|
||||||
|
|
||||||
share = cs.shares.create(args.share_protocol, args.size, args.snapshot_id,
|
share = cs.shares.create(args.share_protocol, args.size, args.snapshot_id,
|
||||||
args.name, args.description,
|
args.name, args.description,
|
||||||
metadata=share_metadata,
|
metadata=share_metadata,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user