|
From: Raymond I. <sor...@gm...> - 2007-07-31 17:51:29
|
I've been able to talk to several machines around here, most running
Pegasus. But I set up a Suse 10.1 box running owcimomd (apparently
based on OpenWBEM, with owc's SMASH providers). I'm trying to classify
instances by CreationClassName, but I can't seem to get them the same
way as other CIMOM's I've been talking to.
Here's what I'm doing:
// Do a deep enumeration of the instances of the class
e = cc.enumerateInstances(cop, false, true, true, true, null);
// Will print out all the instances of the class and its
subclasses.
while (e.hasMoreElements()) {
CIMInstance inst = (CIMInstance)e.nextElement();
System.out.println(inst.getName());
CIMProperty ccname = inst.getProperty("CreationClassName");
if (null == ccname) {
System.out.println("Whoa, no CreationClassName!");
}
//CIMProperty[] props = inst.getProperties();
Enumeration props = inst.getProperties().elements();
while (props.hasMoreElements()) {
CIMProperty cur_prop = (CIMProperty) props.nextElement();
System.out.print(cur_prop.getName().toString()+ " - ");
if (cur_prop.getValue() != null) {
System.out.print(cur_prop.getValue().toString());
} else {
System.out.print(" NULL VALUE ");
}
if (cur_prop.isKey()) {
System.out.print(" - key!");
}
System.out.println("");
}
}
Indeed, instances that show up with properties in, say, SNIA's
cimbrowser don't show *any* properties when queried by this code. A
few of them do, say:
OMC_SystemTimeService
SystemCreationClassName - "OMC_UnitaryComputerSystem" - key!
SystemName - "svdevsuse101.prodti.compuware.com" - key!
CreationClassName - "OMC_SystemTimeService" - key!
Name - "timeservice" - key!
But, for example:
OMC_SyslogNGRecordLog
Whoa, no CreationClassName!
Note, no properties listed. I'm somewhat confused. Like I said, this
works against other machines (e.g. an Itanium HP-UX box running HP's
WBEM providers). Any ideas or suggestions?
|