'Raise if requirements are not met.'

def _check_requirements(self, context, tenant_id):

    self._get_default_external_network(context)
    try:
        self._get_supported_subnetpools(context)
    except n_exc.NotFound:
        raise exceptions.AutoAllocationFailure(reason=_('No    default    subnetpools    defined'))
    return {'id': 'dry-run=pass', 'tenant_id': tenant_id}
