
+1 Kaitlin Rupert wrote:
# HG changeset patch # User Kaitlin Rupert <karupert@us.ibm.com> # Date 1241805181 25200 # Node ID 9a16c7a7963cebddd145212e57ccc9defa5e0a0c # Parent e08c78615c3ec653c2979b4619b15d48a1c56d48 Allow user to specify UUID to use when guest is created
Also expose UUID in VSSD instances.
Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com>
diff -r e08c78615c3e -r 9a16c7a7963c schema/ComputerSystem.mof --- a/schema/ComputerSystem.mof Mon May 11 10:23:34 2009 -0700 +++ b/schema/ComputerSystem.mof Fri May 08 10:53:01 2009 -0700 @@ -7,7 +7,6 @@ ] class Xen_ComputerSystem : CIM_ComputerSystem { - [Description("UUID assigned to this DomU.")] string UUID;
diff -r e08c78615c3e -r 9a16c7a7963c schema/Virt_VSSD.mof --- a/schema/Virt_VSSD.mof Mon May 11 10:23:34 2009 -0700 +++ b/schema/Virt_VSSD.mof Fri May 08 10:53:01 2009 -0700 @@ -12,4 +12,7 @@ Values { "Turn Off", "Save state", "DMTF Reserved" }] uint16 AutomaticShutdownAction;
+ [Description("UUID assigned to this DomU.")] + string UUID; + }; diff -r e08c78615c3e -r 9a16c7a7963c src/Virt_VSSD.c --- a/src/Virt_VSSD.c Mon May 11 10:23:34 2009 -0700 +++ b/src/Virt_VSSD.c Fri May 08 10:53:01 2009 -0700 @@ -113,6 +113,9 @@ CMSetProperty(inst, "VirtualSystemType", (CMPIValue *)pfx, CMPI_chars);
+ CMSetProperty(inst, "UUID", + (CMPIValue *)dominfo->uuid, CMPI_chars); + CMSetProperty(inst, "Caption", (CMPIValue *)"Virtual System", CMPI_chars);
diff -r e08c78615c3e -r 9a16c7a7963c src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Mon May 11 10:23:34 2009 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Fri May 08 10:53:01 2009 -0700 @@ -337,6 +337,12 @@ free(domain->name); domain->name = strdup(val);
+ ret = cu_get_str_prop(inst, "UUID", &val); + if (ret == CMPI_RC_OK) { + free(domain->uuid); + domain->uuid = strdup(val); + } + ret = cu_get_u16_prop(inst, "AutomaticShutdownAction", &tmp); if (ret != CMPI_RC_OK) tmp = 0;
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim
-- Richard Maciel, MSc IBM Linux Technology Center rmaciel@linux.vnet.ibm.com