api-ref: Fix api-ref for metering
This patch add request parameters for show/delete method and correct description of all attributes in response parameters table. Part of blueprint neutron-in-tree-api-ref Co-Authored-By: Anindita Das <anindita.das@intel.com> Change-Id: If4c917db8048a32f401dd3104379897975209169
This commit is contained in:
parent
1152f9d4c3
commit
a02765c920
@ -1,8 +1,4 @@
|
|||||||
.. -*- rst -*-
|
.. -*- rst -*-
|
||||||
.. needs:method_verification
|
|
||||||
.. needs:parameter_verification
|
|
||||||
.. needs:example_verification
|
|
||||||
.. needs:body_verification
|
|
||||||
|
|
||||||
=================================================================
|
=================================================================
|
||||||
Metering labels and rules (metering-labels, metering-label-rules)
|
Metering labels and rules (metering-labels, metering-label-rules)
|
||||||
@ -18,7 +14,13 @@ List metering labels
|
|||||||
|
|
||||||
Lists all L3 metering labels that belong to the project.
|
Lists all L3 metering labels that belong to the project.
|
||||||
|
|
||||||
The list shows the UUID for each metering label.
|
The list shows the ID for each metering label.
|
||||||
|
|
||||||
|
Use the ``fields`` query parameter to control which fields are
|
||||||
|
returned in the response body. Additionally, you can filter results
|
||||||
|
by using query string parameters. For information, see `Filtering
|
||||||
|
and Column Selection <https://wiki.openstack.org/wiki/Neutron/APIv2
|
||||||
|
-specification#Filtering_and_Column_Selection>`__.
|
||||||
|
|
||||||
Normal response codes: 200
|
Normal response codes: 200
|
||||||
|
|
||||||
@ -27,17 +29,21 @@ Error response codes: 401
|
|||||||
Request
|
Request
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- fields: fields
|
||||||
|
|
||||||
Response Parameters
|
Response Parameters
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
.. rest_parameters:: parameters.yaml
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- metering_labels: metering_labels
|
||||||
- description: description
|
- description: description
|
||||||
- tenant_id: project_id
|
- tenant_id: project_id
|
||||||
- project_id: project_id
|
- project_id: project_id
|
||||||
- metering_labels: metering_labels
|
- shared: metering_label-shared
|
||||||
- shared: shared
|
- id: metering_label-id
|
||||||
- id: id
|
|
||||||
- name: name
|
- name: name
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
@ -53,15 +59,17 @@ Create metering label
|
|||||||
|
|
||||||
Creates an L3 metering label.
|
Creates an L3 metering label.
|
||||||
|
|
||||||
Error response codes: 201,403,401,400
|
Normal response codes: 201
|
||||||
|
|
||||||
|
Error response codes: 400, 401, 403
|
||||||
|
|
||||||
Request
|
Request
|
||||||
-------
|
-------
|
||||||
|
|
||||||
.. rest_parameters:: parameters.yaml
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
- shared: shared
|
|
||||||
- metering_label: metering_label
|
- metering_label: metering_label
|
||||||
|
- shared: metering_label-shared-request
|
||||||
- description: description
|
- description: description
|
||||||
- name: name
|
- name: name
|
||||||
- tenant_id: project_id
|
- tenant_id: project_id
|
||||||
@ -78,41 +86,49 @@ Response Parameters
|
|||||||
|
|
||||||
.. rest_parameters:: parameters.yaml
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- metering_label: metering_label
|
||||||
- description: description
|
- description: description
|
||||||
- tenant_id: project_id
|
- tenant_id: project_id
|
||||||
- project_id: project_id
|
- project_id: project_id
|
||||||
- metering_label: metering_label
|
- shared: metering_label-shared
|
||||||
- shared: shared
|
- id: metering_label-id
|
||||||
- id: id
|
|
||||||
- name: name
|
- name: name
|
||||||
|
|
||||||
Show metering label details
|
Show metering label details
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
.. rest_method:: GET /v2.0/metering/metering-labels/{metering-label-id}
|
.. rest_method:: GET /v2.0/metering/metering-labels/{metering_label_id}
|
||||||
|
|
||||||
Shows details for a metering label.
|
Shows details for a metering label.
|
||||||
|
|
||||||
The response body shows the description, name, and UUID.
|
|
||||||
|
|
||||||
Normal response codes: 200
|
Normal response codes: 200
|
||||||
|
|
||||||
Error response codes: 404,401
|
Error response codes: 401, 404
|
||||||
|
|
||||||
Request
|
Request
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- metering_label_id: metering_label-id-path
|
||||||
|
|
||||||
|
Request Example
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/metering/metering-label-show-request-json-http.txt
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
Response Parameters
|
Response Parameters
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
.. rest_parameters:: parameters.yaml
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- metering_label: metering_label
|
||||||
- description: description
|
- description: description
|
||||||
- tenant_id: project_id
|
- tenant_id: project_id
|
||||||
- project_id: project_id
|
- project_id: project_id
|
||||||
- metering_label: metering_label
|
- shared: metering_label-shared
|
||||||
- shared: shared
|
- id: metering_label-id
|
||||||
- id: id
|
|
||||||
- name: name
|
- name: name
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
@ -124,15 +140,32 @@ Response Example
|
|||||||
Delete metering label
|
Delete metering label
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
.. rest_method:: DELETE /v2.0/metering/metering-labels/{metering-label-id}
|
.. rest_method:: DELETE /v2.0/metering/metering-labels/{metering_label_id}
|
||||||
|
|
||||||
Deletes an L3 metering label.
|
Deletes an L3 metering label.
|
||||||
|
|
||||||
Error response codes: 404,204,401
|
Normal response codes: 204
|
||||||
|
|
||||||
|
Error response codes: 401, 404
|
||||||
|
|
||||||
Request
|
Request
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- metering_label_id: metering_label-id-path
|
||||||
|
|
||||||
|
Request Example
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/metering/metering-label-delete-request-json-http.txt
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
There is no body content for the response of a successful DELETE request.
|
||||||
|
|
||||||
List metering label rules
|
List metering label rules
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
@ -140,7 +173,13 @@ List metering label rules
|
|||||||
|
|
||||||
Lists a summary of all L3 metering label rules that belong to the project.
|
Lists a summary of all L3 metering label rules that belong to the project.
|
||||||
|
|
||||||
The list shows the UUID for each metering label rule.
|
The list shows the ID for each metering label rule.
|
||||||
|
|
||||||
|
Use the ``fields`` query parameter to control which fields are
|
||||||
|
returned in the response body. Additionally, you can filter results
|
||||||
|
by using query string parameters. For information, see `Filtering
|
||||||
|
and Column Selection <https://wiki.openstack.org/wiki/Neutron/APIv2
|
||||||
|
-specification#Filtering_and_Column_Selection>`__.
|
||||||
|
|
||||||
Normal response codes: 200
|
Normal response codes: 200
|
||||||
|
|
||||||
@ -149,17 +188,21 @@ Error response codes: 401
|
|||||||
Request
|
Request
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- fields: fields
|
||||||
|
|
||||||
Response Parameters
|
Response Parameters
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
.. rest_parameters:: parameters.yaml
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- metering_label_rules: metering_label_rules
|
||||||
- direction: direction
|
- direction: direction
|
||||||
- remote_ip_prefix: remote_ip_prefix
|
- remote_ip_prefix: remote_ip_prefix
|
||||||
- metering_label_rules: metering_label_rules
|
- excluded : excluded
|
||||||
- excluded : excluded
|
- metering_label_id: metering_label-id-response-body
|
||||||
- metering_label_id: metering_label_id
|
- id: metering_label_rule-id
|
||||||
- id: id
|
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
@ -174,17 +217,19 @@ Create metering label rule
|
|||||||
|
|
||||||
Creates an L3 metering label rule.
|
Creates an L3 metering label rule.
|
||||||
|
|
||||||
Error response codes: 201,404,403,401,400,409
|
Normal response codes: 201
|
||||||
|
|
||||||
|
Error response codes: 400, 401, 403, 404, 409
|
||||||
|
|
||||||
Request
|
Request
|
||||||
-------
|
-------
|
||||||
|
|
||||||
.. rest_parameters:: parameters.yaml
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- metering_label_rule: metering_label_rule
|
||||||
- remote_ip_prefix: remote_ip_prefix
|
- remote_ip_prefix: remote_ip_prefix
|
||||||
- direction: direction
|
- direction: direction
|
||||||
- metering_label_id: metering_label_id
|
- metering_label_id: metering_label-id-response-body
|
||||||
- metering_label_rule: metering_label_rule
|
|
||||||
- excluded: excluded
|
- excluded: excluded
|
||||||
|
|
||||||
Request Example
|
Request Example
|
||||||
@ -198,28 +243,33 @@ Response Parameters
|
|||||||
|
|
||||||
.. rest_parameters:: parameters.yaml
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- metering_label_rule: metering_label_rule
|
||||||
- direction: direction
|
- direction: direction
|
||||||
- remote_ip_prefix: remote_ip_prefix
|
- remote_ip_prefix: remote_ip_prefix
|
||||||
- excluded : excluded
|
- excluded : excluded
|
||||||
- metering_label_id: metering_label_id
|
- metering_label_id: metering_label-id-response-body
|
||||||
- metering_label_rule: metering_label_rule
|
- id: metering_label_rule-id
|
||||||
- id: id
|
|
||||||
|
Response Example
|
||||||
|
----------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/metering/metering-label-rule-create-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
Show metering label rule details
|
Show metering label rule details
|
||||||
================================
|
================================
|
||||||
|
|
||||||
.. rest_method:: GET /v2.0/metering/metering-label-rules/{metering-label-rule-id}
|
.. rest_method:: GET /v2.0/metering/metering-label-rules/{metering_label_rule_id}
|
||||||
|
|
||||||
Shows details for a metering label rule.
|
Shows details for a metering label rule.
|
||||||
|
|
||||||
The response body shows this information for each metering label
|
The response body shows this information for each metering label rule:
|
||||||
rule:
|
|
||||||
|
|
||||||
- ``direction``. Either ingress or egress.
|
- ``direction``. Either ingress or egress.
|
||||||
|
|
||||||
- ``excluded``. Either ``true`` or ``false``.
|
- ``excluded``. Either ``true`` or ``false``.
|
||||||
|
|
||||||
- The UUID for the metering label rule.
|
- The ID for the metering label rule.
|
||||||
|
|
||||||
- The remote IP prefix.
|
- The remote IP prefix.
|
||||||
|
|
||||||
@ -228,11 +278,33 @@ rule:
|
|||||||
|
|
||||||
Normal response codes: 200
|
Normal response codes: 200
|
||||||
|
|
||||||
Error response codes: 404,401
|
Error response codes: 401, 404
|
||||||
|
|
||||||
Request
|
Request
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- metering_label_rule_id: metering_label_rule-id-path
|
||||||
|
|
||||||
|
Request Example
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/metering/metering-label-rule-show-request-json-http.txt
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
Response Paramters
|
||||||
|
------------------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- metering_label_rule: metering_label_rule
|
||||||
|
- direction: direction
|
||||||
|
- remote_ip_prefix: remote_ip_prefix
|
||||||
|
- excluded : excluded
|
||||||
|
- metering_label_id: metering_label-id-response-body
|
||||||
|
- id: metering_label_rule-id
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
@ -242,12 +314,28 @@ Response Example
|
|||||||
Delete metering label rule
|
Delete metering label rule
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
.. rest_method:: DELETE /v2.0/metering/metering-label-rules/{metering-label-rule-id}
|
.. rest_method:: DELETE /v2.0/metering/metering-label-rules/{metering_label_rule_id}
|
||||||
|
|
||||||
Deletes an L3 metering label rule.
|
Deletes an L3 metering label rule.
|
||||||
|
|
||||||
Error response codes: 404,204,401
|
Normal response codes: 204
|
||||||
|
|
||||||
|
Error response codes: 401, 404
|
||||||
|
|
||||||
Request
|
Request
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- metering_label_rule_id: metering_label_rule-id-path
|
||||||
|
|
||||||
|
Request Example
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/metering/metering-label-rule-delete-request-json-http.txt
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
There is no body content for the response of a successful DELETE request.
|
||||||
|
@ -97,6 +97,18 @@ member_id-path:
|
|||||||
in: path
|
in: path
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
metering_label-id-path:
|
||||||
|
description: |
|
||||||
|
The ID of the metering label.
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
metering_label_rule-id-path:
|
||||||
|
description: |
|
||||||
|
The ID of the metering label rule.
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
network_id_1:
|
network_id_1:
|
||||||
description: |
|
description: |
|
||||||
The ID of the network.
|
The ID of the network.
|
||||||
@ -2318,19 +2330,45 @@ metering_label:
|
|||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: object
|
type: object
|
||||||
metering_label_id:
|
metering_label-id:
|
||||||
description: |
|
description: |
|
||||||
The metering label UUID to associate with this
|
The ID of the metering label.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
metering_label-id-response-body:
|
||||||
|
description: |
|
||||||
|
The metering label ID to associate with this
|
||||||
metering rule.
|
metering rule.
|
||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
metering_label-shared:
|
||||||
|
description: |
|
||||||
|
Indicates whether this metering label is shared
|
||||||
|
across all projects.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: boolean
|
||||||
|
metering_label-shared-request:
|
||||||
|
description: |
|
||||||
|
Indicates whether this metering label is shared
|
||||||
|
across all projects.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: boolean
|
||||||
metering_label_rule:
|
metering_label_rule:
|
||||||
description: |
|
description: |
|
||||||
A ``metering_label_rule`` object.
|
A ``metering_label_rule`` object.
|
||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: object
|
type: object
|
||||||
|
metering_label_rule-id:
|
||||||
|
description: |
|
||||||
|
The ID of the metering label rule.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
metering_label_rules:
|
metering_label_rules:
|
||||||
description: |
|
description: |
|
||||||
A list of ``metering_label_rule`` objects.
|
A list of ``metering_label_rule`` objects.
|
||||||
@ -3929,13 +3967,6 @@ shared_13:
|
|||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
shared_2:
|
|
||||||
description: |
|
|
||||||
Indicates whether this metering label is shared
|
|
||||||
across all projects.
|
|
||||||
in: body
|
|
||||||
required: false
|
|
||||||
type: boolean
|
|
||||||
shared_3:
|
shared_3:
|
||||||
description: |
|
description: |
|
||||||
Admin-only. Indicates whether this network is
|
Admin-only. Indicates whether this network is
|
||||||
@ -3972,13 +4003,6 @@ shared_7:
|
|||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
shared_8:
|
|
||||||
description: |
|
|
||||||
Indicates whether this metering label is shared
|
|
||||||
across all projects.
|
|
||||||
in: body
|
|
||||||
required: true
|
|
||||||
type: boolean
|
|
||||||
shared_9:
|
shared_9:
|
||||||
description: |
|
description: |
|
||||||
Indicates whether this network is shared across
|
Indicates whether this network is shared across
|
||||||
|
Loading…
Reference in New Issue
Block a user