This page documents the psphere API.
The main module for accessing a vSphere server.
Module author: Jonathan Kinred <jonathan.kinred@gmail.com>
A client for communicating with a VirtualCenter/ESX/ESXi server
>>> from psphere.client import Client
>>> Client = Client(server="esx.foo.com", username="me", password="pass")
Parameters: |
|
---|
Methods
add_prefix | |
clone | |
create | |
dict | |
find_entity_view | |
find_entity_views | |
get_search_filter_spec | |
get_view | |
get_views | |
invoke | |
invoke_task | |
items | |
last_received | |
last_sent | |
login | |
logout | |
metadata | |
set_options |
Create a SOAP object of the requested type.
>>> client.create('VirtualE1000')
Parameters: |
|
---|
Find a ManagedEntity of the requested type.
Traverses the MOB looking for an entity matching the filter.
Parameters: |
|
---|---|
Returns: | If an entity is found, a ManagedEntity matching the search. |
Return type: | ManagedEntity |
Find all ManagedEntity’s of the requested type.
Parameters: |
|
---|---|
Returns: | A list of ManagedEntity’s |
Return type: | list |
Build a PropertyFilterSpec capable of full inventory traversal.
By specifying all valid traversal specs we are creating a PFS that can recursively select any object under the given entity.
Parameters: |
|
---|---|
Returns: | A PropertyFilterSpec, suitable for recursively searching under the given ManagedEntity. |
Return type: | PropertyFilterSpec |
Get a view of a vSphere managed object.
Parameters: |
|
---|---|
Returns: | A view representing the ManagedObjectReference. |
Return type: | ManagedObject |
Get a list of local view’s for multiple managed objects.
Parameters: |
|
---|---|
Returns: | A list of local instances representing the server-side managed objects. |
Return type: | list of ManagedObject’s |
Invoke a method on the server.
>>> client.invoke('CurrentTime', client.si)
Parameters: |
|
---|
Execute a *_Task method and wait for it to complete.
Parameters: |
|
---|
Login to a vSphere server.
>>> client.login(username='Administrator', password='strongpass')
Parameters: |
|
---|