Imrpove logic used for determinging which nodes to copy karaf.log
files from.
Fix test case 19 failing consistently in single node FUNCoptical
Change-Id: Icd161d1e4a34a71b185a7fbe016c279a65cc5e5b
diff --git a/TestON/tests/FUNC/FUNCintent/FUNCintent.py b/TestON/tests/FUNC/FUNCintent/FUNCintent.py
index ba0f2a9..167a847 100644
--- a/TestON/tests/FUNC/FUNCintent/FUNCintent.py
+++ b/TestON/tests/FUNC/FUNCintent/FUNCintent.py
@@ -670,9 +670,8 @@
stepResult = main.TRUE
scpResult = main.TRUE
copyResult = main.TRUE
- i = 0
- for cli in main.CLIs:
- main.node = cli
+ for i in range( main.numCtrls ):
+ main.node = main.CLIs[ i ]
ip = main.ONOSip[ i ]
main.node.ip_address = ip
scpResult = scpResult and main.ONOSbench.scp( main.node ,
@@ -685,7 +684,6 @@
stepResult = main.TRUE and stepResult
else:
stepResult = main.FALSE and stepResult
- i += 1
utilities.assert_equals( expect=main.TRUE,
actual=stepResult,
onpass="Successfully copied remote ONOS logs",
diff --git a/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py b/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
index 51ad5b1..3824ea3 100644
--- a/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
+++ b/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
@@ -785,9 +785,8 @@
stepResult = main.TRUE
scpResult = main.TRUE
copyResult = main.TRUE
- i = 0
- for cli in main.CLIs2:
- main.node = cli
+ for i in range( main.numCtrls ):
+ main.node = main.CLIs2[ i ]
ip = main.ONOSip[ i ]
main.node.ip_address = ip
scpResult = scpResult and main.ONOSbench.scp( main.node ,
@@ -800,7 +799,6 @@
stepResult = main.TRUE and stepResult
else:
stepResult = main.FALSE and stepResult
- i += 1
utilities.assert_equals( expect=main.TRUE,
actual=stepResult,
onpass="Successfully copied remote ONOS logs",
diff --git a/TestON/tests/FUNC/FUNCnetconf/FUNCnetconf.py b/TestON/tests/FUNC/FUNCnetconf/FUNCnetconf.py
index 94fd0ef..967dea5 100644
--- a/TestON/tests/FUNC/FUNCnetconf/FUNCnetconf.py
+++ b/TestON/tests/FUNC/FUNCnetconf/FUNCnetconf.py
@@ -269,9 +269,8 @@
stepResult = main.TRUE
scpResult = main.TRUE
copyResult = main.TRUE
- i = 0
- for cli in main.CLIs2:
- main.node = cli
+ for i in range( main.numCtrls ):
+ main.node = main.CLIs[ i ]
ip = main.ONOSip[ i ]
main.node.ip_address = ip
scpResult = scpResult and main.ONOSbench.scp( main.node ,
@@ -284,9 +283,6 @@
stepResult = main.TRUE and stepResult
else:
stepResult = main.FALSE and stepResult
- i += 1
- if main.numCtrls == 1:
- break
utilities.assert_equals( expect=main.TRUE,
actual=stepResult,
onpass="Successfully copied remote ONOS logs",
diff --git a/TestON/tests/FUNC/FUNCoptical/FUNCoptical.py b/TestON/tests/FUNC/FUNCoptical/FUNCoptical.py
index 137ce44..2c4b0ca 100644
--- a/TestON/tests/FUNC/FUNCoptical/FUNCoptical.py
+++ b/TestON/tests/FUNC/FUNCoptical/FUNCoptical.py
@@ -327,9 +327,8 @@
stepResult = main.TRUE
scpResult = main.TRUE
copyResult = main.TRUE
- i = 0
- for cli in main.CLIs:
- main.node = cli
+ for i in range( main.numCtrls ):
+ main.node = main.CLIs[ i ]
ip = main.ONOSip[ i ]
main.node.ip_address = ip
scpResult = scpResult and main.ONOSbench.scp( main.node ,
@@ -342,7 +341,6 @@
stepResult = main.TRUE and stepResult
else:
stepResult = main.FALSE and stepResult
- i += 1
utilities.assert_equals( expect=main.TRUE,
actual=stepResult,
onpass="Successfully copied remote ONOS logs",