def update_port_state(context, port_id, admin_state_up):
 port_id = port_id[0:11]
 session = context.session
 session.query(BrocadePort).filter_by(port_id=port_id).update({'admin_state_up': admin_state_up})

def update_port_state ( context , port_id , admin_state_up ) : port_id = port_id [ 0 : 11 ] session = context . session session . query ( BrocadePort ) . filter_by ( port_id = port_id ) . update ( { 'admin_state_up' : admin_state_up } )
update port attributes .