Skip to content

Commit

Permalink
Merge pull request #668 from joseph-v/oceanstor-mapping
Browse files Browse the repository at this point in the history
Add mapping support for OceanStor driver
  • Loading branch information
skdwriting authored Sep 3, 2021
2 parents cfd5a1c + 97e8a59 commit 75023fe
Show file tree
Hide file tree
Showing 11 changed files with 911 additions and 136 deletions.
33 changes: 33 additions & 0 deletions delfin/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,39 @@ class ShareProtocol(object):
ALL = (CIFS, NFS, FTP, HDFS)


class HostStatus(object):
NORMAL = 'normal'
OFFLINE = 'offline'
ABNORMAL = 'abnormal'

ALL = (NORMAL, OFFLINE, ABNORMAL)


class HostOSTypes(object):
LINUX = 'Linux'
WINDOWS = 'Windows'
SOLARIS = 'Solaris'
HP_UX = 'HP-UX'
AIX = 'AIX'
XEN_SERVER = 'XenServer'
VMWARE_ESX = 'VMware ESX'
LINUX_VIS = 'LINUX_VIS'
WINDOWS_SERVER_2012 = 'Windows Server 2012'
ORACLE_VM = 'Oracle VM'
OPEN_VMS = 'Open VMS'

ALL = (LINUX, WINDOWS, SOLARIS, HP_UX, AIX, XEN_SERVER, VMWARE_ESX,
LINUX_VIS, WINDOWS_SERVER_2012, ORACLE_VM, OPEN_VMS)


class InitiatorStatus(object):
ONLINE = 'online'
OFFLINE = 'offline'
UNKNOWN = 'unknown'

ALL = (ONLINE, OFFLINE, UNKNOWN)


# Enumerations for alert severity
class Severity(object):
FATAL = 'Fatal'
Expand Down
26 changes: 26 additions & 0 deletions delfin/drivers/huawei/oceanstor/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,32 @@
THICK_LUNTYPE = '0'
THIN_LUNTYPE = '1'

HOST_OS = [
constants.HostOSTypes.LINUX,
constants.HostOSTypes.WINDOWS,
constants.HostOSTypes.SOLARIS,
constants.HostOSTypes.HP_UX,
constants.HostOSTypes.AIX,
constants.HostOSTypes.XEN_SERVER,
constants.HostOSTypes.VMWARE_ESX,
constants.HostOSTypes.LINUX_VIS,
constants.HostOSTypes.WINDOWS_SERVER_2012,
constants.HostOSTypes.ORACLE_VM,
constants.HostOSTypes.OPEN_VMS,
]

HOST_RUNNINGSTATUS_NORMAL = '1'
INITIATOR_RUNNINGSTATUS_UNKNOWN = '0'
INITIATOR_RUNNINGSTATUS_ONLINE = '27'
INITIATOR_RUNNINGSTATUS_OFFLINE = '28'
ISCSI_INITIATOR_TYPE = 222
FC_INITIATOR_TYPE = 223
IB_INITIATOR_TYPE = 16499
ISCSI_INITIATOR_DESCRIPTION = 'iSCSI Initiator'
FC_INITIATOR_DESCRIPTION = 'FC Initiator'
IB_INITIATOR_DESCRIPTION = 'IB Initiator'
UNKNOWN_INITIATOR_DESCRIPTION = 'Unknown Initiator'

OCEANSTOR_METRICS = {
'iops': '22',
'readIops': '25',
Expand Down
Loading

0 comments on commit 75023fe

Please sign in to comment.