test_data: fix port_desc_stats_reply for Java
port_desc_stats_reply hat values for config and state that
do not correspond to valid enum value combinations, so it couldn't
be read by Java. Changed the values and added a Java definition for
full testing.
diff --git a/test_data/of14/port_desc_stats_reply.data b/test_data/of14/port_desc_stats_reply.data
index b969b4a..8e38975 100644
--- a/test_data/of14/port_desc_stats_reply.data
+++ b/test_data/of14/port_desc_stats_reply.data
@@ -11,8 +11,8 @@
01 02 03 04 05 06 # entries[0].hw_addr
00 00 # pad
69 6e 74 65 72 66 61 63 65 31 32 33 34 35 36 37 # entries[0].name
-00 00 00 50 # entries[0].config
-00 00 00 60 # entries[0].state
+00 00 00 60 # entries[0].config
+00 00 00 03 # entries[0].state
00 00 # entries[0].properties[0].type (ethernet)
00 20 # entries[0].properties[0].length
00 00 00 00 # pad
@@ -29,10 +29,26 @@
port_no=1,
hw_addr=[1,2,3,4,5,6],
name="interface1234567",
- config=0x50,
- state=0x60,
+ config=0x60,
+ state=0x03,
properties=[
ofp.port_desc_prop.ethernet(
curr=0x70,
max_speed=0x80)])])
-
+-- java
+builder
+ .setXid(5)
+ .setFlags(ImmutableSet.<OFStatsReplyFlags>of())
+ .setEntries(ImmutableList.of(
+ factory.buildPortDesc()
+ .setPortNo(OFPort.of(1))
+ .setHwAddr(MacAddress.of("01:02:03:04:05:06"))
+ .setName("interface1234567")
+ .setConfig(Sets.immutableEnumSet(OFPortConfig.NO_FWD, OFPortConfig.NO_PACKET_IN))
+ .setState(Sets.immutableEnumSet(OFPortState.LINK_DOWN, OFPortState.BLOCKED))
+ .setProperties(ImmutableList.<OFPortDescProp>of(factory.buildPortDescPropEthernet()
+ .setCurr(0x70)
+ .setMaxSpeed(0x80)
+ .build()))
+ .build())
+ );