Found a few codec inconsistencies between JSON encoders and decoders
- Fix EtherType inconsistency in coding VLAN_PUSH and MPLS_POP instructions
- Fix group id inconsistency in coding a Group instruction
- Fix Group identifiers to be treated as unsigned integers in GroupCodec
- Add a JSON decoder for FlowEntry
Change-Id: Id80b9e009550e3b71b9274adb116e5179391fa66
(cherry picked from commit 494f586853c1a87ba62f20b477e211f996baded5)
diff --git a/core/common/src/test/resources/org/onosproject/codec/impl/simple-flow-entry.json b/core/common/src/test/resources/org/onosproject/codec/impl/simple-flow-entry.json
new file mode 100644
index 0000000..b00ba8d
--- /dev/null
+++ b/core/common/src/test/resources/org/onosproject/codec/impl/simple-flow-entry.json
@@ -0,0 +1,29 @@
+{
+ "priority": 1,
+ "isPermanent": false,
+ "timeout": 1,
+ "deviceId": "of:0000000000000001",
+ "tableId": 1,
+ "treatment": {
+ "instructions": [
+ {
+ "type": "OUTPUT",
+ "port": "CONTROLLER"
+ }
+ ],
+ "deferred": []
+ },
+ "selector": {
+ "criteria": [
+ {
+ "type": "ETH_TYPE",
+ "ethType": "0x800"
+ }
+ ]
+ },
+ "state": "ADDED",
+ "life": 1000,
+ "liveType": "UNKNOWN",
+ "packets": 123,
+ "bytes": 456
+}
\ No newline at end of file
diff --git a/core/common/src/test/resources/org/onosproject/codec/impl/simple-group.json b/core/common/src/test/resources/org/onosproject/codec/impl/simple-group.json
index 865ae23..2229372 100644
--- a/core/common/src/test/resources/org/onosproject/codec/impl/simple-group.json
+++ b/core/common/src/test/resources/org/onosproject/codec/impl/simple-group.json
@@ -2,7 +2,7 @@
"type": "ALL",
"deviceId": "of:0000000000000001",
"appCookie": "0x1234abCD",
- "groupId": "1",
+ "id": "1",
"buckets": [
{
"treatment": {