Preliminary support for P4 switches
Change-Id: I2665813772bc5334eb171d9b304c3a80fff4d536
diff --git a/xos/synchronizer/steps/sync_fabric_switch.py b/xos/synchronizer/steps/sync_fabric_switch.py
index cac7ac5..15031cf 100644
--- a/xos/synchronizer/steps/sync_fabric_switch.py
+++ b/xos/synchronizer/steps/sync_fabric_switch.py
@@ -40,7 +40,9 @@
model.ofId: {
"basic": {
"name": model.name,
- "driver": model.driver
+ "driver": model.driver,
+ "pipeconf": model.pipeconf,
+ "managementAddress": model.managementAddress
},
"segmentrouting": {
"name": model.name,
@@ -48,7 +50,7 @@
"ipv4Loopback": model.ipv4Loopback,
"routerMac": model.routerMac,
"isEdgeRouter": model.isEdgeRouter,
- "adjacencySids": []
+ "adjacencySids": [],
}
}
}
@@ -61,7 +63,7 @@
if r.status_code != 200:
log.error(r.text)
- raise Exception("Failed to add device %s into ONOS" % model.name)
+ raise Exception("Failed to add device %s into ONOS: %s" % (model.name, r.text))
else:
try:
log.info("result", json=r.json())
diff --git a/xos/synchronizer/steps/test_sync_fabric_switch.py b/xos/synchronizer/steps/test_sync_fabric_switch.py
index b749b94..f9facea 100644
--- a/xos/synchronizer/steps/test_sync_fabric_switch.py
+++ b/xos/synchronizer/steps/test_sync_fabric_switch.py
@@ -101,13 +101,17 @@
self.o.ipv4Loopback = "192.168.0.201"
self.o.routerMac = "00:00:02:01:06:01"
self.o.isEdgeRouter = False
+ self.o.pipeconf = "pipeconf"
+ self.o.managementAddress = "192.168.100.123"
expected_conf = {
"devices": {
self.o.ofId: {
"basic": {
"name": self.o.name,
- "driver": self.o.driver
+ "driver": self.o.driver,
+ "pipeconf": self.o.pipeconf,
+ "managementAddress": self.o.managementAddress
},
"segmentrouting": {
"name": self.o.name,