From gesaint at linux.vnet.ibm.com Thu Jun 5 02:06:00 2014 From: gesaint at linux.vnet.ibm.com (Xu Wang) Date: Thu, 5 Jun 2014 10:06:00 +0800 Subject: [Libvirt-cim] [PATCH] libxutil: Fix memory device dumpCore field parsing Message-ID: <1401933960-18054-1-git-send-email-gesaint@linux.vnet.ibm.com> Signed-off-by: Xu Wang --- libxkutil/device_parsing.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c index d654a6a..815feea 100644 --- a/libxkutil/device_parsing.c +++ b/libxkutil/device_parsing.c @@ -850,9 +850,9 @@ static int parse_mem_device(xmlNode *node, struct virt_device **vdevs) else if (XSTREQ(node->name, "memory")) { sscanf(content, "%" PRIu64, &mdev->maxsize); tmpval = get_attr_value(node, "dumpCore"); - if (tmpval && XSTREQ(tmpval, "on")) { + if (tmpval && STREQC(tmpval, "on")) { mdev->dumpCore = MEM_DUMP_CORE_ON; - } else if (tmpval && XSTREQ(content, "off")) { + } else if (tmpval && STREQC(tmpval, "off")) { mdev->dumpCore = MEM_DUMP_CORE_OFF; } else { mdev->dumpCore = MEM_DUMP_CORE_NOT_SET; -- 1.7.1 From jferlan at redhat.com Mon Jun 9 10:59:07 2014 From: jferlan at redhat.com (John Ferlan) Date: Mon, 09 Jun 2014 06:59:07 -0400 Subject: [Libvirt-cim] [PATCH 1/3] live.full_hostname: Adjust mechanism to get FQDN In-Reply-To: <53845415.8020702@linux.vnet.ibm.com> References: <1400610388-907-1-git-send-email-jferlan@redhat.com> <1400610388-907-2-git-send-email-jferlan@redhat.com> <53845415.8020702@linux.vnet.ibm.com> Message-ID: <5395937B.6000009@redhat.com> On 05/27/2014 05:00 AM, Xu Wang wrote: > It works fine for me. hostname mismatch issue has been solved by this patch. > > Thanks, > Xu Wang Thanks - this is now pushed. Still waiting of 2/3 & 3/3 John From jferlan at redhat.com Mon Jun 9 11:09:11 2014 From: jferlan at redhat.com (John Ferlan) Date: Mon, 09 Jun 2014 07:09:11 -0400 Subject: [Libvirt-cim] [PATCH V2] Add disk device='lun' support In-Reply-To: <1401178450-14982-1-git-send-email-gesaint@linux.vnet.ibm.com> References: <1401178450-14982-1-git-send-email-gesaint@linux.vnet.ibm.com> Message-ID: <539595D7.10401@redhat.com> On 05/27/2014 04:14 AM, Xu Wang wrote: > Besides 'disk', 'cdrom', 'floppy' and 'filesystem', there is one > more value 'lun' should be supported by value of device field in > the disk device. So this patch adds it into libvirt-cim. Now device > like could be operated by class. > > Signed-off-by: Xu Wang > --- > schema/ResourceAllocationSettingData.mof | 8 ++++---- > src/Virt_RASD.c | 3 +++ > src/Virt_RASD.h | 1 + > src/Virt_SettingsDefineCapabilities.c | 3 ++- > src/Virt_VirtualSystemManagementService.c | 5 ++++- > 5 files changed, 14 insertions(+), 6 deletions(-) A difference between this and your prior patch: --- a/src/Virt_SettingsDefineCapabilities.c +++ b/src/Virt_SettingsDefineCapabilities.c @@ -1071,15 +1071,14 @@ static CMPIStatus set_disk_props(int type, (CMPIValue *)"FV disk", CMPI_chars); } - if (emu_type == VIRT_DISK_TYPE_DISK) { + if (emu_type == VIRT_DISK_TYPE_DISK || + emu_type == VIRT_DISK_TYPE_LUN) { CMSetProperty(inst, "VirtualQuantity", (CMPIValue *)&disk_size, CMPI_uint64); } else if (emu_type == VIRT_DISK_TYPE_CDROM) { dev = "hdc"; } else if (emu_type == VIRT_DISK_TYPE_FLOPPY) { dev = "fda"; - } else if (emu_type == VIRT_DISK_TYPE_LUN) { - dev = "sda"; } leaves me with one question - Are you expecting the LUN type to have a dev of "hda" or "sda"? If "sda", I can fix the code and push... If "hda", I will just push... I actually assume you meant "sda"... John > > diff --git a/schema/ResourceAllocationSettingData.mof b/schema/ResourceAllocationSettingData.mof > index 9c387f0..f78d423 100644 > --- a/schema/ResourceAllocationSettingData.mof > +++ b/schema/ResourceAllocationSettingData.mof > @@ -10,8 +10,8 @@ class Xen_DiskResourceAllocationSettingData : Xen_ResourceAllocationSettingData > string VirtualDevice; > > [Description ("Device emulation type"), > - ValueMap {"0", "1", "2"}, > - Values {"Disk", "CDROM", "floppy"}] > + ValueMap {"0", "1", "2", "4"}, > + Values {"Disk", "CDROM", "floppy", "lun"}] > uint16 EmulatedType; > > [Description ("Bus type of the device")] > @@ -43,8 +43,8 @@ class KVM_DiskResourceAllocationSettingData : KVM_ResourceAllocationSettingData > string VirtualDevice; > > [Description ("Device emulation type"), > - ValueMap {"0", "1", "2", "3"}, > - Values {"Disk", "CDROM", "floppy", "filesystem"}] > + ValueMap {"0", "1", "2", "3", "4"}, > + Values {"Disk", "CDROM", "floppy", "filesystem", "lun"}] > uint16 EmulatedType; > > [Description ("Bus type of the device")] > diff --git a/src/Virt_RASD.c b/src/Virt_RASD.c > index 3c62c2d..761d053 100644 > --- a/src/Virt_RASD.c > +++ b/src/Virt_RASD.c > @@ -444,6 +444,9 @@ static CMPIStatus set_disk_rasd_params(const CMPIBroker *broker, > else if ((dev->dev.disk.device != NULL) && > STREQ(dev->dev.disk.device, "floppy")) > type = VIRT_DISK_TYPE_FLOPPY; > + else if ((dev->dev.disk.device != NULL) && > + STREQ(dev->dev.disk.device, "lun")) > + type = VIRT_DISK_TYPE_LUN; > else > type = VIRT_DISK_TYPE_DISK; > > diff --git a/src/Virt_RASD.h b/src/Virt_RASD.h > index 400143f..49d7195 100644 > --- a/src/Virt_RASD.h > +++ b/src/Virt_RASD.h > @@ -27,6 +27,7 @@ > #define VIRT_DISK_TYPE_CDROM 1 > #define VIRT_DISK_TYPE_FLOPPY 2 > #define VIRT_DISK_TYPE_FS 3 > +#define VIRT_DISK_TYPE_LUN 4 > > char *rasd_to_xml(CMPIInstance *rasd); > > diff --git a/src/Virt_SettingsDefineCapabilities.c b/src/Virt_SettingsDefineCapabilities.c > index 756e46b..49986ff 100644 > --- a/src/Virt_SettingsDefineCapabilities.c > +++ b/src/Virt_SettingsDefineCapabilities.c > @@ -1071,7 +1071,8 @@ static CMPIStatus set_disk_props(int type, > (CMPIValue *)"FV disk", CMPI_chars); > } > > - if (emu_type == VIRT_DISK_TYPE_DISK) { > + if (emu_type == VIRT_DISK_TYPE_DISK || > + emu_type == VIRT_DISK_TYPE_LUN) { > CMSetProperty(inst, "VirtualQuantity", > (CMPIValue *)&disk_size, CMPI_uint64); > } else if (emu_type == VIRT_DISK_TYPE_CDROM) { > diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c > index f673c38..c640360 100644 > --- a/src/Virt_VirtualSystemManagementService.c > +++ b/src/Virt_VirtualSystemManagementService.c > @@ -1114,7 +1114,8 @@ static const char *disk_rasd_to_vdev(CMPIInstance *inst, > type = VIRT_DISK_TYPE_DISK; > > if ((type == VIRT_DISK_TYPE_DISK) || > - (type == VIRT_DISK_TYPE_FS)){ > + (type == VIRT_DISK_TYPE_FS) || > + (type == VIRT_DISK_TYPE_LUN)){ > if (dev->dev.disk.disk_type == DISK_UNKNOWN) { > /* on success or fail caller should try free it */ > rc = asprintf(p_error, "Device %s, Address %s, " > @@ -1149,6 +1150,8 @@ static const char *disk_rasd_to_vdev(CMPIInstance *inst, > dev->dev.disk.device = strdup("floppy"); > else if (type == VIRT_DISK_TYPE_FS) > dev->dev.disk.device = strdup("filesystem"); > + else if (type == VIRT_DISK_TYPE_LUN) > + dev->dev.disk.device = strdup("lun"); > else > return "Invalid value for EmulatedType"; > > From cngesaint at gmail.com Wed Jun 11 03:26:56 2014 From: cngesaint at gmail.com (Xu Wang) Date: Wed, 11 Jun 2014 11:26:56 +0800 Subject: [Libvirt-cim] [PATCH V2] Add disk device='lun' support In-Reply-To: <539595D7.10401@redhat.com> References: <1401178450-14982-1-git-send-email-gesaint@linux.vnet.ibm.com> <539595D7.10401@redhat.com> Message-ID: <5397CC80.7090704@gmail.com> ? 2014?06?09? 19:09, John Ferlan ??: > > On 05/27/2014 04:14 AM, Xu Wang wrote: >> Besides 'disk', 'cdrom', 'floppy' and 'filesystem', there is one >> more value 'lun' should be supported by value of device field in >> the disk device. So this patch adds it into libvirt-cim. Now device >> like could be operated by class. >> >> Signed-off-by: Xu Wang >> --- >> schema/ResourceAllocationSettingData.mof | 8 ++++---- >> src/Virt_RASD.c | 3 +++ >> src/Virt_RASD.h | 1 + >> src/Virt_SettingsDefineCapabilities.c | 3 ++- >> src/Virt_VirtualSystemManagementService.c | 5 ++++- >> 5 files changed, 14 insertions(+), 6 deletions(-) > A difference between this and your prior patch: > > --- a/src/Virt_SettingsDefineCapabilities.c > +++ b/src/Virt_SettingsDefineCapabilities.c > @@ -1071,15 +1071,14 @@ static CMPIStatus set_disk_props(int type, > (CMPIValue *)"FV disk", CMPI_chars); > } > > - if (emu_type == VIRT_DISK_TYPE_DISK) { > + if (emu_type == VIRT_DISK_TYPE_DISK || > + emu_type == VIRT_DISK_TYPE_LUN) { > CMSetProperty(inst, "VirtualQuantity", > (CMPIValue *)&disk_size, > CMPI_uint64); > } else if (emu_type == VIRT_DISK_TYPE_CDROM) { > dev = "hdc"; > } else if (emu_type == VIRT_DISK_TYPE_FLOPPY) { > dev = "fda"; > - } else if (emu_type == VIRT_DISK_TYPE_LUN) { > - dev = "sda"; > } > > > > leaves me with one question - > > Are you expecting the LUN type to have a dev of "hda" or "sda"? If > "sda", I can fix the code and push... If "hda", I will just push... > > I actually assume you meant "sda"... > > John > Dear John,
From http://libvirt.org/formatdomain.html, I think 'sda' is a better choice. Thanks, Xu Wang >> diff --git a/schema/ResourceAllocationSettingData.mof b/schema/ResourceAllocationSettingData.mof >> index 9c387f0..f78d423 100644 >> --- a/schema/ResourceAllocationSettingData.mof >> +++ b/schema/ResourceAllocationSettingData.mof >> @@ -10,8 +10,8 @@ class Xen_DiskResourceAllocationSettingData : Xen_ResourceAllocationSettingData >> string VirtualDevice; >> >> [Description ("Device emulation type"), >> - ValueMap {"0", "1", "2"}, >> - Values {"Disk", "CDROM", "floppy"}] >> + ValueMap {"0", "1", "2", "4"}, >> + Values {"Disk", "CDROM", "floppy", "lun"}] >> uint16 EmulatedType; >> >> [Description ("Bus type of the device")] >> @@ -43,8 +43,8 @@ class KVM_DiskResourceAllocationSettingData : KVM_ResourceAllocationSettingData >> string VirtualDevice; >> >> [Description ("Device emulation type"), >> - ValueMap {"0", "1", "2", "3"}, >> - Values {"Disk", "CDROM", "floppy", "filesystem"}] >> + ValueMap {"0", "1", "2", "3", "4"}, >> + Values {"Disk", "CDROM", "floppy", "filesystem", "lun"}] >> uint16 EmulatedType; >> >> [Description ("Bus type of the device")] >> diff --git a/src/Virt_RASD.c b/src/Virt_RASD.c >> index 3c62c2d..761d053 100644 >> --- a/src/Virt_RASD.c >> +++ b/src/Virt_RASD.c >> @@ -444,6 +444,9 @@ static CMPIStatus set_disk_rasd_params(const CMPIBroker *broker, >> else if ((dev->dev.disk.device != NULL) && >> STREQ(dev->dev.disk.device, "floppy")) >> type = VIRT_DISK_TYPE_FLOPPY; >> + else if ((dev->dev.disk.device != NULL) && >> + STREQ(dev->dev.disk.device, "lun")) >> + type = VIRT_DISK_TYPE_LUN; >> else >> type = VIRT_DISK_TYPE_DISK; >> >> diff --git a/src/Virt_RASD.h b/src/Virt_RASD.h >> index 400143f..49d7195 100644 >> --- a/src/Virt_RASD.h >> +++ b/src/Virt_RASD.h >> @@ -27,6 +27,7 @@ >> #define VIRT_DISK_TYPE_CDROM 1 >> #define VIRT_DISK_TYPE_FLOPPY 2 >> #define VIRT_DISK_TYPE_FS 3 >> +#define VIRT_DISK_TYPE_LUN 4 >> >> char *rasd_to_xml(CMPIInstance *rasd); >> >> diff --git a/src/Virt_SettingsDefineCapabilities.c b/src/Virt_SettingsDefineCapabilities.c >> index 756e46b..49986ff 100644 >> --- a/src/Virt_SettingsDefineCapabilities.c >> +++ b/src/Virt_SettingsDefineCapabilities.c >> @@ -1071,7 +1071,8 @@ static CMPIStatus set_disk_props(int type, >> (CMPIValue *)"FV disk", CMPI_chars); >> } >> >> - if (emu_type == VIRT_DISK_TYPE_DISK) { >> + if (emu_type == VIRT_DISK_TYPE_DISK || >> + emu_type == VIRT_DISK_TYPE_LUN) { >> CMSetProperty(inst, "VirtualQuantity", >> (CMPIValue *)&disk_size, CMPI_uint64); >> } else if (emu_type == VIRT_DISK_TYPE_CDROM) { >> diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c >> index f673c38..c640360 100644 >> --- a/src/Virt_VirtualSystemManagementService.c >> +++ b/src/Virt_VirtualSystemManagementService.c >> @@ -1114,7 +1114,8 @@ static const char *disk_rasd_to_vdev(CMPIInstance *inst, >> type = VIRT_DISK_TYPE_DISK; >> >> if ((type == VIRT_DISK_TYPE_DISK) || >> - (type == VIRT_DISK_TYPE_FS)){ >> + (type == VIRT_DISK_TYPE_FS) || >> + (type == VIRT_DISK_TYPE_LUN)){ >> if (dev->dev.disk.disk_type == DISK_UNKNOWN) { >> /* on success or fail caller should try free it */ >> rc = asprintf(p_error, "Device %s, Address %s, " >> @@ -1149,6 +1150,8 @@ static const char *disk_rasd_to_vdev(CMPIInstance *inst, >> dev->dev.disk.device = strdup("floppy"); >> else if (type == VIRT_DISK_TYPE_FS) >> dev->dev.disk.device = strdup("filesystem"); >> + else if (type == VIRT_DISK_TYPE_LUN) >> + dev->dev.disk.device = strdup("lun"); >> else >> return "Invalid value for EmulatedType"; >> >> > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From jferlan at redhat.com Wed Jun 11 18:20:42 2014 From: jferlan at redhat.com (John Ferlan) Date: Wed, 11 Jun 2014 14:20:42 -0400 Subject: [Libvirt-cim] [PATCH V2] Add disk device='lun' support In-Reply-To: <5397CC80.7090704@gmail.com> References: <1401178450-14982-1-git-send-email-gesaint@linux.vnet.ibm.com> <539595D7.10401@redhat.com> <5397CC80.7090704@gmail.com> Message-ID: <53989DFA.4060005@redhat.com> On 06/10/2014 11:26 PM, Xu Wang wrote: > > ? 2014?06?09? 19:09, John Ferlan ??: >> >> On 05/27/2014 04:14 AM, Xu Wang wrote: >>> Besides 'disk', 'cdrom', 'floppy' and 'filesystem', there is one >>> more value 'lun' should be supported by value of device field in >>> the disk device. So this patch adds it into libvirt-cim. Now device >>> like could be operated by class. >>> >>> Signed-off-by: Xu Wang >>> --- >>> schema/ResourceAllocationSettingData.mof | 8 ++++---- >>> src/Virt_RASD.c | 3 +++ >>> src/Virt_RASD.h | 1 + >>> src/Virt_SettingsDefineCapabilities.c | 3 ++- >>> src/Virt_VirtualSystemManagementService.c | 5 ++++- >>> 5 files changed, 14 insertions(+), 6 deletions(-) >> A difference between this and your prior patch: >> >> --- a/src/Virt_SettingsDefineCapabilities.c >> +++ b/src/Virt_SettingsDefineCapabilities.c >> @@ -1071,15 +1071,14 @@ static CMPIStatus set_disk_props(int type, >> (CMPIValue *)"FV disk", CMPI_chars); >> } >> >> - if (emu_type == VIRT_DISK_TYPE_DISK) { >> + if (emu_type == VIRT_DISK_TYPE_DISK || >> + emu_type == VIRT_DISK_TYPE_LUN) { >> CMSetProperty(inst, "VirtualQuantity", >> (CMPIValue *)&disk_size, >> CMPI_uint64); >> } else if (emu_type == VIRT_DISK_TYPE_CDROM) { >> dev = "hdc"; >> } else if (emu_type == VIRT_DISK_TYPE_FLOPPY) { >> dev = "fda"; >> - } else if (emu_type == VIRT_DISK_TYPE_LUN) { >> - dev = "sda"; >> } >> >> >> >> leaves me with one question - >> >> Are you expecting the LUN type to have a dev of "hda" or "sda"? If >> "sda", I can fix the code and push... If "hda", I will just push... >> >> I actually assume you meant "sda"... >> >> John >> > Dear John, > > > > > >
> > > From http://libvirt.org/formatdomain.html, I think 'sda' is a better choice. > > Thanks, > Xu Wang OK - the following was squashed in and pushed: diff --git a/src/Virt_SettingsDefineCapabilities.c b/src/Virt_SettingsDefineCapa index 49986ff..85cb27a 100644 --- a/src/Virt_SettingsDefineCapabilities.c +++ b/src/Virt_SettingsDefineCapabilities.c @@ -1075,6 +1075,8 @@ static CMPIStatus set_disk_props(int type, emu_type == VIRT_DISK_TYPE_LUN) { CMSetProperty(inst, "VirtualQuantity", (CMPIValue *)&disk_size, CMPI_uint64); + if (emu_type == VIRT_DISK_TYPE_LUN) + dev = "sda"; } else if (emu_type == VIRT_DISK_TYPE_CDROM) { dev = "hdc"; } else if (emu_type == VIRT_DISK_TYPE_FLOPPY) { From jferlan at redhat.com Wed Jun 11 18:53:40 2014 From: jferlan at redhat.com (John Ferlan) Date: Wed, 11 Jun 2014 14:53:40 -0400 Subject: [Libvirt-cim] [PATCH] Complete the support for dumpCore In-Reply-To: <1401094835-24383-1-git-send-email-gesaint@linux.vnet.ibm.com> References: <1401094835-24383-1-git-send-email-gesaint@linux.vnet.ibm.com> Message-ID: <5398A5B4.6040607@redhat.com> On 05/26/2014 05:00 AM, Xu Wang wrote: > Add API support for dumpCore field of Memory devices. > > Signed-off-by: Xu Wang > --- > libxkutil/device_parsing.c | 1 + > schema/ResourceAllocationSettingData.mof | 3 +++ > src/Virt_RASD.c | 8 ++++++++ > src/Virt_VirtualSystemManagementService.c | 11 +++++++++++ > 4 files changed, 23 insertions(+), 0 deletions(-) > Seems reasonable - should I merge in the other patch as well? John > diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c > index f863cc5..d654a6a 100644 > --- a/libxkutil/device_parsing.c > +++ b/libxkutil/device_parsing.c > @@ -1438,6 +1438,7 @@ struct virt_device *virt_device_dup(struct virt_device *_dev) > } else if (dev->type == CIM_RES_TYPE_MEM) { > dev->dev.mem.size = _dev->dev.mem.size; > dev->dev.mem.maxsize = _dev->dev.mem.maxsize; > + dev->dev.mem.dumpCore = _dev->dev.mem.dumpCore; > } else if (dev->type == CIM_RES_TYPE_PROC) { > dev->dev.vcpu.quantity = _dev->dev.vcpu.quantity; > } else if (dev->type == CIM_RES_TYPE_EMU) { > diff --git a/schema/ResourceAllocationSettingData.mof b/schema/ResourceAllocationSettingData.mof > index 9c387f0..11a444f 100644 > --- a/schema/ResourceAllocationSettingData.mof > +++ b/schema/ResourceAllocationSettingData.mof > @@ -229,6 +229,9 @@ class Xen_MemResourceAllocationSettingData : Xen_ResourceAllocationSettingData > ] > class KVM_MemResourceAllocationSettingData : KVM_ResourceAllocationSettingData > { > + [Description ("dumpCore could be set as 'on' or 'off'. " > + "it also could be leave null.")] > + boolean dumpCore; > }; > > [Description ("LXC virtual memory"), > diff --git a/src/Virt_RASD.c b/src/Virt_RASD.c > index 3c62c2d..691fff9 100644 > --- a/src/Virt_RASD.c > +++ b/src/Virt_RASD.c > @@ -1044,6 +1044,14 @@ CMPIInstance *rasd_from_vdev(const CMPIBroker *broker, > (CMPIValue *)&dev->dev.mem.size, CMPI_uint64); > CMSetProperty(inst, "Limit", > (CMPIValue *)&dev->dev.mem.maxsize, CMPI_uint64); > + > + if (dev->dev.mem.dumpCore != MEM_DUMP_CORE_NOT_SET) { > + bool dumpCore = true; > + if (dev->dev.mem.dumpCore == MEM_DUMP_CORE_OFF) > + dumpCore = false; > + CMSetProperty(inst, "dumpCore", > + (CMPIValue *)&dumpCore, CMPI_boolean); > + } > } else if (dev->type == CIM_RES_TYPE_PROC) { > set_proc_rasd_params(broker, ref, dev, host, inst); > } else if (dev->type == CIM_RES_TYPE_GRAPHICS) { > diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c > index f673c38..f228a73 100644 > --- a/src/Virt_VirtualSystemManagementService.c > +++ b/src/Virt_VirtualSystemManagementService.c > @@ -1236,6 +1236,17 @@ static const char *mem_rasd_to_vdev(CMPIInstance *inst, > const char *units; > CMPIrc ret; > int shift; > + bool dumpCore; > + > + ret = cu_get_bool_prop(inst, "dumpCore", &dumpCore); > + if (ret != CMPI_RC_OK) { > + dev->dev.mem.dumpCore = MEM_DUMP_CORE_NOT_SET; > + } else { > + if (dumpCore) > + dev->dev.mem.dumpCore = MEM_DUMP_CORE_ON; > + else > + dev->dev.mem.dumpCore = MEM_DUMP_CORE_OFF; > + } > > ret = cu_get_u64_prop(inst, "VirtualQuantity", &dev->dev.mem.size); > if (ret != CMPI_RC_OK) > From jferlan at redhat.com Wed Jun 11 18:53:58 2014 From: jferlan at redhat.com (John Ferlan) Date: Wed, 11 Jun 2014 14:53:58 -0400 Subject: [Libvirt-cim] [PATCH] libxutil: Fix memory device dumpCore field parsing In-Reply-To: <1401933960-18054-1-git-send-email-gesaint@linux.vnet.ibm.com> References: <1401933960-18054-1-git-send-email-gesaint@linux.vnet.ibm.com> Message-ID: <5398A5C6.9050102@redhat.com> On 06/04/2014 10:06 PM, Xu Wang wrote: > Signed-off-by: Xu Wang > --- > libxkutil/device_parsing.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > Do you mind if I merge/squash this together with your other dumpCore patch? John > diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c > index d654a6a..815feea 100644 > --- a/libxkutil/device_parsing.c > +++ b/libxkutil/device_parsing.c > @@ -850,9 +850,9 @@ static int parse_mem_device(xmlNode *node, struct virt_device **vdevs) > else if (XSTREQ(node->name, "memory")) { > sscanf(content, "%" PRIu64, &mdev->maxsize); > tmpval = get_attr_value(node, "dumpCore"); > - if (tmpval && XSTREQ(tmpval, "on")) { > + if (tmpval && STREQC(tmpval, "on")) { > mdev->dumpCore = MEM_DUMP_CORE_ON; > - } else if (tmpval && XSTREQ(content, "off")) { > + } else if (tmpval && STREQC(tmpval, "off")) { > mdev->dumpCore = MEM_DUMP_CORE_OFF; > } else { > mdev->dumpCore = MEM_DUMP_CORE_NOT_SET; > From gesaint at linux.vnet.ibm.com Mon Jun 16 06:55:37 2014 From: gesaint at linux.vnet.ibm.com (Xu Wang) Date: Mon, 16 Jun 2014 14:55:37 +0800 Subject: [Libvirt-cim] [PATCH] libxutil: Fix memory device dumpCore field parsing In-Reply-To: <5398A5C6.9050102@redhat.com> References: <1401933960-18054-1-git-send-email-gesaint@linux.vnet.ibm.com> <5398A5C6.9050102@redhat.com> Message-ID: <539E94E9.2050203@linux.vnet.ibm.com> ? 2014?06?12? 02:53, John Ferlan ??: > > On 06/04/2014 10:06 PM, Xu Wang wrote: >> Signed-off-by: Xu Wang >> --- >> libxkutil/device_parsing.c | 4 ++-- >> 1 files changed, 2 insertions(+), 2 deletions(-) >> > Do you mind if I merge/squash this together with your other dumpCore patch? > > John Sure. Thanks for your work. Xu Wang > >> diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c >> index d654a6a..815feea 100644 >> --- a/libxkutil/device_parsing.c >> +++ b/libxkutil/device_parsing.c >> @@ -850,9 +850,9 @@ static int parse_mem_device(xmlNode *node, struct virt_device **vdevs) >> else if (XSTREQ(node->name, "memory")) { >> sscanf(content, "%" PRIu64, &mdev->maxsize); >> tmpval = get_attr_value(node, "dumpCore"); >> - if (tmpval && XSTREQ(tmpval, "on")) { >> + if (tmpval && STREQC(tmpval, "on")) { >> mdev->dumpCore = MEM_DUMP_CORE_ON; >> - } else if (tmpval && XSTREQ(content, "off")) { >> + } else if (tmpval && STREQC(tmpval, "off")) { >> mdev->dumpCore = MEM_DUMP_CORE_OFF; >> } else { >> mdev->dumpCore = MEM_DUMP_CORE_NOT_SET; >> > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim From jferlan at redhat.com Mon Jun 16 10:28:43 2014 From: jferlan at redhat.com (John Ferlan) Date: Mon, 16 Jun 2014 06:28:43 -0400 Subject: [Libvirt-cim] [PATCH] libxutil: Fix memory device dumpCore field parsing In-Reply-To: <539E94E9.2050203@linux.vnet.ibm.com> References: <1401933960-18054-1-git-send-email-gesaint@linux.vnet.ibm.com> <5398A5C6.9050102@redhat.com> <539E94E9.2050203@linux.vnet.ibm.com> Message-ID: <539EC6DB.4090208@redhat.com> On 06/16/2014 02:55 AM, Xu Wang wrote: > > ? 2014?06?12? 02:53, John Ferlan ??: >> >> On 06/04/2014 10:06 PM, Xu Wang wrote: >>> Signed-off-by: Xu Wang >>> --- >>> libxkutil/device_parsing.c | 4 ++-- >>> 1 files changed, 2 insertions(+), 2 deletions(-) >>> >> Do you mind if I merge/squash this together with your other dumpCore patch? >> >> John > Sure. Thanks for your work. > > Xu Wang OK - done. Now merged and pushed upstream John From jferlan at redhat.com Mon Jun 16 10:30:45 2014 From: jferlan at redhat.com (John Ferlan) Date: Mon, 16 Jun 2014 06:30:45 -0400 Subject: [Libvirt-cim] [PATCH 0/3] cimtest: Changes for live.full_hostname In-Reply-To: <1400610388-907-1-git-send-email-jferlan@redhat.com> References: <1400610388-907-1-git-send-email-jferlan@redhat.com> Message-ID: <539EC755.50102@redhat.com> On 05/20/2014 02:26 PM, John Ferlan wrote: > Series of patches to close the loop on prior set of cimtest changes: > > http://www.redhat.com/archives/libvirt-cim/2014-April/msg00002.html > > Based primarily on feedback/investigation done as part of a prior > cimtest commit: > > http://www.redhat.com/archives/libvirt-cim/2014-May/msg00012.html > > Patch 1 of 3 modifies the full_hostname() call to use getfqdn() only. A > prior patch would attempt the gethostname() if something failed, but as > seen through the documentation of the in the above link - thats also a > fallback for getfqdn(). > > Patches 2&3 remove the check_sblim() usage. See the commit messages for > details. > > John Ferlan (3): > live.full_hostname: Adjust mechanism to get FQDN > HostSystem: Remove call to check_sblim > XenKvmLib: Remove check_sblim() > > lib/VirtLib/live.py | 6 +-- > .../cimtest/ElementConforms/04_ectp_rev_errs.py | 2 +- > suites/libvirt-cim/cimtest/HostSystem/01_enum.py | 56 +++++++--------------- > .../cimtest/HostSystem/03_hs_to_settdefcap.py | 2 +- > suites/libvirt-cim/lib/XenKvmLib/common_util.py | 28 ----------- > suites/libvirt-cim/lib/XenKvmLib/vxml.py | 2 +- > 6 files changed, 24 insertions(+), 72 deletions(-) > Any thoughts/comments on patches 2 & 3 to remove check_sblim()? Tks, John