[PATCH 0/3] cimtest: Changes for live.full_hostname
by John Ferlan
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(-)
--
1.9.0
10 years, 6 months
[PATCH] Complete the support for dumpCore
by Xu Wang
Add API support for dumpCore field of Memory devices.
Signed-off-by: Xu Wang <gesaint(a)linux.vnet.ibm.com>
---
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(-)
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)
--
1.7.1
10 years, 6 months
[PATCH V2] Add disk device='lun' support
by Xu Wang
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 <disk type='block' device='lun'> could be operated by class.
Signed-off-by: Xu Wang <gesaint(a)linux.vnet.ibm.com>
---
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(-)
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";
--
1.7.1
10 years, 6 months
[PATCH V2] cimtest: Update controller type from pci to scsi
by Xu Wang
To test controller device new element <controller type='pci' index='0'
model='pci-root'> was introduced into domain xml. But it was not supported
until libvirt-1.0.5. Now RHEL-6.5 is using libvirt-0.10.2-29. It could
involve regression issue. Hence here I updated it to <controller type='scsi'
index='0' model='virtio-scsi'> to test fields of this device.
Signed-off-by: Xu Wang <gesaint(a)linux.vnet.ibm.com>
---
.../libvirt-cim/cimtest/SystemDevice/01_forward.py | 6 +++++-
.../02_reverse.py | 6 +++++-
suites/libvirt-cim/lib/XenKvmLib/vxml.py | 2 +-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
index f81aff1..3fab346 100644
--- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
+++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
@@ -133,7 +133,11 @@ def main():
if curr_cim_rev >= controller_rev and virt == 'KVM':
controller_cn = get_typed_class(virt, "Controller")
exp_pllist[controller_cn] = []
- exp_pllist[controller_cn].append('%s/controller:pci:0' % test_dom)
+ exp_pllist[controller_cn].append('%s/controller:scsi:0' % test_dom)
+ # pci-root gets added automagically for us since scsi has to
+ # hang somewhere
+ if virsh_version_cmp(libvirt_version, "1.0.5") >= 0:
+ exp_pllist[controller_cn].append('%s/controller:pci:0' % test_dom)
exp_pllist[controller_cn].append('%s/controller:usb:0' % test_dom)
try:
diff --git a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
index a7e6c17..89124e3 100644
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
@@ -101,7 +101,11 @@ def assoc_values(ip, assoc_info, virt="Xen"):
if curr_cim_rev >= controller_rev:
# Add controllers too ... will need a cim/cimtest version check
- rasd_list.update({"pci_rasd":"%s/controller:pci:0" % test_dom})
+ rasd_list.update({"scsi_rasd":"%s/controller:scsi:0" % test_dom})
+ # pci-root gets added automagically for us since scsi has to
+ # hang somewhere
+ if virsh_version_cmp(libvirt_version, "1.0.5") >= 0:
+ rasd_list.update({"pci_rasd":"%s/controller:pci:0" % test_dom})
rasd_list.update({"usb_rasd":"%s/controller:usb:0" % test_dom})
expect_rasds = len(rasd_list)
diff --git a/suites/libvirt-cim/lib/XenKvmLib/vxml.py b/suites/libvirt-cim/lib/XenKvmLib/vxml.py
index c38b4dd..8c4256c 100644
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py
@@ -937,7 +937,7 @@ class KVMXML(VirtXML, VirtCIM):
is_ipv6_only=None,
port_num='-1', keymap="en-us", irstype="mouse",
btype="ps2", vnc_passwd=None,
- ctltype="pci", ctlindex=0, ctlmodel="pci-root"):
+ ctltype="scsi", ctlindex=0, ctlmodel="virtio-scsi"):
# Optionally the following works too:
#ctltype="usb", ctlindex=0, ctlmodel=None):
if not os.path.exists(disk_file_path):
--
1.7.1
10 years, 7 months
[PATCH] cimtest: Update controller type from pci to scsi
by Xu Wang
To test controller device new element <controller type='pci' index='0'
model='pci-root'> was introduced into domain xml. But it was not supported
until libvirt-1.0.5. Now RHEL-6.5 is using libvirt-0.10.2-29. It could
involve regression issue. Hence here I updated it to <controller type='scsi'
index='0' model='virtio-scsi'> to test fields of this device.
Signed-off-by: Xu Wang <gesaint(a)linux.vnet.ibm.com>
---
.../libvirt-cim/cimtest/SystemDevice/01_forward.py | 2 +-
.../02_reverse.py | 2 +-
suites/libvirt-cim/lib/XenKvmLib/vxml.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
index f81aff1..052efc1 100644
--- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
+++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
@@ -133,7 +133,7 @@ def main():
if curr_cim_rev >= controller_rev and virt == 'KVM':
controller_cn = get_typed_class(virt, "Controller")
exp_pllist[controller_cn] = []
- exp_pllist[controller_cn].append('%s/controller:pci:0' % test_dom)
+ exp_pllist[controller_cn].append('%s/controller:scsi:0' % test_dom)
exp_pllist[controller_cn].append('%s/controller:usb:0' % test_dom)
try:
diff --git a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
index a7e6c17..9060ae4 100644
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
@@ -101,7 +101,7 @@ def assoc_values(ip, assoc_info, virt="Xen"):
if curr_cim_rev >= controller_rev:
# Add controllers too ... will need a cim/cimtest version check
- rasd_list.update({"pci_rasd":"%s/controller:pci:0" % test_dom})
+ rasd_list.update({"scsi_rasd":"%s/controller:scsi:0" % test_dom})
rasd_list.update({"usb_rasd":"%s/controller:usb:0" % test_dom})
expect_rasds = len(rasd_list)
diff --git a/suites/libvirt-cim/lib/XenKvmLib/vxml.py b/suites/libvirt-cim/lib/XenKvmLib/vxml.py
index 3bea13c..9ea46e4 100644
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py
@@ -937,7 +937,7 @@ class KVMXML(VirtXML, VirtCIM):
is_ipv6_only=None,
port_num='-1', keymap="en-us", irstype="mouse",
btype="ps2", vnc_passwd=None,
- ctltype="pci", ctlindex=0, ctlmodel="pci-root"):
+ ctltype="scsi", ctlindex=0, ctlmodel="virtio-scsi"):
# Optionally the following works too:
#ctltype="usb", ctlindex=0, ctlmodel=None):
if not os.path.exists(disk_file_path):
--
1.7.1
10 years, 7 months
[PATCH] Add disk device='lun' support
by Xu Wang
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 <disk type='block' device='lun'> could be operated by class.
Signed-off-by: Xu Wang <gesaint(a)linux.vnet.ibm.com>
---
schema/ResourceAllocationSettingData.mof | 8 ++++----
src/Virt_RASD.c | 3 +++
src/Virt_RASD.h | 1 +
src/Virt_SettingsDefineCapabilities.c | 2 ++
src/Virt_VirtualSystemManagementService.c | 2 ++
5 files changed, 12 insertions(+), 4 deletions(-)
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..714153e 100644
--- a/src/Virt_SettingsDefineCapabilities.c
+++ b/src/Virt_SettingsDefineCapabilities.c
@@ -1078,6 +1078,8 @@ static CMPIStatus set_disk_props(int type,
dev = "hdc";
} else if (emu_type == VIRT_DISK_TYPE_FLOPPY) {
dev = "fda";
+ } else if (emu_type == VIRT_DISK_TYPE_LUN) {
+ dev = "sda";
}
CMSetProperty(inst, "VirtualDevice",
diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c
index f673c38..28a9a5f 100644
--- a/src/Virt_VirtualSystemManagementService.c
+++ b/src/Virt_VirtualSystemManagementService.c
@@ -1149,6 +1149,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";
--
1.7.1
10 years, 7 months
[PATCH 00/10] cimtest: changes for controller and upstream support
by John Ferlan
Here's my bundle of cimtest related changes to support Controllers,
Controller Pools, and libvirt upstream addition of a keyboard device.
I have tested all these changes on both my upstream libvirt-cim environment
and a RHEL6.5 libvirt-cim environment. The only failures I get are in
the indiciations tests which I've never had working quite right. My testing
process was to add each patch separately and ensure that each didn't
change the RHEL6.5 results.
I've used the currently posted libvirt-cim revision number sequence as
the key to whether or not support for the controller and controller pool
will be added/checked. The numbers 1310 and 1312 may changed base on
how the libvirt-cim submit goes.
I have split them up into "bundles" of changes:
Patch 1: is a rebase/repost of a change I posted back in November. It's
still a valid change since then. I don't think I got an ACk for
it back then, so reposted
Patch 2: is a change because nfs server tests were failing in my upstream
environment on f19. I just added a parameter as nfs-server.service
told me to do and things worked.
Patch 3
Patch 4: These are infrastructure changes - Patch 3 is basically converting
all code that uses Dictionaries and the Class Name as the key to
the dictionary with lists of tuples that have the classname and
the element formerly inserted into the dictionary key. Patch 4 is
much of the same, but a bit more gnarly with respect to what it
did - so I kept it separate
Patch5
Patch6: Adds support for controller RASD - I can merge these later, but
keeping them separate was easier for code review purposes
Patch7
Patch8: Adds support for controller pools. Again, these can be merged, but
for review purposes - I'll keep them separate.
Patch9
Patch10: Adds support to handle the keyboard RASD as an input device. I have
a set of libvirt-cim code that will go along with this, but since
it's in my branch already - I just posted it anyway. It was part
of my RHEL6 environment testing. These won't be pushed with the
controller changes, but would be pushed eventually.
John Ferlan (10):
live.full_hostname: Adjust mechanism to get FQDN
XenKvmLib: Adjust systemd nfs server settings
cimtest: Use lists instead of dictionaries
cimtest: VSSDC - 02-reverse.py - adjust iteration of association
XenKvmLib: Add controller device
cimtest: Add controller RASD support
XenKvmLib: Add controller pool
cimtest: Add controller pool support
XenKvmLib: Add keyboard input RASD
cimtest: Add support for keyboard input device
lib/VirtLib/live.py | 11 +-
.../cimtest/AllocationCapabilities/01_enum.py | 4 +
.../ComputerSystem/41_cs_to_settingdefinestate.py | 57 +++++-----
.../cimtest/ElementCapabilities/01_forward.py | 1 +
.../cimtest/HostSystem/02_hostsystem_to_rasd.py | 25 +++--
.../cimtest/HostSystem/04_hs_to_EAPF.py | 3 +
.../cimtest/HostedResourcePool/01_forward.py | 7 +-
.../cimtest/RASD/01_verify_rasd_fields.py | 18 ++-
.../ResourceAllocationFromPool/02_reverse.py | 12 +-
.../cimtest/ServiceAffectsElement/01_forward.py | 57 +++++-----
.../cimtest/ServiceAffectsElement/02_reverse.py | 22 ++--
.../cimtest/SettingsDefine/02_reverse.py | 36 +++---
.../libvirt-cim/cimtest/SystemDevice/01_forward.py | 19 +++-
suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py | 27 ++++-
.../02_reverse.py | 124 ++++++++++++++-------
suites/libvirt-cim/lib/XenKvmLib/common_util.py | 4 +-
suites/libvirt-cim/lib/XenKvmLib/devices.py | 6 +
suites/libvirt-cim/lib/XenKvmLib/logicaldevices.py | 2 +-
suites/libvirt-cim/lib/XenKvmLib/pool.py | 6 +
suites/libvirt-cim/lib/XenKvmLib/rasd.py | 47 +++++++-
suites/libvirt-cim/lib/XenKvmLib/vsms.py | 24 ++++
suites/libvirt-cim/lib/XenKvmLib/vxml.py | 40 +++++--
22 files changed, 393 insertions(+), 159 deletions(-)
--
1.8.5.3
10 years, 7 months
[PATCH] xmlgen: fix build issue
by Pavel Hrdina
Function controller_protocol_type_IDToStr() returns a const char
and we should abide that.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
libxkutil/xmlgen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libxkutil/xmlgen.c b/libxkutil/xmlgen.c
index 3174ca9..a9a672d 100644
--- a/libxkutil/xmlgen.c
+++ b/libxkutil/xmlgen.c
@@ -807,7 +807,7 @@ static const char *controller_xml(xmlNodePtr root, struct domain *dominfo)
for (i = 0; i < dominfo->dev_controller_ct; i++) {
xmlNodePtr ctlr;
xmlNodePtr tmp;
- char *type_str;
+ const char *type_str;
struct virt_device *_dev = &dominfo->dev_controller[i];
if (_dev->type == CIM_RES_TYPE_UNKNOWN)
--
1.8.3.2
10 years, 7 months
[PATCH 0/2] Fix bug on buildVol error path
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1092882
Changes as a result of commit id '0c2305b3', see:
http://www.redhat.com/archives/libvir-list/2014-April/msg00375.html
Resulted in a regression when there was a failure to buildVol the
volume wasn't removed from the storage driver list because the wrong
local storage pointer was passed to the DeleteInternal routine.
Additionally a preexisting condition where if deleteVol didn't exist
or failed, the volume would not be removed from volumes.objs[] even
though it doesn't exist. This results in virsh vol-list and vol-info
not finding the volume and emitting error messages.
John Ferlan (2):
storage: Need to ensure removal of voldef from driver list
storage: Resolve issues in failure path
src/storage/storage_driver.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
--
1.9.0
10 years, 7 months
[PATCH v3 0/8] Add Controller Device Support
by John Ferlan
I know this is a long cover letter, but it covers a lot of ground...
I was just about done with all the merges this morning - I ran the cimtest
one more time and found that there's a couple of tests which associate
RASDs and Pools. So I jumped into the rabbit hole and wound my way through
the maze of twisty little passages. I even heard a babbling brook (it's an
old computer game reference).
So here's where I'm at - I have cimtest completely passing again which keeps
me happy. Although I have a pile of cimtest related changes that will also
need to be made, but I have to wait to do them until I get a libvirt-cim
revision number to compare against so as to be able to add conditional code
to support controllers devices, rasds, and pools.
For now support is only for KVM. We've already determined LXC doesn't have
the concept of a controller and I have no way to test Xen. I also don't have
the cycles to dig through the Xen source code and determine what that driver
supports. If someone wants to add that - great - have at it!
I want to put it out there for review - knowing that I probably still have
a bit of cleanup left. I think I'm going to need to add KVM specific code
to a number of places, but I figured I needed to get everything merged first
then I could determine that. I'm also hoping it'll be pointed out to me :-).
I kept the changes split even though I know only changes 1 & 2 can be compiled
alone and run without any new cimtest failures. Each step of changes can
compile successfully/cleanly - although once you hit change 3, you'll need
to regenerate your Makefile
Changes 1 & 2 are more or less Xu's previous patch #1. I split it for
ease of review - there's no real reason, although you will note I
have left out the addition of CONTROLLER to the cim_res_types until
patch 4... With that patch 2 will have cimtest failures.
Change 3 adds the MOF's and adjusts the install resulting in cimtest
failures because of "missing" links between MOF and code.
Change 4 adds the bulk of the code required to fill in all the fields for
the mofs from the xml/data structures.
Change 6 adds the various associations between the new elements
Change 7 adds the MOF's and modifies install/build to include ControllerPool's
Change 8 adds the code and associations for Controller Pools. Without it
there are a few cimtest failures.
My plan is to allow review of Changes 3->8 separately, but when it comes
time to push - 3-8 could be squashed together so that the ability to bisect
history and run cimtest without too many failures isn't lost. Although I'm
also considering combining 3-6 and 7-8 for "functionality" likeness. I'll
take suggestions from the community if it's felt strongly to keep the split
as is, then so bit it.
The following is a list of the differences between this set of changes
and what Xu posted as his v2. All I did was pull down his changes into a
clean branch, then 'git am' those changes. Then after making all my changes
a simple 'git diff' of the branches let me know what was different.
Makefile.am
* Copyright date
* Add controller pool
libvirt-cim.spec.in
* Order - kept closer to DisplayController/PointingDevice
* Add controller pool
libxkutil/device_parsing.c
* Copyright date
* Additional CU_DEBUG messages - useful in debugging free() issues
* Merged sgio/rawio changes
* cleanup_controller_device():
* Free new controller fields for queues, ports, vectors, address
* Changed controller 'type' from "char *" to "uint16_t", no need to free
* parse_controller_device():
* Use controller_protocol_type_StrToID() to store type integer
* Fail in "index" is not present
* Convert/store "index" as uint64_t and free "index"
* Added controller fields for queues, ports, vectors, address
* Format id as "controller:<type_str>:<index#>"
libxkutil/device_parsing.h
* Copyright date
* Add CONTROLLER_INDEX_NOT_SET as -1
* Change type to uint16_t, add uint64_t index, and char */device_address fields
libxkutil/xmlgen.c
* Copyright date
* Change how we store fields
* Be sure to convert the "type" to it's string representation
* Handle missing/default Index value (eg from define system from vdev)
* Print out model, ports, vectors, queues, and address if present
schema/Controller.mof
* Remove {Xen|LXC}_Controller
schema/Controller.registration
* Remove {Xen|LXC}_Controller
schema/ControllerPool.mof
* Add ControllerPool mof
schema/ControllerPool.registration
* Add ControllerPool registration
schema/ResourceAllocationSettingData.mof
* Copyright date
* Merged rawio/sgio changes
* Remove {Xen|LXC}_ControllerResourceAllocationSettingData
* Add comments and properties we care about
schema/ResourceAllocationSettingData.registration
* Copyright date
* Remove {Xen|LXC}_ControllerResourceAllocationSettingData
src/Virt_Device.c
* Copyright date
* Set the Virtual Controller Logical Device properties:
* ProtocolSupported <== String from controller_device->type (pci, usb, etc.)
* ProtocolDescription <== If available, string from model
* Adjusted some debug messages
* Removed incorrect setting of "Controller" property (twice)
src/Virt_DevicePool.c
* Add ControllerPool support
src/Virt_ElementAllocatedFromPool.c
* Copyright date
* Remove Xen/LXC associations
* Add ControllerPool
src/Virt_ElementCapabilities.c
* Copyright date
* Add ControllerPool
src/Virt_ElementSettingData.c
* Copyright date
* Remove Xen/LXC associations
src/Virt_HostedResourcePool.c
* Copyright date
* Add ControllerPool
src/Virt_RASD.c
* Copyright date
* Merged sgio/rawio changes
* set_controller_rasd_params():
* Set the fields properly based on defintion of structure/mof
* ResourceSubType <== String-ified type (pci, usb, etc)
* Other fields set if available in data structure
* Changed vdev_device -> type to use CIM_RES_TYPE_OTHER - this is the parent
structure to the controller_device structure
src/Virt_ResourceAllocationFromPool.c
* Copyright date
* Controller RASD Association
* ControllerPool Association
src/Virt_ResourcePoolConfigurationService.c
* Copyright date
* Add ControllerPool
src/Virt_ServiceAffectsElement.c
* Copyright date
* Add "Controller" to list that use get_device_by_ref() call
* Remove Xen/LXC associations
src/Virt_SettingsDefineState.c
* Copyright date
* Remove Xen/LXC associations
src/Virt_SystemDevice.c
* Copyright date
* Remove Xen/LXC associations
src/Virt_VSSDComponent.c
* Copyright date
* Remove Xen/LXC associations
src/Virt_VirtualSystemManagementService.c
* Copyright date
* Merged sgio/rawio changes
* Fix controller_rasd_to_vdev():
* Handle the controller_device->type properly to get 'type_str'
* Build dev->id based on Index:
NOTE: I found through debugging cimtest code that on input the dev->id
is NULL. It cannot be left that way since a subsequent call to
add_device_nodup() would core on the STREQC(ptr->id, dev->id).
Thus I formulated an InstanceID with the -1. If there's another
similarly "undefined" element, it'll go through the overriding
code and be removed.
* Set other fields if present in data
* Following Boris' earlier advice, mimic the method that disks, networks,
and graphics devices use to set things up.
* Similarly for resource_del, resource_add, and resource_mod - allow
the code to do it's magic for controller devices.
* HMM: Given what I discovered about dev->id in controller_rasd_to_vdev()
described above, I wonder if the check in resource_add could ever
happen. I guess it's "safe" to keep...
src/svpc_types.h
* Copyright date
* Add some pointers to where to find the details we're describing
* Add CIM_controller_protocol_type enum to describe the various values
* Add controller_protocol_type_StrToID() and controller_protocol_type_IDToStr()
to handle the "supported" conversions
John Ferlan (3):
Associations
Add MOFS and change install for ControllerPools
Add code and associations for ControllerPool
Xu Wang (5):
Add virtual controller device types
Parse/Store controller XML tags
Add virtual controller object definitions to mofs
Set fields in mofs for Controller Device/RASD
VSMS: Support for domains with controller devices
Makefile.am | 6 +-
libvirt-cim.spec.in | 4 +
libxkutil/device_parsing.c | 119 ++++++++++++++++++-
libxkutil/device_parsing.h | 17 ++-
libxkutil/xmlgen.c | 74 +++++++++++-
schema/Controller.mof | 7 ++
schema/Controller.registration | 4 +
schema/ControllerPool.mof | 6 +
schema/ControllerPool.registration | 3 +
schema/ResourceAllocationSettingData.mof | 37 +++++-
schema/ResourceAllocationSettingData.registration | 3 +-
src/Virt_Device.c | 68 ++++++++++-
src/Virt_DevicePool.c | 55 ++++++++-
src/Virt_ElementAllocatedFromPool.c | 6 +-
src/Virt_ElementCapabilities.c | 4 +-
src/Virt_ElementSettingData.c | 3 +-
src/Virt_HostedResourcePool.c | 3 +-
src/Virt_RASD.c | 57 +++++++++-
src/Virt_ResourceAllocationFromPool.c | 2 +
src/Virt_ResourcePoolConfigurationCapabilities.c | 2 +-
src/Virt_ResourcePoolConfigurationService.c | 2 +
src/Virt_ServiceAffectsElement.c | 8 +-
src/Virt_SettingsDefineState.c | 4 +-
src/Virt_SystemDevice.c | 3 +-
src/Virt_VSSDComponent.c | 3 +-
src/Virt_VirtualSystemManagementService.c | 87 +++++++++++++-
src/svpc_types.h | 132 +++++++++++++++++++++-
27 files changed, 695 insertions(+), 24 deletions(-)
create mode 100644 schema/Controller.mof
create mode 100644 schema/Controller.registration
create mode 100644 schema/ControllerPool.mof
create mode 100644 schema/ControllerPool.registration
--
1.8.5.3
10 years, 7 months