[PATCH] ECTP: Adoption of changes to std_assoc struct in std_association

# HG changeset patch # User Heidi Eckhart <heidieck@linux.vnet.ibm.com> # Date 1196287282 -3600 # Node ID 786976aa40c60088afe17571372b4a5d82a0d29e # Parent 535f219fe23fec8a5de725e0875e4fcdadbd584c ECTP: Adoption of changes to std_assoc struct in std_association This is the follow up patch to the API changes made in std_association. The struct std_assoc does now take lists for source, target and assoc classnames. It also adds the registration of ComputerSystem and HostSystem to the interop namespace. This is necessary to check the client's resultClass value. Signed-off-by: Heidi Eckhart <heidieck@linux.vnet.ibm.com> diff -r 535f219fe23f -r 786976aa40c6 Makefile.am --- a/Makefile.am Wed Nov 28 11:39:55 2007 +0100 +++ b/Makefile.am Wed Nov 28 23:01:22 2007 +0100 @@ -36,6 +36,8 @@ MOFS = \ schema/ElementSettingData.mof INTEROP_MOFS = \ + schema/ComputerSystem.mof \ + schema/HostSystem.mof \ schema/RegisteredProfile.mof \ schema/ElementConformsToProfile.mof diff -r 535f219fe23f -r 786976aa40c6 src/Virt_ElementConformsToProfile.c --- a/src/Virt_ElementConformsToProfile.c Wed Nov 28 11:39:55 2007 +0100 +++ b/src/Virt_ElementConformsToProfile.c Wed Nov 28 23:01:22 2007 +0100 @@ -224,27 +224,47 @@ static CMPIInstance *make_ref(const CMPI return assoc_inst; } +char* conformant_standard[] = { + "Xen_RegisteredProfile", + "KVM_RegisteredProfile", + NULL +}; + +char* managed_element[] = { + "Xen_HostSystem", + "Xen_ComputerSystem", + "KVM_HostSystem", + "KVM_ComputerSystem", + NULL +}; + +char* assoc_classname[] = { + "Xen_ElementConformsToProfile", + "KVM_ElementConformsToProfile", + NULL +}; + struct std_assoc forward = { - .source_class = "CIM_RegisteredProfile", + .source_class = (char**)&conformant_standard, .source_prop = "ConformantStandard", - .target_class = "CIM_ManagedElement", + .target_class = (char**)&managed_element, .target_prop = "ManagedElement", - .assoc_class = NULL, + .assoc_class = (char**)&assoc_classname, .handler = prof_to_elem, .make_ref = make_ref }; struct std_assoc backward = { - .source_class = "CIM_ManagedElement", + .source_class = (char**)&managed_element, .source_prop = "ManagedElement", - .target_class = "CIM_RegisteredProfile", + .target_class = (char**)&conformant_standard, .target_prop = "ConformantStandard", - .assoc_class = NULL, + .assoc_class = (char**)&assoc_classname, .handler = elem_to_prof, .make_ref = make_ref @@ -255,7 +275,6 @@ struct std_assoc *assoc_handlers[] = { &backward, NULL }; - STDA_AssocMIStub(, Virt_ElementConformsToProfileProvider, _BROKER, libvirt_cim_init(), assoc_handlers); /*

I will cook up the patches for the other associations tomorrow. This one is for verification purpose. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck@linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294

HE> I will cook up the patches for the other associations tomorrow. This HE> one is for verification purpose. Great, thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@us.ibm.com

Heidi Eckhart wrote:
# HG changeset patch # User Heidi Eckhart <heidieck@linux.vnet.ibm.com> # Date 1196287282 -3600 # Node ID 786976aa40c60088afe17571372b4a5d82a0d29e # Parent 535f219fe23fec8a5de725e0875e4fcdadbd584c ECTP: Adoption of changes to std_assoc struct in std_association
This looks good and worked for me. =) I suspect this will have to be checked in as a part of a larger patchset since every class will be dependent on the libcmpiutil changes. -- Kaitlin Rupert IBM Linux Technology Center karupert@us.ibm.com
participants (3)
-
Dan Smith
-
Heidi Eckhart
-
Kaitlin Rupert