the port is unneccesory forqos flow's action, in fact , config port into qos actionwill cause a bug
Change-Id: I24c2ff9c2b4feda96176e75cd563978ca72be140
diff --git a/core/common/src/main/java/org/onosproject/codec/impl/DecodeInstructionCodecHelper.java b/core/common/src/main/java/org/onosproject/codec/impl/DecodeInstructionCodecHelper.java
index 525033c..2917afd 100644
--- a/core/common/src/main/java/org/onosproject/codec/impl/DecodeInstructionCodecHelper.java
+++ b/core/common/src/main/java/org/onosproject/codec/impl/DecodeInstructionCodecHelper.java
@@ -365,7 +365,12 @@
} else if (type.equals(Instruction.Type.QUEUE.name())) {
long queueId = nullIsIllegal(json.get(InstructionCodec.QUEUE_ID),
InstructionCodec.QUEUE_ID + InstructionCodec.MISSING_MEMBER_MESSAGE).asLong();
- return Instructions.setQueue(queueId, getPortNumber(json));
+ if (json.get(InstructionCodec.PORT) == null ||
+ json.get(InstructionCodec.PORT).isNull()) {
+ return Instructions.setQueue(queueId, null);
+ } else {
+ return Instructions.setQueue(queueId, getPortNumber(json));
+ }
} else if (type.equals(Instruction.Type.L0MODIFICATION.name())) {
return decodeL0();
} else if (type.equals(Instruction.Type.L1MODIFICATION.name())) {