Seeing an issue with managedobject and client

16 views
Skip to first unread message

Suresh Palanisamy

unread,
Aug 10, 2016, 8:43:17 PM8/10/16
to psphere
Hey Guys,
i am new to Python and psphere. Seeing an issue with managedobject and client. Could anyone help me?
python version is 2.6 that i am running

>>> import psphere
>>> from psphere.client import Client
>>> from psphere.managedobjects import HostSystem
>>> client = Client("10.193.218.222", "root", "insieme")
>>> host_system = HostSystem.get(client, name="webserver")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/psphere/managedobjects.py", line 135, in get
    properties=properties)
  File "/usr/lib/python2.6/site-packages/psphere/client.py", line 619, in find_entity_view
    raise ObjectNotFoundError("No matching objects for filter")
psphere.errors.ObjectNotFoundError: No matching objects for filter
>>>

Thanks
sp

Leo Godin

unread,
Oct 3, 2016, 4:57:20 PM10/3/16
to psphere
I believe you would use host_system = HostSystem(client), not HostSystem.get(client)
Reply all
Reply to author
Forward
0 new messages