[Libvirt-cim] [PATCH] (#2) Do not filter out SBLIM host
Chip Vincent
cvincent at linux.vnet.ibm.com
Thu Sep 23 15:20:02 UTC 2010
Curious why there is code to both fetch and filter out the SBLIM
instance. Anyway, the code looks good and has been pushed upstream.
+1
Sharad Mishra wrote:
> # HG changeset patch
> # User Sharad Mishra <snmishra at us.ibm.com>
> # Date 1285004026 25200
> # Node ID 9cdaa2ce4c1541235182bf5a8097caffcf0dbcfc
> # Parent 5dcb6bc27cc6e7fdcb2e595358d523cf29023808
> (#2) Do not filter out SBLIM host.
>
> This patch removes the code that does not return SBLIM host system.
> The original code did not have this filter and was added later.
> I searched the archives and did not find any reason to add this code.
>
> Update #2 - Added an else case where if enumeration of instances is null,
> a fake host is returned.
>
> Signed-off-by: Sharad Mishra <snmishra at us.ibm.com>
>
> diff -r 5dcb6bc27cc6 -r 9cdaa2ce4c15 src/Virt_HostSystem.c
> --- a/src/Virt_HostSystem.c Wed Sep 08 16:36:08 2010 -0400
> +++ b/src/Virt_HostSystem.c Mon Sep 20 10:33:46 2010 -0700
> @@ -194,6 +194,11 @@
> }
>
> *inst = data.value.inst;
> + } else {
> + cu_statusf(broker, &s,
> + CMPI_RC_ERR_FAILED,
> + "No entry found");
> + goto out;
> }
>
> out:
> @@ -237,20 +242,11 @@
> {
> CMPIStatus s = {CMPI_RC_OK, NULL};
> CMPIInstance *inst = NULL;
> - CMPIObjectPath *path = NULL;
>
> s = get_host(_BROKER, context, reference, &inst, is_get_inst);
> if (s.rc != CMPI_RC_OK || inst == NULL)
> goto out;
>
> - path = CMGetObjectPath(inst, &s);
> - if ((path == NULL) || (s.rc != CMPI_RC_OK))
> - return s;
> -
> - if (STARTS_WITH(CLASSNAME(path), "Linux_"))
> - /* Don't return SBLIM instances */
> - goto out;
> -
> if (name_only)
> cu_return_instance_name(results, inst);
> else
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
>
--
Chip Vincent
Open Virtualization, Linux Technology Center
IBM Systems & Technology Group
phone: 919-254-4482, T/L 444-4482
email: cvincent at us.ibm.com
More information about the Libvirt-cim
mailing list