Add SRRouting for sdfabric-ci1 POD

Change-Id: I10554d6d530e1fb567c4eadbce638caf8f4718c5
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params.hudson b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params.hudson
new file mode 100644
index 0000000..946ca43
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params.hudson
@@ -0,0 +1,123 @@
+<PARAMS>
+    <!-- Ignore case 104 for now since it requires additional settings to access the Internet. -->
+    <testcases>1,3,4,6,7,9,101,701</testcases>
+
+    <GRAPH>
+        <nodeCluster>ci1-sdfabric</nodeCluster>
+        <builds>20</builds>
+        <jobName>SRRouting-tofino</jobName>
+        <branch>master</branch>
+    </GRAPH>
+
+    <SCALE>
+        <size>3</size>
+        <max>3</max>
+    </SCALE>
+
+    <DEPENDENCY>
+        <useCommonConf>False</useCommonConf>
+        <useCommonTopo>True</useCommonTopo>
+        <useBmv2>True</useBmv2>
+        <bmv2SwitchType>stratum</bmv2SwitchType>
+        <switchPrefix></switchPrefix>
+        <stratumRoot>~/stratum</stratumRoot>
+        <confName>hudson</confName>
+        <topology>trellis_fabric.py</topology>
+        <lib>routinglib.py,trellislib.py,stratum.py</lib>
+    </DEPENDENCY>
+
+    <jsonFileSuffix>.hudson</jsonFileSuffix>
+
+    <persistent_setup>True</persistent_setup>
+
+    <kubernetes>
+        <appName>onos-classic</appName>
+        <namespace>tost</namespace>
+    </kubernetes>
+    <use_stern>True</use_stern>
+
+    <ENV>
+        <cellName>productionCell</cellName>
+        <cellApps>drivers,fpm,lldpprovider,hostprovider,netcfghostprovider,drivers.bmv2,pipelines.fabric,org.stratumproject.fabric-tna,drivers.barefoot,segmentrouting,t3</cellApps>
+    </ENV>
+
+    <EXTERNAL_APPS>
+    </EXTERNAL_APPS>
+
+    <ONOS_Configuration>
+        <org.onosproject.grpc.ctl.GrpcChannelControllerImpl>
+            <enableMessageLog>true</enableMessageLog>
+        </org.onosproject.grpc.ctl.GrpcChannelControllerImpl>
+    </ONOS_Configuration>
+
+    <ONOS_Logging>
+        <org.onosproject.events>TRACE</org.onosproject.events>
+        <org.onosproject.segmentrouting>DEBUG</org.onosproject.segmentrouting>
+        <org.onosproject.routeservice.impl>DEBUG</org.onosproject.routeservice.impl>
+        <org.onosproject.routeservice.store>DEBUG</org.onosproject.routeservice.store>
+        <org.onosproject.routing.fpm>DEBUG</org.onosproject.routing.fpm>
+        <org.onosproject.fpm>DEBUG</org.onosproject.fpm>
+    </ONOS_Logging>
+    <ONOS_Logging_Reset>
+        <org.onosproject.segmentrouting>DEBUG</org.onosproject.segmentrouting>
+    </ONOS_Logging_Reset>
+
+    <GIT>
+        <pull>False</pull>
+        <branch>master</branch>
+    </GIT>
+
+    <CTRL>
+        <port>6653</port>
+    </CTRL>
+
+    <timers>
+        <LinkDiscovery>30</LinkDiscovery>
+        <SwitchDiscovery>45</SwitchDiscovery>
+        <TrafficDiscovery>10</TrafficDiscovery>
+        <OnosDiscovery>45</OnosDiscovery>
+        <loadNetcfgSleep>5</loadNetcfgSleep>
+        <startMininetSleep>25</startMininetSleep>
+        <dhcpSleep>15</dhcpSleep>
+        <balanceMasterSleep>10</balanceMasterSleep>
+    </timers>
+
+    <SLEEP>
+        <startup>10</startup>
+    </SLEEP>
+
+    <TOPO>
+        <internalIpv4Hosts>h1,h2,h3</internalIpv4Hosts>
+        <switchNum>2</switchNum>
+        <linkNum>2</linkNum>
+    </TOPO>
+    <CASE101Links>
+        <Stage1>
+            <leaf1>100</leaf1>
+        </Stage1>
+        <Stage2>
+            <leaf1>101</leaf1>
+        </Stage2>
+        <Stage3>
+            <expect>False</expect>
+            <leaf2>100,101,102,103,16</leaf2>
+            <leaf1>100,101,102,103,16</leaf1>
+        </Stage3>
+    </CASE101Links>
+    <CASE104Links>
+        <Stage1>
+            <leaf1>100</leaf1>
+        </Stage1>
+        <Stage2>
+            <leaf1>101</leaf1>
+        </Stage2>
+        <Stage3>
+            <expect>False</expect>
+            <leaf2>100,101,102,103,16</leaf2>
+            <leaf1>100,101,102,103,16</leaf1>
+        </Stage3>
+    </CASE104Links>
+    <ALARM>
+        <minPassPercent>100</minPassPercent>
+    </ALARM>
+</PARAMS>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
index c6e97b5..86387a1 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
@@ -1684,8 +1684,8 @@
         blackholeIpRoute = "%s/24" % blackholeIp
         route = "%s/16" % baseIP
         blackholeRoute = "%s/24" % baseIP
-        srcComponent = getattr( main, 'Compute2' )
-        nextHopComponent = getattr( main, 'ManagmentServer' ) # add dstIP to the params file
+        srcComponent = getattr( main, 'Host2' )
+        nextHopComponent = getattr( main, 'Host1' ) # add dstIP to the params file
         nextHopIface = nextHopComponent.interfaces[0].get( 'name' )
         nextHopIp = nextHopComponent.getIPAddress( iface=nextHopIface )
         srcComponentIface = srcComponent.interfaces[0].get( 'name' )
@@ -1711,7 +1711,7 @@
         utilities.assert_equals( expect=main.TRUE, actual=routeResult,
                                      onpass="Route added in the host",
                                      onfail="Failed to add route in the host" )
-        main.log.debug( main.Compute2.getRoutes() )
+        main.log.debug( main.Host2.getRoutes() )
 
         main.step("Capturing ping to dstIP after adding the static routes")
         nextHopComponent.startFilter( ifaceName=nextHopIface, sniffCount=1, pktFilter="icmp and host " + dstIp )
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.topo.0x2.hudson b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.topo.0x2.hudson
new file mode 100644
index 0000000..5bed481
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.topo.0x2.hudson
@@ -0,0 +1,133 @@
+<TOPOLOGY>
+    <COMPONENT>
+        <ONOScell>
+            <host>localhost</host>  # ONOS "bench" machine
+            <user>jenkins</user>
+            <password></password>
+            <type>OnosClusterDriver</type>
+            <connect_order>1</connect_order>
+            <home>~/onos</home>   # defines where onos home is on the build machine. Defaults to "~/onos/" if empty.
+            <COMPONENTS>
+                <kubeConfig>~/.kube/01-ci1-sdfabric.yaml</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>\$</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</karaf_username>
+                <karaf_password>karaf</karaf_password>
+                <karafPrompt_username>karaf</karafPrompt_username>
+                <karafPrompt_password>karaf</karafPrompt_password>
+                <web_user>karaf</web_user>
+                <web_pass>karaf</web_pass>
+                <rest_port></rest_port>
+                <prompt></prompt>  # TODO: we technically need a few of these, one per component
+                <onos_home>~/onos/</onos_home>  # defines where onos home is on the target cell machine. Defaults to entry in "home" if empty.
+                <nodes> 3 </nodes>  # number of nodes in the cluster
+            </COMPONENTS>
+        </ONOScell>
+
+        <Leaf1>
+            <host>10.70.10.94</host>
+            <user>root</user>
+            <password>onl</password>
+            <type>StratumOSSwitchDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS>
+                <shortName>leaf1</shortName>
+                <port1>1</port1>
+                <link1>Host1</link1>
+                <onosConfigPath></onosConfigPath>
+                <onosConfigFile></onosConfigFile>
+            </COMPONENTS>
+        </Leaf1>
+
+        <Leaf2>
+            <host>10.70.10.95</host>
+            <user>root</user>
+            <password>onl</password>
+            <type>StratumOSSwitchDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS>
+                <shortName>leaf2</shortName>
+                <port1>2</port1>
+                <link1>Host2</link1>
+                <onosConfigPath></onosConfigPath>
+                <onosConfigFile></onosConfigFile>
+            </COMPONENTS>
+        </Leaf2>
+
+        <Host1>
+            <host>10.70.10.105</host>
+            <user>sdfab</user>
+            <password></password>
+            <type>HostDriver</type>
+            <connect_order>6</connect_order>
+            <jump_host></jump_host>
+            <COMPONENTS>
+                <mac></mac>
+                <inband>false</inband>
+                <dhcp>False</dhcp>
+                <ip>10.32.11.1</ip>
+                <shortName>h1</shortName>
+                <port1></port1>
+                <link1></link1>
+                <ifaceName>bond0</ifaceName>
+                <scapy_path>/usr/bin/scapy</scapy_path>
+                <sudo_required>true</sudo_required>
+            </COMPONENTS>
+        </Host1>
+
+        <Host2>
+            <host>10.70.10.106</host>
+            <user>sdfab</user>
+            <password></password>
+            <type>HostDriver</type>
+            <connect_order>7</connect_order>
+            <jump_host></jump_host>
+            <COMPONENTS>
+                <mac></mac>
+                <inband>false</inband>
+                <dhcp>False</dhcp>
+                <ip>10.32.11.2</ip>
+                <shortName>h2</shortName>
+                <port1></port1>
+                <link1></link1>
+                <ifaceName>bond0</ifaceName>
+                <scapy_path>/usr/bin/scapy</scapy_path>
+                <sudo_required>true</sudo_required>
+            </COMPONENTS>
+        </Host2>
+
+        <Host3>
+            <host>10.70.10.107</host>
+            <user>sdfab</user>
+            <password></password>
+            <type>HostDriver</type>
+            <connect_order>8</connect_order>
+            <jump_host></jump_host>
+            <COMPONENTS>
+                <mac></mac>
+                <inband>false</inband>
+                <dhcp>False</dhcp>
+                <ip>10.32.11.193</ip>
+                <shortName>h3</shortName>
+                <port1></port1>
+                <link1></link1>
+                <ifaceName>ens17</ifaceName>
+                <scapy_path>/usr/bin/scapy</scapy_path>
+                <sudo_required>true</sudo_required>
+            </COMPONENTS>
+        </Host3>
+
+        <NetworkBench>
+            <host>10.70.10.105</host>
+            <user>sdfab</user>
+            <password></password>
+            <type>NetworkDriver</type>
+            <connect_order>10</connect_order>
+            <COMPONENTS>
+            </COMPONENTS>
+        </NetworkBench>
+
+    </COMPONENT>
+</TOPOLOGY>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/host/hudson.host b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/host/hudson.host
new file mode 100644
index 0000000..f7582f1
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/host/hudson.host
@@ -0,0 +1,14 @@
+{
+    "onos":
+    {
+        "A4:23:05:AA:AA:01/None": "10.32.11.1",
+        "A4:23:05:AA:AA:02/None": "10.32.11.2",
+        "A4:23:05:AA:BB:03/None": "10.32.11.193"
+    },
+    "network":
+    {
+        "h1": "10.32.11.1",
+        "h2": "10.32.11.2",
+        "h3": "10.32.11.193"
+    }
+}