oslo_vmware.service
Module¶Common classes that provide access to vSphere services.
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)¶Sends request for a local file.
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.
oslo_vmware.service.
RequestsTransport
(cacert=None, insecure=True, pool_maxsize=10, connection_timeout=None)¶Bases: suds.transport.Transport
open
(request)¶Open the URL in the specified request.
@param request: A transport request. @type request: L{Request} @return: An input stream. @rtype: stream @raise TransportError: On all transport errors.
send
(request)¶@param request: A transport request. @type request: L{Request} @return: The reply @rtype: L{Reply} @raise TransportError: On all transport errors.
oslo_vmware.service.
Response
(stream, status=200, headers=None)¶Bases: _io.BytesIO
Response with an input stream as source.
get_all
(name, default)¶getheaders
(name)¶info
()¶msg
¶read
(chunk_size, **kwargs)¶Read at most size bytes, returned as a bytes object.
If the size argument is negative, read until EOF is reached. Return an empty bytes object at EOF.
release_conn
()¶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
build_base_url
(protocol, host, port)¶Return the vCenter session cookie.
service_content
¶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)¶oslo_vmware.service.
SudsLogFilter
(name='')¶Bases: logging.Filter
Filter to mask/truncate vCenter credentials in suds logs.
filter
(record)¶Determine if the specified record is to be logged.
Is the specified record to be logged? Returns 0 for no, nonzero for yes. If deemed appropriate, the record may be modified in-place.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.