# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1239679403 25200
# Node ID c9160bb4698b629c7832efcd32f6641fd74449de
# Parent 8d0ce3b79aaacde9a7b25d8e2fe2eb79878229ee
Pass OP with root/virt NS to get_host() in ECTP
When calling get_host() in ECTP, be sure to pass object path with root/virt
namespace instead of root/interop. get_host() uses the namespace of the ref
when creating the instance, so this needs to be set properly.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 8d0ce3b79aaa -r c9160bb4698b src/Virt_ElementConformsToProfile.c
--- a/src/Virt_ElementConformsToProfile.c Wed Apr 08 22:22:42 2009 -0400
+++ b/src/Virt_ElementConformsToProfile.c Mon Apr 13 20:23:23 2009 -0700
@@ -64,15 +64,7 @@
if (class == NULL)
return s;
- if (STREQC(class, "HostSystem")) {
- s = get_host(_BROKER, info->context, ref, &inst, false);
- if (s.rc == CMPI_RC_OK)
- inst_list_add(list, inst);
- goto out;
- }
-
- classname = get_typed_class(pfx_from_conn(conn),
- class);
+ classname = get_typed_class(pfx_from_conn(conn), class);
if (classname == NULL) {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
@@ -83,7 +75,14 @@
op = CMNewObjectPath(_BROKER, CIM_VIRT_NS, classname, &s);
if ((s.rc != CMPI_RC_OK) || CMIsNullObject(op))
goto out;
-
+
+ if (STREQC(class, "HostSystem")) {
+ s = get_host(_BROKER, info->context, op, &inst, false);
+ if (s.rc == CMPI_RC_OK)
+ inst_list_add(list, inst);
+ goto out;
+ }
+
en = CBEnumInstances(_BROKER, info->context , op, info->properties,
&s);
if (en == NULL) {
cu_statusf(_BROKER, &s,
_______________________________________________
Libvirt-cim mailing list
Libvirt-cim(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim
--
Richard Maciel, MSc
IBM Linux Technology Center
rmaciel(a)linux.vnet.ibm.com