Merge "[ONOS-5514] add vlan interfaces to Sdn-ip tests"
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 91a2509..08f8a5b 100755
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -249,14 +249,15 @@
"""
self.onosIp = ONOSIp
try:
+ # Check if we are already in the cli
self.handle.sendline( "" )
x = self.handle.expect( [
"\$", "onos>" ], commandlineTimeout)
-
if x == 1:
main.log.info( "ONOS cli is already running" )
return main.TRUE
+ # Not in CLI so login
if waitForStart:
# Wait for onos start ( -w ) and enter onos cli
startCliCommand = "onos -w "
@@ -4102,7 +4103,7 @@
containsCheck = None
# Patterns to match
setPattern = "\[(.*)\]"
- pattern = "Items in set " + setName + ":\n" + setPattern
+ pattern = "Items in set " + setName + ":\r\n" + setPattern
containsTrue = "Set " + setName + " contains the value " + values
containsFalse = "Set " + setName + " did not contain the value " +\
values
@@ -4138,11 +4139,11 @@
match = re.search( pattern, output )
else: # if given values
if length == 1: # Contains output
- patternTrue = pattern + "\n" + containsTrue
- patternFalse = pattern + "\n" + containsFalse
+ patternTrue = pattern + "\r\n" + containsTrue
+ patternFalse = pattern + "\r\n" + containsFalse
else: # ContainsAll output
- patternTrue = pattern + "\n" + containsAllTrue
- patternFalse = pattern + "\n" + containsAllFalse
+ patternTrue = pattern + "\r\n" + containsAllTrue
+ patternFalse = pattern + "\r\n" + containsAllFalse
matchTrue = re.search( patternTrue, output )
matchFalse = re.search( patternFalse, output )
if matchTrue:
@@ -4204,7 +4205,7 @@
setName = str( setName ).strip()
# Patterns to match
setPattern = "\[(.*)\]"
- pattern = "There are (\d+) items in set " + setName + ":\n" +\
+ pattern = "There are (\d+) items in set " + setName + ":\r\n" +\
setPattern
cmdStr = "set-test-get -s "
cmdStr += setName
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 644b9f7..655f17e 100755
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -727,7 +727,7 @@
main.exit()
def createCellFile( self, benchIp, fileName, mnIpAddrs,
- appString, onosIpAddrs, onosUser="sdn", useSSH=False ):
+ appString, onosIpAddrs, onosUser="sdn", useSSH=True ):
"""
Creates a cell file based on arguments
Required:
@@ -762,7 +762,6 @@
appString = "export ONOS_APPS=" + appString
onosGroup = "export ONOS_GROUP=" + onosUser
onosUser = "export ONOS_USER=" + onosUser
- # FIXME: unset ONOS_USE_SSH when not using SSH?
if useSSH:
onosUseSSH = "export ONOS_USE_SSH=true"
mnString = "export OCN="
diff --git a/TestON/tests/CHOTestMonkey/CHOTestMonkey.py b/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
index b120ed7..ec64601 100644
--- a/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
+++ b/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
@@ -160,7 +160,7 @@
main.step( "Set up ONOS secure SSH" )
secureSshResult = main.TRUE
for i in range( int( main.numCtrls ) ):
- secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+ secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.onosIPs[i] )
utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
onpass="Test step PASS",
onfail="Test step FAIL" )
@@ -201,7 +201,7 @@
"true" )
time.sleep( setIPv6CfgSleep )
cfgResult2 = main.controllers[ 0 ].CLI.setCfg( "org.onosproject.provider.host.impl.HostLocationProvider",
- "ipv6NeighborDiscovery",
+ "useIpv6ND",
"true" )
else:
main.log.info( "Skipped setting IPv6 cfg parameters as it is disabled in params file" )
diff --git a/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py b/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
index 282e623..f799854 100755
--- a/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
+++ b/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
@@ -128,7 +128,7 @@
main.step( "Installing ONOS package" )
onosInstallResult = main.ONOSbench.onosInstall(
- options="-f", node=main.nodes[0].ip_address )
+ options="-f", node=main.nodes[ 0 ].ip_address )
utilities.assert_equals( expect=main.TRUE, actual=onosInstallResult,
onpass="ONOS install successful",
onfail="ONOS install failed" )
@@ -136,7 +136,7 @@
main.step( "Checking if ONOS is up yet" )
print main.nodes[0].ip_address
for i in range( 2 ):
- onos1Isup = main.ONOSbench.isup( main.nodes[0].ip_address )
+ onos1Isup = main.ONOSbench.isup( main.nodes[ 0 ].ip_address )
if onos1Isup:
break
utilities.assert_equals( expect=main.TRUE, actual=onos1Isup,
@@ -144,14 +144,14 @@
onfail="ONOS startup failed" )
main.step( "Set up ONOS secure SSH" )
- secureSshResult = main.ONOSbench.onosSecureSSH( node=main.nodes[0].ip_address )
+ secureSshResult = main.ONOSbench.onosSecureSSH( node=main.nodes[ 0 ].ip_address )
utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
- onpass="Test step PASS",
- onfail="Test step FAIL" )
+ onpass="Test step PASS",
+ onfail="Test step FAIL" )
main.step( "Starting ONOS CLI sessions" )
- print main.nodes[0].ip_address
- cliResults = main.ONOScli1.startOnosCli( main.nodes[0].ip_address )
+ print main.nodes[ 0 ].ip_address
+ cliResults = main.ONOScli1.startOnosCli( main.nodes[ 0 ].ip_address )
utilities.assert_equals( expect=main.TRUE, actual=cliResults,
onpass="ONOS cli startup successful",
onfail="ONOS cli startup failed" )
@@ -160,8 +160,8 @@
appCheck = main.ONOScli1.appToIDCheck()
if appCheck !=main.TRUE:
- main.log.warn( main.CLIs[0].apps() )
- main.log.warn( main.CLIs[0].appIDs() )
+ main.log.warn( main.CLIs[ 0 ].apps() )
+ main.log.warn( main.CLIs[ 0 ].appIDs() )
utilities.assert_equals( expect=main.TRUE, actual=appCheck,
onpass="App Ids seem to be correct",
onfail="Something is wrong with app Ids" )
@@ -249,8 +249,8 @@
bgplsConfig.Comments()
print (bgpls_post)
- main.ONOSrest.user_name = "karaf"
- main.ONOSrest.pwd = "karaf"
+ main.ONOSrest.user_name = "onos"
+ main.ONOSrest.pwd = "rocks"
Poststatus, result = main.ONOSrest.send( '/network/configuration/', method="POST", data=bgpls_post)
main.step( "Configure BGP through RESTCONF" )
diff --git a/TestON/tests/FUNC/FUNCipv6Intent/FUNCipv6Intent.py b/TestON/tests/FUNC/FUNCipv6Intent/FUNCipv6Intent.py
index 8694a0d..6423ff4 100755
--- a/TestON/tests/FUNC/FUNCipv6Intent/FUNCipv6Intent.py
+++ b/TestON/tests/FUNC/FUNCipv6Intent/FUNCipv6Intent.py
@@ -258,7 +258,7 @@
main.step( "setup the ipv6NeighbourDiscovery" )
cfgResult1 = main.CLIs[0].setCfg( "org.onosproject.incubator.net.neighbour.impl.NeighbourResolutionManager", "ndpEnabled", "true" )
- cfgResult2 = main.CLIs[0].setCfg( "org.onosproject.provider.host.impl.HostLocationProvider", "ipv6NeighborDiscovery", "true" )
+ cfgResult2 = main.CLIs[0].setCfg( "org.onosproject.provider.host.impl.HostLocationProvider", "useIpv6ND", "true" )
cfgResult = cfgResult1 and cfgResult2
utilities.assert_equals( expect=main.TRUE, actual=cfgResult,
onpass="ipv6NeighborDiscovery cfg is set to true",
diff --git a/TestON/tests/FUNC/FUNCipv6Intent/dependencies/FUNCIpv6IntentFunction.py b/TestON/tests/FUNC/FUNCipv6Intent/dependencies/FUNCIpv6IntentFunction.py
index edca254..863d406 100755
--- a/TestON/tests/FUNC/FUNCipv6Intent/dependencies/FUNCIpv6IntentFunction.py
+++ b/TestON/tests/FUNC/FUNCipv6Intent/dependencies/FUNCIpv6IntentFunction.py
@@ -1794,7 +1794,7 @@
getDataResult = main.TRUE
main.log.info( "Activating reactive forwarding app " )
activateResult = main.CLIs[ 0 ].activateApp( "org.onosproject.fwd" )
- main.CLIs[ 0 ].setCfg( "org.onosproject.provider.host.impl.HostLocationProvider", "ipv6NeighborDiscovery", "true")
+ main.CLIs[ 0 ].setCfg( "org.onosproject.provider.host.impl.HostLocationProvider", "useIpv6ND", "true")
main.CLIs[ 0 ].setCfg( "org.onosproject.incubator.net.neighbour.impl.NeighbourResolutionManager", "ndpEnabled", "true" )
main.CLIs[ 0 ].setCfg( "org.onosproject.fwd.ReactiveForwarding", "ipv6Forwarding", "true")
main.CLIs[ 0 ].setCfg( "org.onosproject.fwd.ReactiveForwarding", "matchIpv6Address", "true")
diff --git a/TestON/tests/FUNC/FUNCnetconf/dependencies/netconf.py b/TestON/tests/FUNC/FUNCnetconf/dependencies/netconf.py
index a97b2eb..27ead3e 100644
--- a/TestON/tests/FUNC/FUNCnetconf/dependencies/netconf.py
+++ b/TestON/tests/FUNC/FUNCnetconf/dependencies/netconf.py
@@ -58,7 +58,7 @@
main.cfgJson = '{ "devices":{ "netconf:'+ main.configDeviceIp + ":" +\
main.configDevicePort + '":' + '{ "basic":{ "driver":"'+\
main.configDriver + '" } } }, "apps": { "' +\
- main.configApps + '":{ "devices":[ { "name":' +\
+ main.configApps + '":{ "devices":[ { "username":' +\
main.configName + ', "password":' + main.configPass +\
', "ip":"' + main.configDeviceIp + '", "port":' +\
main.configPort + '} ] } } }'
diff --git a/TestON/tests/FUNC/FUNCnetconf/dependencies/netconfConfig.json b/TestON/tests/FUNC/FUNCnetconf/dependencies/netconfConfig.json
index fc5a231..a0079e4 100644
--- a/TestON/tests/FUNC/FUNCnetconf/dependencies/netconfConfig.json
+++ b/TestON/tests/FUNC/FUNCnetconf/dependencies/netconfConfig.json
@@ -4,7 +4,7 @@
"devices": [
{
"ip": "10.128.50.10",
- "name": "sdn",
+ "username": "sdn",
"password": "rocks",
"port": 830
}
diff --git a/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.py b/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.py
index 5ff2606..894b96b 100644
--- a/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.py
+++ b/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.py
@@ -155,7 +155,7 @@
main.step( "Set up ONOS secure SSH" )
secureSshResult = main.TRUE
for i in range( int( main.numCtrls ) ):
- secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+ secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.nodes[ i ].ip_address )
utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
onpass="Test step PASS",
onfail="Test step FAIL" )
diff --git a/TestON/tests/SCPF/SCPFscaleTopo/dependencies/scaleTopoFunction.py b/TestON/tests/SCPF/SCPFscaleTopo/dependencies/scaleTopoFunction.py
index 254956c..b94c292 100644
--- a/TestON/tests/SCPF/SCPFscaleTopo/dependencies/scaleTopoFunction.py
+++ b/TestON/tests/SCPF/SCPFscaleTopo/dependencies/scaleTopoFunction.py
@@ -63,7 +63,7 @@
main.writeData = -1
main.log.error( "Can't compare the difference with role request time" )
return -1
- # Only concern about the absolute value of difference.
+ # Only concern about the absolute value of difference.
return abs( roleRequestTime - termTime )
except IndexError:
main.log.error( "Catch the wrong information of search term " )