[PATCH] Add source host and directory for netfs diskpool

# HG changeset patch # User Sharad Mishra <snmishra@us.ibm.com> # Date 1310766822 25200 # Node ID f064a20fba355fa2fbaa2bc914fa2189712223f6 # Parent 0563cf6502d4cd10418001d88c0c60b269370b3e Add source host and directory for netfs diskpool. Added new properties to populate the source host and directory being used for netfs diskpool. Signed-off-by: Sharad Mishra <snmishra@us.ibm.com> diff -r 0563cf6502d4 -r f064a20fba35 schema/DiskPool.mof --- a/schema/DiskPool.mof Fri Jul 15 09:03:55 2011 -0700 +++ b/schema/DiskPool.mof Fri Jul 15 14:53:42 2011 -0700 @@ -5,6 +5,9 @@ { [Description("Path this storage pool represents")] string Path; + uint16 Autostart; + string Host; + string SourceDirectory; }; @@ -13,6 +16,9 @@ { [Description("Path this storage pool represents")] string Path; + uint16 Autostart; + string Host; + string SourceDirectory; }; @@ -21,6 +27,9 @@ { [Description("Path this storage pool represents")] string Path; + uint16 Autostart; + string Host; + string SourceDirectory; }; diff -r 0563cf6502d4 -r f064a20fba35 src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Fri Jul 15 09:03:55 2011 -0700 +++ b/src/Virt_DevicePool.c Fri Jul 15 14:53:42 2011 -0700 @@ -213,6 +213,19 @@ CMSetProperty(inst, "Path", (CMPIValue *)pool_str, CMPI_chars); } + if (pool_vals->pool_info.disk.host != NULL) { + pool_str = strdup(pool_vals->pool_info.disk.host); + + CMSetProperty(inst, "Host", + (CMPIValue *)pool_str, CMPI_chars); + } + if (pool_vals->pool_info.disk.src_dir != NULL) { + pool_str = strdup(pool_vals->pool_info.disk.src_dir); + + CMSetProperty(inst, "SourceDirectory", + (CMPIValue *)pool_str, CMPI_chars); + } + type = pool_vals->pool_info.disk.pool_type; CMSetProperty(inst, "OtherResourceType", (CMPIValue *)get_disk_pool_type(type),

Looks correct, builds source and rpm. I did not explicitly test the function since I don't have netfs access. +1 and pushed. On 07/15/2011 06:00 PM, Sharad Mishra wrote:
# HG changeset patch # User Sharad Mishra<snmishra@us.ibm.com> # Date 1310766822 25200 # Node ID f064a20fba355fa2fbaa2bc914fa2189712223f6 # Parent 0563cf6502d4cd10418001d88c0c60b269370b3e Add source host and directory for netfs diskpool.
Added new properties to populate the source host and directory being used for netfs diskpool.
Signed-off-by: Sharad Mishra<snmishra@us.ibm.com>
diff -r 0563cf6502d4 -r f064a20fba35 schema/DiskPool.mof --- a/schema/DiskPool.mof Fri Jul 15 09:03:55 2011 -0700 +++ b/schema/DiskPool.mof Fri Jul 15 14:53:42 2011 -0700 @@ -5,6 +5,9 @@ { [Description("Path this storage pool represents")] string Path; + uint16 Autostart; + string Host; + string SourceDirectory;
};
@@ -13,6 +16,9 @@ { [Description("Path this storage pool represents")] string Path; + uint16 Autostart; + string Host; + string SourceDirectory;
};
@@ -21,6 +27,9 @@ { [Description("Path this storage pool represents")] string Path; + uint16 Autostart; + string Host; + string SourceDirectory;
};
diff -r 0563cf6502d4 -r f064a20fba35 src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Fri Jul 15 09:03:55 2011 -0700 +++ b/src/Virt_DevicePool.c Fri Jul 15 14:53:42 2011 -0700 @@ -213,6 +213,19 @@ CMSetProperty(inst, "Path", (CMPIValue *)pool_str, CMPI_chars); } + if (pool_vals->pool_info.disk.host != NULL) { + pool_str = strdup(pool_vals->pool_info.disk.host); + + CMSetProperty(inst, "Host", + (CMPIValue *)pool_str, CMPI_chars); + } + if (pool_vals->pool_info.disk.src_dir != NULL) { + pool_str = strdup(pool_vals->pool_info.disk.src_dir); + + CMSetProperty(inst, "SourceDirectory", + (CMPIValue *)pool_str, CMPI_chars); + } + type = pool_vals->pool_info.disk.pool_type; CMSetProperty(inst, "OtherResourceType", (CMPIValue *)get_disk_pool_type(type),
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim
-- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent@linux.vnet.ibm.com
participants (2)
-
Chip Vincent
-
Sharad Mishra