'Event handler to for csnat port creation on interface creation.'

@registry.receives(resources.ROUTER_INTERFACE, [events.BEFORE_CREATE])
@db_api.retry_if_session_inactive()
def _add_csnat_on_interface_create(self, resource, event, trigger, context, router_db, port, **kwargs):

    if ((not router_db.extra_attributes.distributed) or (not router_db.gw_port)):
        return
    admin_context = context.elevated()
    self._add_csnat_router_interface_port(admin_context, router_db, port['network_id'], port['fixed_ips'][(-1)]['subnet_id'])
