Add description about QoS minimum bandwidth rules API

This commit adds description about QoS minimum bandwidth rule
API calls.

Change-Id: I6d3ad3a579ed52d4f2352df5a76b5e83bf93fc7c
This commit is contained in:
Sławek Kapłoński 2017-08-06 09:45:24 +00:00
parent 5876ff6e44
commit 0694964a9c
9 changed files with 272 additions and 0 deletions

View File

@ -3329,6 +3329,20 @@ metering_labels:
in: body
required: true
type: array
min_kbps:
description: |
The minimum KBPS (kilobits per second) value which should be available for
port.
in: body
required: true
type: integer
min_kbps-response:
description: |
The minimum KBPS (kilobits per second) value which should be available for
port.
in: body
required: true
type: integer
min_prefixlen:
description: |
The smallest prefix that can be allocated from a
@ -3344,6 +3358,19 @@ min_prefixlen_1:
in: body
required: true
type: integer
minimum_bandwidth_rule:
description: |
A ``minimum_bandwidth_rule`` object.
in: body
required: true
type: object
minimum_bandwidth_rules:
description: |
A list of ``minimum_bandwidth_rule`` objects associated with
the QoS policy.
in: body
required: true
type: array
mtu:
description: |
The maximum transmission unit (MTU) value to
@ -4362,6 +4389,12 @@ qos_dscp_marking_rule-id:
in: body
required: true
type: string
qos_minimum_bandwidth_rule-id:
description: |
The ID of the QoS minimum bandwidth rule.
in: body
required: true
type: string
qos_policy-name:
description: |
Human-readable name of the resource.

View File

@ -678,3 +678,199 @@ Response
There is no body content for the response of a successful DELETE request.
===========================
QoS minimum bandwidth rules
===========================
Lists, creates, deletes, shows information for, and updates QoS minimum bandwidth rules.
List minimum bandwidth rules for QoS policy
===========================================
.. rest_method:: GET /v2.0/qos/policies/{policy_id}/minimum_bandwidth_rules
Lists all minimum bandwidth rules for a QoS policy.
The list might be empty.
You can control which response parameters are returned by using the
fields query parameter. For information, see `Filtering and column
selection <http://specs.openstack.org/openstack/neutron-
specs/specs/api/networking_general_api_information.html#filtering-
and-column-selection>`__.
Normal response codes: 200
Error response codes: 401, 404
Request
-------
.. rest_parameters:: parameters.yaml
- policy_id: qos-policy-id-path
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- minimum_bandwidth_rules: minimum_bandwidth_rules
- min_kbps: min_kbps-response
- id: qos_minimum_bandwidth_rule-id
- direction: qos-rule-direction-response
Response Example
----------------
.. literalinclude:: samples/qos/minimum_bandwidth_rules-list-response.json
:language: javascript
Create minimum bandwidth rule
=============================
.. rest_method:: POST /v2.0/qos/policies/{policy_id}/minimum_bandwidth_rules
Creates a minimum bandwidth rule for a QoS policy.
Normal response codes: 201
Error response codes: 400, 401, 404, 409
Request
-------
.. rest_parameters:: parameters.yaml
- policy_id: qos-policy-id-path
- minimum_bandwidth_rule: minimum_bandwidth_rule
- min_kbps: min_kbps
- direction: qos-rule-direction
Request Example
---------------
.. literalinclude:: samples/qos/minimum_bandwidth_rule-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- minimum_bandwidth_rule: minimum_bandwidth_rule
- min_kbps: min_kbps-response
- id: qos_minimum_bandwidth_rule-id
- direction: qos-rule-direction-response
Response Example
----------------
.. literalinclude:: samples/qos/minimum_bandwidth_rule-create-response.json
:language: javascript
Show minimum bandwidth rule details
===================================
.. rest_method:: GET /v2.0/qos/policies/{policy_id}/minimum_bandwidth_rules/{rule_id}
Shows details for a minimum bandwidth rule for a QoS policy.
Normal response codes: 200
Error response codes: 401, 404
Request
-------
.. rest_parameters:: parameters.yaml
- policy_id: qos-policy-id-path
- rule_id: qos-rule_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- minimum_bandwidth_rule: minimum_bandwidth_rule
- min_kbps: min_kbps-response
- id: qos_minimum_bandwidth_rule-id
- direction: qos-rule-direction-response
Response Example
----------------
.. literalinclude:: samples/qos/minimum_bandwidth_rule-show-response.json
:language: javascript
Update minimum bandwidth rule
=============================
.. rest_method:: PUT /v2.0/qos/policies/{policy_id}/minimum_bandwidth_rules/{rule_id}
Updates a minimum bandwidth rule for a QoS policy.
If the request is valid, the service returns the ``Accepted (202)``
response code.
Normal response codes: 202
Error response codes: 400, 401, 404
Request
-------
.. rest_parameters:: parameters.yaml
- policy_id: qos-policy-id-path
- rule_id: qos-rule_id
- minimum_bandwidth_rule: minimum_bandwidth_rule
- min_kbps: min_kbps
- direction: qos-rule-direction-update
Request Example
---------------
.. literalinclude:: samples/qos/minimum_bandwidth_rule-update-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- minimum_bandwidth_rule: minimum_bandwidth_rule
- min_kbps: min_kbps-response
- id: qos_minimum_bandwidth_rule-id
- direction: qos-rule-direction-update-response
Response Example
----------------
.. literalinclude:: samples/qos/minimum_bandwidth_rule-update-response.json
:language: javascript
Delete minimum bandwidth rule
=============================
.. rest_method:: DELETE /v2.0/qos/policies/{policy_id}/minimum_bandwidth_rules/{rule_id}
Deletes a minimum bandwidth rule for a QoS policy.
Normal response codes: 204
Error response codes: 400, 401, 404
Request
-------
.. rest_parameters:: parameters.yaml
- policy_id: qos-policy-id-path
- rule_id: qos-rule_id
Response
--------
There is no body content for the response of a successful DELETE request.

View File

@ -0,0 +1,5 @@
{
"minimum_bandwidth_rule": {
"min_kbps": "10000"
}
}

View File

@ -0,0 +1,7 @@
{
"minimum_bandwidth_rule": {
"id": "1eddf7af-0b4c-42c5-8ae1-390b32f1de08",
"min_kbps": 10000,
"direction": "egress"
}
}

View File

@ -0,0 +1,7 @@
{
"minimum_bandwidth_rule": {
"id": "1eddf7af-0b4c-42c5-8ae1-390b32f1de08",
"min_kbps": 10000,
"direction": "egress"
}
}

View File

@ -0,0 +1,5 @@
{
"minimum_bandwidth_rule": {
"min_kbps": "20000"
}
}

View File

@ -0,0 +1,7 @@
{
"minimum_bandwidth_rule": {
"id": "1eddf7af-0b4c-42c5-8ae1-390b32f1de08",
"min_kbps": 20000,
"direction": "egress"
}
}

View File

@ -0,0 +1,9 @@
{
"minimum_bandwidth_rules": [
{
"id": "1eddf7af-0b4c-42c5-8ae1-390b32f1de08",
"min_kbps": 10000,
"direction": "egress"
}
]
}

View File

@ -5,6 +5,9 @@
},
{
"type": "dscp_marking"
},
{
"type": "minimum_bandwidth"
}
]
}