Add Stratum-bmv2 to Trellis SRBridging
TODO:
- Refactor so that we can use with other SR Tests
- Add creating docker image
Change-Id: Ib44418579e6f0eb4a862c36077459ed4dd389f8e
(cherry picked from commit 9bc3fb67167255b8962f4c1e4dc05d7fac10656b)
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/trellis_fabric.py b/TestON/tests/USECASE/SegmentRouting/dependencies/trellis_fabric.py
index e02a675..8668f83 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/trellis_fabric.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/trellis_fabric.py
@@ -17,6 +17,7 @@
from functools import partial
from bmv2 import ONOSBmv2Switch
+from stratum import StratumBmv2Switch
# Parse command line options and dump results
def parseOptions():
@@ -46,7 +47,7 @@
parser.add_option( '--remote-dhcp-server', action="store_true", dest='remoteServer', default=False,
help='Connect DHCP server indirectly (via gateway) if True' )
parser.add_option( '--switch', dest='switch', type='str', default='ovs',
- help='Switch type: ovs, bmv2 (with fabric.p4)' )
+ help='Switch type: ovs, bmv2 (with fabric.p4), stratum' )
( options, args ) = parser.parse_args()
return options, args
@@ -58,7 +59,8 @@
SWITCH_TO_PARAMS_DICT = {
"ovs": dict(cls=OVSSwitch),
- "bmv2": dict(cls=ONOSBmv2Switch, pipeconf=FABRIC_PIPECONF)
+ "bmv2": dict(cls=ONOSBmv2Switch, pipeconf=FABRIC_PIPECONF),
+ "stratum": dict(cls=StratumBmv2Switch, pipeconf=FABRIC_PIPECONF, loglevel='debug')
}
if opts.switch not in SWITCH_TO_PARAMS_DICT:
raise Exception("Unknown switch type '%s'" % opts.switch)