def _notify_cfg_agent_port_update(resource, event, trigger, **kwargs):
original_port = kwargs.get('<STR_LIT>')<EOL>updated_port = kwargs.get('<STR_LIT:port>')<EOL>if (updated_port is not None and original_port is not None and (<EOL>updated_port.get('<STR_LIT>')) != (<EOL>original_port.get('<STR_LIT>'))):<EOL><INDENT>new_port_data = {'<STR_LIT:port>': {}}<EOL>new_port_data['<STR_LIT:port>']['<STR_LIT>'] = (<EOL>updated_port.get('<STR_LIT>'))<EOL>original_device_owner = original_port.get('<STR_LIT>', '<STR_LIT>')<EOL>if original_device_owner.startswith('<STR_LIT>'):<EOL><INDENT>router_id = original_port.get('<STR_LIT>')<EOL>context = kwargs.get('<STR_LIT>')<EOL>l3plugin = bc.get_plugin(L3_ROUTER_NAT)<EOL>if l3plugin and router_id:<EOL><INDENT>l3plugin._notify_port_update_routers(context, router_id,<EOL>original_port,<EOL>new_port_data,<EOL>'<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT>
Called when router port/interface is enabled/disabled