Signed-off-by: Simon Horman <[email protected]>

---
v3
* Update changelog: s/of1.4/of14/

v2
* First post
---
 .../packet_data/of14/5-68-ofp_table_status.packet  | Bin 0 -> 96 bytes
 ryu/tests/packet_data_generator/src/x5.erl         |  26 +++++++++-
 .../json/of14/5-68-ofp_table_status.packet.json    |  57 +++++++++++++++++++++
 ryu/tests/unit/ofproto/test_parser.py              |   1 +
 4 files changed, 83 insertions(+), 1 deletion(-)
 create mode 100644 ryu/tests/packet_data/of14/5-68-ofp_table_status.packet
 create mode 100644 
ryu/tests/unit/ofproto/json/of14/5-68-ofp_table_status.packet.json

diff --git a/ryu/tests/packet_data/of14/5-68-ofp_table_status.packet 
b/ryu/tests/packet_data/of14/5-68-ofp_table_status.packet
new file mode 100644
index 
0000000000000000000000000000000000000000..f630ccc2bef2c7a80b18ba4c74f431d03703492b
GIT binary patch
literal 96
zcmZRTXGmZG0%i~a0s$Nlnu!6zV205D|1<CaB~l@h3=BZN0F=)Nq#1#H5h$Mt#0O#!
G%>V#wC<s*m

literal 0
HcmV?d00001

diff --git a/ryu/tests/packet_data_generator/src/x5.erl 
b/ryu/tests/packet_data_generator/src/x5.erl
index 1611ab9..74debf1 100644
--- a/ryu/tests/packet_data_generator/src/x5.erl
+++ b/ryu/tests/packet_data_generator/src/x5.erl
@@ -2842,6 +2842,30 @@ x() ->
                                        port = normal,
                                        max_len = 0}]}]},
                  #ofp_flow_update_abbrev{event = abbrev,xid=1234},
-                 #ofp_flow_update_paused{event = paused}]}
+                 #ofp_flow_update_paused{event = paused}]},
+        #ofp_table_status{
+            reason = vacancy_down,
+            table =
+                 #ofp_table_desc{
+                     table_id = 8,
+                     config = [],
+                     properties =
+                         [#ofp_table_mod_prop_eviction{flags = []},
+                          #ofp_table_mod_prop_vacancy{
+                              vacancy = 0,
+                              vacancy_down = 0,
+                              vacancy_up = 0},
+                          #ofp_table_mod_prop_experimenter{
+                              experimenter = 101,
+                              exp_type = 0,
+                              data = <<>>},
+                          #ofp_table_mod_prop_experimenter{
+                              experimenter = 101,
+                              exp_type = 1,
+                              data = <<1:32>>},
+                          #ofp_table_mod_prop_experimenter{
+                              experimenter = 101,
+                              exp_type = 2,
+                              data = <<1:32,2:32>>}]}}
     ],
     lists:foldl(fun x:do/2, {5, 0}, List).
diff --git a/ryu/tests/unit/ofproto/json/of14/5-68-ofp_table_status.packet.json 
b/ryu/tests/unit/ofproto/json/of14/5-68-ofp_table_status.packet.json
new file mode 100644
index 0000000..b66831b
--- /dev/null
+++ b/ryu/tests/unit/ofproto/json/of14/5-68-ofp_table_status.packet.json
@@ -0,0 +1,57 @@
+{
+   "OFPTableStatus": {
+      "reason": 3, 
+      "table": {
+         "OFPTableDesc": {
+            "config": 0, 
+            "length": 80, 
+            "properties": [
+               {
+                  "OFPTableModPropEviction": {
+                     "flags": 0, 
+                     "length": 8, 
+                     "type": 2
+                  }
+               }, 
+               {
+                  "OFPTableModPropVacancy": {
+                     "length": 8, 
+                     "type": 3, 
+                     "vacancy": 0, 
+                     "vacancy_down": 0, 
+                     "vacancy_up": 0
+                  }
+               }, 
+               {
+                  "OFPTableModPropExperimenter": {
+                     "data": "", 
+                     "exp_type": 0, 
+                     "experimenter": 101, 
+                     "length": 12, 
+                     "type": 65535
+                  }
+               }, 
+               {
+                  "OFPTableModPropExperimenter": {
+                     "data": "AAAAAQ==", 
+                     "exp_type": 1, 
+                     "experimenter": 101, 
+                     "length": 16, 
+                     "type": 65535
+                  }
+               }, 
+               {
+                  "OFPTableModPropExperimenter": {
+                     "data": "AAAAAQAAAAI=", 
+                     "exp_type": 2, 
+                     "experimenter": 101, 
+                     "length": 20, 
+                     "type": 65535
+                  }
+               }
+            ], 
+            "table_id": 8
+         }
+      }
+   }
+}
diff --git a/ryu/tests/unit/ofproto/test_parser.py 
b/ryu/tests/unit/ofproto/test_parser.py
index 57ad6f6..cac78b4 100644
--- a/ryu/tests/unit/ofproto/test_parser.py
+++ b/ryu/tests/unit/ofproto/test_parser.py
@@ -112,6 +112,7 @@ implemented = {
         ofproto_v1_4.OFPT_GET_ASYNC_REPLY: (True, False),
         ofproto_v1_4.OFPT_SET_ASYNC: (False, True),
         ofproto_v1_4.OFPT_ROLE_STATUS: (True, False),
+        ofproto_v1_4.OFPT_TABLE_STATUS: (True, False),
     },
 }
 
-- 
1.8.5.2


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to