[Libvirt-cim] [PATCH] [RFC] #2 - variable renaming in make_ref() of associations
Dan Smith
danms at us.ibm.com
Wed Dec 5 17:26:11 UTC 2007
HE> # HG changeset patch
HE> # User Heidi Eckhart <heidieck at linux.vnet.ibm.com>
HE> # Date 1196858495 -3600
HE> # Node ID af64285fa953aca6c4183d0fd6845d110ddd1a1d
HE> # Parent 012fc8655c2b443511ba536ef2b425ac86f69f7b
HE> [RFC] #2 - variable renaming in make_ref() of associations
HE> Suggestion to rename some of the variables in make_ref()
HE> to make the relations clearer.
HE> Also moved the content of make_ref() to make_reference()
HE> in libxkutil to generalize it. This make_reference can
HE> then be used by each association's make_ref().
Sounds good to me.
HE> + CMPIInstance *ref_inst = NULL;
HE> +
HE> + ref_inst = make_reference(_BROKER,
HE> + source_ref,
HE> + target_inst,
HE> + assoc,
HE> + "ElementAllocatedFromPool");
HE> +
HE> + return ref_inst;
HE> }
Why not just pass the make_reference function from libxkutil directly
in the std_assoc block? The function should be able to infer the name
of the reference from the assoc_class field of the std_assoc or info
struct, right?
That would let us cut out even more code from all the providers :)
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms at us.ibm.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20071205/6553cc19/attachment.sig>
More information about the Libvirt-cim
mailing list