def Args(parser): updated = parser.add_argument_group( 'Updated fields', 'The following flags determine the fields need to be updated. ' 'You can update a role by specifying the following flags, or ' 'you can update a role from a Yaml file by specifying the file flag.' ) updated.add_argument('--title', help='The title of the role you want to update.') updated.add_argument( '--description', help='The description of the role you want to update.') updated.add_argument('--stage', help='The state of the role you want to update.') updated.add_argument( '--permissions', help='The permissions of the role you want to set. ' 'Use commas to separate them.') updated.add_argument( '--add-permissions', help='The permissions you want to add to the role. ' 'Use commas to separate them.') updated.add_argument( '--remove-permissions', help='The permissions you want to remove from the ' 'role. Use commas to separate them.') parser.add_argument( '--file', help='The Yaml file you want to use to update a role. ' 'Can not be specified with other flags except role-id.') flags.GetOrgFlag('update').AddToParser(parser) flags.GetRoleFlag('update').AddToParser(parser)
def Args(parser): parser.add_argument( '--title', help='The title of the role you want to create.') parser.add_argument( '--description', help='The description of the role you want to create.') parser.add_argument( '--stage', help='The state of the role you want to create.') parser.add_argument( '--permissions', help='The permissions of the role you want to create. ' 'Use commas to separate them.') parser.add_argument( '--file', help='The Yaml file you want to use to create a role. ' 'Can not be specified with other flags except role-id.') flags.GetOrgFlag('create').AddToParser(parser) flags.GetRoleFlag('create').AddToParser(parser)
def Args(parser): flags.GetOrgFlag('describe').AddToParser(parser) flags.GetRoleFlag('describe').AddToParser(parser)
def Args(parser): flags.AddParentFlags(parser, 'describe', required=False) flags.GetRoleFlag('describe').AddToParser(parser)
def Args(parser): flags.GetOrgFlag('undelete').AddToParser(parser) flags.GetRoleFlag('undelete').AddToParser(parser)