Hi,
On 2015年08月15日 05:43, Liu, Weijie wrote:
> Hi,
>
> My goal:
> I want to run ofctl_rest.py and use the "GET /stats/flow/<dpid>" to see the
> flow rules.
>
> Problem:
> I ran 2 experiments. I used OFPIT_APPLY_ACTIONS and OFPIT_WRITE_ACTIONS as
> the type of instructions, respectively.
> But the outputs of "GET /stats/flow/<dpid>" were the same.
>
> Question:
> How can I tell the type of instructions from the outputs of ofctl_rest.py?
> Any other REST apis I can use?
>
> thanks
Oh, just as you say.
"GET /stats/flow/<dpid>" does not determine the type of OFPIT_*_ACTIONS.
I'm trying to make a patch for fix this problem.
Use OF1.3?
Following patch is just a quick hack.
If hurry, please correct as follows ofctl_v1_3.py.
diff --git a/ryu/lib/ofctl_v1_3.py b/ryu/lib/ofctl_v1_3.py
index 5b709f3..dc14981 100644
--- a/ryu/lib/ofctl_v1_3.py
+++ b/ryu/lib/ofctl_v1_3.py
@@ -176,7 +176,14 @@ def actions_to_str(instructions):
if isinstance(instruction,
ofproto_v1_3_parser.OFPInstructionActions):
for a in instruction.actions:
- actions.append(action_to_str(a))
+ if instruction.type == ofproto_v1_3.OFPIT_APPLY_ACTIONS:
+ actions.append('(apply_actions)' + action_to_str(a))
+ elif instruction.type == ofproto_v1_3.OFPIT_WRITE_ACTIONS:
+ actions.append('(write_actions)' + action_to_str(a))
+ elif instruction.type == ofproto_v1_3.OFPIT_CLEAR_ACTIONS:
+ actions.append('(clear_actions)' + action_to_str(a))
+ else:
+ actions.append('(unknown)' + action_to_str(a))
elif isinstance(instruction,
ofproto_v1_3_parser.OFPInstructionGotoTable):
thanks,
>
> --
> Weijie Liu
> Department of Computer Science
> University of Illinois at Urbana-Champaign
> (217)819-6113
>
>
> ------------------------------------------------------------------------------
>
>
>
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel