[ONOS-7781] Migrate SRRouting test case 1 to POD
Change-Id: I66dac9e1c1652ac16022892a08afa6f359362029
diff --git a/TestON/drivers/common/cli/hostdriver.py b/TestON/drivers/common/cli/hostdriver.py
index 86c0c38..d8cc74d 100644
--- a/TestON/drivers/common/cli/hostdriver.py
+++ b/TestON/drivers/common/cli/hostdriver.py
@@ -235,6 +235,53 @@
main.log.exception( self.name + ": Uncaught exception!" )
main.cleanAndExit()
+ def pingHostSetAlternative( self, dstIPList, wait=1, IPv6=False ):
+ """
+ Description:
+ Ping a set of destination host.
+ Params:
+ dstIPList is a list of destination ip addresses
+ Returns:
+ main.TRUE if the destination host is reachable
+ main.FALSE otherwise
+ """
+ isReachable = main.TRUE
+ wait = int( wait )
+ cmd = "ping"
+ if IPv6:
+ cmd = cmd + "6"
+ cmd = cmd + " -c 1 -i 1 -W " + str( wait )
+ try:
+ for dstIP in dstIPList:
+ pingCmd = cmd + " " + dstIP
+ self.handle.sendline( pingCmd )
+ i = self.handle.expect( [ self.prompt,
+ pexpect.TIMEOUT ],
+ timeout=wait + 5 )
+ if i == 0:
+ response = self.handle.before
+ if not re.search( ',\s0\%\spacket\sloss', response ):
+ main.log.debug( "Ping failed between %s and %s" % ( self.name, dstIP ) )
+ isReachable = main.FALSE
+ elif i == 1:
+ main.log.error( self.name + ": timeout when waiting for response" )
+ isReachable = main.FALSE
+ else:
+ main.log.error( self.name + ": unknown response: " + self.handle.before )
+ isReachable = main.FALSE
+ except pexpect.TIMEOUT:
+ main.log.exception( self.name + ": TIMEOUT exception" )
+ self.exitFromCmd( [ self.prompt ] )
+ isReachable = main.FALSE
+ except pexpect.EOF:
+ main.log.error( self.name + ": EOF exception found" )
+ main.log.error( self.name + ": " + self.handle.before )
+ main.cleanAndExit()
+ except Exception:
+ main.log.exception( self.name + ": Uncaught exception!" )
+ main.cleanAndExit()
+ return isReachable
+
def ifconfig( self, wait=3 ):
"""
Run ifconfig command on host and return output
diff --git a/TestON/drivers/common/cli/networkdriver.py b/TestON/drivers/common/cli/networkdriver.py
index f0d7f8b..828187c 100755
--- a/TestON/drivers/common/cli/networkdriver.py
+++ b/TestON/drivers/common/cli/networkdriver.py
@@ -207,9 +207,9 @@
main.log.exception( self.name + ": Uncaught exception!" )
main.cleanAndExit()
- def createComponent( self, name ):
+ def createHostComponent( self, name ):
"""
- Creates switch/host component with the same parameters as the one copied to local.
+ Creates host component with the same parameters as the one copied to local.
Arguments:
name - The string of the name of this component. The new component
will be assigned to main.<name> .
@@ -563,3 +563,24 @@
except Exception:
main.log.exception( self.name + ": Uncaught exception!" )
main.cleanAndExit()
+
+ def getIPAddress( self, host, proto='IPV4' ):
+ """
+ Returns IP address of the host
+ """
+ response = self.runCmdOnHost( host, "ifconfig" )
+ pattern = ''
+ if proto == 'IPV4':
+ pattern = "inet\s(\d+\.\d+\.\d+\.\d+)\s\snetmask"
+ else:
+ pattern = "inet6\s([\w,:]*)/\d+\s\sprefixlen"
+ ipAddressSearch = re.search( pattern, response )
+ if not ipAddressSearch:
+ return None
+ main.log.info(
+ self.name +
+ ": IP-Address of Host " +
+ host +
+ " is " +
+ ipAddressSearch.group( 1 ) )
+ return ipAddressSearch.group( 1 )
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.topo.flex b/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.topo.flex
index 8c32a0c..645243d 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.topo.flex
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.topo.flex
@@ -23,7 +23,7 @@
<OFDPASwitchLeaf201>
<host>10.192.21.22</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>2</connect_order>
<COMPONENTS>
@@ -36,7 +36,7 @@
<OFDPASwitchLeaf202>
<host>10.192.21.23</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>3</connect_order>
<COMPONENTS>
@@ -49,7 +49,7 @@
<OFDPASwitchLeaf203>
<host>10.192.21.24</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>4</connect_order>
<COMPONENTS>
@@ -62,7 +62,7 @@
<OFDPASwitchLeaf204>
<host>10.192.21.25</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>5</connect_order>
<COMPONENTS>
@@ -75,7 +75,7 @@
<OFDPASwitchLeaf205>
<host>10.192.21.29</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>6</connect_order>
<COMPONENTS>
@@ -88,7 +88,7 @@
<OFDPASwitchLeaf206>
<host>10.192.21.30</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>7</connect_order>
<COMPONENTS>
@@ -101,7 +101,7 @@
<OFDPASwitchLeaf225>
<host>10.192.21.21</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>8</connect_order>
<COMPONENTS>
@@ -114,7 +114,7 @@
<OFDPASwitchLeaf226>
<host>10.192.21.26</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>9</connect_order>
<COMPONENTS>
@@ -127,7 +127,7 @@
<OFDPASwitchLeaf227>
<host>10.192.21.28</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>10</connect_order>
<COMPONENTS>
@@ -140,7 +140,7 @@
<OFDPASwitchLeaf228>
<host>10.192.21.31</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>11</connect_order>
<COMPONENTS>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params.flex b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params.flex
new file mode 100644
index 0000000..7d2bd17
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params.flex
@@ -0,0 +1,59 @@
+<PARAMS>
+ <testcases>1</testcases>
+
+ <GRAPH>
+ <nodeCluster>Fabric</nodeCluster>
+ <builds>20</builds>
+ </GRAPH>
+
+ <SCALE>
+ <size>7</size>
+ <max>7</max>
+ </SCALE>
+
+ <DEPENDENCY>
+ <useCommonConf>False</useCommonConf>
+ <useCommonTopo>True</useCommonTopo>
+ <confName>flex</confName>
+ <topology>hagg_fabric.py</topology>
+ <lib>routinglib.py,trellislib.py,trellis_fabric.py</lib>
+ <conf>bgpdbgp1.conf,bgpdbgp2.conf,bgpdr1.conf,bgpdr2.conf,dhcpd6.conf,dhcpd.conf,zebradbgp1.conf,zebradbgp2.conf</conf>
+ </DEPENDENCY>
+
+ <ENV>
+ <cellName>productionCell</cellName>
+ <cellApps>drivers,openflow,segmentrouting,fpm,dhcprelay,netcfghostprovider,routeradvertisement,t3,hostprobingprovider</cellApps>
+ </ENV>
+
+ <GIT>
+ <pull>False</pull>
+ <branch>master</branch>
+ </GIT>
+
+ <CTRL>
+ <port>6653</port>
+ </CTRL>
+
+ <timers>
+ <LinkDiscovery>30</LinkDiscovery>
+ <SwitchDiscovery>30</SwitchDiscovery>
+ <OnosDiscovery>45</OnosDiscovery>
+ <loadNetcfgSleep>5</loadNetcfgSleep>
+ <startMininetSleep>25</startMininetSleep>
+ <dhcpSleep>60</dhcpSleep>
+ <balanceMasterSleep>10</balanceMasterSleep>
+ <connectToNetSleep>30</connectToNetSleep>
+ </timers>
+
+ <TOPO>
+ <internalIpv4Hosts>h4v4,h5v4,h9v4,h10v4</internalIpv4Hosts>
+ <internalIpv6Hosts>h4v6,h5v6,h9v6,h10v6</internalIpv6Hosts>
+ <externalIpv4Hosts></externalIpv4Hosts>
+ <externalIpv6Hosts></externalIpv6Hosts>
+ <staticIpv4Hosts></staticIpv4Hosts>
+ <staticIpv6Hosts></staticIpv6Hosts>
+ <switchNum>10</switchNum>
+ <linkNum>48</linkNum>
+ </TOPO>
+
+</PARAMS>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.topo.flex b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.topo.flex
new file mode 100644
index 0000000..a9c3ed1
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.topo.flex
@@ -0,0 +1,232 @@
+<TOPOLOGY>
+ <COMPONENT>
+ <ONOScell>
+ <host>localhost</host> # ONOS "bench" machine
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>OnosClusterDriver</type>
+ <connect_order>1</connect_order>
+ <COMPONENTS>
+ <cluster_name></cluster_name> # Used as a prefix for cluster components. Defaults to 'ONOS'
+ <diff_clihost></diff_clihost> # if it has different host other than localhost for CLI. True or empty. OC# will be used if True.
+ <karaf_username>ubuntu</karaf_username>
+ <karaf_password>ubuntu</karaf_password>
+ <web_user></web_user>
+ <web_pass></web_pass>
+ <rest_port></rest_port>
+ <prompt></prompt> # TODO: we technically need a few of these, one per component
+ <onos_home></onos_home> # defines where onos home is
+ <nodes>3</nodes> # number of nodes in the cluster
+ </COMPONENTS>
+ </ONOScell>
+
+ <OFDPASwitchLeaf201>
+ <host>10.192.21.22</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>2</connect_order>
+ <COMPONENTS>
+ <shortName>s004</shortName>
+ <dpid>0x201</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf201>
+
+ <OFDPASwitchLeaf202>
+ <host>10.192.21.23</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>3</connect_order>
+ <COMPONENTS>
+ <shortName>s005</shortName>
+ <dpid>0x202</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf202>
+
+ <OFDPASwitchLeaf203>
+ <host>10.192.21.24</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>4</connect_order>
+ <COMPONENTS>
+ <shortName>s002</shortName>
+ <dpid>0x203</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf203>
+
+ <OFDPASwitchLeaf204>
+ <host>10.192.21.25</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>5</connect_order>
+ <COMPONENTS>
+ <shortName>s003</shortName>
+ <dpid>0x204</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf204>
+
+ <OFDPASwitchLeaf205>
+ <host>10.192.21.29</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>6</connect_order>
+ <COMPONENTS>
+ <shortName>s006</shortName>
+ <dpid>0x205</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf205>
+
+ <OFDPASwitchLeaf206>
+ <host>10.192.21.30</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>7</connect_order>
+ <COMPONENTS>
+ <shortName>s001</shortName>
+ <dpid>0x206</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf206>
+
+ <OFDPASwitchLeaf225>
+ <host>10.192.21.21</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>8</connect_order>
+ <COMPONENTS>
+ <shortName>s101</shortName>
+ <dpid>0x225</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf225>
+
+ <OFDPASwitchLeaf226>
+ <host>10.192.21.26</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>9</connect_order>
+ <COMPONENTS>
+ <shortName>s102</shortName>
+ <dpid>0x226</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf226>
+
+ <OFDPASwitchLeaf227>
+ <host>10.192.21.28</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>10</connect_order>
+ <COMPONENTS>
+ <shortName>s103</shortName>
+ <dpid>0x227</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf227>
+
+ <OFDPASwitchLeaf228>
+ <host>10.192.21.31</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>11</connect_order>
+ <COMPONENTS>
+ <shortName>s104</shortName>
+ <dpid>0x228</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf228>
+
+ <Host4v4>
+ <host>10.192.21.61</host>
+ <user>vyatta</user>
+ <password>vyatta</password>
+ <type>HostDriver</type>
+ <connect_order>13</connect_order>
+ <COMPONENTS>
+ <ip>10.0.202.7</ip>
+ <ip6></ip6>
+ <shortName>h4v4</shortName>
+ <ifaceName>bond0</ifaceName>
+ <inband>True</inband>
+ <username>ubuntu</username>
+ <password>ubuntu</password>
+ </COMPONENTS>
+ </Host4v4>
+
+
+ <Host5v4>
+ <host>10.192.21.61</host>
+ <user>vyatta</user>
+ <password>vyatta</password>
+ <type>HostDriver</type>
+ <connect_order>14</connect_order>
+ <COMPONENTS>
+ <ip>10.0.202.8</ip>
+ <ip6></ip6>
+ <shortName>h5v4</shortName>
+ <ifaceName>bond0</ifaceName>
+ <inband>True</inband>
+ <username>ubuntu</username>
+ <password>ubuntu</password>
+ </COMPONENTS>
+ </Host5v4>
+
+ <Host9v4>
+ <host>10.192.21.61</host>
+ <user>vyatta</user>
+ <password>vyatta</password>
+ <type>HostDriver</type>
+ <connect_order>15</connect_order>
+ <COMPONENTS>
+ <ip>10.0.204.7</ip>
+ <ip6></ip6>
+ <shortName>h9v4</shortName>
+ <ifaceName>bond0</ifaceName>
+ <inband>True</inband>
+ <username>ubuntu</username>
+ <password>ubuntu</password>
+ </COMPONENTS>
+ </Host9v4>
+
+ <Host10v4>
+ <host>10.192.21.61</host>
+ <user>vyatta</user>
+ <password>vyatta</password>
+ <type>HostDriver</type>
+ <connect_order>16</connect_order>
+ <COMPONENTS>
+ <ip>10.0.204.8</ip>
+ <ip6></ip6>
+ <shortName>h10v4</shortName>
+ <ifaceName>bond0</ifaceName>
+ <inband>True</inband>
+ <username>ubuntu</username>
+ <password>ubuntu</password>
+ </COMPONENTS>
+ </Host10v4>
+
+ <NetworkBench>
+ <host>localhost</host>
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>NetworkDriver</type>
+ <connect_order>20</connect_order>
+ <COMPONENTS>
+ </COMPONENTS>
+ </NetworkBench>
+ </COMPONENT>
+</TOPOLOGY>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
index f5e8d70..479b3f4 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
@@ -40,10 +40,10 @@
main.internalIpv4Hosts = main.params[ 'TOPO' ][ 'internalIpv4Hosts' ].split( ',' )
main.internalIpv6Hosts = main.params[ 'TOPO' ][ 'internalIpv6Hosts' ].split( ',' )
- main.externalIpv4Hosts = main.params[ 'TOPO' ][ 'externalIpv4Hosts' ].split( ',' )
- main.externalIpv6Hosts = main.params[ 'TOPO' ][ 'externalIpv6Hosts' ].split( ',' )
- main.staticIpv4Hosts = main.params[ 'TOPO' ][ 'staticIpv4Hosts' ].split( ',' )
- main.staticIpv6Hosts = main.params[ 'TOPO' ][ 'staticIpv6Hosts' ].split( ',' )
+ main.externalIpv4Hosts = main.params[ 'TOPO' ][ 'externalIpv4Hosts' ].split( ',' ) if main.params[ 'TOPO' ].get('externalIpv4Hosts') else []
+ main.externalIpv6Hosts = main.params[ 'TOPO' ][ 'externalIpv6Hosts' ].split( ',' ) if main.params[ 'TOPO' ].get('externalIpv6Hosts') else []
+ main.staticIpv4Hosts = main.params[ 'TOPO' ][ 'staticIpv4Hosts' ].split( ',' ) if main.params[ 'TOPO' ].get('staticIpv4Hosts') else []
+ main.staticIpv6Hosts = main.params[ 'TOPO' ][ 'staticIpv6Hosts' ].split( ',' ) if main.params[ 'TOPO' ].get('staticIpv6Hosts') else []
main.disconnectedIpv4Hosts = []
main.disconnectedIpv6Hosts = []
main.disconnectedExternalIpv4Hosts = []
@@ -56,8 +56,11 @@
lib.installOnos( main, skipPackage=skipPackage, cliSleep=5 )
# Load configuration files
- main.cfgName = 'TEST_CONFIG_ipv4={}_ipv6={}'.format( 1 if ipv4 else 0,
- 1 if ipv6 else 0)
+ if hasattr( main, "Mininet1" ):
+ main.cfgName = 'TEST_CONFIG_ipv4={}_ipv6={}'.format( 1 if ipv4 else 0,
+ 1 if ipv6 else 0)
+ else:
+ main.cfgName = main.params[ "DEPENDENCY" ][ "confName" ]
lib.loadJson( main )
time.sleep( float( main.params[ 'timers' ][ 'loadNetcfgSleep' ] ) )
lib.loadHost( main )
@@ -82,9 +85,8 @@
time.sleep( float( main.params[ "timers" ][ "startMininetSleep" ] ) )
else:
# Run the test with physical devices
- lib.connectToPhysicalNetwork( main, self.switchNames )
- # Check if the devices are up
- lib.checkDevices( main, switches=len( self.switchNames ) )
+ lib.connectToPhysicalNetwork( main )
+
# wait some time for onos to install the rules!
time.sleep( float( main.params[ 'timers' ][ 'dhcpSleep' ] ) )
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/host/flex.host b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/host/flex.host
new file mode 100644
index 0000000..0ccf382
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/host/flex.host
@@ -0,0 +1,16 @@
+{
+ "onos":
+ {
+ "0A:5E:0D:F3:EC:D4/None": "10.0.202.7",
+ "12:1C:B7:5C:69:68/None": "10.0.202.8",
+ "EA:DA:19:1E:CB:7D/None": "10.0.204.7",
+ "A2:9B:16:E8:2A:52/None": "10.0.204.8"
+ },
+ "network":
+ {
+ "h4v4": "10.0.202.7",
+ "h5v4": "10.0.202.8",
+ "h9v4": "10.0.204.7",
+ "h10v4": "10.0.204.8"
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/flex.json b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/flex.json
new file mode 100644
index 0000000..c8f1ff2
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/flex.json
@@ -0,0 +1,460 @@
+{
+ "ports" : {
+ "of:0000000000000205/1" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.205.254/24" ],
+ "vlan-untagged": 205
+ }]
+ },
+ "of:0000000000000205/2" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.205.254/24" ],
+ "vlan-untagged": 205
+ }]
+ },
+ "of:0000000000000206/1" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.206.254/24" ],
+ "vlan-untagged": 206
+ }]
+ },
+ "of:0000000000000206/2" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.206.254/24" ],
+ "vlan-untagged": 206
+ }]
+ },
+ "of:0000000000000203/1" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000203/2" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000203/3" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000203/4" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000203/5" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000203/6" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000203/7" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000203/8" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000203/20" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-tagged": [204]
+ }]
+ },
+ "of:0000000000000204/1" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000204/2" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000204/3" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000204/4" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000204/5" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000204/6" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000204/7" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000204/8" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000204/20" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-tagged": [204]
+ }]
+ },
+ "of:0000000000000201/1" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000201/2" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000201/3" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000201/4" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000201/5" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000201/6" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000201/7" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000201/8" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000201/17" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.101.254/24" ],
+ "vlan-untagged": 101
+ }]
+ },
+ "of:0000000000000201/18" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.101.254/24" ],
+ "vlan-untagged": 101
+ }]
+ },
+ "of:0000000000000201/20" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-tagged": [202]
+ }]
+ },
+ "of:0000000000000202/1" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000202/2" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000202/3" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000202/4" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000202/5" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000202/6" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000202/7" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000202/8" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000202/17" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.102.254/24" ],
+ "vlan-untagged": 102
+ }]
+ },
+ "of:0000000000000202/18" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.102.254/24" ],
+ "vlan-untagged": 102
+ }]
+ },
+ "of:0000000000000202/20" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-tagged": [202]
+ }]
+ }
+ },
+ "devices" : {
+ "of:0000000000000201" : {
+ "basic" : {
+ "name": "201-qmx",
+ "latitude" : 34,
+ "longitude": -95
+ },
+ "segmentrouting" : {
+ "ipv4NodeSid" : 201,
+ "ipv4Loopback" : "192.168.0.201",
+ "ipv6NodeSid" : 201,
+ "ipv6Loopback" : "2000::c0a8:0201",
+ "routerMac" : "00:00:02:01:02:02",
+ "pairDeviceId" : "of:0000000000000202",
+ "pairLocalPort" : 20,
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ }
+ },
+ "of:0000000000000202" : {
+ "basic" : {
+ "name": "202-qmx",
+ "latitude" : 34,
+ "longitude": -90
+ },
+ "segmentrouting" : {
+ "ipv4NodeSid" : 202,
+ "ipv4Loopback" : "192.168.0.202",
+ "ipv6NodeSid" : 202,
+ "ipv6Loopback" : "2000::c0a8:0202",
+ "routerMac" : "00:00:02:01:02:02",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000201",
+ "pairLocalPort" : 20,
+ "adjacencySids" : []
+ }
+ },
+ "of:0000000000000203" : {
+ "basic" : {
+ "name": "203-qmx",
+ "latitude" : 34,
+ "longitude": -108
+ },
+ "segmentrouting" : {
+ "name" : "Leaf2-R1",
+ "ipv4NodeSid" : 203,
+ "ipv4Loopback" : "192.168.0.203",
+ "ipv6NodeSid" : 203,
+ "ipv6Loopback" : "2000::c0a8:0203",
+ "routerMac" : "00:00:02:03:02:04",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000204",
+ "pairLocalPort" : 20,
+ "adjacencySids" : []
+ }
+ },
+ "of:0000000000000204" : {
+ "basic" : {
+ "name": "204-qmx",
+ "latitude" : 34,
+ "longitude": -103
+ },
+ "segmentrouting" : {
+ "name" : "Leaf1-R1",
+ "ipv4NodeSid" : 204,
+ "ipv4Loopback" : "192.168.0.204",
+ "ipv6NodeSid" : 204,
+ "ipv6Loopback" : "2000::c0a8:0204",
+ "routerMac" : "00:00:02:03:02:04",
+ "pairDeviceId" : "of:0000000000000203",
+ "pairLocalPort" : 20,
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ }
+ },
+ "of:0000000000000225" : {
+ "basic" : {
+ "name": "225-t2",
+ "latitude" : 42,
+ "longitude": -100
+ },
+ "segmentrouting" : {
+ "name" : "SpineToma-0",
+ "ipv4NodeSid" : 225,
+ "ipv4Loopback" : "192.168.0.225",
+ "ipv6NodeSid" : 225,
+ "ipv6Loopback" : "2000::c0a8:0225",
+ "routerMac" : "00:00:02:25:00:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ }
+ },
+ "of:0000000000000226" : {
+ "basic" : {
+ "name": "226-tmhk",
+ "latitude" : 42,
+ "longitude": -95
+ },
+ "segmentrouting" : {
+ "name" : "Spine1",
+ "ipv4NodeSid" : 226,
+ "ipv4Loopback" : "192.168.0.226",
+ "ipv6NodeSid" : 226,
+ "ipv6Loopback" : "2000::c0a8:0226",
+ "routerMac" : "00:00:02:26:00:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ }
+ },
+ "of:0000000000000205":{
+ "basic":{
+ "name":"205-qmx",
+ "latitude":34,
+ "longitude":-120
+ },
+ "segmentrouting":{
+ "name":"Leaf1",
+ "ipv4NodeSid":205,
+ "ipv4Loopback":"192.168.0.205",
+ "ipv6NodeSid":205,
+ "ipv6Loopback":"2000::c0a8:0205",
+ "routerMac":"00:00:02:05:06:01",
+ "isEdgeRouter":true,
+ "adjacencySids":[
+ ]
+ }
+ },
+ "of:0000000000000206":{
+ "basic":{
+ "name":"206-qmx",
+ "latitude":34,
+ "longitude":-115
+ },
+ "segmentrouting":{
+ "name":"Leaf2",
+ "ipv4NodeSid":206,
+ "ipv4Loopback":"192.168.0.206",
+ "ipv6NodeSid":206,
+ "ipv6Loopback":"2000::c0a8:0206",
+ "routerMac":"00:00:02:06:06:01",
+ "isEdgeRouter":true,
+ "adjacencySids":[
+ ]
+ }
+ },
+ "of:0000000000000227":{
+ "basic":{
+ "name":"227-tmhk",
+ "latitude":38,
+ "longitude":-119
+ },
+ "segmentrouting":{
+ "name":"Spine1",
+ "ipv4NodeSid":227,
+ "ipv4Loopback":"192.168.0.227",
+ "ipv6NodeSid":227,
+ "ipv6Loopback":"2000::c0a8:0227",
+ "routerMac":"00:00:02:27:00:01",
+ "isEdgeRouter":false,
+ "adjacencySids":[
+ ]
+ }
+ },
+ "of:0000000000000228":{
+ "basic":{
+ "name":"228-t2",
+ "latitude":38,
+ "longitude":-116
+ },
+ "segmentrouting":{
+ "name":"Spine2",
+ "ipv4NodeSid":228,
+ "ipv4Loopback":"192.168.0.228",
+ "ipv6NodeSid":228,
+ "ipv6Loopback":"2000::c0a8:0228",
+ "routerMac":"00:00:02:28:00:01",
+ "isEdgeRouter":false,
+ "adjacencySids":[
+ ]
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default" : [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000204/8",
+ "serverIps": ["10.0.204.8"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/flex.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/flex.linkFailureChart
new file mode 100644
index 0000000..784fbd3
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/flex.linkFailureChart
@@ -0,0 +1,17 @@
+{
+ "link_batch_1" : { "links" : { "link1" : ["spine103", "spine101"],
+ "link2" : ["leaf2", "spine101"],
+ "link3" : ["leaf3", "spine101"],
+ "link4" : ["leaf4", "spine101"],
+ "link5" : ["leaf5", "spine101"] },
+ "links_before" : 48,
+ "links_after" : 30 },
+ "link_batch_2" : { "links" : { "link1" : ["spine104", "spine102"],
+ "link2" : ["leaf2", "spine102"],
+ "link3" : ["leaf3", "spine102"],
+ "link4" : ["leaf4", "spine102"],
+ "link5" : ["leaf5", "spine102"] },
+ "links_before" : 48,
+ "links_after" : 30 }
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/switchFailure/flex.switchFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/switchFailure/flex.switchFailureChart
new file mode 100644
index 0000000..96e4982
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/switchFailure/flex.switchFailureChart
@@ -0,0 +1,10 @@
+{
+ "spine101": { "switches_before_failure": 10,
+ "links_before_failure": 48,
+ "switches_after_failure": 9,
+ "links_after_failure": 30 },
+ "spine102": { "switches_before_failure": 10,
+ "links_before_failure": 48,
+ "switches_after_failure": 9,
+ "links_after_failure": 30 }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
index 4d6c1c1..d9c350c 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -1183,7 +1183,7 @@
mininetName = None
scapyHandle.startHostCli( mininetName )
else:
- main.Network.createComponent( scapyName )
+ main.Network.createHostComponent( scapyName )
scapyHandle = getattr( main, scapyName )
scapyHandle.connectInband()
main.scapyHosts.append( scapyHandle )
diff --git a/TestON/tests/dependencies/topology.py b/TestON/tests/dependencies/topology.py
index ae2b89c..720bf92 100644
--- a/TestON/tests/dependencies/topology.py
+++ b/TestON/tests/dependencies/topology.py
@@ -254,8 +254,11 @@
main.log.info( "Creating component for host {}".format( src ) )
main.Network.createHostComponent( src )
hostHandle = getattr( main, src )
- main.log.info( "Starting CLI on host {}".format( src ) )
- hostHandle.startHostCli()
+ if hasattr( main, 'Mininet1' ):
+ main.log.info( "Starting CLI on host {}".format( src ) )
+ hostHandle.startHostCli()
+ else:
+ hostHandle.connectInband()
srcIpList[ src ] = main.Network.getIPAddress( src, proto='IPV6' if ipv6 else 'IPV4' )
unexpectedPings = []
for dst in dstList: