Update tests for aether pods
- Update test for QA-POD
- SRStaging for testing connecting to Staging pod
- Add some functions for a kubernetes deployed cluster
- Connect to ONOS nodes with kubernetes
- Add option to connect to components through jump hosts
- Fixes for installing ONOS in custom locations
- Invoke python2 instead of python
- If using an ssh agent, also use that for pexpect ssh sessions,
E.G. Jenkins initiated tests
Change-Id: I1fc345c8eab60a5b00c17e6ed677a63489a74a19
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params
index 2deaa95..7021d41 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params
@@ -46,8 +46,6 @@
</ONOS_Logging>
<GIT>
- <pull>False</pull>
- <branch>master</branch>
</GIT>
<CTRL>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params.tofino b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params.tofino
index 88d669b..00666bc 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params.tofino
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params.tofino
@@ -2,7 +2,7 @@
<testcases>1</testcases>
<GRAPH>
- <nodeCluster>Fabric</nodeCluster>
+ <nodeCluster>QA-Pod</nodeCluster>
<builds>20</builds>
<jobName>SRBridging-tofino</jobName>
<branch>master</branch>
@@ -18,7 +18,7 @@
<useCommonTopo>True</useCommonTopo>
<useBmv2>True</useBmv2>
<bmv2SwitchType>stratum</bmv2SwitchType>
- <switchPrefix>tofino</switchPrefix>
+ <switchPrefix></switchPrefix>
<stratumRoot>~/stratum</stratumRoot>
<topology>trellis_fabric.py</topology>
<lib>routinglib.py,trellislib.py,stratum.py</lib>
@@ -28,27 +28,32 @@
<persistent_setup>True</persistent_setup>
- <MN_DOCKER>
- <args>--privileged --net host --rm -v topo:/topo -v ~/mininet/custom:/home/root/mininet/custom -v /var/run/openvswitch/:/var/run/openvswitch/ -v /tmp/mn-stratum:/tmp -v /tmp/mn_conf/:/home/root/config --hostname mn-stratum -v /etc/network/interfaces:/etc/network/interfaces -it -d</args>
- <name>trellis_mininet</name>
- <home>/home/root/</home>
- </MN_DOCKER>
- <CLUSTER>
- # Params for onos docker
- <dockerSkipBuild>True</dockerSkipBuild>
- <dockerBuildCmd>make ONOS_VERSION=onos-2.2 DOCKER_TAG=TestON-onos-2.2 onos-build trellis-control-build trellis-t3-build tost-build</dockerBuildCmd> # If using another cmd like make
- <dockerBuildTimeout>1200</dockerBuildTimeout>
- <dockerFilePath>~/tost-onos</dockerFilePath>
- <dockerImageTag>registry.aetherproject.org/tost/tost:master</dockerImageTag>
- <dockerOptions>-d --rm --network host -v ~/.ssh/authorized_keys:/root/.ssh/authorized_keys -v /tmp/cluster.json:/root/onos/config/cluster.json </dockerOptions> # We start the container detached, so the docker component can connect to cli instead of logs
- <atomixImageTag>atomix/atomix:3.1.5</atomixImageTag>
- <atomixOptions>-d --rm --network host -v ~/.ssh/authorized_keys:/root/.ssh/authorized_keys -v /tmp/atomix.json:/opt/atomix/conf/atomix.json </atomixOptions>
- </CLUSTER>
+ <kubernetes>
+ <appName>onos-tost-onos-classic</appName>
+ <namespace>tost</namespace>
+ </kubernetes>
+
+ <PERF>
+ <traffic_host>Host3</traffic_host>
+ <traffic_container>mlabbe/iperf</traffic_container>
+ <traffic_container_arguments>--net=host -v /proc/net/arp:/host/arp --rm</traffic_container_arguments>
+ <traffic_cmd_arguments> -u -b 20M -t 20</traffic_cmd_arguments>
+
+ <pcap_host>Host4</pcap_host>
+ <pcap_container>toendeavour/tshark</pcap_container>
+ <pcap_container_arguments>--cap-add=NET_RAW --cap-add=NET_ADMIN --net=host --rm -v ~/TestON/tshark/:/tshark</pcap_container_arguments>
+ <pcap_cmd_arguments>-t e -F pcap</pcap_cmd_arguments>
+ <pcap_cmd_arguments2>-t e -F pcap</pcap_cmd_arguments2>
+
+ </PERF>
+
+
+
<ENV>
<cellName>productionCell</cellName>
- <cellApps>drivers,fpm,lldpprovider,hostprovider,netcfghostprovider,drivers.bmv2,org.opencord.fabric-tofino,pipelines.fabric,org.stratumproject.fabric-tna,drivers.barefoot,segmentrouting,t3</cellApps>
+ <cellApps>drivers,fpm,lldpprovider,hostprovider,netcfghostprovider,drivers.bmv2,pipelines.fabric,org.stratumproject.fabric-tna,drivers.barefoot,segmentrouting,t3</cellApps>
</ENV>
<EXTERNAL_APPS>
@@ -79,7 +84,6 @@
<org.onosproject.drivers.gnoi>DEBUG</org.onosproject.drivers.gnoi>
<org.onosproject.drivers.gmni>DEBUG</org.onosproject.drivers.gmni>
<org.onosproject.drivers.barefoot>DEBUG</org.onosproject.drivers.barefoot>
- <org.opencord.fabric.tofino>DEBUG</org.opencord.fabric.tofino>
<org.onosproject.bmv2>DEBUG</org.onosproject.bmv2>
</ONOS_Logging>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.0x1.physical b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.0x1.physical
index d7a2bad..e67e354 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.0x1.physical
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.0x1.physical
@@ -8,12 +8,13 @@
<connect_order>1</connect_order>
<home></home> # defines where onos home is on the build machine. Defaults to "~/onos/" if empty.
<COMPONENTS>
+ <kubeConfig>~/.kube/qa-ace-menlo</kubeConfig> # If set, will attempt to use this file for setting up port-forwarding
<useDocker>True</useDocker> # Whether to use docker for ONOS nodes
- <docker_prompt>~/onos#</docker_prompt>
+ <docker_prompt>\$</docker_prompt>
<cluster_name></cluster_name> # Used as a prefix for cluster components. Defaults to 'ONOS'
<diff_clihost>True</diff_clihost> # if it has different host other than localhost for CLI. True or empty. OC# will be used if True.
- <karaf_username></karaf_username>
- <karaf_password></karaf_password>
+ <karaf_username>karaf</karaf_username>
+ <karaf_password>karaf</karaf_password>
<web_user>sdn</web_user>
<web_pass>rocks</web_pass>
<rest_port></rest_port>
@@ -30,13 +31,14 @@
<type>StratumOSSwitchDriver</type>
<connect_order>2</connect_order>
<COMPONENTS>
+ <prompt>#</prompt>
<shortName>leaf1</shortName>
<port1>1</port1>
<link1>Host1</link1>
<port2>2</port2>
<link2>Host2</link2>
- <onosConfigPath>~/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/</onosConfigPath>
- <onosConfigFile>tofino-onos-netcfg.json</onosConfigFile>
+ <onosConfigPath></onosConfigPath>
+ <onosConfigFile></onosConfigFile>
</COMPONENTS>
</SwitchLeaf1>
@@ -49,14 +51,14 @@
<COMPONENTS>
<mac>3c:fd:fe:a8:ea:30</mac>
<inband>false</inband>
- <ip>10.0.2.1</ip>
+ <ip>192.168.102.2</ip>
<shortName>h1</shortName>
<port1>0</port1>
<link1>SwitchLeaf1</link1>
<interfaceName>ens6f0</interfaceName>
<routes>
<route1>
- <network>10.0.2.0</network>
+ <network>192.168.102.1</network>
<netmask>24</netmask>
<gw></gw>
<interface></interface>
@@ -74,14 +76,14 @@
<COMPONENTS>
<mac>3c:fd:fe:a8:ea:31</mac>
<inband>false</inband>
- <ip>10.0.2.2</ip>
+ <ip>192.168.102.11</ip>
<shortName>h2</shortName>
<port1>0</port1>
<link1>SwitchLeaf1</link1>
<interfaceName>ens6f1</interfaceName>
<routes>
<route1>
- <network>10.0.2.0</network>
+ <network>192.168.102.1</network>
<netmask>24</netmask>
<gw></gw>
<interface></interface>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py
index f88c85a..bfba8df 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py
@@ -65,18 +65,21 @@
main.Cluster.setRunningNode( onosNodes )
run.installOnos( main, skipPackage=skipPackage, cliSleep=5 )
if main.useBmv2:
- switchPrefix = main.params[ 'DEPENDENCY' ].get( 'switchPrefix', "bmv2" )
+ switchPrefix = main.params[ 'DEPENDENCY' ].get( 'switchPrefix', '' )
+ if switchPrefix is None:
+ switchPrefix = ''
# Translate configuration file from OVS-OFDPA to BMv2 driver
translator.bmv2ToOfdpa( main ) # Try to cleanup if switching between switch types
translator.ofdpaToBmv2( main, switchPrefix=switchPrefix )
else:
translator.bmv2ToOfdpa( main )
- suf = main.params.get( 'jsonFileSuffix', None)
- if suf:
- run.loadJson( main, suffix=suf )
- else:
- run.loadJson( main )
- run.loadChart( main )
+ if not main.persistentSetup:
+ suf = main.params.get( 'jsonFileSuffix', None)
+ if suf:
+ run.loadJson( main, suffix=suf )
+ else:
+ run.loadJson( main )
+ run.loadChart( main ) # stores hosts to ping and expected results
if hasattr( main, 'Mininet1' ):
run.mnDockerSetup( main ) # optionally create and setup docker image
@@ -94,15 +97,14 @@
else:
# Run the test with physical devices
- run.connectToPhysicalNetwork( main )
+ run.connectToPhysicalNetwork( main, hostDiscovery=False ) # We don't want to do host discovery in the pod
run.checkFlows( main, minFlowCount=self.topo[ topology ][ 5 if main.useBmv2 else 4 ] * self.topo[ topology ][ 1 ], sleep=5 )
if main.useBmv2:
- switchPrefix = main.params[ 'DEPENDENCY' ].get( 'switchPrefix' )
- if switchPrefix == "tofino":
- leaf_dpid = [ "device:tofino:leaf%d" % ( ls + 1 ) for ls in range( self.topo[ topology ][ 1 ]) ]
- else:
- leaf_dpid = [ "device:bmv2:leaf%d" % ( ls + 1 ) for ls in range( self.topo[ topology ][ 1 ]) ]
+ switchPrefix = main.params[ 'DEPENDENCY' ].get( 'switchPrefix', '' )
+ if switchPrefix is not '' and switchPrefix is not None:
+ switchPrefix += ':'
+ leaf_dpid = [ "device:%sleaf%d" % ( switchPrefix, ls + 1 ) for ls in range( self.topo[ topology ][ 1 ]) ]
else:
leaf_dpid = [ "of:%016d" % ( ls + 1 ) for ls in range( self.topo[ topology ][ 1 ] ) ]
for dpid in leaf_dpid: