# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1196844141 -3600
# Node ID bce59cb2dd5054ba4f01bc20d805ed99bd767119
# Parent b07a0b1db5d9bb50e80d08a06d8138de3a132c69
ESD: 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 b07a0b1db5d9 -r bce59cb2dd50 schema/ElementSettingData.registration
--- a/schema/ElementSettingData.registration Wed Dec 05 09:42:20 2007 +0100
+++ b/schema/ElementSettingData.registration Wed Dec 05 09:42:21 2007 +0100
@@ -1,4 +1,4 @@
# Copyright IBM Corp. 2007
-# Classname Namespace ProviderName ProviderModule ProviderTypes ...
-Xen_ElementSettingData root/virt Xen_ElementSettingDataProvider Virt_ElementSettingData
association
-KVM_ElementSettingData root/virt KVM_ElementSettingDataProvider Virt_ElementSettingData
association
+# Classname Namespace ProviderName ProviderModule ProviderTypes
+Xen_ElementSettingData root/virt Virt_ElementSettingDataProvider Virt_ElementSettingData
association
+KVM_ElementSettingData root/virt Virt_ElementSettingDataProvider Virt_ElementSettingData
association
diff -r b07a0b1db5d9 -r bce59cb2dd50 src/Virt_ElementSettingData.c
--- a/src/Virt_ElementSettingData.c Wed Dec 05 09:42:20 2007 +0100
+++ b/src/Virt_ElementSettingData.c Wed Dec 05 09:42:21 2007 +0100
@@ -39,13 +39,14 @@ static CMPIStatus vssd_to_vssd(const CMP
struct std_assoc_info *info,
struct inst_list *list)
{
- CMPIStatus s;
+ CMPIStatus s = {CMPI_RC_OK, NULL};
CMPIInstance *inst;
virConnectPtr conn = NULL;
virDomainPtr dom = NULL;
char *host = NULL;
- ASSOC_MATCH(info->provider_name, CLASSNAME(ref));
+ if (!match_hypervisor_prefix(ref, info))
+ return s;
if (!parse_instanceid(ref, NULL, &host)) {
cu_statusf(_BROKER, &s,
@@ -93,7 +94,8 @@ static CMPIStatus rasd_to_rasd(const CMP
const char *id = NULL;
uint16_t type;
- ASSOC_MATCH(info->provider_name, CLASSNAME(ref));
+ if (!match_hypervisor_prefix(ref, info))
+ return s;
if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) {
cu_statusf(_BROKER, &s,
@@ -227,8 +229,7 @@ static struct std_assoc *handlers[] = {
NULL
};
-STDA_AssocMIStub(, Xen_ElementSettingDataProvider, _BROKER, libvirt_cim_init(),
handlers);
-STDA_AssocMIStub(, KVM_ElementSettingDataProvider, _BROKER, libvirt_cim_init(),
handlers);
+STDA_AssocMIStub(, Virt_ElementSettingDataProvider, _BROKER, libvirt_cim_init(),
handlers);
/*
* Local Variables: