java_gen: use auto-generated reader/writer code for OFBsnVportQInQ
This commit removes unimplemented manual stub methods for reading
and writing OFBsnVportQInq from ChannelUtilsVer${version}. Instead,
it delegates reading to the auto-generated reader.
Caveat: It seems the c code does not correctly honor the format
defined in openflow_input at this time. Based on the input, the
autogenerated reader and writer start the vport with a type and
a length field:
uint16_t type == 0;
uint16_t length; /* 32 */
This is inconsistent with the implementation in bigdb and
what the switch seems to expect.
diff --git a/java_gen/java_type.py b/java_gen/java_type.py
index 87cd6e8..07e50d9 100644
--- a/java_gen/java_type.py
+++ b/java_gen/java_type.py
@@ -418,6 +418,9 @@
meter_features = JType("OFMeterFeatures")\
.op(read="OFMeterFeaturesVer$version.READER.readFrom(bb)",
write="$name.writeTo(bb)")
+bsn_vport_q_in_q = JType("OFBsnVportQInQ")\
+ .op(read="OFBsnVportQInQVer$version.READER.readFrom(bb)",
+ write="$name.writeTo(bb)")
flow_wildcards = JType("int") \
.op(read='bb.readInt()',
write='bb.writeInt($name)',
@@ -523,6 +526,7 @@
'of_meter_features_t': meter_features,
'of_bitmap_128_t': port_bitmap,
'of_checksum_128_t': checksum,
+ 'of_bsn_vport_q_in_q_t': bsn_vport_q_in_q,
}
## Map that defines exceptions from the standard loxi->java mapping scheme
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver10/ChannelUtilsVer10.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver10/ChannelUtilsVer10.java
index ed7c0c8..b4937ba 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver10/ChannelUtilsVer10.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver10/ChannelUtilsVer10.java
@@ -6,7 +6,6 @@
import org.jboss.netty.buffer.ChannelBuffer;
import org.projectfloodlight.openflow.exceptions.OFParseError;
import org.projectfloodlight.openflow.protocol.OFActionType;
-import org.projectfloodlight.openflow.protocol.OFBsnVportQInQ;
import org.projectfloodlight.openflow.protocol.match.Match;
import com.google.common.hash.PrimitiveSink;
@@ -22,17 +21,6 @@
return OFMatchV1Ver10.READER.readFrom(bb);
}
- // TODO these need to be figured out / removed
- public static OFBsnVportQInQ readOFBsnVportQInQ(ChannelBuffer bb) {
- throw new UnsupportedOperationException("not implemented");
- }
-
- public static void writeOFBsnVportQInQ(ChannelBuffer bb,
- OFBsnVportQInQ vport) {
- throw new UnsupportedOperationException("not implemented");
-
- }
-
public static Set<OFActionType> readSupportedActions(ChannelBuffer bb) {
int actions = bb.readInt();
EnumSet<OFActionType> supportedActions = EnumSet.noneOf(OFActionType.class);
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver11/ChannelUtilsVer11.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver11/ChannelUtilsVer11.java
index 735fe3b..b090e47 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver11/ChannelUtilsVer11.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver11/ChannelUtilsVer11.java
@@ -4,8 +4,6 @@
import org.projectfloodlight.openflow.exceptions.OFParseError;
import org.projectfloodlight.openflow.protocol.OFMatchBmap;
import org.projectfloodlight.openflow.protocol.match.Match;
-import org.projectfloodlight.openflow.protocol.ver11.OFMatchV2Ver11;
-import org.projectfloodlight.openflow.protocol.OFBsnVportQInQ;
/**
* Collection of helper functions for reading and writing into ChannelBuffers
@@ -18,17 +16,6 @@
return OFMatchV2Ver11.READER.readFrom(bb);
}
- // TODO these need to be figured out / removed
- public static OFBsnVportQInQ readOFBsnVportQInQ(ChannelBuffer bb) {
- throw new UnsupportedOperationException("not implemented");
- }
-
- public static void writeOFBsnVportQInQ(ChannelBuffer bb,
- OFBsnVportQInQ vport) {
- throw new UnsupportedOperationException("not implemented");
- }
-
-
public static OFMatchBmap readOFMatchBmap(ChannelBuffer bb) {
throw new UnsupportedOperationException("not implemented");
}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver13/ChannelUtilsVer13.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver13/ChannelUtilsVer13.java
index 0be26ae..8216bb0 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver13/ChannelUtilsVer13.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver13/ChannelUtilsVer13.java
@@ -4,8 +4,6 @@
import org.projectfloodlight.openflow.exceptions.OFParseError;
import org.projectfloodlight.openflow.protocol.OFMatchBmap;
import org.projectfloodlight.openflow.protocol.match.Match;
-import org.projectfloodlight.openflow.protocol.ver13.OFMatchV3Ver13;
-import org.projectfloodlight.openflow.protocol.OFBsnVportQInQ;
/**
* Collection of helper functions for reading and writing into ChannelBuffers
@@ -18,17 +16,6 @@
return OFMatchV3Ver13.READER.readFrom(bb);
}
- // TODO these need to be figured out / removed
-
- public static OFBsnVportQInQ readOFBsnVportQInQ(ChannelBuffer bb) {
- throw new UnsupportedOperationException("not implemented");
- }
-
- public static void writeOFBsnVportQInQ(ChannelBuffer bb,
- OFBsnVportQInQ vport) {
- throw new UnsupportedOperationException("not implemented");
- }
-
public static OFMatchBmap readOFMatchBmap(ChannelBuffer bb) {
throw new UnsupportedOperationException("not implemented");
}