Repository :
http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
---------------------------------------------------------------
commit 657dab142a2f3ad2e3037f053304a7369d8bcddd
Author: Peter Hatina <phatina(a)redhat.com>
Date: Fri Aug 2 15:56:37 2013 +0200
update man page
---------------------------------------------------------------
man/lmishell.1 | 129 +++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 104 insertions(+), 25 deletions(-)
diff --git a/man/lmishell.1 b/man/lmishell.1
index 3f83e7a..4eb5502 100644
--- a/man/lmishell.1
+++ b/man/lmishell.1
@@ -37,7 +37,6 @@ Do not print any log messages to stderr.
By default, LMIShell prints out log messages with Error severity. Options
\fB\-v\fR, \fB\-m\fR and \fB\-q\fR are mutually exclusive and
can not be used together.
-
.SH HOW TO USE THE SHELL
The following text covers basic use-cases.
@@ -77,10 +76,9 @@ LMIShell can connect directly to the CIMOM using unix socket. For this
type of
connection, the shell needs to be run under root user and the destination
machine has to be either "localhost", "127.0.0.1" or "::1".
This type of
connection is supported by Tog-Pegasus and there needs to be a unix socket
-file present at /var/run/tog-pegasus/cimxml.socket. If the condition is not
+file present at `/var/run/tog-pegasus/cimxml.socket`. If the condition is not
met, classic username/password method will be used. See following example:
- # lmishell
c = connect("localhost")
.TP 4
@@ -90,10 +88,12 @@ are OK, otherwise `None` is returned:
# correct username or password
c = connect("host", "username", "password"}
- >
type(c) == lmi.lmi_client_shell.LmiConnection
- > # bad login username or password
- > c = connect("host", "bad_username",
"bad_password")
- > type(c) == None
+ > isinstance(c, LMIConnection)
+ True
+ > # wrong login username or password
+ > c = connect("host", "wrong_username",
"wrong_password")
+ > c is None
+ True
.SH NAMESPACES
Namespaces in CIM and LMIShell provide a natural way, how to organize all
@@ -260,12 +260,14 @@ To get a list of methods, run following:
instance.print_methods()
...
- > method_lst = sshd.methods()
+ > method_lst = instance.methods()
To execute a method within an object, run this:
- > instance.Method(Param1=value1, Param2=value2, ...)
+ > instance.Method(
+ ... Param1=value1,
+ ... Param2=value2, ...)
https://host: ok (0)
@@ -276,7 +278,9 @@ includes a return value in the parenthesis).
To get the result from a method call, see following:
- > (rval, rparams, errorstr) = instance.Method(Param1=value1, Param2=value2, ...)
+ > (rval, rparams, errorstr) = instance.Method(
+ ... Param1=value1,
+ ... Param2=value2, ...)
The tuple in the previous example will contain retun value of the method call
@@ -298,8 +302,9 @@ fails, then it uses polling method instead.
Following example illustrates, how to perform a synchronous method call:
- > (rval, rparams, errorstr) = instance.SyncMethod(Param1=value1, Param2=value2,
...)
- ...
+ > (rval, rparams, errorstr) = instance.SyncMethod(
+ ... Param1=value1,
+ ... Param2=value2, ...)
\fBNOTE:\fR See the prefix `Sync` in front of a `Method` name.
@@ -396,34 +401,108 @@ be converted into the instance, see next example:
> instance = instance_name.to_instance()
.SH ASSOCIATED OBJECTS
-In CIMOM broker, there is a association relationship defined, in case, you
-want to get list of associated objects with a given object, run following:
+CIM defines an association relationship between managed objects. Following
+text describes the means of retrieving associated objects within a given one.
+.SS ASSOCIATED INSTANCES
+To get list of associated objects with a given object, run following:
+
+ > associated_objects = instance.associators(
+ ... AssocClass=cls,
+ ... ResultClass=cls,
+ ... ResultRole=role,
+ ... IncludeQualifiers=include_qualifiers,
+ ... IncludeClassOrigin=include_class_origin,
+ ... PropertyList=property_lst)
+ > first_associated_object = instance.first_associator(
+ ... AssocClass=cls,
+ ... ResultClass=cls,
+ ... ResultRole=role,
+ ... IncludeQualifiers=include_qualifiers,
+ ... IncludeClassOrigin=include_class_origin,
+ ... PropertyList=property_lst))
+ >
+
+The list of returned associated objects can be filtered by:
+
+ * `AssocClass` -- Each returned object shall be associated to the source object through
an instance of this class or one of its subclasses. Default value is None.
+ * `ResultClass` -- Each returned object shall be either an instance of this class (or
one of its subclasses) or be this class (or one of its subclasses). Default value is None.
+ * `Role` -- Each returned object shall be associated with the source object through an
association in which the source object plays the specified role. That is, the name of the
property in the association class that refers to the source object shall match the value
of this parameter. Default value is None.
+ * `ResultRole` -- Each returned object shall be associated to the source object through
an association in which the returned object plays the specified role. That is, the name of
the property in the association class that refers to the returned object shall match the
value of this parameter. Default value is None.
+
+Other parameters reffer to:
+
+ * `IncludeQualifiers` -- Bool flag indicating, if all qualifiers for each object
(including qualifiers on the object and on any returned properties) shall be included as
<QUALIFIER> elements in the response. Default value is False.
+ * `IncludeClassOrigin` -- Bool flag indicating, if the CLASSORIGIN attribute shall be
present on all appropriate elements in each returned object. Default value is False.
+ * `PropertyList` -- The members of the array define one or more property names. Each
returned object shall not include elements for any properties missing from this list. If
PropertyList? is an empty list, no properties are included in each returned object. If it
is None, no additional filtering is defined. Default value is None.
+.SS ASSOCIATED INSTANCE NAMES
+You can also get AssociatorNames:
- > associated_objects = instance.associators()
- > first_associated_object = instance.first_associator()
+ > associated_object_names = instance.associator_names(
+ ... AssocClass=cls,
+ ... ResultClass=cls,
+ ... Role=role,
+ ... ResultRole=result_role)
+ > first_associated_object_name = instance.first_associator_name(
+ ... AssocClass=cls,
+ ... ResultClass=cls,
+ ... Role=role,
+ ... ResultRole=result_role)
-You can also get AssociatorNames:
+The list of returned associated instance names can be filtered by:
- > associated_object_names = instance.associator_names()
- > first_associated_object_name = instance.first_associator_name()
- >
+ * `AssocClass` -- Each returned name identify an object that shall be associated to the
source object through an instance of this class or one of its subclasses. Default value is
None.
+ * `ResultClass` -- Each returned name identify an object that shall be either an
instance of this class (or one of its subclasses) or be this class (or one of its
subclasses). Default value is None.
+ * `Role` -- Each returned name identify an object that shall be associated to the
source object through an association in which the source object plays the specified role.
That is, the name of the property in the association class that refers to the source
object shall match the value of this parameter. Default value is None.
+ * `ResultRole` -- Each returned name identify an object that shall be associated to the
source object through an association in which the named returned object plays the
specified role. That is, the name of the property in the association class that refers to
the returned object shall match the value of this parameter. Default value is None.
.SH ASSOCIATION OBJECTS
+CIM defines an association relationship between managed objects. Following
+text describes the means of retrieving association objects within a given one.
An association object is the object, which defines the relationship between
two other objects.
-
+.SS ASSOCIATION INSTANCES
To get association objects that refer to a particular target object, run
following:
- > association_objects = instance.references()
- > first_association_object = instance.first_reference()
+ > association_objects = instance.references(
+ ... ResultClass=cls,
+ ... Role=role,
+ ... IncludeQualifiers=include_qualifiers,
+ ... IncludeClassOrigin=include_class_origin,
+ ... PropertyList=property_lst)
+ > first_association_object = instance.first_reference(
+ ... ResultClass=cls,
+ ... Role=role,
+ ... IncludeQualifiers=include_qualifiers,
+ ... IncludeClassOrigin=include_class_origin,
+ ... PropertyList=property_lst)
+The list of returned association objects can be filtered by:
+
+ * `ResultClass` -- Each returned object shall be an instance of this class (or one of
its subclasses) or this class (or one of its subclasses). Default value is None.
+ * `Role` -- Each returned object shall refer to the target object through a property
with a name that matches the value of this parameter. Default value is None.
+
+Other parameters reffer to:
+
+ * `IncludeQualifiers` -- Each object (including qualifiers on the object and on any
returned properties) shall be included as <QUALIFIER> elements in the response.
Default value is False.
+ * `IncludeClassOrigin` -- Flag indicating, if the CLASSORIGIN attribute shall be
present on all appropriate elements in each returned object. Default value is False.
+ * `PropertyList` -- The members of the list define one or more property names. Each
returned object shall not include elements for any properties missing from this list. If
PropertyList? is an empty list, no properties are included in each returned object. If
PropertyList? is None, no additional filtering is defined. Default value is None.
+.SS ASSOCIATION INSTANCE NAMES
To get association instance names, run following:
- > association_object_names = instance.reference_names()
- > first_association_object_name = instance.first_reference_name()
+ > association_object_names = instance.reference_names(
+ ... ResultClass=cls,
+ ... Role=role)
+ > first_association_object_name = instance.first_reference_name(
+ ... ResultClass=cls,
+ ... Role=role)
+
+The list of returned association instance names can be filtered by:
+
+ * `ResultClass` -- Each returned Object Name identify an instance of this class (or one
of its subclasses) or this class (or one of its subclasses). Default value is None.
+ * `Role` -- Each returned object name shall identify an object that refers to the
target instance through a property with a name that matches the value of this parameter.
Default value is None.
.SH INDICATIONS
Indication is a reaction to some specific event that occurs in response to a
change to a particular change in data. LMIShell can perform a indication