This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/549/

This change has been marked as submitted.


Review request for OpenLMI Developers.
By Peter Hatina.

Updated Sept. 19, 2013, 1:12 p.m.

Repository: openlmi-tools

Description

By this patch, we introduce a feature, which enables LMIShell to perform synchronous method calls. In other words, when there is a method call executed, which returns a CIM_ConcretJob object (derived from), LMIShell is able to either subscribe an indication and then wait for the job to finish and return job output parameters. If the shell is not able to use indications (can not start tcp server), then it uses "blind" polling as the waiting method. Indication method of waiting also checks the JobState value of the object to prevent the shell from infinite waiting.

To invoke a "synchro" method, see following (example with filesystem):
> ... some stuff to get necessary objects ...
> conf_service.SyncLMI_CreateFileSystem(FileSystemType = 11, InExtents = [sda1])
               ^^^^

The prefix "Sync" is also added to interactive interface (tab-completion).

Question 1) 
As the patch of a version 1, there is only unsecure http used for indication delivery. The question is: what kind of certificate to use, do we generate some for the shell at install time, or use some existing? Please, tell me your opinion.

Question 2)
Can we setup Pegasus to permit other users to create objects in the namespace PG_InterOp? In the example below, there is root account used, other users for me with default Pegasus setup can not create indication handler and subscription objects. Now, the shell will fail to get necessary static filter instance (used for the subscription) and will fail to call "synchro" method.

Testing

Tested with storage provider.

> c = connect("hostname", "root", "root")
> sda = c.root.cimv2.LMI_StorageExtent.first_instance({"ElementName" : "sda"})
> basedon = sda.first_reference(ResultClass = "LMI_PartitionBasedOn")
> sda1 = basedon.Dependent.to_instance()
> conf_service = c.root.cimv2.LMI_FileSystemConfigurationService.first_instance()
> (ret, out, err) = conf_service.SyncLMI_CreateFileSystem(FileSystemType = 11, InExtents = [sda1])
> print "%s\n%s\n%s" % (ret, out, err)
4096
NocaseDict({'out': _LmiInstance(classname='CIM_ManagedElement', ...)})

Note: see return value and output parameters (ret == 4096, out['out'] == _LmiInstance(...)) <- this will be changed once we have Pegasus fixed. Now synchro method does not modify return value of the method, therefore you can find 4096 in the result. Once we have proper values in output parameters (Job.JobOutParameters), return code and return parameters will be modified respectively.

Diffs

  • cli-tools/lmi/__init__.py (e69de29bb2d1d6434b8b29ae775ad8c2e48c5391)
  • cli-tools/lmi/lmi_client_shell.py (9a6788cc17582f7c4419df909cd4322d9e6b23f9)
  • cli-tools/lmi/lmi_listener.py (6670b204a84485b6e1f8bef5dfa2893098f0a9da)
  • cli-tools/lmishell (a12233eedc159a6f6c570ca31dfff20ac6d17161)

View Diff