test/iscsi_tgt: restrict rpc ip_address test to 2 nics
This is plenty to test the add/delete IP address code. Testing additional interfaces only adds to test time with no additional coverage. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ic9a11620ca46a779e3738e210772b4f06c7ca674 Reviewed-on: https://review.gerrithub.io/362629 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
b0355c0266
commit
94e1719bf5
@ -362,8 +362,8 @@ def help_get_interface_ip_list(rpc_py, nic_name):
|
||||
def verify_add_delete_ip_address(rpc_py):
|
||||
rpc = spdk_rpc(rpc_py)
|
||||
nics = json.loads(rpc.get_interfaces())
|
||||
# add ip on all nic
|
||||
for x in nics:
|
||||
# add ip on up to first 2 nics
|
||||
for x in nics[:2]:
|
||||
faked_ip = "123.123.{}.{}".format(random.randint(1, 254), random.randint(1, 254))
|
||||
rpc.add_ip_address(x["ifc_index"], faked_ip)
|
||||
verify(faked_ip in help_get_interface_ip_list(rpc_py, x["name"]), 1,
|
||||
|
Loading…
Reference in New Issue
Block a user