
# HG changeset patch # User Heidi Eckhart <heidieck@linux.vnet.ibm.com> # Date 1196844142 -3600 # Node ID cf48a55a717b1aa79345e95aff6cfec96cbc2d65 # Parent bce59cb2dd5054ba4f01bc20d805ed99bd767119 HS: Provider registered per subclass The provider registration approach - registering one provider per subclass (Xen_<classname>Provider, KVM_<classname>Provider) caused interoperability issues with Pegasus and sfcb. The same call returned duplicates with sfcb and worked with Pegasus. Signed-off-by: Heidi Eckhart <heidieck@linux.vnet.ibm.com> diff -r bce59cb2dd50 -r cf48a55a717b schema/HostedService.registration --- a/schema/HostedService.registration Wed Dec 05 09:42:21 2007 +0100 +++ b/schema/HostedService.registration Wed Dec 05 09:42:22 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 -# Classname Namespace ProviderName ProviderModule ProviderTypes ... -Xen_HostedService root/virt Xen_HostedServiceProvider Virt_HostedService association -KVM_HostedService root/virt KVM_HostedServiceProvider Virt_HostedService association +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_HostedService root/virt Virt_HostedServiceProvider Virt_HostedService association +KVM_HostedService root/virt Virt_HostedServiceProvider Virt_HostedService association diff -r bce59cb2dd50 -r cf48a55a717b src/Virt_HostedService.c --- a/src/Virt_HostedService.c Wed Dec 05 09:42:21 2007 +0100 +++ b/src/Virt_HostedService.c Wed Dec 05 09:42:22 2007 +0100 @@ -40,10 +40,11 @@ static CMPIStatus service_to_host(const struct std_assoc_info *info, struct inst_list *list) { - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *instance; - ASSOC_MATCH(info->provider_name, CLASSNAME(ref)); + if (!match_hypervisor_prefix(ref, info)) + return s; s = get_host_cs(_BROKER, ref, &instance); if (s.rc == CMPI_RC_OK) @@ -59,7 +60,8 @@ static CMPIStatus host_to_service(const CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst; - ASSOC_MATCH(info->provider_name, CLASSNAME(ref)); + if (!match_hypervisor_prefix(ref, info)) + return s; s = rpcs_instance(ref, &inst, _BROKER); if (s.rc != CMPI_RC_OK) @@ -159,8 +161,7 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Xen_HostedServiceProvider, _BROKER, libvirt_cim_init(), handlers); -STDA_AssocMIStub(, KVM_HostedServiceProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, Virt_HostedServiceProvider, _BROKER, libvirt_cim_init(), handlers); /* * Local Variables: