Module: check_mk
Branch: master
Commit: e56f2bace6c5ddf48f6cb2e86db250097260d4d4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e56f2bace6c5dd…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Mon Dec 17 16:43:58 2018 +0100
Format esx_hostsystem.multipath regression test
Change-Id: I3bc4ff21431317f8e21791aa093f57e251b5943c
---
.../datasets/esx_vsphere_hostsystem_regression.py | 239 +++++++++++----------
1 file changed, 122 insertions(+), 117 deletions(-)
diff --git a/tests/unit/checks/generictests/datasets/esx_vsphere_hostsystem_regression.py
b/tests/unit/checks/generictests/datasets/esx_vsphere_hostsystem_regression.py
index c21f70d..e98c804 100644
--- a/tests/unit/checks/generictests/datasets/esx_vsphere_hostsystem_regression.py
+++ b/tests/unit/checks/generictests/datasets/esx_vsphere_hostsystem_regression.py
@@ -1,121 +1,126 @@
-
-
checkname = 'esx_vsphere_hostsystem'
+info = [
+ [
+ [
+ u'config.multipathState.path', u'vmhba0:C2:T0:L0',
u'active', u'vmhba1:C0:T0:L0',
+ u'active', u'vmhba66:C0:T0:L0', u'active',
u'vmhba66:C0:T1:L0', u'active',
+ u'vmhba66:C0:T2:L0', u'active'
+ ],
+ [
+ u'config.storageDevice.multipathInfo',
u'6e843b6d8f2740bdecbad4676da7a9dd',
+ u'vmhba66:C0:T2:L0', u'active',
u'6e843b6bc5cc897d430ad40b7d9172d1',
+ u'vmhba66:C0:T0:L0', u'active',
u'6e843b63fcbd92ad8f22d4cf7d8e6cdc',
+ u'vmhba66:C0:T1:L0', u'active', u'766d6862',
u'vmhba1:C0:T0:L0', u'active',
+ u'600605b002db9f7018d0a40c2a1444b0', u'vmhba0:C2:T0:L0',
u'active'
+ ],
+ [u'hardware.biosInfo.biosVersion', u'-[D6E158AUS-1.16]-'],
+ [u'hardware.biosInfo.releaseDate', u'2012-11-26T00:00:00Z'],
+ [u'hardware.cpuInfo.hz', u'2933437094'],
+ [u'hardware.cpuInfo.numCpuCores', u'12'],
+ [u'hardware.cpuInfo.numCpuPackages', u'2'],
+ [u'hardware.cpuInfo.numCpuThreads', u'24'],
+ [u'hardware.cpuPkg.busHz.0', u'133338040'],
+ [u'hardware.cpuPkg.busHz.1', u'133338015'],
+ [
+ u'hardware.cpuPkg.description.0', u'Intel(R)',
u'Xeon(R)', u'CPU', u'X5670', u'@',
+ u'2.93GHz'
+ ],
+ [
+ u'hardware.cpuPkg.description.1', u'Intel(R)',
u'Xeon(R)', u'CPU', u'X5670', u'@',
+ u'2.93GHz'
+ ],
+ [u'hardware.cpuPkg.hz.0', u'2933437152'],
+ [u'hardware.cpuPkg.hz.1', u'2933437036'],
+ [u'hardware.cpuPkg.index.0', u'0'],
+ [u'hardware.cpuPkg.index.1', u'1'],
+ [u'hardware.cpuPkg.vendor.0', u'intel'],
+ [u'hardware.cpuPkg.vendor.1', u'intel'],
+ [u'hardware.memorySize', u'146016378880'],
+ [u'hardware.systemInfo.model', u'System', u'x3650',
u'M3', u'-[7945M2G]-'],
+ [u'hardware.systemInfo.otherIdentifyingInfo.AssetTag.0',
u'none'],
+ [u'hardware.systemInfo.otherIdentifyingInfo.OemSpecificString.0',
u'IBM', u'SystemX'],
+ [u'hardware.systemInfo.otherIdentifyingInfo.ServiceTag.0',
u'none'],
+ [u'hardware.systemInfo.uuid',
u'e8a2b8a7-b9d4-3f21-a53a-afca3baa74f2'],
+ [u'hardware.systemInfo.vendor', u'IBM'],
+ [u'name', u'esx-w.dhcp.mathias-kettner'],
+ [u'overallStatus', u'green'],
+ [u'runtime.inMaintenanceMode', u'false'],
+ [u'runtime.powerState', u'poweredOn'],
+ [u'summary.quickStats.overallCpuUsage', u'2946'],
+ [u'summary.quickStats.overallMemoryUsage', u'110738'],
+ ],
+ None,
+]
-info = [[[u'config.multipathState.path',
- u'vmhba0:C2:T0:L0',
- u'active',
- u'vmhba1:C0:T0:L0',
- u'active',
- u'vmhba66:C0:T0:L0',
- u'active',
- u'vmhba66:C0:T1:L0',
- u'active',
- u'vmhba66:C0:T2:L0',
- u'active'],
- [u'config.storageDevice.multipathInfo',
- u'6e843b6d8f2740bdecbad4676da7a9dd',
- u'vmhba66:C0:T2:L0',
- u'active',
- u'6e843b6bc5cc897d430ad40b7d9172d1',
- u'vmhba66:C0:T0:L0',
- u'active',
- u'6e843b63fcbd92ad8f22d4cf7d8e6cdc',
- u'vmhba66:C0:T1:L0',
- u'active',
- u'766d6862',
- u'vmhba1:C0:T0:L0',
- u'active',
- u'600605b002db9f7018d0a40c2a1444b0',
- u'vmhba0:C2:T0:L0',
- u'active'],
- [u'hardware.biosInfo.biosVersion', u'-[D6E158AUS-1.16]-'],
- [u'hardware.biosInfo.releaseDate', u'2012-11-26T00:00:00Z'],
- [u'hardware.cpuInfo.hz', u'2933437094'],
- [u'hardware.cpuInfo.numCpuCores', u'12'],
- [u'hardware.cpuInfo.numCpuPackages', u'2'],
- [u'hardware.cpuInfo.numCpuThreads', u'24'],
- [u'hardware.cpuPkg.busHz.0', u'133338040'],
- [u'hardware.cpuPkg.busHz.1', u'133338015'],
- [u'hardware.cpuPkg.description.0',
- u'Intel(R)',
- u'Xeon(R)',
- u'CPU',
- u'X5670',
- u'@',
- u'2.93GHz'],
- [u'hardware.cpuPkg.description.1',
- u'Intel(R)',
- u'Xeon(R)',
- u'CPU',
- u'X5670',
- u'@',
- u'2.93GHz'],
- [u'hardware.cpuPkg.hz.0', u'2933437152'],
- [u'hardware.cpuPkg.hz.1', u'2933437036'],
- [u'hardware.cpuPkg.index.0', u'0'],
- [u'hardware.cpuPkg.index.1', u'1'],
- [u'hardware.cpuPkg.vendor.0', u'intel'],
- [u'hardware.cpuPkg.vendor.1', u'intel'],
- [u'hardware.memorySize', u'146016378880'],
- [u'hardware.systemInfo.model', u'System', u'x3650',
u'M3', u'-[7945M2G]-'],
- [u'hardware.systemInfo.otherIdentifyingInfo.AssetTag.0',
u'none'],
- [u'hardware.systemInfo.otherIdentifyingInfo.OemSpecificString.0',
- u'IBM',
- u'SystemX'],
- [u'hardware.systemInfo.otherIdentifyingInfo.ServiceTag.0',
u'none'],
- [u'hardware.systemInfo.uuid',
u'e8a2b8a7-b9d4-3f21-a53a-afca3baa74f2'],
- [u'hardware.systemInfo.vendor', u'IBM'],
- [u'name', u'esx-w.dhcp.mathias-kettner'],
- [u'overallStatus', u'green'],
- [u'runtime.inMaintenanceMode', u'false'],
- [u'runtime.powerState', u'poweredOn'],
- [u'summary.quickStats.overallCpuUsage', u'2946'],
- [u'summary.quickStats.overallMemoryUsage', u'110738']],
- None]
-
-
-discovery = {'': [],
- 'cpu_usage': [(None, {})],
- 'cpu_util_cluster': [],
- 'maintenance': [(None, {'target_state': 'false'})],
- 'mem_usage': [(None, 'esx_host_mem_default_levels')],
- 'mem_usage_cluster': [],
- 'multipath': [(u'L0 physical', None), (u'L0
pseudo-logical', None)],
- 'state': [(None, None)]}
-
+discovery = {
+ '': [],
+ 'cpu_usage': [(None, {})],
+ 'cpu_util_cluster': [],
+ 'maintenance': [(None, {
+ 'target_state': 'false'
+ })],
+ 'mem_usage': [(None, 'esx_host_mem_default_levels')],
+ 'mem_usage_cluster': [],
+ 'multipath': [(u'L0 physical', None), (u'L0 pseudo-logical',
None)],
+ 'state': [(None, None)]
+}
-checks = {'cpu_usage': [(None,
- {},
- [(0,
- 'total cpu: 8.4%, 2.95GHz/35.20GHz, 2 sockets, 6
cores/socket, 24 threads',
- [('util', 8.369022144778265, None, None, 0,
100)])])],
- 'maintenance': [(None,
- {'target_state': 'false'},
- [(0, 'System not in Maintenance mode', [])])],
- 'mem_usage': [(None,
- (80.0, 90.0),
- [(0,
- '79% used - 108.14 GB/135.99 GB',
- [('usage',
- 116117209088.0,
- 116813103104.0,
- 131414740992.0,
- 0,
- 146016378880.0),
- ('mem_total', 146016378880.0, None, None, None,
None)])])],
- 'multipath': [(u'L0 physical',
- {},
- [(0,
- u'2 active, 0 dead, 0 disabled, 0 standby, 0
unknown\nIncluded Paths:\nvmhba0:C2:T0:L0\nvmhba1:C0:T0:L0',
- [])]),
- (u'L0 pseudo-logical',
- {},
- [(0,
- u'3 active, 0 dead, 0 disabled, 0 standby, 0
unknown\nIncluded Paths:\nvmhba66:C0:T0:L0\nvmhba66:C0:T1:L0\nvmhba66:C0:T2:L0',
- [])])],
- 'state': [(None,
- {},
- [(0, 'Entity state: green', []),
- (0, 'Power state: poweredOn', [])])]}
\ No newline at end of file
+checks = {
+ 'cpu_usage': [(
+ None,
+ {},
+ [(
+ 0,
+ 'total cpu: 8.4%, 2.95GHz/35.20GHz, 2 sockets, 6 cores/socket, 24
threads',
+ [('util', 8.369022144778265, None, None, 0, 100)],
+ )],
+ )],
+ 'maintenance': [(
+ None,
+ {
+ 'target_state': 'false'
+ },
+ [(0, 'System not in Maintenance mode', [])],
+ )],
+ 'mem_usage': [(
+ None,
+ (80.0, 90.0),
+ [(
+ 0,
+ '79% used - 108.14 GB/135.99 GB',
+ [
+ ('usage', 116117209088.0, 116813103104.0, 131414740992.0, 0,
146016378880.0),
+ ('mem_total', 146016378880.0, None, None, None, None),
+ ],
+ )],
+ )],
+ 'multipath': [
+ (
+ u'L0 physical',
+ {},
+ [(
+ 0,
+ u'2 active, 0 dead, 0 disabled, 0 standby, 0 unknown\nIncluded
Paths:\nvmhba0:C2:T0:L0\nvmhba1:C0:T0:L0',
+ [],
+ )],
+ ),
+ (
+ u'L0 pseudo-logical',
+ {},
+ [(
+ 0,
+ u'3 active, 0 dead, 0 disabled, 0 standby, 0 unknown\nIncluded
Paths:\nvmhba66:C0:T0:L0\nvmhba66:C0:T1:L0\nvmhba66:C0:T2:L0',
+ [],
+ )],
+ )
+ ],
+ 'state': [(
+ None,
+ {},
+ [
+ (0, 'Entity state: green', []),
+ (0, 'Power state: poweredOn', []),
+ ],
+ )],
+}