ich versuche grade die VMware API von hier https://bitbucket.org/jkinred/psphere2/ zum Laufen zu bringen.
Nach einer kleineren Anpassung funktioniert das example/connect.py script bis hier:
Was hat die untere Bemerkung zu bedeuten? In dieser Zeile sind nur 3 Argumente vergeben:$ usage: connect.py --url https://<host>/sdk --username <username> --password <password>
$ examples/connect.py --url https://localhost/sdk --username testuser --password *********
Traceback (most recent call last):
File "examples/connect.py", line 54, in ?
main()
File "examples/connect.py", line 51, in main
c.connect()
File "examples/connect.py", line 42, in connect
self.login()
File "/auto/user1/doirs70/Q14/eexthie/office/VMware/API/psphere2/psphere/scripting.py", line 58, in login
self.vim = Vim(self.options.url)
File "/auto/user1/doirs70/Q14/eexthie/office/VMware/API/psphere2/psphere/server.py", line 33, in __init__
self.si = ServiceInstance(si_mo_ref, self)
File "/auto/user1/doirs70/Q14/eexthie/office/VMware/API/psphere2/psphere/managedobjects.py", line 903, in __init__
super(ServiceInstance, self).__init__(self, mo_ref, server)
TypeError: __init__() takes exactly 3 arguments (4 given)
Code: Alles auswählen
class ServiceInstance(ManagedObject):
def __init__(self, mo_ref, server):
"""hier kommt Zeile 903 """
super(ServiceInstance, self).__init__(self, mo_ref, server)
self.capability = None
self.content = None
self.serverClock = None
def __getattr__(self, name):
def func(**kwargs):
result = self.server.invoke(name, self.mo_ref, **kwargs)
return result
return func