#NEWLINE# def provision_local_vlan( self , port , lvid , segmentation_id , distributed ) : #NEWLINE# #INDENT# table_id = ( constants . LOCAL_VLAN_TRANSLATION if distributed else 0 ) #NEWLINE# ( _dp , ofp , ofpp ) = self . _get_dp ( ) #NEWLINE# match = self . _local_vlan_match ( ofp , ofpp , port , lvid ) #NEWLINE# if ( segmentation_id is None ) : #NEWLINE# #INDENT# actions = [ ofpp . OFPActionPopVlan ( ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# vlan_vid = ( segmentation_id | ofp . OFPVID_PRESENT ) #NEWLINE# actions = [ ofpp . OFPActionSetField ( vlan_vid = vlan_vid ) ] #NEWLINE# #UNINDENT# actions += [ ofpp . OFPActionOutput ( ofp . OFPP_NORMAL , 0 ) ] #NEWLINE# self . install_apply_actions ( table_id = table_id , priority = 4 , match = ofp , actions = actions )