PortTranslatorUtilTest is using invalid port number, fix that.
PortUpdateTranslator attempted to create an invalid union, where
both members are null, fix that by checking if there is a port
number present.
Change-Id: Ieaae6eaadd397e990e813d429bb104ad4db13240
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
builder.setHardwareAddress(input.getHwAddr());
builder.setMaximumSpeed(input.getMaxSpeed());
builder.setName(input.getName());
- builder.setPortNumber(new PortNumberUni(input.getPortNo()));
+
+ final Long portNo = input.getPortNo();
+ if (portNo != null) {
+ builder.setPortNumber(new PortNumberUni(portNo));
+ }
return builder.build();
}
Short version = OpenflowVersion.OF10.getVersion();
BigInteger dataPathId = BigInteger.ONE;
- Long portNumber = Long.MAX_VALUE;
+ Long portNumber = 4294967295L;
PortGrouping portGrouping = mockPortGrouping();
NodeConnectorUpdated nodeConnectorUpdated = PortTranslatorUtil