'Check if the subnetpool can be updated or not.
If the subnetpool is associated to a shared address scope not owned
by the tenant, then the subnetpool cannot be updated.'

def _check_subnetpool_update_allowed(self, context, subnetpool_id, address_scope_id):

    if (not self.is_address_scope_owned_by_tenant(context, address_scope_id)):
        msg = (_('subnetpool    %(subnetpool_id)s    cannot    be    updated    when    associated    with    shared    address    scope    %(address_scope_id)s') % {'subnetpool_id': subnetpool_id, 'address_scope_id': address_scope_id})
        raise n_exc.IllegalSubnetPoolUpdate(reason=msg)
