Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Commit

Permalink
Fixes to adress @govint comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Sterin committed Oct 16, 2016
1 parent c7845ef commit a6ca62f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/misc/vmdkops-admin-cli-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ All output from the admin cli defaults to human readable formats. It will be mad
The majority of testing will be automated. We can ensure that parsing calls the right callbacks with
the right information by generating representative input and mocking the callbacks to assert that
the right information is parsed and delivered correctly. Additionally, and specifically for testing
access control, we can create access controk definition (tenants and privileges)
access control, we can create access control definition (tenants and privileges)
and then test that they act as expected by invoking vmdk_ops commmands on behalf of a fake VM.
Unit
tests for stateless logic can be fed mock input representing data from sidecar and the filesystem.
Expand Down
16 changes: 8 additions & 8 deletions esx_service/cli/vmdkops_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def commands():
one level of subcommands in this specification. Each subcommand can contain the same
attributes as top level commands: (func, help, args, cmds). These attributes have
identical usage to the top-level keys, except they only apply when the subcommand is
part of the command. For example the `--matches-vm` argument only applies to `tenant
part of the command. For example the `--vm-list` argument only applies to `tenant
create` or `tenant set` commands. It will be invalid in any other context.
Note that the last subcommand in a chain is the one where the callback function is
Expand All @@ -123,7 +123,7 @@ def commands():
'metavar': 'Col1,Col2,...'
},
'--tenant' : {
'help': 'Displays only VMs for a given tenant'
'help': 'Displays VMs for a given tenant'
}
}
},
Expand Down Expand Up @@ -207,7 +207,7 @@ def commands():
'help': 'The name of the tenant',
},
'--remove-volumes': {
'help': 'BE CAREFUL - Removes this tenant volumes when removing a tenant'
'help': 'BE CAREFUL: Removes this tenant volumes when removing a tenant'
}
}
},
Expand Down Expand Up @@ -310,12 +310,12 @@ def commands():
'--add-rights': {
'help': 'Datastore access Permissions granted',
'choices': ['create', 'delete', 'mount', 'all'],
'metavar': 'create,delete,mount'
'metavar': 'create,delete,mount,all'
},
'--rm-rights': {
'help': 'Datastore access Permissions granted',
'help': 'Datastore access Permissions removed',
'choices': ['create', 'delete', 'mount', 'all'],
'metavar': 'create,delete,mount'
'metavar': 'create,delete,mount,all'
},
'--volume-maxsize': {
'help': 'Maximum size of the volume that can be created',
Expand Down Expand Up @@ -429,7 +429,7 @@ def make_list_of_values(allowed):
"""
Take a list of allowed values for an option and return a function that can be
used to typecheck a string of given values and ensure they match the allowed
values. This is required to support options that take comma seperated lists
values. This is required to support options that take comma separated lists
such as --rights in 'tenant set --rights=create,delete,mount'
"""

Expand Down Expand Up @@ -459,7 +459,7 @@ def ls(args):
header = all_ls_headers()
rows = generate_ls_rows()
if args.tenant:
print("TBD: print only VMS for the tenant ", args.tenant) # TODO
print("TBD: print volumes for the given tenant ", args.tenant) # TODO
print(cli_table.create(header, rows))


Expand Down

0 comments on commit a6ca62f

Please # to comment.