diff --git a/ryu/app/rest_qos.py b/ryu/app/rest_qos.py index c7a3b13e..f9ab9362 100644 --- a/ryu/app/rest_qos.py +++ b/ryu/app/rest_qos.py @@ -106,14 +106,21 @@ from ryu.ofproto import inet # POST /qos/{switch-id}/{vlan-id} # # request body format: -# {"match": {"": "", "": "",...}, +# {"priority": "", +# "match": {"": "", "": "",...}, # "actions": {"": "", "": "",...} # } # # Description +# * priority field +# +# "0 to 65533" +# +# Note: When "priority" has not been set up, +# "priority: 1" is set to "priority". +# # * match field # : -# "priority": "0 to 65533" # "in_port" : "" # "dl_src" : "" # "dl_dst" : "" @@ -127,7 +134,8 @@ from ryu.ofproto import inet # "tp_dst" : "" # "ip_dscp" : "" # -# * action field +# * actions field +# : # "mark": # sets the IPv4 ToS/DSCP field to tos. # "meter": @@ -732,7 +740,7 @@ class QoS(object): if vlan_id: match_value[REST_DL_VLAN] = vlan_id - priority = int(match_value.get(REST_PRIORITY, QOS_PRIORITY_MIN)) + priority = int(rest.get(REST_PRIORITY, QOS_PRIORITY_MIN)) if (QOS_PRIORITY_MAX < priority): raise ValueError('Invalid priority value. Set [%d-%d]' % (QOS_PRIORITY_MIN, QOS_PRIORITY_MAX))