lmishell, instance filtering

Peter Hatina phatina at redhat.com
Tue Jun 25 12:10:08 UTC 2013


Hi,

from now, there is a preferred way, how to filter instances and instance
names by using a dictionary. The old means of filtering still works, as
well.

Examples (with networking provider):

eth0 = cimv2.LMI_IPNetworkConnection.first_instance(key="Name",
value="eth0")

vs.

eth0 = cimv2.LMI_IPNetworkConnection.first_instance({"Name" : "eth0"})

The main reason, why we switched to this is: there can be more filter
elements present:

active_ifs = cimv2.LMI_IPNetworkConnection.instances({"EnabledDefault" :
2, "OperatingStatus" : 16})

Cheers

-- 
Peter Hatina
ENG Server Experience, System Management
Red Hat Czech, Brno


More information about the openlmi-devel mailing list