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

On August 8th, 2013, 12:49 p.m. UTC, Jan Safranek wrote:

cli/lmi/shell/LMIUtil.py (Diff revision 1)
269
        Helper function, which temporarily disables LMIShell's cache and returns CIMClass
270
        with no properties, qualifiers to save network communication.
Why is caching disabled here? Maybe some superclass is already loaded.

And it would be nice to have separate(?) cache for these 'minimal' classes, lmi_isinstance() can be used quite a lot.

On August 8th, 2013, 12:50 p.m. UTC, Jan Safranek wrote:

Just an idea, you don't need to cache whole class, just some dictionary class->superclass.
Already working on that. I will cache {class : superclass}. Is that for you?

- Peter


On August 8th, 2013, 12:40 p.m. UTC, Peter Hatina wrote:

Review request for OpenLMI Developers.
By Peter Hatina.

Updated Aug. 8, 2013, 12:40 p.m.

Repository: openlmi-tools

Description

lmi_isinstance is a LMIShell helper function, which checks if provided LMIInstance/LMIInstanceName is instance of provided LMIClass.

Example usage:
> cimv2 = c.root.cimv2
> se = cimv2.LMI_StorageExtent.first_instance()
> lmi_isinstance(se, cimv2.LMI_StorageExtent)
True
> lmi_isinstance(se, cimv2.CIM_StorageExtent)
True
> lmi_isinstance(se, cimv2.CIM_FileSystem)
False

Diffs

  • cli/lmi/shell/LMIConsole.py (2c28d36fcc47d5cf1f1cc9959ba77c002c458f0b)
  • cli/lmi/shell/LMIInstanceName.py (91406c453091c094f10a91e34a07667f1660b2c4)
  • cli/lmi/shell/LMIShellClient.py (eb850600d1d527ffc843f4fd233616259c7a2013)
  • cli/lmi/shell/LMIUtil.py (618ee42634e70390d85a23c5a0b1d6c77c62db33)

View Diff