|
24 | 24 | import re |
25 | 25 | import itertools |
26 | 26 | from pyVmomi import vim, vmodl |
27 | | -from monplugin import Check, Status, Threshold, Range |
| 27 | +from monplugin import Check, Status |
28 | 28 | from collections import namedtuple |
29 | 29 |
|
30 | 30 | from ..tools import cli, service_instance |
31 | | -from .. import CheckVsphereException |
32 | 31 | from ..tools.helper import ( |
33 | 32 | CheckArgument, |
34 | 33 | find_entity_views, |
@@ -154,11 +153,9 @@ def iter_lun(): |
154 | 153 |
|
155 | 154 | def check_lun(check: Check, si: vim.ServiceInstance, storage): |
156 | 155 | lun2disc = get_lun2disc(storage) |
157 | | - count = {} |
| 156 | + count: dict[str, int] = {} |
158 | 157 | luns = storage['storageDeviceInfo'].scsiLun |
159 | 158 | for scsi in luns: |
160 | | - canonicalName = scsi.canonicalName |
161 | | - scsiId = scsi.uuid |
162 | 159 | discKey = scsi.key.split("-")[-1] |
163 | 160 | displayName = re.sub(r'[^][\w _().-]', '', scsi.displayName) |
164 | 161 |
|
@@ -195,7 +192,7 @@ def check_lun(check: Check, si: vim.ServiceInstance, storage): |
195 | 192 |
|
196 | 193 |
|
197 | 194 | def check_adapter(check: Check, si: vim.ServiceInstance, storage): |
198 | | - count = {} |
| 195 | + count: dict[str, int] = {} |
199 | 196 | adapters = storage['storageDeviceInfo'].hostBusAdapter |
200 | 197 | for dev in adapters: |
201 | 198 | if ( |
|
0 commit comments