
Heidi Eckhart wrote:
Jay Gagnon wrote:
Heidi Eckhart wrote:
@@ -224,8 +212,19 @@ static int device_set_systemname(CMPIIns static int device_set_systemname(CMPIInstance *instance, const virDomainPtr dom) { + virConnectPtr conn = NULL; + CMSetProperty(instance, "SystemName", (CMPIValue *)virDomainGetName(dom), CMPI_chars); + + conn = virDomainGetConnect(dom); + if (conn) { + char *sccn = NULL; + sccn = get_typed_class(pfx_from_conn(conn), "ComputerSystem"); + CMSetProperty(instance, "SystemCreationClassName", + (CMPIValue *)sccn, CMPI_chars); + free(sccn); + }
return 1; }
I'm sure this is just my CIM ignorance showing here, but is ComputerSystem the right base class name there? Isn't this for Device?
Its always good to have a discerning reviewer ;). What's set here is the system's CreationClassName. And the scoping system in that case is the virtual system ... our Xen/KVM_ComputerSystem. So its the key-value pair of ComputerSystem. Xen/KVM_ComputerSystem.Name becomes Xen/KVM_<LogicalDevice>.SystemName Xen/KVM_ComputerSystem.CreationClassName becomes Xen/KVM_<LogicalDevice>.SystemCreationClassName
Okay, cool. I suspected it might be something like that but wanted to make sure. -- -Jay