#NEWLINE# def _create_ovs_vif_cmd( bridge , dev , iface_id , mac , instance_id , interface_type = None ) : #NEWLINE# #INDENT# cmd = [ '--' , '--if-exists' , 'del-port' , dev , '--' , 'add-port' , bridge , dev , '--' , 'set' , 'Interface' , dev , ( 'external-ids:iface-id=%s' % iface_id ) , 'external-ids:iface-status=active' , ( 'external-ids:attached-mac=%s' % mac ) , ( 'external-ids:vm-uuid=%s' % instance_id ) ] #NEWLINE# if interface_type : #NEWLINE# #INDENT# cmd += [ ( 'type=%s' % interface_type ) ] #NEWLINE# #UNINDENT# return cmd