cimcli (1) - Linux Manuals
NAME
cimcli - command line WBEM ClientSYNOPSIS
Operation
[OperationTarget]
[ValueParameter
...]
[ -hc ]
[ -h operationName ]
[ -ho ]
[ --help ]
[ -n namespace ]
[ -l location ]
[ -u user name ]
[ -p password ]
[ -s ]
[ --cert certFilePath ]
[ --key keyFilePath ]
[ --truststore clientTrustStorePath ]
[ --sort ]
[ --r repeat count ]
[ -delay seconds ]
[ --sum ]
[ --count object count ]
[ --timeout seconds ]
[ -o XML|MOF|TABLE ]
[ --verbose ]
[ -pl propertyList ]
[ -niq ]
[ -di ]
[ -ic ]
[ -ac associationClassName ]
[ -rc resultClassName ]
[ -r role ]
[ -rr resultRole ]
[ -f filter ]
[ -ql query language ]
[ --version ]
[ --expExit exitCode ]
[
DESCRIPTION
cimcli is a command line tool for executing CIM client operations using
the CIM/XML protocol. It implements all of the DMTF CIM operations
defined in the DMTF specification DSP0200 (CIM Operations over HTTP)
except for the modify and create class/instance operations and includes
several other operations that are useful in working with CIM Servers.
For the execution of the DMTF defined CIM operations (ex.
enumerateInstances CIM/XML operation). cimcli includes as command line
options all of the parameters defined in the DMTF specification. (ex.
-di for deep inheritance for the enumerateInstances operation).
In addition to the CIM Operations defined in the DMTF specification DMTF
DSP0200, cimcli implements a number of other operations that support
testing and querying CIM servers (ex. operation to query for
namespaces and another to get all instances in a namespace) which require
multiple CIM Operations. The additional operations include:
NOTE: This operation may be CIMServer type specific since not all
CIM servers implement the statistics functions.
WARNING:
This operation could cause problems if executed against a server which
returns very large numbers of instances since it retrieves all of the
instances and counts them in cimcli.
The format of the cimcli command is:
cimcli [Operation] [OperationTarget] [options] [ValueParameters]
Options may be interspersed with the [OperationTarget] parameter but the
ordering and position on the command line of [Operation] [OperationTarget]
is fixed and any [value parameters] MUST occur after the [OperationTarget]
parameter.
* a short form typically two characters (i.e. gc for getclass) and
* a long form which is the full name of the operation (i.e. getclass).
The complete set of operations can be viewed by calling cimcli with the
option -hc.
This parameter is operation dependent. For example, with the getClass
operation the [OperationTarget] is a CIM class name. With the getInstance
operation the object is a CIM instance name. Note that some of the
commands do not require an [OperationTarget] parameter. Thus, for
example, the [OperationTarget] is optional with the enumerateClasses
operation as it is with the equivalent enumerateClassNames CIM operation.
Normally this is either a CIM class name or an instance name (classname
plus keybindings). In some operations one or the other is required. In
other operations, the behavior of the operation is dependent on whether
class name or instance name is supplied. See the definition of each operation
for detailed requirements for the [OperationTarget]
The format for <instancename> (CIMObjectPath) is defined as the model path
in the CIM Specification(DMTF DSP0004) and has the form:
<classname>.<keyPropertyName>=<value>[,<keypropertyName>=<value>]*
where:
To simplify inputting command line object names, cimcli offers a second
option for defining the object name as [OperationTarget]. In this second
form, the [OperationTarget] object is the class name and zero or more <value
parameter>s are used to define each feature/value. In this case,
the quotation marks around string property values are optional and are required
only in the case where quotation marks would be required to define a value
such as a string that includes quotation marks or spaces.
The syntax for this form is:
<classname> <keyPropertyName>=<value> [,<keypropertyName>=<value>]*
where:
Note that each name/value definition is treated as a single command line
parameter so that MUST not include spaces between the name and value
components. (ex. name=fred, not name = fred and name=\"freds name\")
As an example, the input for a getInstance might be:
In the second case, cimcli gets the class from the CIM Server and uses the
parameters to form a correct CIMObjectPath. In the first case, generally
cimcli uses the input path directly without getting the class from the
server. The quotation marks in the first case are required by the
CIMObjectPath format defined by the DMTF.
Any extra parameter entities on the command line that occur after the
[Operation] and [Operation Target] and are not proceeded by "-" to
indicate an option are considered value parameters. These are used in some
of the operations to provide additional information required or optionally
desired by the operation. See each operation definition to determine if
extra parameters are required or allowed. These may be either
keyname/value pairs in some cases or simply strings depending on the
operation.
NOTE: cimcli does not protect the user against inputting extra options
or parameters. Since the options are heavily dependent on the
operation to be executed, it ignores options that are not
used with a particular operation. Thus, entering the -r option (role)
with a getClass operation is syntactically allowed but cimcli ignores
the parameter.
There are 4 types of options
The following set of options re general to all of the CIM
Operations and most of the compound operations They provide parameters for
the initiation or execution of the operations (ie. identify the target
server and namespace and set connection security parameters).
NOTE Since SSL is a compile cimcli compile option, the -s options and
following options will not even exist in a cimcli that was compiled with
the SSL capabilities disabled.
A set of options that modifies the manner in
which the command is executed or the display of information on
response including the following:
Options that define request parameters for specific cimcli
Operation requests. These are typically optional parameters on the CIM
operation request that modify the behavior of the server to the request.
This includes things like requesting localonly, deep inheritance, etc.
Note that the actual behavior may be dependent on the particular operation
request type. The full definition of these options is below here and
their use with each specific cimcli operation is defined with the
operations.
The syntax of propertylist is:
<propertyName>[,<propertyName>]* |
Examples:
These operations correspond directly to the original operations as shown in the
table below but with extra cimcli options to control the enumeration sequence
parameters.
OriginalOperation shortcut PullOperation shortcut
enumerateInstances ei PullEnumerateInstances pei
enumerateInstanceNames ni PullEnumerateInstancePaths pni
references r PullReferenceInstances pr
referenceNames rn PullReferenceNames prn
associators a PullAssociators pa
associatorNames an PullAssociatorPaths pan
execQuery xq pullExecQuery pxq
The pull operations generally duplicate the parameters of the original
operations with some options to allow the new arguments required to define
the enumeration context, control of the size of individual responses,
timing, and maximum size.
The pull operations have a common set of options including:
-ql [filterQueryLanguage]
Optional definition of the filter query language used for this operation.
This option allows specification of filter query languages like the DMTF
FQL which apply specifically to filtering instances from enumerations.
WQL and CQL are not allowed with this parameter in the pull operations except
for pullExecQuery. FQL is the single normalized filter query language
for the pull operations.
Since FQL is a required query language for systems that support the pull
operations, it is the definition normally used for this option ("DMTF:FQL")
-f [filter]
Optional filter for the language defined in the -ql option. The response
is filtered using this filter specification. The required query language is
FQL (Filter Query Language) which is a simple query language that allows only
comparison between properties within an instance and literals boolean
combinations of these property comparison expressions with AND and OR documented in detail in the DMTF specification
DSP0212 and generally is of the form:
CreateInstance returns the object path of the created instance if the call
to the CIM server was executed successfully. Otherwise it returns the
exception from the server.
The syntax for createInstance is:
NOTE: The value of array properties may also be defined by repeating the
property multiple times with the different values. cimcli will
consolidate these multiple property definitions into an array
The use of the value parameters is further defined in the following paragraphs.
Note that the syntax for value parameters for DMTF data types differes from
the syntax for value parameters for embedded instances and objects.
1.
Scalar property values - The string form of the property similar to MOF
input of constant values is used to input scalar values. The scalar value
input includes all CIM Types. Numeric values may be input in hex, octal,
decimal or binary in the same form as the DMTF specification for MOF.
Quotations are not required surrounding values unless the value includes
spaces. Quote marks can be embedded by escaping them (ex. ab\"cd) with
whatever the shell uses as an escape character..
2.
Array property values - Array property values are defined by defining a
string that is comma-separated scalar value entities.
of the form :
The array MUST NOT include any spaces between the scalar value entities.
It must appear to cimcli as a single input parameter. In addition, array
value can be input by repeating the complete parameter so that values
input will be appended to an already created array.
3.
If the propertyName parameter is provided with no value, the
default value or NULL if there is no default value is inserted.
4.
String property values are special because there are two concepts
that must be covered when there is no value,
1) Empty String or
2. NULL/default value. These are different for CIM Strings.
When a property that requires an empty string is to be input,
the user will specify it with no value after the = sign.
If, a NULL or default value is desired, the = sign terminator
is replaced with the ! (exclamation mark).
5.
The value defined in the name/value pair must be decodable into the
CIMType of the CIMClass for which the instance is being created. For
example a String cannot be supplied for a property that is of type Uint32.
cimcli get the CIMType for the property from the server and checks this
against the data input.
The execution of this operation first accesses the CIM server for the class
definition and uses this information to build the proper value types and
values for the instance. This means that values that cannot be decoded with
values to match the CIM Type in the class will be rejected.
This command builds the instance with all of the properties for which
name/value pairs representing the properties of the class are input. It
does not include any properties that are not defined on the command line.
To create an instance with less than the full set of properties, supply
only those properties that are to be submitted to the CIM Server.
The command will be rejected if the class does not exist in the namespace or
if the input includes property names that are not in the class.
6.
If the property defines an embedded instance or embedded object (defined in
MOF as a CIMTYpe String but with the qualifer "embeddedInstance" or
"embeddedObject" the embedded instance can be built directly from the
command line by supplying the class name and property definitions for the
embedded instance. Note that cimcli builds embedded instances in any case
(It cannot build embedded classes) but sends them to the server as either
embedded instances or embedded objects per the MOF definiton.
An embedded instance definition is delineated by either "{" or "={" separating
the property name and value definition "}" to end the embedded instance
definition as shown below:
The embedded instance termination marker "}" must be separated by spaces from
other parameters.
Arrays of embedded instances can also be created following the pattern for
arrays of properties of other CIM types as follows:
Examples:
[Operation]
Defines the operation to be executed. cimcli executes all of the DMTF CIM
Operations (ex. getclass) and a set of compound operations
(enumeratenamespaces). There are two forms for each [Operation]
definition:
[OperationTarget]
The [OperationTarget] is the name of the object for which the the operation is
requested.
[options...]
Options are identified on the command line with the - or -- notation. They
are identified in a cimcli config file with the form <name>=value where name
is a long name for the option. Each cimcli option has both a short name
for command line use and a long name for configuration file use.
There are several types of options:
[value-parameter]
Some of the operations allow or require extra parameters, for example to
supply property value definitions for create and modify instance. These
are typically keywords or keyword/value pairs and are defined as part of
the particular operation that use them.
OPTIONS
CONNECTION OPTIONS
CIMCLI OPERATION MODIFICATION OPTIONS
Example:
cimcli en CIM_ManagedElement -count 100
OPERATION PARAMETER OPTIONS
OPERATIONS
This section defines the individual operations supported by cimcli.
Note that either the names (ex. EnumerateInstances) or the shortcut (ei)
may be used in defining an [Operation] on the command line
and they are case independent.
Pull Client Operations and OpenPegasus Overview (OpenPegasus 2.14 extension)
The DMTF has extended the client xml protocol with new operations
that return multiple instance or path responses to allow the
client to pull the responses as components of an enumeration sequence rather
than a single monolothic operation. This allows the server improved management
of operation resources and allows the client to control its memory use. cimcli
has created a set of new operations that use this pull model. cimcli did not
create an operation corresponding to each client api but one that uses the
client apis and a set of options to execute complete pull enumertation
sequences.
property comparison expression:
Scalarproperty operation scalarliteral or ScalarProperty
ArrayProperty operation arrayLiteral or ArrayProperty
ArrayProperty arrayOps scalarProperty or scalarLiteral
Arrayproperty[index]
literals:
ci CreateInstance Operation
The CreateInstance operation executes the DMTF CIM/XML createInstance
operation request. It builds an instance of the class defined on the
command line building the properties of the instance from a combination of
the class retrieved from the CIM server and value parameters provided with
the input. cimcli issues the CIM operation createInstance with the
created instance It requires the [OperationTarget] parameter defining the class
for which the instance is to be created and optional
set of property definition (name=value) parameters that define properties
and their values for the created instance.