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 msa system pool volume disks alerts resources #761

Merged
merged 60 commits into from
Dec 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
7fa7e4e
add msa report
oneWLuo Oct 13, 2021
46be721
add msa report
oneWLuo Oct 14, 2021
6c7c8b6
delete
luojiagen Oct 14, 2021
bf870c9
add msa report
luojiagen Oct 14, 2021
ac7e043
add msa report
luojiagen Oct 14, 2021
8d41a1b
add msa report
luojiagen Oct 14, 2021
c99a206
Merge pull request #273 from luojiagen/hpe_msa
luopan-code Oct 14, 2021
9d2e3fe
Merge branch 'master' into hpe_msa
tanjiangyu-ghca Oct 14, 2021
88c9146
update msa code and insert trap info
luojiagen Nov 3, 2021
a586f06
update msa code and insert trap info
luojiagen Nov 3, 2021
2be6172
Optimize dictionary values
luojiagen Nov 3, 2021
438c305
Optimize dictionary values
luojiagen Nov 3, 2021
daf11d5
Merge pull request #285 from luojiagen/hpe_msa
luopan-code Nov 3, 2021
22f9345
Basic problems of modifying code
luojiagen Nov 9, 2021
1634b91
Basic problems of modifying code
luojiagen Nov 9, 2021
5811eba
Basic problems of modifying code
luojiagen Nov 9, 2021
8e5d08e
Basic problems of modifying code
luojiagen Nov 9, 2021
e9a077b
Basic problems of modifying code
luojiagen Nov 9, 2021
aef0655
Basic problems of modifying code
luojiagen Nov 9, 2021
d97e73e
Basic problems of modifying code
luojiagen Nov 9, 2021
11cc4f7
Basic problems of modifying code
luojiagen Nov 9, 2021
a2c0db9
Basic problems of modifying code
luojiagen Nov 9, 2021
8ad901a
Basic problems of modifying code
luojiagen Nov 9, 2021
c17d3e0
Basic problems of modifying code
luojiagen Nov 9, 2021
8da358a
Basic problems of modifying code
luojiagen Nov 9, 2021
ba26f36
Basic problems of modifying code
luojiagen Nov 9, 2021
4dded25
Merge pull request #292 from luojiagen/hpe_msa
luopan-code Nov 10, 2021
7579def
Merge branch 'master' into hpe_msa
luojiagen Nov 23, 2021
813d9c4
Add storage status:degraded
luojiagen Nov 24, 2021
7e77527
Add storage status:degraded
luojiagen Nov 24, 2021
6fdc7f3
Add storage status:degraded
luojiagen Nov 24, 2021
5f42770
Merge pull request #313 from luojiagen/hpe_msa
luopan-code Nov 24, 2021
edfa46f
update vendor info
luojiagen Nov 25, 2021
141c0a9
update vendor info
luojiagen Nov 25, 2021
c1c8486
update vendor info
luojiagen Nov 25, 2021
71aa1be
update vendor info
luojiagen Nov 25, 2021
e762d71
Merge pull request #318 from luojiagen/hpe_msa
luopan-code Nov 25, 2021
0622c15
update vendor info,alert info
luojiagen Nov 26, 2021
934de63
update vendor info,alert info
luojiagen Nov 26, 2021
8986c23
update vendor info,alert info
luojiagen Nov 26, 2021
f551569
update vendor info,alert info
luojiagen Nov 26, 2021
e3d07e1
update vendor info,alert info
luojiagen Nov 26, 2021
e74da26
update vendor info,alert info
luojiagen Nov 26, 2021
e1a817a
update vendor info,alert info
luojiagen Nov 26, 2021
4aa9d09
update vendor info,alert info
luojiagen Nov 26, 2021
76f2290
update vendor info,alert info
luojiagen Nov 26, 2021
ec4ba13
update vendor info,alert info
luojiagen Nov 26, 2021
19acd4f
update vendor info,alert info
luojiagen Nov 26, 2021
43e430d
Merge pull request #322 from luojiagen/hpe_msa
ghca-cxl Nov 26, 2021
62f605f
update vendor info,alert info
luojiagen Dec 3, 2021
ba192ff
update vendor info,alert info
luojiagen Dec 3, 2021
1642873
update alert info
luojiagen Dec 3, 2021
2a2bfb5
Merge pull request #338 from luojiagen/hpe_msa
ghca-cxl Dec 3, 2021
571387e
update alert info
luojiagen Dec 6, 2021
b6cd7e3
Merge pull request #345 from luojiagen/hpe_msa
ghca-cxl Dec 6, 2021
5c7b236
update alert info time
luojiagen Dec 6, 2021
0e43727
update vendor info,alert info
luojiagen Dec 6, 2021
f3ad701
update vendor info,alert info
luojiagen Dec 6, 2021
38c7355
Merge pull request #351 from luojiagen/hpe_msa
ghca-cxl Dec 6, 2021
c847a98
Merge branch 'master' into hpe_msa
tanjiangyu-ghca Dec 24, 2021
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
Empty file.
59 changes: 59 additions & 0 deletions delfin/drivers/hpe/hpe_msa/consts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
from delfin.common import constants


class AlertOIDNumber:
OID_ERR_ID = '1.3.6.1.3.94.1.11.1.1'
OID_EVENT_TYPE = '1.3.6.1.3.94.1.11.1.7'
OID_LAST_TIME = '1.3.6.1.3.94.1.11.1.4'
OID_EVENT_DESC = '1.3.6.1.3.94.1.11.1.9'
OID_EVENT_ID = '1.3.6.1.3.94.1.11.1.3'
OID_SEVERITY = '1.3.6.1.3.94.1.11.1.6'


class StorageVendor:
HPE_MSA_VENDOR = "HPE"


class TrapSeverity:
TRAP_SEVERITY_MAP = {
'1': 'unknown',
'2': 'emergency',
'3': 'alert',
'4': constants.Severity.CRITICAL,
'5': 'error',
'6': constants.Severity.WARNING,
'7': 'notify',
'8': constants.Severity.INFORMATIONAL,
'9': 'debug',
'10': 'mark'
}

SEVERITY_MAP = {"warning": "Warning",
"informational": "Informational",
"error": "Major"
}


class SecondsNumber:
SECONDS_TO_MS = 1000


class RpmSpeed:
RPM_SPEED = 1000


class DiskPhysicalType:
DISK_PHYSICAL_TYPE = {
'fc': constants.DiskPhysicalType.FC,
'SAS': constants.DiskPhysicalType.SAS
}


class InitiatorType:
ISCSI_INITIATOR_TYPE = "9"
FC_INITIATOR_TYPE = "6"
SAS_INITIATOR_TYPE = "8"
ISCSI_INITIATOR_DESCRIPTION = 'iSCSI Initiator'
FC_INITIATOR_DESCRIPTION = 'FC Initiator'
IB_INITIATOR_DESCRIPTION = 'IB Initiator'
UNKNOWN_INITIATOR_DESCRIPTION = 'Unknown Initiator'
48 changes: 48 additions & 0 deletions delfin/drivers/hpe/hpe_msa/hpe_msastor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
from delfin.drivers import driver
from delfin.drivers.hpe.hpe_msa import ssh_handler
from delfin.drivers.hpe.hpe_msa.ssh_handler import SSHHandler


class HpeMsaStorDriver(driver.StorageDriver):

def __init__(self, **kwargs):
super().__init__(**kwargs)
self.ssh_handler = ssh_handler.SSHHandler(**kwargs)

def reset_connection(self, context, **kwargs):
self.ssh_handler.login()

def get_storage(self, context):
return self.ssh_handler.get_storage(self.storage_id)

def list_storage_pools(self, context):
return self.ssh_handler.list_storage_pools(self.storage_id)

def list_volumes(self, context):
return self.ssh_handler.list_storage_volume(self.storage_id)

def list_controllers(self, context):
return self.ssh_handler.\
list_storage_controller(self.storage_id)

def list_ports(self, context):
return self.ssh_handler.list_storage_ports(self.storage_id)

def list_disks(self, context):
return self.ssh_handler.list_storage_disks(self.storage_id)

def list_alerts(self, context, query_para=None):
return self.ssh_handler.list_alerts(query_para)

def add_trap_config(self, context, trap_config):
pass

def remove_trap_config(self, context, trap_config):
pass

@staticmethod
def parse_alert(context, alert):
return SSHHandler.parse_alert(alert)

def clear_alert(self, context, alert):
pass
Loading