Skip to content

Commit

Permalink
Merge pull request sodafoundation#817 from qinwang-murphy/add_host_in…
Browse files Browse the repository at this point in the history
…itiator_type

Add a host status and resolved problem of  tenant field is deleted from oslo.context 4.0.0.
  • Loading branch information
joseph-v authored Feb 8, 2022
2 parents 122c928 + 014d58c commit 928641a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion delfin/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,9 @@ class HostStatus(object):
NORMAL = 'normal'
OFFLINE = 'offline'
ABNORMAL = 'abnormal'
DEGRADED = 'degraded'

ALL = (NORMAL, OFFLINE, ABNORMAL)
ALL = (NORMAL, OFFLINE, ABNORMAL, DEGRADED)


class HostOSTypes(object):
Expand Down
2 changes: 1 addition & 1 deletion delfin/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def __init__(self, user_id=None, project_id=None, is_admin=None,
super(RequestContext, self).__init__(
auth_token=auth_token,
user=user_id or user,
tenant=project_id or tenant,
domain=kwargs.pop('domain', None),
user_domain=kwargs.pop('user_domain', None),
project_domain=kwargs.pop('project_domain', None),
Expand All @@ -70,6 +69,7 @@ def __init__(self, user_id=None, project_id=None, is_admin=None,
roles=roles)

self.user_id = self.user
self.tenant = project_id or tenant
self.project_id = self.tenant

self.read_deleted = read_deleted
Expand Down

0 comments on commit 928641a

Please sign in to comment.