'Event handler to create HA resources before router creation.'

@registry.receives(resources.ROUTER, [events.BEFORE_CREATE])
@db_api.retry_if_session_inactive()
def _before_router_create(self, resource, event, trigger, context, router, **kwargs):

    if (not self._is_ha(router)):
        return
    if (not self.get_ha_network(context, router['tenant_id'])):
        self._create_ha_network(context, router['tenant_id'])
