Defines a base class for all command classes operating upon a Session object.
Base class for end-point commands operating upon a session object.
Using metaclass: SessionCommandMetaClass.
This returns default cim namespace, the connection object will be nested into before being passed to associated function. It can be overriden in few ways:
- by setting [CIM] Namespace option in configuration
- by giving --namespace argument on command line to the lmi meta-command
- by setting NAMESPACE property in declaration of command
Higher number means higher priority.
Returns maximum number of seconds the client shall wait for broker’s reply. Defaults to None which means that it’s up to the connection object itself to decide. It can be oveririden with CONNECTION_TIMEOUT property in declaration of command.
There is a namespace/connection object passed as the first positional argument.
Wraps the execute() method with connection adjustments. Connection object is not usually passed directly to associated function. Mostly it’s the namespace object that is expected. This method checks, whether the namespace object is desired and modifies connection accordingly.
Parameters: |
|
---|
Called from process_session() after single host gets processed. By default this prints obtained result with default formatter if the execution was successful. Children of this class may want to override this.
Parameters: |
|
---|
Process each host of given session, call the associated command function, collect results and print it to standard output.
Parameters: |
|
---|---|
Returns: | Exit code of application. |
Return type: | integer |
Called at the end of process_session()‘s execution. It’s supposed to do any summary work upon results from all hosts. By default it just prints errors in a form of list.
Parameters: |
|
---|
Executes an action on single host and collects results.
Parameters: |
|
---|---|
Returns: | Column names and item list as a pair. |
Return type: | tuple |