ONOS-574 - Complete REST APIs for flows
- codecs for all objects referenced by flows
- codecs for HostToHost and PointToPoint intents
- standardized on context.codec() rather than direct calls to new codec()
Change-Id: I94fcb6e31a9161132c6efc2793b9c46fa3cc4570
diff --git a/web/api/src/main/java/org/onosproject/codec/impl/CodecManager.java b/web/api/src/main/java/org/onosproject/codec/impl/CodecManager.java
index 6980a34..592f6a8 100644
--- a/web/api/src/main/java/org/onosproject/codec/impl/CodecManager.java
+++ b/web/api/src/main/java/org/onosproject/codec/impl/CodecManager.java
@@ -20,6 +20,7 @@
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Deactivate;
import org.apache.felix.scr.annotations.Service;
+import org.onlab.packet.Ethernet;
import org.onosproject.codec.CodecService;
import org.onosproject.codec.JsonCodec;
import org.onosproject.net.Annotations;
@@ -32,7 +33,12 @@
import org.onosproject.net.flow.FlowEntry;
import org.onosproject.net.flow.TrafficSelector;
import org.onosproject.net.flow.TrafficTreatment;
+import org.onosproject.net.flow.criteria.Criterion;
+import org.onosproject.net.flow.instructions.Instruction;
+import org.onosproject.net.intent.ConnectivityIntent;
+import org.onosproject.net.intent.HostToHostIntent;
import org.onosproject.net.intent.Intent;
+import org.onosproject.net.intent.PointToPointIntent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -61,10 +67,16 @@
registerCodec(Link.class, new LinkCodec());
registerCodec(Host.class, new HostCodec());
registerCodec(HostLocation.class, new HostLocationCodec());
+ registerCodec(HostToHostIntent.class, new HostToHostIntentCodec());
+ registerCodec(PointToPointIntent.class, new PointToPointIntentCodec());
registerCodec(Intent.class, new IntentCodec());
+ registerCodec(ConnectivityIntent.class, new ConnectivityIntentCodec());
registerCodec(FlowEntry.class, new FlowEntryCodec());
registerCodec(TrafficTreatment.class, new TrafficTreatmentCodec());
registerCodec(TrafficSelector.class, new TrafficSelectorCodec());
+ registerCodec(Instruction.class, new InstructionCodec());
+ registerCodec(Criterion.class, new CriterionCodec());
+ registerCodec(Ethernet.class, new EthernetCodec());
log.info("Started");
}