use of org.onosproject.driver.extensions.NiciraResubmitTable in project onos by opennetworkinglab.
the class NiciraResubmitTableCodec method decode.
@Override
public NiciraResubmitTable decode(ObjectNode json, CodecContext context) {
if (json == null || !json.isObject()) {
return null;
}
// parse in port number
long portNumberLong = nullIsIllegal(json.get(RESUBMIT_PORT), RESUBMIT_PORT + MISSING_MEMBER_MESSAGE).asLong();
PortNumber portNumber = PortNumber.portNumber(portNumberLong);
// parse table id
short tableId = (short) nullIsIllegal(json.get(RESUBMIT_TABLE), RESUBMIT_TABLE + MISSING_MEMBER_MESSAGE).asInt();
return new NiciraResubmitTable(portNumber, tableId);
}
Aggregations