Hi,
I think rest_qos.py might have some bugs.
Does the following fix this problem?
$ git diff
diff --git a/ryu/app/rest_qos.py b/ryu/app/rest_qos.py
index 89185a6..e67e63f 100644
--- a/ryu/app/rest_qos.py
+++ b/ryu/app/rest_qos.py
@@ -1128,10 +1128,12 @@ class Action(object):
@staticmethod
def to_rest(openflow):
+ action = {REST_ACTION: 'Unknown action type.'}
+
if REST_ACTION in openflow:
actions = []
for action in openflow[REST_ACTION]:
- field_value = re.search('SET_FIELD: {ip_dscp:(\d+)', action)
+ field_value = re.search('SET_FIELD: \{ip_dscp:(\d+)', action)
if field_value:
actions.append({REST_ACTION_MARK: field_value.group(1)})
meter_value = re.search('METER:(\d+)', action)
@@ -1141,7 +1143,5 @@ class Action(object):
if queue_value:
actions.append({REST_ACTION_QUEUE: queue_value.group(1)})
action = {REST_ACTION: actions}
- else:
- action = {REST_ACTION: 'Unknown action type.'}
return action
Thanks,
Iwase
On 2016年07月15日 23:17, wesam kh wrote:
> hi every one
> I have custom topology to apply Qos and apply all priority on all switch but
> I have some problem in switch 3 , 4 when apply the code
> curl -X GET http://localhost:8080/qos/rules/0000000000000003
> <http://localhost:8080/qos/rules/0000000000000001>
> curl -X GET http://localhost:8080/qos/rules/0000000000000004
> <http://localhost:8080/qos/rules/0000000000000001>
> you can see the error in attachment
> thank you in advance
>
>
>
>
>
> *Wisam Maala*
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports.http://sdm.link/zohodev2dev
>
>
>
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel