The oslo_vmware.service
Module¶
Common classes that provide access to vSphere services.
-
class
oslo_vmware.service.
LocalFileAdapter
(pool_maxsize=10)¶ Bases:
requests.adapters.HTTPAdapter
Transport adapter for local files.
See http://stackoverflow.com/a/22989322
-
send
(request, stream=False, timeout=None, verify=True, cert=None, proxies=None)¶
-
-
class
oslo_vmware.service.
MemoryCache
¶ Bases:
suds.cache.ObjectCache
-
get
(key)¶ Retrieves the value for a key or None.
-
put
(key, value, time=3600)¶ Sets the value for a key.
-
-
class
oslo_vmware.service.
RequestsTransport
(cacert=None, insecure=True, pool_maxsize=10, connection_timeout=None)¶ Bases:
suds.transport.Transport
-
open
(request)¶
-
send
(request)¶
-
-
class
oslo_vmware.service.
Response
(stream, status=200, headers=None)¶ Bases:
StringIO.StringIO
Response with an input stream as source.
-
get_all
(name, default)¶
-
getheaders
(name)¶
-
info
()¶
-
msg
¶
-
read
(chunk_size, **kwargs)¶
-
release_conn
()¶
-
-
class
oslo_vmware.service.
Service
(wsdl_url=None, soap_url=None, cacert=None, insecure=True, pool_maxsize=10, connection_timeout=None, op_id_prefix='oslo.vmware')¶ Bases:
object
Base class containing common functionality for invoking vSphere services
-
static
build_base_url
(protocol, host, port)¶
Return the vCenter session cookie.
-
service_content
¶
-
static
-
class
oslo_vmware.service.
ServiceMessagePlugin
¶ Bases:
suds.plugin.MessagePlugin
Suds plug-in handling some special cases while calling VI SDK.
-
EMPTY_ELEMENTS
= ['VirtualMachineEmptyProfileSpec']¶
-
add_attribute_for_value
(node)¶ Helper to handle AnyType.
Suds does not handle AnyType properly. But VI SDK requires type attribute to be set when AnyType is used.
Parameters: node – XML value node
-
marshalled
(context)¶ Modifies the envelope document before it is sent.
This method provides the plug-in with the opportunity to prune empty nodes and fix nodes before sending it to the server.
Parameters: context – send context
-
prune
(el)¶
-