summaryrefslogtreecommitdiffstats
path: root/staslib/service.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-06 07:51:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-06 07:51:39 +0000
commit593ffd6b9dc008e81ed95579a0f56c49bf3e782f (patch)
treeb3a10caf7583dc08b7beed1a329f3b65a1dffe33 /staslib/service.py
parentAdding upstream version 2.3~rc2. (diff)
downloadnvme-stas-593ffd6b9dc008e81ed95579a0f56c49bf3e782f.tar.xz
nvme-stas-593ffd6b9dc008e81ed95579a0f56c49bf3e782f.zip
Adding upstream version 2.3~rc3.upstream/2.3_rc3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'staslib/service.py')
-rw-r--r--staslib/service.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/staslib/service.py b/staslib/service.py
index e681f3a..08a775a 100644
--- a/staslib/service.py
+++ b/staslib/service.py
@@ -393,9 +393,10 @@ class Stac(Service):
for staf_data in self._get_log_pages_from_stafd():
host_traddr = staf_data['discovery-controller']['host-traddr']
host_iface = staf_data['discovery-controller']['host-iface']
+ host_nqn = staf_data['discovery-controller']['host-nqn']
for dlpe in staf_data['log-pages']:
if dlpe.get('subtype') == 'nvme': # eliminate discovery controllers
- tid = stas.tid_from_dlpe(dlpe, host_traddr, host_iface)
+ tid = stas.tid_from_dlpe(dlpe, host_traddr, host_iface, host_nqn)
discovered_ctrls[tid] = dlpe
discovered_ctrl_list = list(discovered_ctrls.keys())
@@ -476,19 +477,20 @@ class Stac(Service):
logging.debug('Stac._disconnect_from_staf() - Disconnected from staf')
def _log_pages_changed( # pylint: disable=too-many-arguments
- self, transport, traddr, trsvcid, host_traddr, host_iface, subsysnqn, device
+ self, transport, traddr, trsvcid, subsysnqn, host_traddr, host_iface, host_nqn, device
):
if not self._alive():
return
logging.debug(
- 'Stac._log_pages_changed() - transport=%s, traddr=%s, trsvcid=%s, host_traddr=%s, host_iface=%s, subsysnqn=%s, device=%s',
+ 'Stac._log_pages_changed() - transport=%s, traddr=%s, trsvcid=%s, subsysnqn=%s, host_traddr=%s, host_iface=%s, host_nqn=%s, device=%s',
transport,
traddr,
trsvcid,
+ subsysnqn,
host_traddr,
host_iface,
- subsysnqn,
+ host_nqn,
device,
)
if self._cfg_soak_tmr:
@@ -693,9 +695,10 @@ class Staf(Service):
controller.tid.transport,
controller.tid.traddr,
controller.tid.trsvcid,
+ controller.tid.subsysnqn,
controller.tid.host_traddr,
controller.tid.host_iface,
- controller.tid.subsysnqn,
+ controller.tid.host_nqn,
device,
)
@@ -708,7 +711,12 @@ class Staf(Service):
def _referrals(self) -> list:
return [
- stas.tid_from_dlpe(dlpe, controller.tid.host_traddr, controller.tid.host_iface)
+ stas.tid_from_dlpe(
+ dlpe,
+ controller.tid.host_traddr,
+ controller.tid.host_iface,
+ controller.tid.host_nqn,
+ )
for controller in self.get_controllers()
for dlpe in controller.referrals()
]