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

Moved admin 'ls' and 'set' commands under 'volume' #1055

Merged
merged 1 commit into from
Mar 22, 2017
Merged

Conversation

msterin
Copy link
Contributor

@msterin msterin commented Mar 21, 2017

Rename 'vmdkops_admin ls" to vmdkops_admin volume ls
and rename ‘vmdkops_admin set’ to vmdkops_admin volume set

This is a part of #1043

As I work through multi-ESX tenancy code, some pieces ask for fix or implementation and make it easier for me to proceed. I do not want to bundle them all in a large PR, so I am submitting individual PRs which are useful on their own. This is one of them,

Test: make test-esx locally. Manual validation. CI (in progress)

[root@localhost:~] time  /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py volume ls 
Volume   Datastore      VM-Group  Capacity  Used  Filesystem  Policy          Disk Format  Attached-to  Access      Attach-as               Created By  Created Date              
-------  -------------  --------  --------  ----  ----------  --------------  -----------  -----------  ----------  ----------------------  ----------  ------------------------  
vol      Datastore2     _DEFAULT  100MB     13MB  ext4        N/A             thin         detached     read-write  independent_persistent  umini-1     Fri Nov  4 02:54:43 2016  
vol1     Datastore2     _DEFAULT  100MB     13MB  ext4        N/A             thin         detached     read-write  independent_persistent  umini-1     Fri Nov  4 02:54:57 2016  
Volume1  Datastore2     _DEFAULT  100MB     13MB  ext4        N/A             thin         detached     read-write  independent_persistent  umini-1     Fri Nov  4 02:56:16 2016  
Volume2  Datastore2     _DEFAULT  100MB     13MB  ext4        N/A             thin         detached     read-write  independent_persistent  umini-1     Fri Nov  4 02:56:19 2016  
Volume3  Datastore2     _DEFAULT  100MB     13MB  ext4        N/A             thin         detached     read-write  independent_persistent  umini-1     Fri Nov  4 02:56:22 2016  
Volume4  Datastore2     _DEFAULT  100MB     13MB  ext4        N/A             thin         detached     read-write  independent_persistent  umini-1     Fri Nov  4 02:58:08 2016  
Volume5  Datastore2     _DEFAULT  100MB     13MB  ext4        N/A             thin         detached     read-write  independent_persistent  umini-1     Fri Nov  4 02:58:12 2016  
Volume6  Datastore2     _DEFAULT  100MB     13MB  ext4        N/A             thin         detached     read-write  independent_persistent  umini-1     Fri Nov  4 02:58:14 2016  
Volume7  Datastore2     _DEFAULT  100MB     13MB  ext4        N/A             thin         detached     read-write  independent_persistent  umini-1     Fri Nov  4 02:58:37 2016  
Volume8  Datastore2     _DEFAULT  100MB     13MB  ext4        N/A             thin         detached     read-write  independent_persistent  umini-1     Fri Nov  4 02:59:51 2016  
vo2      vsanDatastore  _DEFAULT  100MB     40MB  ext4        [VSAN default]  thin         detached     read-write  independent_persistent  umini-1     Fri Nov  4 02:52:51 2016  
vol      vsanDatastore  _DEFAULT  100MB     40MB  ext4        [VSAN default]  thin         detached     read-write  independent_persistent  umini-1     Fri Nov  4 02:53:05 2016  

real	0m 1.61s
user	0m 0.96s
sys	0m 0.00s

//CC @pshahzeb @lipingxue

Rename 'vmdkops_admin ls" to ‘vmdkops_admin volume ls’
and rename ‘vmdkops_admin set’ to ‘ vmdkops_admin volume set’

This is a part of #1043

As I work through :multi-ESX tenancy code, some pieces ask for fix or implementation and make it easier for me to proceed. I do not want to bundle them all in a large PR, so I am submitting individual PRs which are useful on their own. This is one of them,

Test: make test-esx locally. Manual validation. CI
@@ -119,24 +119,48 @@ def commands():
defined. For example, `tenant create` has a callback, but if a user runs the program
like: `./vmdkops_admin.py tenant` they will get the following error:
```
usage: vmdkops_admin.py tenant [-h] {rm,create,set,ls,get} ...
usage: vmdkops_admin.py tenant [-h] {rm,create,volume,get} ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments in L109-L122 still use "vmdkops_admin.py tenant...", which need to be replaced with "vmdkops_admin.py vm-group" since we have renamed "vmdkops_admin.py tenant" command to "vmdk_ops_admin.py vm-group".

In L122, the subcommand for "vmdkops_admin.py vm-group" are create, update, rm, ls , vm , access. So L122 should be change to something like this:

usage: vmdkops_admin.py vm-group [-h] {create, update, rm, ls, vm, access} ...

Copy link
Contributor Author

@msterin msterin Mar 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lipingxue - cleaning up 'tenant->vm-group' terminology conversion is out of scope for this PR. The PR is targeting 'ls' and 'set' commands conversion to 'volume ls' and 'volume set'.

I just fixed a couple of locations I noticed with old "tenant" in messages. for common good. If you feel it should not be there I will be happy to rollback these, but I do not plan to put tenant-related cleanup here.

Besides , the lines you've referred to is the data structure explanation for arg parse support, it is not documentation for the actual usage.

Please do comment/suggest on the 'ls' and 'set' commands conversion to 'volume ls' and 'volume set'.

Copy link
Contributor

@pshahzeb pshahzeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pdhamdhere
Copy link
Contributor

@msterin can you do dummy push to restart CI CC/ @shuklanirdesh82

@shuklanirdesh82
Copy link
Contributor

@pdhamdhere's comment #1055 (comment)

let me restart this specific run. (https://ci.vmware.run/vmware/docker-volume-vsphere/1731)

Copy link
Contributor

@lipingxue lipingxue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@msterin
Copy link
Contributor Author

msterin commented Mar 22, 2017

tests passed but the last (concurrent) timed out. Since this PR impacts only admin CLI, merging.

@msterin msterin merged commit 0d8ce20 into master Mar 22, 2017
@msterin msterin deleted the admin_vol.msterin branch March 22, 2017 04:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants