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

Quick fix for broken tenant commands in admin CLI #669

Merged
merged 1 commit into from
Nov 1, 2016

Conversation

msterin
Copy link
Contributor

@msterin msterin commented Oct 31, 2016

During the last merge (threading support in vmdk_ops) we accidentally broke tenant commands in admin CLI. No, they did not have unit test coverage - and this will be addressed in a separate PR (Issue #668 - The same PR will also take care of re-using the get_auth_mgt() function from auth.py)

This PR applies a quick bandaid by defining the missing function and moving it (and related _auth_mgr) global to admin CLI code.

// @shaominchen @lipingxue

Tested: manually. Was throwing exception before the fix. Now does the following:

[root@localhost:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py tenant create --name oneTenant
tenant create succeeded
[root@localhost:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py tenant ls
Uuid                                  Name       Description  Default_datastore  VM_list  
------------------------------------  ---------  -----------  -----------------  -------  
2955e3ed-fec5-4d49-b878-ab0eb493704b  oneTenant               default_ds                  
[root@localhost:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py tenant rm oneTenant
tenant rm succeeded
[root@localhost:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py tenant ls
Uuid  Name  Description  Default_datastore  VM_list  
----  ----  -----------  -----------------  -------  

[root@localhost:~]

Copy link
Contributor

@pdhamdhere pdhamdhere left a comment

Choose a reason for hiding this comment

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

Fine as workaround. Looks like we will have to patch or do 0.81. CC/ @kerneltime

@andrewjstone
Copy link
Contributor

LGTM

@msterin msterin merged commit 5b12ee8 into master Nov 1, 2016
@msterin msterin deleted the fix-master.msterin branch November 1, 2016 06:27
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants