#NEWLINE# def port_up_segment_mode( self , lldpad_port , port_name , port_uuid , mac , net_uuid , segmentation_id , oui ) : #NEWLINE# #INDENT# lvm = self . local_vlan_map . get ( net_uuid ) #NEWLINE# if ( lvm and lvm . late_binding_vlan ) : #NEWLINE# #INDENT# vdp_vlan = lvm . late_binding_vlan #NEWLINE# ovs_cb_data = { #NEWLINE# #INDENT# 'obj' : self , #NEWLINE# 'mac' : mac , #NEWLINE# 'port_uuid' : port_uuid , #NEWLINE# 'net_uuid' : net_uuid , #NEWLINE# #UNINDENT# } #NEWLINE# lldpad_port . send_vdp_vnic_up ( port_uuid = port_uuid , vsiid = port_uuid , gid = segmentation_id , mac = mac , vlan = vdp_vlan , oui = oui , vsw_cb_fn = self . vdp_vlan_change , vsw_cb_data = ovs_cb_data ) #NEWLINE# lvm . port_uuid_list [ port_uuid ] = port_uuid #NEWLINE# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# int_br = self . integ_br_obj #NEWLINE# lvid = int_br . get_port_vlan_tag ( port_name ) #NEWLINE# if ( lvid != cconstants . INVALID_VLAN ) : #NEWLINE# #INDENT# ( ret , vdp_vlan ) = self . provision_vdp_overlay_networks ( port_uuid , mac , net_uuid , segmentation_id , lvid , oui ) #NEWLINE# if ( not lvm ) : #NEWLINE# #INDENT# lvm = LocalVlan ( lvid , segmentation_id ) #NEWLINE# self . local_vlan_map [ net_uuid ] = lvm #NEWLINE# #UNINDENT# lvm . lvid = lvid #NEWLINE# lvm . port_uuid_list [ port_uuid ] = port_uuid #NEWLINE# if ( vdp_vlan != cconstants . INVALID_VLAN ) : #NEWLINE# #INDENT# lvm . late_binding_vlan = vdp_vlan #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# LOG . error ( _LE ( 'Cannot provision VDP overlay' ) ) #NEWLINE# #UNINDENT# return ret #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# LOG . error ( _LE ( 'Invalid VLAN' ) ) #NEWLINE# return False