Merge into master from pull request #335:
openflow_input: add of_action_bsn_gentable (https://github.com/floodlight/loxigen/pull/335)
diff --git a/java_gen/pre-written/pom.xml b/java_gen/pre-written/pom.xml
index 1c405ce..6b60fd1 100644
--- a/java_gen/pre-written/pom.xml
+++ b/java_gen/pre-written/pom.xml
@@ -10,7 +10,7 @@
<groupId>org.projectfloodlight</groupId>
<artifactId>openflowj</artifactId>
- <version>0.4.0-SNAPSHOT</version>
+ <version>0.4.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>OpenFlowJ-Loxi</name>
diff --git a/loxi_front_end/parser.py b/loxi_front_end/parser.py
index 4a465f7..fbf476d 100644
--- a/loxi_front_end/parser.py
+++ b/loxi_front_end/parser.py
@@ -68,7 +68,7 @@
s('}') - s(';')
# Enums
-enum_param_name = kw("wire_type") | kw("bitmask") | kw("complete")
+enum_param_name = kw("wire_type") | kw("bitmask") | kw("complete") | kw("stable")
enum_param = P.Group(enum_param_name - s('=') - word)
enum_param_list = P.Forward()
enum_param_list << enum_param + P.Optional(s(',') + P.Optional(enum_param_list))
diff --git a/loxi_ir/unified.py b/loxi_ir/unified.py
index 41b86dc..fa97c87 100644
--- a/loxi_ir/unified.py
+++ b/loxi_ir/unified.py
@@ -98,6 +98,9 @@
self.entries[e.name] = ir.OFEnumEntry(e.name, e.value, copy.copy(e.params))
else:
entry = self.entries[e.name]
+ if v_enum.params.get('stable') == 'True' and e.value != entry.value:
+ raise Exception("Error unifying stable ir enum {} - adding entry {} version {} value {} <-> {}".format(
+ self.name, e.name, version, entry.value, e.value))
for name, value in e.params.items():
if not name in entry.params:
entry.params[name] = value
diff --git a/openflow_input/bsn_lacp b/openflow_input/bsn_lacp
index d2e540a..2a63b17 100644
--- a/openflow_input/bsn_lacp
+++ b/openflow_input/bsn_lacp
@@ -31,7 +31,7 @@
#version 4
// LACP Convergence Status set in of_bsn_lacp_convergence_notif message
-enum of_bsn_lacp_convergence_status_t(wire_type=uint8_t, complete=False) {
+enum of_bsn_lacp_convergence_status(wire_type=uint8_t, complete=False) {
LACP_SUCCESS = 0,
LACP_TIMEDOUT = 1,
LACP_OUT_OF_SYNC = 2,
diff --git a/openflow_input/bsn_pdu b/openflow_input/bsn_pdu
index 66465f3..007365b 100644
--- a/openflow_input/bsn_pdu
+++ b/openflow_input/bsn_pdu
@@ -32,7 +32,7 @@
// When the slot_num field has this value, the message applies
// to all currently used slots on the switch for the given port
-enum of_bsn_pdu_slot_num_t(wire_type=uint8_t, complete=False) {
+enum of_bsn_pdu_slot_num(wire_type=uint8_t, complete=False) {
BSN_PDU_SLOT_NUM_ANY = 0xff
};
diff --git a/openflow_input/bsn_port_counter b/openflow_input/bsn_port_counter
index 73ba80e..83cd1c8 100644
--- a/openflow_input/bsn_port_counter
+++ b/openflow_input/bsn_port_counter
@@ -30,7 +30,7 @@
#version 4
-enum ofp_bsn_port_counter(wire_type=uint8_t, complete=False) {
+enum ofp_bsn_port_counter(wire_type=uint8_t, complete=False, stable=True) {
OFP_BSN_PORT_COUNTER_RX_BYTES = 0,
OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST = 1,
OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST = 2,
diff --git a/openflow_input/bsn_vlan_counter b/openflow_input/bsn_vlan_counter
index 5d90724..c5814f4 100644
--- a/openflow_input/bsn_vlan_counter
+++ b/openflow_input/bsn_vlan_counter
@@ -34,7 +34,7 @@
OFP_BSN_VLAN_ALL = 0xffff,
};
-enum of_bsn_vlan_counter_t(wire_type=uint8_t, complete=False) {
+enum of_bsn_vlan_counter(wire_type=uint8_t, complete=False, stable=True) {
OFP_BSN_VLAN_COUNTER_RX_BYTES = 0,
OFP_BSN_VLAN_COUNTER_RX_PACKETS = 1,
OFP_BSN_VLAN_COUNTER_TX_BYTES = 2,
diff --git a/openflow_input/bsn_vrf_counter b/openflow_input/bsn_vrf_counter
index 7676e69..b638ff7 100644
--- a/openflow_input/bsn_vrf_counter
+++ b/openflow_input/bsn_vrf_counter
@@ -34,7 +34,7 @@
OFP_BSN_VRF_ALL = 0xffffffff,
};
-enum of_bsn_vrf_counter_t(wire_type=uint8_t, complete=False) {
+enum of_bsn_vrf_counter(wire_type=uint8_t, complete=False, stable=True) {
OFP_BSN_VRF_COUNTER_BYTES = 0,
OFP_BSN_VRF_COUNTER_PACKETS = 1,
};