Using psphere for vsphere 6.0

49 views
Skip to first unread message

Cam Sparr

unread,
Nov 5, 2014, 2:29:03 PM11/5/14
to psp...@googlegroups.com
Hello all,

For a beta project, I'm trying to use psphere to make some new API calls that are available in vsphere and ESX 6.

It appears that psphere is not dynamically loading the WSDL when it connects to a new vsphere server. I know this because our vsphere 6 server has some new APIs available in the WSDL and UI, but when I connect via psphere, I do not see those new APIs.

I was wondering if anyone could point me in the right direction on how I might get psphere to dynamically load the WSDL, so that I can utilize beta APIs.

thanks a bunch!
Cam

Cam Sparr

unread,
Nov 5, 2014, 5:31:20 PM11/5/14
to psp...@googlegroups.com
Found the wsdl_location arg, duh, but this fails for something I don't understand, anyone have some pointers for a patch so that it can vCenter 6 ?


In [3]: client = Client('172.26.82.7', username='admini...@vsphere.local', password='SolidF!r3', wsdl_location='remote')
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-3-29c59e32931b> in <module>()
----> 1 client = Client('172.26.82.7', username='admini...@vsphere.local', password='SolidF!r3', wsdl_location='remote')

/usr/local/lib/python2.7/dist-packages/psphere/client.pyc in __init__(self, server, username, password, wsdl_location, timeout, plugins)
    114         self.si = ServiceInstance(mo_ref, self)
    115         try:
--> 116             self.sc = self.si.RetrieveServiceContent()
    117         except URLError, e:
    118             logger.critical("Failed to connect to %s" % self.server)

/usr/local/lib/python2.7/dist-packages/psphere/__init__.pyc in func(**kwargs)
    353         def func(**kwargs):
    354             result = self._client.invoke(name, _this=self._mo_ref,
--> 355                                         **kwargs)
    356             logger.debug("Invoke returned %s", result)
    357             return result

/usr/local/lib/python2.7/dist-packages/psphere/client.pyc in invoke(self, method, _this, **kwargs)
    186                 new_result.append(self._unmarshal(item))
    187         else:
--> 188             new_result = self._unmarshal(result)
    189 
    190         logger.debug("Finished in invoke.")

/usr/local/lib/python2.7/dist-packages/psphere/client.pyc in _unmarshal(self, obj)
    266                 logger.debug("Converting nested MOR to psphere class:")
    267                 logger.debug(sub_obj[1])
--> 268                 kls = classmapper(sub_obj[1]._type)
    269                 logger.debug("Setting %s.%s to %s",
    270                              new_object.__class__.__name__,

/usr/local/lib/python2.7/dist-packages/psphere/managedobjects.pyc in classmapper(name)
   1498 ))
   1499 def classmapper(name):
-> 1500     return classmap[name]

KeyError: ServiceManager


--
You received this message because you are subscribed to the Google Groups "psphere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psphere+u...@googlegroups.com.
To post to this group, send email to psp...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/psphere/1cec6055-13ef-4e38-9bf6-ed33d53b2150%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Cameron Sparr
Automation Engineer, SolidFire Inc.

Michael Rice

unread,
Nov 5, 2014, 5:33:59 PM11/5/14
to psp...@googlegroups.com

You signed an NDA to get access to that beta software. You should read the terms of it. No one can legally help you.

-mike

Cam Sparr

unread,
Nov 5, 2014, 5:38:23 PM11/5/14
to psp...@googlegroups.com
Okay then, how about I phrase my question more generally....

Anyone have pointers on the following traceback? I would like to know where I might find information on adding the ServiceManager class to the managedobjects.py file in psphere.

ServiceManager is a type that was added in vsphere 5.1, BTW

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages