[Libvirt-cim] [PATCH 07 of 12] HS: Adoption of changes to std_assoc struct in std_association
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Thu Nov 29 17:11:36 UTC 2007
Heidi Eckhart wrote:
> + CMPIStatus s = {CMPI_RC_OK, NULL};
> CMPIInstance *refinst = NULL;
> - char *base;
> + virConnectPtr conn = NULL;
>
> - base = class_base_name(assoc->assoc_class);
> - if (base == NULL)
> - goto out;
> + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s);
> + if (conn == NULL)
> + return NULL;
>
> refinst = get_typed_instance(_BROKER,
> - CLASSNAME(ref),
> - base,
> + pfx_from_conn(conn),
> + "HostedService",
> NAMESPACE(ref));
>
> if (refinst != NULL) {
> @@ -101,67 +102,58 @@ static CMPIInstance *make_ref(const CMPI
> set_reference(assoc, refinst, ref, instop);
> }
>
> -out:
> + virConnectClose(conn);
> +
> return refinst;
>
I think this patch has some unrelated changes. Could this be sent as a
separate patch?
> +char* dependent[] = {
> + "Xen_VirtualSystemManagementService",
> + "KVM_VirtualSystemManagementService",
> + NULL
> +};
> +
>
This provider also supports ResourcePoolConfigurationService - could
that be added as well?. Whew - this patch cleaned up a lot of redundant
std_assoc blocks. Nicely done. =)
--
Kaitlin Rupert
IBM Linux Technology Center
karupert at us.ibm.com
More information about the Libvirt-cim
mailing list