You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.
Tried to see access rights for _DEFAULT vmgroup - Failed with error : Please init configuration with 'vmdkops_admin.py config init' before changing it.
Ideally, user shouldn't have to do config init if the user just wants to see access rights for _DEFAULT tenant.
Steps and their output are as follows:
There is only _DEFAULT vmgroup
[root@sc-rdops-vm04-dhcp-100-33:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py vmgroup ls
Uuid Name Description Default_datastore VM_list
------------------------------------ -------- ------------------------- ----------------- -------
11111111-1111-1111-1111-111111111111 _DEFAULT This is a default vmgroup _VM_DS
Tried to see access rights for _DEFAULT vmgroup - Failed
[root@sc-rdops-vm04-dhcp-100-33:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py vmgroup access ls --name=_DEFAULT
Please init configuration with 'vmdkops_admin.py config init' before changing it.
[root@sc-rdops-vm04-dhcp-100-33:~]
ashahi1
changed the title
Not able to see access rights for _DEFAULT vmgroup without running 'config init'
Not able to see access rights for default vmgroup without running 'config init'
Jun 12, 2017
Given the state of the code I'd suggest that the default vmgroup handling is non-trivial.
Functions that retrieve the access attrs for tenants in auth_api.py(_tenant_access_ls) require that the DB is initialized else they aren't ever called. So, even for the default vmgroup the DB is needed.
Suppose we allow the function to be called (_tenant_access_ls()), the called functions to get tenant privileges pass back a dict which the admin CLI code is unable to use. Admin CLI code expects an object and hence fails with the dict returned from auth_data.py:get_tenant().
I tried out changing these but the changes are unnecessary and involves changing a set of functions that are otherwise working fine at this point. Its easier to instead init the DB and the command is working fine at present to instruct the user to initialize the DB first.
It feels.like we still disagree on user experience and what's needed there and what's nit. Let's agree on it first, offline, and then make decisions about cleaning up the implementation , or leaving it as is with error messages.
Steps:
Please init configuration with 'vmdkops_admin.py config init' before changing it.
Ideally, user shouldn't have to do
config init
if the user just wants to see access rights for _DEFAULT tenant.Steps and their output are as follows:
===============
Logs:
vmdk_ops.txt
The text was updated successfully, but these errors were encountered: