CORD-512 Support vSG <-> vRouter default route
- Support multiple subnets per port. getIpPort() will only return the first non-/32 and non-/0 subnet
/32 is used as vSG subnet
/0 is used as default gateway
- Support multiple L3 unicast group on a single port
Change the way to generate the group ID and group key
- Special case for 0.0.0.0 host. Push a /0 to IP table instead of /32
- Implement vRouterConfig
Put VR MAC to TMAC table of all leaves when config added
When processEthDst see PortNumber.ANY in key, match ETH_DST only
- For OFDPA, wipe existing instruction before sending to controller
So packet that misses L3 unicast table won't be sent to controller twice
- For SpringOpenTTP, pop VLAN before sending to controller
- Move several constant definitions to SegmentRoutingService
- Add minimum priority for IP rules such that /0 won't collide with zero priority default rules
- Update the config sample
Use VLAN=-1 for hosts
Add example for default route
Change-Id: Id751697ce36a7e5c13b3859350ff21b585c38525
diff --git a/src/main/java/org/onosproject/segmentrouting/SRObjectiveContext.java b/src/main/java/org/onosproject/segmentrouting/SRObjectiveContext.java
new file mode 100644
index 0000000..8dd75de
--- /dev/null
+++ b/src/main/java/org/onosproject/segmentrouting/SRObjectiveContext.java
@@ -0,0 +1,40 @@
+package org.onosproject.segmentrouting;
+
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.flowobjective.Objective;
+import org.onosproject.net.flowobjective.ObjectiveContext;
+import org.onosproject.net.flowobjective.ObjectiveError;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Segment Routing Flow Objective Context.
+ */
+public class SRObjectiveContext implements ObjectiveContext {
+ enum ObjectiveType {
+ FILTER,
+ FORWARDING
+ }
+ private final DeviceId deviceId;
+ private final ObjectiveType type;
+
+ private static final Logger log = LoggerFactory
+ .getLogger(SegmentRoutingManager.class);
+
+ SRObjectiveContext(DeviceId deviceId, ObjectiveType type) {
+ this.deviceId = deviceId;
+ this.type = type;
+ }
+ @Override
+ public void onSuccess(Objective objective) {
+ log.debug("{} objective operation successful in device {}",
+ type.name(), deviceId);
+ }
+
+ @Override
+ public void onError(Objective objective, ObjectiveError error) {
+ log.warn("{} objective {} operation failed with error: {} in device {}",
+ type.name(), objective, error, deviceId);
+ }
+}
+