Using project* instead of tenant*
Implements: blueprint remove-tenant Change-Id: If75f96f7daa6ec38596db302e05148109a256df8
This commit is contained in:
parent
99404c804e
commit
d3e26b50da
@ -57,10 +57,10 @@ class ContextHook(hooks.PecanHook):
|
||||
The following HTTP request headers are used:
|
||||
|
||||
X-User-Id or X-User:
|
||||
Used for context.user.
|
||||
Used for context.user_id.
|
||||
|
||||
X-Tenant-Id or X-Tenant:
|
||||
Used for context.tenant.
|
||||
Used for context.project_id.
|
||||
|
||||
X-Auth-Token:
|
||||
Used for context.auth_token.
|
||||
|
@ -76,7 +76,7 @@ def model_query(context, model, *args, **kwargs):
|
||||
"""
|
||||
|
||||
if kwargs.pop("project_only", False):
|
||||
kwargs["project_id"] = context.tenant
|
||||
kwargs["project_id"] = context.project_id
|
||||
|
||||
with _session_for_read() as session:
|
||||
query = sqlalchemyutils.model_query(
|
||||
|
@ -97,7 +97,7 @@ class QuotaEngine(object):
|
||||
value will be treated as a number of seconds).
|
||||
:param project_id: Specify the project_id if current context
|
||||
is admin and admin wants to impact on
|
||||
common user's tenant.
|
||||
common user's project.
|
||||
"""
|
||||
if not project_id:
|
||||
project_id = context.project_id
|
||||
@ -117,7 +117,7 @@ class QuotaEngine(object):
|
||||
returned by the reserve() method.
|
||||
:param project_id: Specify the project_id if current context
|
||||
is admin and admin wants to impact on
|
||||
common user's tenant.
|
||||
common user's project.
|
||||
"""
|
||||
project_id = context.project_id
|
||||
try:
|
||||
@ -173,7 +173,7 @@ class DbQuotaDriver(object):
|
||||
returned by the reserve() method.
|
||||
:param project_id: Specify the project_id if current context
|
||||
is admin and admin wants to impact on
|
||||
common user's tenant.
|
||||
common user's project.
|
||||
"""
|
||||
|
||||
try:
|
||||
|
@ -136,10 +136,10 @@ class BaseApiTest(base.DbTestCase):
|
||||
headers = {
|
||||
'X-User-Name': ct.get("user_name") or "user",
|
||||
'X-User-Id':
|
||||
ct.get("user") or "1d6d686bc2c949ddb685ffb4682e0047",
|
||||
ct.get("user_id") or "1d6d686bc2c949ddb685ffb4682e0047",
|
||||
'X-Project-Name': ct.get("project_name") or "no_project_name",
|
||||
'X-Project-Id':
|
||||
ct.get("tenant") or "86f64f561b6d4f479655384572727f70",
|
||||
ct.get("project_id") or "86f64f561b6d4f479655384572727f70",
|
||||
'X-User-Domain-Id':
|
||||
ct.get("domain_id") or "bd5eeb7d0fb046daaf694b36f4df5518",
|
||||
'X-User-Domain-Name': ct.get("domain_name") or "no_domain",
|
||||
|
Loading…
Reference in New Issue
Block a user