Fix problem of RBAC command arguments

Add default value '*' to argument 'target_tenant'

Change-Id: I61c35ee4def53bc141a9ce562c01fe7422663a0e
Closes-Bug: #1596750
This commit is contained in:
wengjiangang
2016-06-28 03:49:34 -04:00
committed by JianGang Weng
parent 9896baeeef
commit 0741d34bfe
3 changed files with 9 additions and 1 deletions

View File

@@ -69,6 +69,7 @@ class CreateRBACPolicy(neutronV20.CreateCommand):
help=_('Type of the object that RBAC policy affects.'))
parser.add_argument(
'--target-tenant',
default='*',
help=_('ID of the tenant to which the RBAC '
'policy will be enforced.'))
parser.add_argument(

View File

@@ -44,7 +44,7 @@ class CLITestV20RBACBaseJSON(test_cli20.CLITestV20Base):
'--action', 'access_as_shared']
position_names = ['object_id', 'object_type',
'target_tenant', 'action']
position_values = [name, self.object_type_val, None,
position_values = [name, self.object_type_val, '*',
'access_as_shared']
self._test_create_resource(resource, cmd, name, myid, args,
position_names, position_values)

View File

@@ -0,0 +1,7 @@
---
fixes:
- Fix 'bug 1596750 <https://bugs.launchpad.net/neutron/+bug/1596750>'
that using 'rbac-create' without specifying 'target-tenant' will
return 'Request Failed internal server error while processing your
request'.
Update the default value of the argument '--target-tenant' to '*'