-
Notifications
You must be signed in to change notification settings - Fork 311
SSO samples are failing with 6.0 vCenter server. com.vmware.vapi.vcen… #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Perhaps we should perform some other API calls instead. |
Hi Tianhao, Added create_category and create_tag methods in both the files. I thought about adding new file in samples.vsphere.common as tagging_helper. Please let me know your thoughts. Thanks |
Tested samples with vSphere 6.0 & 6.5 with Python 2.7.12. Samples are working fine |
|
||
datacenter_svc = Datacenter(stub_config) | ||
pprint(datacenter_svc.list()) | ||
self.tag_id = self.create_tag('TestTag', 'TestTagDesc', self.category_id) |
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.
We just need to make a most basic API call to show we login successfully. So I think we can skip the tag creation step and just create a category and then delete it.
I think it's ok to have the create category method here. No need to create a helper method in common package as we are not using it that often.
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.
Modified sample, to retain only TagCategory creation and deletion. Deleted Tag creation API calls.
Squashed all commits and rebased.
Please review
@@ -47,6 +46,10 @@ def __init__(self): | |||
self.session = None | |||
self.session_id = None | |||
self.skip_verification = False | |||
self.tag_svc = None |
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.
self.tag_svc and tag_id are not needed.
…ter_client.DataCenter module is not present in 6.0. Removed Datacenter listing after connection is successful Signed-off-by: PavanBidkar <[email protected]> SSO samples are failing with 6.0 vCenter server. com.vmware.vapi.vcenter_client.DataCenter module is not present in 6.0. Removed Datacenter listing after connection is successful Added Create & Delete for Tag and Tag Category to verify connection is successful. Signed-off-by: PavanBidkar <[email protected]> SSO samples are failing with 6.0 vCenter server. com.vmware.vapi.vcenter_client.DataCenter module is not present in 6.0. Removed Datacenter listing after connection is successful Added Create & Delete Tag Category to verify connection is successful. Removed Tag Creation and Deletion to have basic API call instead of multiple calls. Signed-off-by: PavanBidkar <[email protected]> SSO samples are failing with 6.0 vCenter server. com.vmware.vapi.vcenter_client.DataCenter module is not present in 6.0. Removed Datacenter listing after connection is successful Added Create & Delete Tag Category to verify connection is successful. Removed Tag Creation and Deletion to have basic API call instead of multiple calls. Signed-off-by: PavanBidkar <[email protected]>
Deleted unused variables. Sorry for too many commits. |
SSO samples are failing with 6.0 vCenter server. com.vmware.vapi.vcenter_client.DataCenter module is not present in 6.0. Removed Datacenter listing after connection is successful
Signed-off-by: PavanBidkar [email protected]