def update_nexusport_binding(port_id, new_vlan_id):
if not new_vlan_id:<EOL><INDENT>LOG.warning("<STR_LIT>")<EOL>return<EOL><DEDENT>LOG.debug("<STR_LIT>")<EOL>session = bc.get_writer_session()<EOL>binding = _lookup_one_nexus_binding(session=session, port_id=port_id)<EOL>binding.vlan_id = new_vlan_id<EOL>session.merge(binding)<EOL>session.flush()<EOL>return binding<EOL>
Updates nexusport binding.