Files
oslo.vmware/doc/source/user/usage.rst
Akihiro Motoki a1598502bd rearrange existing documentation to fit the new standard layout
For more detail, see the doc migration spec:
http://specs.openstack.org/openstack/docs-specs/specs/pike/os-manuals-migration.html
There is also the recent status of the work posted in the dev ML:
http://lists.openstack.org/pipermail/openstack-dev/2017-July/119221.html

Change-Id: I1e728fc0bc671150d826747010eb980176f0cc13
2017-07-11 14:11:12 +00:00

916 B

Usage

Example usage of getting a handle to a vSphere session and retrieving all the ESX hosts in a server:

from oslo_vmware import api
from oslo_vmware import vim_util

# Get a handle to a vSphere API session
session = api.VMwareAPISession(
    '10.1.2.3',      # vSphere host endpoint
    'administrator', # vSphere username
    'password',      # vSphere password
    10,              # Number of retries for connection failures in tasks
    0.1              # Poll interval for async tasks (in seconds)
)

# Example call to get all the managed objects of type "HostSystem"
# on the server.
result = session.invoke_api(
    vim_util,                           # Handle to VIM utility module
    'get_objects',                      # API method name to invoke
    session.vim, 'HostSystem', 100)     # Params to API method (*args)