[Libvirt-cim] [PATCH] Consolidate redundant code in for generating XML for net devices