summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHirotaka Wakabayashi <hiwkby@yahoo.com>2022-03-19 22:01:11 +0900
committerJeremy Stanley <fungi@yuggoth.org>2022-03-29 01:43:36 +0000
commita1815f6e0c436b4bdc15456c4f31abefff0d5c6e (patch)
tree864b7947e34efbddf3eea731ccda3740d606927c
parent2872e91c04e9f60e1c648964a35f5d875493ef7a (diff)
downloadtrove-a1815f6e0c436b4bdc15456c4f31abefff0d5c6e.tar.gz
Removes the deprecated argument tenant from TroveContext17.0.0.0rc217.0.0
The tenant argument of RequestContext in oslo.context had been deprecated long time ago and it was finally removed in oslo.context-4.0.0. We should remove the tenant argument of TroveContext that derives from RequestContext and we should also update the requirements.txt in the master branch. The original problem of this patch is the Configurations API errors in following cases: * when getting a configuration. * when adding a new configuration parameter. Story: 2009933 Task: 44816 Change-Id: Idbd0507e6c87d6926f93806d0d1eef13f557d805 (cherry picked from commit be54e5f16d7c6861cc9c3d4f0f27c4cd892b1046)
-rw-r--r--trove/configuration/service.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/trove/configuration/service.py b/trove/configuration/service.py
index 48f705a0..50b4138b 100644
--- a/trove/configuration/service.py
+++ b/trove/configuration/service.py
@@ -88,7 +88,7 @@ class ConfigurationsController(wsgi.Controller):
'deleted': False
}
if not context.is_admin:
- kwargs['tenant_id'] = context.tenant
+ kwargs['tenant_id'] = context.project_id
instances = instances_models.DBInstance.find_all(**kwargs)
limit = int(context.limit or CONF.instances_page_size)
@@ -246,7 +246,7 @@ class ConfigurationsController(wsgi.Controller):
LOG.debug("Re-applying configuration group '%s' to all clusters.",
configuration_id)
clusters = cluster_models.DBCluster.find_all(
- tenant_id=context.tenant,
+ tenant_id=context.project_id,
configuration_id=configuration_id,
deleted=False).all()