#NEWLINE# def _add_ports( switch_elem , switch , slice_urn ) : #NEWLINE# #INDENT# 'Add the ports tags for the switch' #NEWLINE# ifaces = switch . openflowinterface_set . all ( ) #NEWLINE# for iface in ifaces : #NEWLINE# #INDENT# et . SubElement ( slice_urn , PORT_TAG , { #NEWLINE# #INDENT# URN : _port_to_urn ( switch . datapath_id , iface . port_num ) , #NEWLINE# #UNINDENT# } )