-
Notifications
You must be signed in to change notification settings - Fork 768
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
Querying datastore cluster fails #24
Comments
I'm not sure how client.serviceInstance.find_datacenter works... but I'm suspecting it does some magic at the moment. I will look into this further. |
client.serviceInstance.find_datacenter returns the first datacenter from datacenters folder. I use this when I am sure there is only one datacenter. |
I think I figured out the issue. In your connect call, please specify the latest version of your vcenter. Looking at the rbvmomi code, looks like it is 5.5 version. So in your connect call pass namespace='vim25/5.5'. This should unblock you. I will fix the bug in the connect code to use latest version soon. |
How is this coming? |
Positive, this did the trick. >>> si = connect.Connect('***',443,'root','***')
>>> datacenter = si.content.rootFolder.childEntity[0]
>>> datacenter.datastoreFolder.childEntity
(ManagedObject) [
'vim.Folder:group-p42',
'vim.Datastore:datastore-35',
'vim.Datastore:datastore-34',
'vim.Datastore:datastore-36',
'vim.Datastore:datastore-32'
] WITH FIX: >>> si = connect.Connect('***',443,'root','***',namespace='vim25/5.5')
>>> datacenter = si.content.rootFolder.childEntity[0]
>>> datacenter.datastoreFolder.childEntity
(ManagedObject) [
'vim.StoragePod:group-p42',
'vim.Datastore:datastore-35',
'vim.Datastore:datastore-34',
'vim.Datastore:datastore-36',
'vim.Datastore:datastore-32'
] |
Hi
I am trying to get the details of the datastore cluster from vcenter. It works perfectly with RbVMomi but somehow PyVmomi does not properly recognize the StoragePod object.
In Ruby example, in datastoreFolder there is StoragePod("group-p52") which is an instance of StoragePod.
In python there is vim.Folder:group-p52 which is an instance of vim.Folder and does not respond to podStorageDrsEntry.
Any ideas?
Equivalent code samples:
RUBY:
PYTHON:
The text was updated successfully, but these errors were encountered: