Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a host status and resolved problem of tenant field is deleted from oslo.context 4.0.0. #817

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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