diff --git a/api-ref/source/v2/parameters.yaml b/api-ref/source/v2/parameters.yaml index d06b1074d..fa60440eb 100644 --- a/api-ref/source/v2/parameters.yaml +++ b/api-ref/source/v2/parameters.yaml @@ -205,6 +205,14 @@ qos-rule_id: in: path required: true type: string +qos-rule_type: + description: | + The name of the QoS rule type. It should be one of the types + returned by the List QoS rule types API, for example + ``bandwidth_limit`` or ``dscp_marking``. + in: path + required: true + type: string rbac_policy_id-path: description: | The ID of the RBAC policy. @@ -4254,6 +4262,24 @@ psk: in: body required: true type: string +qos-backend-drivers: + description: | + List of loaded QoS drivers with supported + rule type parameters with possible values for each. + Each driver is represented by a dict with the keys + ``name`` and ``supported_parameters``. + Field ``name`` contains the name of a backend driver. + Field ``supported_parameters`` contains a list of dicts with + ``parameter_name``, ``parameter_type`` and ``parameter_values`` + fields. + The valid values for ``parameter_type`` are ``choices`` or ``range``. + If ``parameter_type`` is ``choices`` then ``parameter_values`` + contains a list of acceptable values, otherwise it contains + a dict with keys of ``start`` and ``end`` which define the range + of acceptable values. + in: body + required: true + type: list qos-rule-direction: description: | The direction of the traffic to which the QoS diff --git a/api-ref/source/v2/qos.inc b/api-ref/source/v2/qos.inc index f2c315e2b..6bdce7e04 100644 --- a/api-ref/source/v2/qos.inc +++ b/api-ref/source/v2/qos.inc @@ -4,7 +4,7 @@ QoS rule types ============== -List QoS rule types available in current deployment. +Lists and shows information for QoS rule types available in current deployment. List QoS rule types =================== @@ -31,6 +31,47 @@ Response Example .. literalinclude:: samples/qos/rule_types-list-response.json :language: javascript +Show QoS rule type details +========================== + +.. rest_method:: GET /v2.0/qos/rule-types/{rule_type} + +Shows details for an available QoS rule type. + +To determine if this API call is available, a user can check whether +the ``qos-rule-type-details`` extension API is available. + +You can control which response parameters are returned by using the +fields query parameter. For information, see `Filtering and column +selection `__. + +Normal response codes: 200 + +Error response codes: 401, 404 + +Request +------- + +.. rest_parameters:: parameters.yaml + + - rule_type: qos-rule_type + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - type: qos-rule-type + - drivers: qos-backend-drivers + +Response Example +---------------- + +.. literalinclude:: samples/qos/rule_type-details-response.json + :language: javascript + ================== QoS policies (qos) ================== diff --git a/api-ref/source/v2/samples/qos/rule_type-details-response.json b/api-ref/source/v2/samples/qos/rule_type-details-response.json new file mode 100644 index 000000000..72b927689 --- /dev/null +++ b/api-ref/source/v2/samples/qos/rule_type-details-response.json @@ -0,0 +1,63 @@ +{ + "drivers": [ + { + "name": "openvswitch", + "supported_parameters": [ + { + "parameter_name": "max_kbps", + "parameter_type": "range", + "parameter_values": { + "end": 2147483647, + "start": 0 + } + }, + { + "parameter_name": "direction", + "parameter_type": "choices", + "parameter_values": [ + "ingress", + "egress" + ] + }, + { + "parameter_name": "max_burst_kbps", + "parameter_type": "range", + "parameter_values": { + "end": 2147483647, + "start": 0 + } + } + ] + }, + { + "name": "linuxbridge", + "supported_parameters": [ + { + "parameter_name": "max_kbps", + "parameter_type": "range", + "parameter_values": { + "end": 2147483647, + "start": 0 + } + }, + { + "parameter_name": "direction", + "parameter_type": "choices", + "parameter_values": [ + "ingress", + "egress" + ] + }, + { + "parameter_name": "max_burst_kbps", + "parameter_type": "range", + "parameter_values": { + "end": 2147483647, + "start": 0 + } + } + ] + } + ], + "type": "bandwidth_limit" +}