Forbid users to create shares with the name "None"
This patch will prevent ambiguity between manila share creation with name = 'None' and without name argument. Closes-Bug: #1909477 Change-Id: Ie21cad4754f32afdaf2c3f69202acfd7aa10f57c
This commit is contained in:
parent
68052cd26b
commit
fc5b6c5985
@ -884,6 +884,11 @@ def do_create(cs, args):
|
||||
share_network = None
|
||||
if 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,
|
||||
args.name, args.description,
|
||||
metadata=share_metadata,
|
||||
|
Loading…
x
Reference in New Issue
Block a user