scripts/nvmf_perf: save initiator NIC info in target object

Save Initiator addressing information in Target object.
This will be needed later to properly spread created
subsystems between initiators and NICs.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I9e5545b7847bb16f3ce3d0ee56038003fda74e6d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12731
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
This commit is contained in:
Karol Latecki 2022-05-18 11:58:00 +02:00 committed by Tomasz Zawadzki
parent 8ab0975b2a
commit b6103a58a1

View File

@ -360,6 +360,7 @@ class Target(Server):
self.null_block = 0
self._nics_json_obj = json.loads(self.exec_cmd(["ip", "-j", "address", "show"]))
self.subsystem_info_list = []
self.initiator_info = []
if "null_block_devices" in target_config:
self.null_block = target_config["null_block_devices"]
@ -1505,6 +1506,11 @@ if __name__ == "__main__":
except FileExistsError:
pass
for i in initiators:
target_obj.initiator_info.append(
{"name": i.name, "target_nic_ips": i.target_nic_ips, "initiator_nic_ips": i.nic_ips}
)
# TODO: This try block is definietly too large. Need to break this up into separate
# logical blocks to reduce size.
try: