#NEWLINE# def register_local_ports( self , chassis_name , local_ports_ids ) : #NEWLINE# #INDENT# txn = idl . Transaction ( self . idl ) #NEWLINE# chassis = idlutils . row_by_value ( self . idl , 'Chassis' , 'name' , chassis_name ) #NEWLINE# for binding in self . idl . tables [ 'Binding' ] . rows . values ( ) : #NEWLINE# #INDENT# if ( binding . logical_port in local_ports_ids ) : #NEWLINE# #INDENT# if ( binding . chassis == chassis_name ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# binding . chassis = chassis #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( binding . chassis == chassis_name ) : #NEWLINE# #INDENT# binding . chassis = [ ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# status = txn . commit_block ( ) #NEWLINE# return status