os-brick/os_brick/tests
Sam Wan fc6ca22bdb Replace sg_scan with lsscsi to get '[H:C:T:L]'
The current get_device_info uses sg_scan to get device info but it only
returns HLU number lower than 255 due to bug#1793259. sg_scan was
designed for old days when 255 LUNs were enough. However we now have
requirement to support HLU number greater than 255. Since lsscsi doesn't
have the limit of 255, we should use lsscsi to get device info.

The 'device' of get_device_info can be of 2 types:
o /dev/disk/by-path/xxx, which is a symlink to /dev/sdX
o /dev/sdX

sg_scan can take any device name but lsscsi only show /dev/sdx names.
So if the device is a symlink, we use the device name it links to,
otherwise we use it directly.
Then get the device info '[H:C:T:L]' by comparing the device name with the
last column of lsscsi output
Also lsscsi doesn't require privilege.

Depends-on: https://review.opendev.org/743548
Change-Id: I867c972d9f712c0df4260ebc8211b786006ed7a2
Closes-bug: #1793259
2020-07-29 13:57:06 +00:00
..
encryptors Use unittest.mock instead of third party mock 2020-04-18 16:22:50 -05:00
initiator Replace sg_scan with lsscsi to get '[H:C:T:L]' 2020-07-29 13:57:06 +00:00
local_dev Switch from retrying to tenacity 2020-05-06 09:08:01 -05:00
privileged Switch from retrying to tenacity 2020-05-06 09:08:01 -05:00
remotefs Use unittest.mock instead of third party mock 2020-04-18 16:22:50 -05:00
windows Switch from unittest2 compat methods to Python 3.x methods 2020-06-23 14:14:34 +02:00
__init__.py renamed the project to os-brick 2015-02-05 23:58:37 +00:00
base.py Switch from retrying to tenacity 2020-05-06 09:08:01 -05:00
test_brick.py Removes unnecessary utf-8 encoding 2016-12-22 10:24:40 +07:00
test_exception.py Use six.text_type instead of unicode 2015-04-03 10:22:45 +03:00
test_executor.py Use unittest.mock instead of third party mock 2020-04-18 16:22:50 -05:00
test_utils.py Switch from retrying to tenacity 2020-05-06 09:08:01 -05:00