Home | Trees | Indices | Help |
|
---|
|
object --+ | WBEMConnection
A client's connection to a WBEM server. This is the main class of the PyWBEM client.
The connection object knows a default CIM namespace, which is used when no namespace is specified on subsequent CIM operations (that support specifying namespaces). Thus, the connection object can be used as a connection to multiple CIM namespaces on a WBEM server (when the namespace is specified on subsequent operations), or as a connection to only the default namespace (this allows omitting the namespace on subsequent operations).
As usual in HTTP, there is no persistent TCP connection; the connectedness provided by this class is only conceptual. That is, the creation of the connection object does not cause any interaction with the WBEM server, and each subsequent CIM operation performs an independent, state-less HTTP/HTTPS request.
After creating a WBEMConnection object, various methods may be called on the object, which cause CIM operations to be invoked on the WBEM server. All these methods take regular Python objects or objects defined in cim_types as arguments, and return the same. The caller does not need to know about the CIM-XML encoding that is used underneath (It should be possible to use a different transport below this layer without disturbing any callers).
The connection remembers the XML of the last request and last reply if debugging is turned on via the debug instance variable of the connection object. This may be useful in debugging: If a problem occurs, you can examine the last_request and last_reply instance variables of the connection object. These are the prettified XML of request and response, respectively. The real request and response that are sent and received are available in the last_raw_request and last_raw_reply instance variables of the connection object.
The methods of this class may raise the following exceptions:
Exceptions indicating processing errors:
Exceptions indicating programming errors:
TypeError
KeyError
ValueError
AttributeError
Exceptions indicating programming errors should not happen and should be reported as bugs, unless caused by the code using this class.
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
Instance Variables | |
... All parameters of __init__ are set as instance variables. |
|
bool
|
debug A boolean indicating whether logging of the last request and last reply is enabled. |
unicode
|
last_raw_reply CIM-XML data of the last response received from the WBEM server on this connection, formatted as it was received. |
unicode
|
last_raw_request CIM-XML data of the last request sent to the WBEM server on this connection, formatted as it was sent. |
unicode
|
last_reply CIM-XML data of the last response received from the WBEM server on this connection, formatted as prettified XML. |
unicode
|
last_request CIM-XML data of the last request sent to the WBEM server on this connection, formatted as prettified XML. |
Properties | |
Inherited from |
Method Details |
Exceptions: See the list of exceptions described in WBEMConnection. |
Return a representation of the connection object with the major instance variables, except for the password in the credentials. TODO: Change to show all instance variables.
|
Perform an intrinsic method call (= CIM operation). This is a low-level function that is used by the operation-specific methods of this class (e.g. EnumerateInstanceNames). In general, clients should call these operation-specific methods instead of this function. The parameters are automatically converted to the right CIM-XML elements.
Exceptions: See the list of exceptions described in WBEMConnection. |
Perform an extrinsic method call (= CIM method invocation). This is a low-level function that is used by the 'InvokeMethod' method of this class. In general, clients should use 'InvokeMethod' instead of this function. The Python method parameters are automatically converted to the right CIM-XML elements. See InvokeMethod for details.
Exceptions: See the list of exceptions described in WBEMConnection. |
Enumerate the instance paths of instances of a class (including instances of its subclasses). This method performs the EnumerateInstanceNames CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Enumerate the instances of a class (including instances of its subclasses). This method performs the EnumerateInstances CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Retrieve an instance. This method performs the GetInstance CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Delete an instance. This method performs the DeleteInstance CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Create an instance. This method performs the CreateInstance CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Modify the property values of an instance. This method performs the ModifyInstance CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Execute a query in a namespace. This method performs the ExecQuery CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Enumerate the names of subclasses of a class, or of the top-level classes in a namespace. This method performs the EnumerateClassNames CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Enumerate the subclasses of a class, or the top-level classes in a namespace. This method performs the EnumerateClasses CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Retrieve a class. This method performs the GetClass CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Delete a class. This method performs the DeleteClass CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Modify a class. This method performs the ModifyClass CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Create a class. This method performs the CreateClass CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Retrieve the instances (or classes) associated to a source instance (or source class). This method performs the Associators CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Retrieve the instance paths of the instances (or class paths of the classes) associated to a source instance (or source class). This method performs the AssociatorNames CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Retrieve the association instances (or association classes) that reference a source instance (or source class). This method performs the References CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Retrieve the instance paths of the association instances (or class paths of the association classes) that reference a source instance (or source class). This method performs the ReferenceNames CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Invoke a method on a target instance or on a target class. The methods that can be invoked are static and non-static methods defined in a class (also known as extrinsic methods). Static methods can be invoked on instances and on classes. Non-static methods can be invoked only on instances. This method performs the InvokeMethod CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception. Input parameters for the CIM method can be specified in a order-preserving way using the Params parameter, and in a order-agnostic way using the **params keyword parameters.
Parameters:
Exceptions: See the list of exceptions described in WBEMConnection. |
Enumerate qualifier declarations. This method performs the EnumerateQualifiers CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Retrieve a qualifier declaration. This method performs the GetQualifier CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Create or modify a qualifier declaration. This method performs the SetQualifier CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Delete a qualifier declaration. This method performs the DeleteQualifier CIM-XML operation. If the operation succeeds, this method returns. Otherwise, this method raises an exception.
Exceptions: See the list of exceptions described in WBEMConnection. |
Instance Variable Details |
debugA boolean indicating whether logging of the last request and last reply is enabled. The initial value of this instance variable is
|
last_raw_replyCIM-XML data of the last response received from the WBEM server on this connection, formatted as it was received. Prior to sending the very first request on this connection object, while waiting for any response, it isNone .
|
last_raw_requestCIM-XML data of the last request sent to the WBEM server on this connection, formatted as it was sent. Prior to sending the very first request on this connection object, it isNone .
|
last_replyCIM-XML data of the last response received from the WBEM server on this connection, formatted as prettified XML. Prior to sending the very first request on this connection object, while waiting for any response, it isNone .
|
last_requestCIM-XML data of the last request sent to the WBEM server on this connection, formatted as prettified XML. Prior to sending the very first request on this connection object, it isNone .
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri May 13 17:29:21 2016 | http://epydoc.sourceforge.net |