-
Notifications
You must be signed in to change notification settings - Fork 88
Add "Tenant" column in "vmdkops_admin ls" output and fix "vmdkops_admin set" command #1014
Conversation
Test for add column "Tenant" for I have done the following test manually: Step1:
Step2: remove "tenant1" without removing volumes, "vol1" which belongs to "tenant1" still show up in the output, but column "Tenant" for that volume shows as "N/A" since "tenant1" has been removed.
|
Test for add argument "--tenant" for
Step2: run
Step3: run
|
esx_service/cli/vmdkops_admin.py
Outdated
@@ -527,14 +531,18 @@ def ls_dash_c(columns, tenant_reg): | |||
|
|||
def all_ls_headers(): | |||
""" Return a list of all header for ls -l """ | |||
return ['Volume', 'Datastore', 'Created By VM', 'Created', | |||
return ['Tenant', 'Volume', 'Datastore', 'Created By VM', 'Created', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would vote for displaying Volume Name as the first column ... can you please accommodate the change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good fix. LGTM pending changing column order
- I agree with @shuklanirdesh82 that volume should be first
- I think "(name/uuid)" in the "Atatched to VM" column header is not needed, it just makes table wider
- I suggest having the following columns order:
Volume
Datastore
VM-Group
Capacity
Used
Filesystem
Attached-to
Access
Attach-as
Created By
Created Date
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with Mark and Nirdesh's comments. Few more nits below.
esx_service/cli/vmdkops_admin.py
Outdated
@@ -415,6 +415,10 @@ def commands(): | |||
'help': 'Volume to set options for, specified as "volume@datastore".', | |||
'required': True | |||
}, | |||
'--tenant': { | |||
'help': 'Name of the tenant which volume to set belongs to.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Suggest to rephrase a little bit: "Name of the tenant the volume belongs to"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
esx_service/utils/auth.py
Outdated
@@ -37,6 +37,7 @@ | |||
DEFAULT_TENANT_UUID = '11111111-1111-1111-1111-111111111111' | |||
DEFAULT_DS = '_DEFAULT' | |||
DEFAULT_DS_URL = DEFAULT_DS + "_URL" | |||
ORPHAN_TENANT = "_ORPHAN" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's define this in auth_data_const.py instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
After change the order/name of columns, the output looks like:
|
No more comments and looks good but - why the CI is failing ? Also , need conflict resolution. |
f242f22
to
c12f94d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
esx_service/cli/vmdkops_admin.py
Outdated
@@ -419,7 +419,7 @@ def commands(): | |||
'required': True | |||
}, | |||
'--tenant': { | |||
'help': 'Name of the tenant which volume to set belongs to.', | |||
'help': 'Name of the tenant the volume belongs to.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure to resolve the conflicts with the other change which renames tenant to vm-group.
This PR includes:
vmdkops_admin ls
command (fixes [Tenant] Add tenant column to admin ls commands #964)vmdkops_admin set
command which take one more argument "--tenant". (fixes Unable to modify access attribute for volume from admin-cli #998)