wbem_request(url,
data,
creds,
headers=[ ] ,
debug=0,
x509=None,
verify_callback=None,
ca_certs=None,
no_verification=False,
timeout=None)
| source code
|
Send an HTTP or HTTPS request to a WBEM server and return the response.
This function uses Python's built-in httplib module.
- Parameters:
url (unicode or UTF-8 encoded str ) - URL of the WBEM server (e.g. "https://10.11.12.13:6988").
For details, see the url parameter of
WBEMConnection.__init__.
data (unicode or UTF-8 encoded str ) - The CIM-XML formatted data to be sent as a request to the WBEM server.
creds - Credentials for authenticating with the WBEM server.
For details, see the creds parameter of
WBEMConnection.__init__.
headers (list of unicode or UTF-8 encoded str ) - List of HTTP header fields to be added to the request, in addition to
the standard header fields such as Content-type,
Content-length, and Authorization.
debug (bool) - Boolean indicating whether to create debug information.
Not currently used.
x509 - Used for HTTPS with certificates.
For details, see the x509 parameter of
WBEMConnection.__init__.
verify_callback - Used for HTTPS with certificates.
For details, see the verify_callback parameter of
WBEMConnection.__init__.
ca_certs - Used for HTTPS with certificates.
For details, see the ca_certs parameter of
WBEMConnection.__init__.
no_verification - Used for HTTPS with certificates.
For details, see the no_verification parameter of
WBEMConnection.__init__.
timeout (number) - Timeout in seconds, for requests sent to the server. If the server did
not respond within the timeout duration, the socket for the connection
will be closed, causing a TimeoutError to be raised.
A value of None means there is no timeout.
A value of 0 means the timeout is very short, and does not really
make any sense.
Note that not all situations can be handled within this timeout, so
for some issues, this method may take longer to raise an exception.
- Returns:
- The CIM-XML formatted response data from the WBEM server, as a
unicode
object.
- Raises:
|