# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1196844143 -3600
# Node ID f67ca8f5c7d74e5b288a7cbf6d9e8a9e3f27f05e
# Parent 9751a165ebca953b720faf81c4fdfd5d0748aa6a
SDC: 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(a)linux.vnet.ibm.com>
diff -r 9751a165ebca -r f67ca8f5c7d7 schema/SettingsDefineCapabilities.registration
--- a/schema/SettingsDefineCapabilities.registration Wed Dec 05 09:42:22 2007 +0100
+++ b/schema/SettingsDefineCapabilities.registration Wed Dec 05 09:42:23 2007 +0100
@@ -1,4 +1,4 @@
# Copyright IBM Corp. 2007
# Classname Namespace ProviderName ProviderModule ProviderTypes
-Xen_SettingsDefineCapabilities root/virt Xen_SettingsDefineCapabilitiesProvider
Virt_SettingsDefineCapabilities association
-KVM_SettingsDefineCapabilities root/virt KVM_SettingsDefineCapabilitiesProvider
Virt_SettingsDefineCapabilities association
+Xen_SettingsDefineCapabilities root/virt Virt_SettingsDefineCapabilitiesProvider
Virt_SettingsDefineCapabilities association
+KVM_SettingsDefineCapabilities root/virt Virt_SettingsDefineCapabilitiesProvider
Virt_SettingsDefineCapabilities association
diff -r 9751a165ebca -r f67ca8f5c7d7 src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Wed Dec 05 09:42:22 2007 +0100
+++ b/src/Virt_SettingsDefineCapabilities.c Wed Dec 05 09:42:23 2007 +0100
@@ -781,6 +781,9 @@ static CMPIStatus alloc_cap_to_rasd(cons
int ret;
uint16_t type;
+ if (!match_hypervisor_prefix(ref, info))
+ return s;
+
CU_DEBUG("Getting ResourceType");
ret = cu_get_u16_path(ref, "ResourceType", &type);
@@ -900,8 +903,7 @@ struct std_assoc *assoc_handlers[] = {
};
-STDA_AssocMIStub(, Xen_SettingsDefineCapabilitiesProvider, _BROKER, libvirt_cim_init(),
assoc_handlers);
-STDA_AssocMIStub(, KVM_SettingsDefineCapabilitiesProvider, _BROKER, libvirt_cim_init(),
assoc_handlers);
+STDA_AssocMIStub(, Virt_SettingsDefineCapabilitiesProvider, _BROKER, libvirt_cim_init(),
assoc_handlers);
/*
* Local Variables: