diff --git a/delfin/common/constants.py b/delfin/common/constants.py index bff18dc3c..64079316a 100644 --- a/delfin/common/constants.py +++ b/delfin/common/constants.py @@ -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): @@ -279,9 +280,11 @@ class InitiatorType(object): FC = 'fc' ISCSI = 'iscsi' NVME_OVER_ROCE = 'roce' + SAS = 'sas' + NVME_OVER_FABRIC = 'nvme-of' UNKNOWN = 'unknown' - ALL = (FC, ISCSI, NVME_OVER_ROCE, UNKNOWN) + ALL = (FC, ISCSI, NVME_OVER_ROCE, SAS, NVME_OVER_FABRIC, UNKNOWN) # Enumerations for alert severity diff --git a/delfin/context.py b/delfin/context.py index 2248aa0a1..04817306e 100644 --- a/delfin/context.py +++ b/delfin/context.py @@ -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), @@ -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