Skip to content

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

Merged
merged 1 commit into from
May 5, 2017
Merged

Conversation

pgbidkar
Copy link
Contributor

@pgbidkar pgbidkar commented May 3, 2017

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]

@pgbidkar pgbidkar requested review from strefethen and alanrenouf May 3, 2017 08:32
@tianhao64
Copy link
Contributor

Perhaps we should perform some other API calls instead.
Maybe create and then delete a tag category?

@pgbidkar pgbidkar requested a review from tianhao64 May 4, 2017 09:02
@pgbidkar
Copy link
Contributor Author

pgbidkar commented May 4, 2017

Hi Tianhao,
Yes, I agree. I think tagging is the only APIs can be called and verified in 6.0.
I have modified the samples. Please review.

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.
Also tried exporting taggingworkflow sample and reuse methods, but methods require changes.

Thanks

@pgbidkar
Copy link
Contributor Author

pgbidkar commented May 4, 2017

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)
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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]>
@pgbidkar
Copy link
Contributor Author

pgbidkar commented May 5, 2017

Deleted unused variables. Sorry for too many commits.
Please review

@tianhao64 tianhao64 merged commit 8fd5154 into vmware:master May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants