phatina/python-lmiwbem

Pull operations in lmiwbem

Closed this issue · 2 comments

Upcoming Pegasus 2.14 will implement PULL operations. This is a friendly reminder that we need to support it also lmiwbem.

In short, there will be number of new intrinsic method to enumerate stuff (instances, instance names, references, associators, ...). Instead of returning all instances / instance names in one huge XML, it will return just first X elements and the client can iteratively pull another X elements, until the enumeration is complete.

Example of EnumerateInstances using PULL operations in lmishell-like pseudolanguage:

enumeration_ctx = c.root.cimv2.LMI_Service.OpenEnumerateInstances()
while not enumeration_ctx.empty():
    instances = enumeration_ctx.PullInstances(MaxObjectCount = 10)
    # process just 10 instances
enumeration_ctx.CloseEnumeration()

This is just an idea, proper API has to be designed.

  • e.g. all this EnumerationContext could be hidden inside a generator and application would just iterate using:

    for i in LMI_Service.new_cool_instances(chunk_size=10):
    

See http://www.dmtf.org/sites/default/files/standards/documents/DSP0200_1.3.1.pdf for all methods and their parameters.

Pegasus will have all these intrinsic methods exposed in its client library.

Thanks Jan, I am aware of this new API and will jump on this soon, for sure.

Pull operations were introduced in 1cb27bc.