Add flavors/flavor_profile api-ref

This patch adds the api-ref updates for the new flavors and flavor profile
API.

Change-Id: I11ab9af188731a1eaf1f402c4d55a944dc85ea88
This commit is contained in:
Michael Johnson 2018-11-15 14:40:20 -08:00
parent 637009ecd0
commit 15282ff9d6
26 changed files with 792 additions and 2 deletions

View File

@ -7,6 +7,18 @@ path-amphora-id:
in: path
required: true
type: uuid
path-flavor-id:
description: |
The ID of the flavor to query.
in: path
required: true
type: uuid
path-flavorprofile-id:
description: |
The ID of the flavor profile to query.
in: path
required: true
type: uuid
path-healthmonitor-id:
description: |
The ID of the health monitor to query.
@ -305,18 +317,72 @@ description-optional:
in: body
required: false
type: string
enabled:
description: |
If the resource is available for use.
in: body
required: true
type: boolean
enabled-optional:
description: |
If the resource is available for use. The default is True.
in: body
required: false
type: boolean
flavor:
description: |
A flavor object.
in: body
required: true
type: object
flavor-data:
description: |
The JSON string containing the flavor metadata.
in: body
required: true
type: string
flavor-data-optional:
description: |
The JSON string containing the flavor metadata.
in: body
required: false
type: string
flavor-id:
description: |
The ID of the flavor.
in: body
required: true
type: string
type: uuid
flavor-id-optional:
description: |
The ID of the flavor.
in: body
required: false
type: string
type: uuid
flavor-profile-id:
description: |
The ID of the flavor profile.
in: body
required: true
type: uuid
flavorprofile:
description: |
A ``flavorprofile`` object.
in: body
required: true
type: object
flavorprofiles:
description: |
A list of ``flavorprofile`` objects.
in: body
required: true
type: array
flavors:
description: |
A list of ``flavor`` objects.
in: body
required: true
type: array
healthmonitor-delay:
description: |
The time, in seconds, between sending probes to members.
@ -911,6 +977,12 @@ provider-name:
in: body
required: true
type: string
provider-name-optional:
description: |
Provider name.
in: body
required: false
type: string
provider-optional:
description: |
Provider name for the load balancer. Default is ``octavia``.

View File

@ -0,0 +1 @@
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"flavor":{"name":"Basic","description":"A basic standalone Octavia load balancer.","enabled":true,"flavor_profile_id":"5712097e-0092-45dc-bff0-ab68b61ad51a"}}' http://198.51.100.10:9876/v2.0/lbaas/flavors

View File

@ -0,0 +1,8 @@
{
"flavor": {
"name": "Basic",
"description": "A basic standalone Octavia load balancer.",
"enabled": true,
"flavor_profile_id": "5712097e-0092-45dc-bff0-ab68b61ad51a"
}
}

View File

@ -0,0 +1,9 @@
{
"flavor": {
"id": "8f94060c-8d5b-4472-9cfd-e8a2b909481d",
"name": "Basic",
"description": "A basic standalone Octavia load balancer.",
"enabled": true,
"flavor_profile_id": "5712097e-0092-45dc-bff0-ab68b61ad51a"
}
}

View File

@ -0,0 +1 @@
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/flavors/8f94060c-8d5b-4472-9cfd-e8a2b909481d

View File

@ -0,0 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/flavors

View File

@ -0,0 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/flavorprofiles

View File

@ -0,0 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/flavors/8f94060c-8d5b-4472-9cfd-e8a2b909481d

View File

@ -0,0 +1,9 @@
{
"flavor": {
"id": "8f94060c-8d5b-4472-9cfd-e8a2b909481d",
"name": "Basic",
"description": "A basic standalone Octavia load balancer.",
"enabled": true,
"flavor_profile_id": "5712097e-0092-45dc-bff0-ab68b61ad51a"
}
}

View File

@ -0,0 +1 @@
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"flavor":{"name":"Basic","description":"A basic standalone Octavia load balancer.","enabled":false}}' http://198.51.100.10:9876/v2.0/lbaas/flavors/8f94060c-8d5b-4472-9cfd-e8a2b909481d

View File

@ -0,0 +1,7 @@
{
"flavor": {
"name": "Basic",
"description": "A basic standalone Octavia load balancer.",
"enabled": false
}
}

View File

@ -0,0 +1,9 @@
{
"flavor": {
"id": "8f94060c-8d5b-4472-9cfd-e8a2b909481d",
"name": "Basic",
"description": "A basic standalone Octavia load balancer.",
"enabled": false,
"flavor_profile_id": "5712097e-0092-45dc-bff0-ab68b61ad51a"
}
}

View File

@ -0,0 +1 @@
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"flavorprofile":{"name":"amphora-act-stdby","provider_name":"amphora","flavor_data":"{\"loadbalancer_topology\": \"ACTIVE_STANDBY\"}"}}' http://198.51.100.10:9876/v2.0/lbaas/flavorprofiles

View File

@ -0,0 +1,8 @@
{
"flavorprofile":
{
"name": "amphora-act-stdby",
"provider_name": "amphora",
"flavor_data": "{\"loadbalancer_topology\": \"ACTIVE_STANDBY\"}"
}
}

View File

@ -0,0 +1,9 @@
{
"flavorprofile":
{
"id": "5712097e-0092-45dc-bff0-ab68b61ad51a",
"name": "amphora-act-stdby",
"provider_name": "amphora",
"flavor_data": "{\"loadbalancer_topology\": \"ACTIVE_STANDBY\"}"
}
}

View File

@ -0,0 +1 @@
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/flavorprofiles/5712097e-0092-45dc-bff0-ab68b61ad51a

View File

@ -0,0 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/flavorprofiles/5712097e-0092-45dc-bff0-ab68b61ad51a

View File

@ -0,0 +1,9 @@
{
"flavorprofile":
{
"id": "5712097e-0092-45dc-bff0-ab68b61ad51a",
"name": "amphora-act-stdby",
"provider_name": "amphora",
"flavor_data": "{\"loadbalancer_topology\": \"ACTIVE_STANDBY\"}"
}
}

View File

@ -0,0 +1 @@
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"flavorprofile":{"name":"amphora-standalone","provider_name":"amphora","flavor_data":"{\"loadbalancer_topology\": \"SINGLE\"}"}}' http://198.51.100.10:9876/v2.0/lbaas/flavorprofiles/5712097e-0092-45dc-bff0-ab68b61ad51a

View File

@ -0,0 +1,8 @@
{
"flavorprofile":
{
"name": "amphora-standalone",
"provider_name": "amphora",
"flavor_data": "{\"loadbalancer_topology\": \"SINGLE\"}"
}
}

View File

@ -0,0 +1,9 @@
{
"flavorprofile":
{
"id": "5712097e-0092-45dc-bff0-ab68b61ad51a",
"name": "amphora-standalone",
"provider_name": "amphora",
"flavor_data": "{\"loadbalancer_topology\": \"SINGLE\"}"
}
}

View File

@ -0,0 +1,10 @@
{
"flavorprofiles": [
{
"id": "5712097e-0092-45dc-bff0-ab68b61ad51a",
"name": "amphora-act-stdby",
"provider_name": "amphora",
"flavor_data": "{\"loadbalancer_topology\": \"ACTIVE_STANDBY\"}"
}
]
}

View File

@ -0,0 +1,11 @@
{
"flavors": [
{
"id": "8f94060c-8d5b-4472-9cfd-e8a2b909481d",
"name": "Basic",
"description": "A basic standalone Octavia load balancer.",
"enabled": true,
"flavor_profile_id": "5712097e-0092-45dc-bff0-ab68b61ad51a"
}
]
}

View File

@ -0,0 +1,295 @@
.. -*- rst -*-
List Flavors
============
.. rest_method:: GET /v2.0/lbaas/flavors
List all available flavors.
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 :ref:`filtering`.
The list might be empty.
**New in version 2.6**
.. rest_status_code:: success ../http-status.yaml
- 200
.. rest_status_code:: error ../http-status.yaml
- 400
- 401
- 500
Request
-------
.. rest_parameters:: ../parameters.yaml
- fields: fields
Curl Example
------------
.. literalinclude:: examples/flavor-list-curl
:language: bash
Response Parameters
-------------------
.. rest_parameters:: ../parameters.yaml
- description: description
- enabled: enabled
- flavor_profile_id: flavor-profile-id
- flavors: flavors
- id: flavor-id
- name: name
Response Example
----------------
.. literalinclude:: examples/flavors-list-response.json
:language: javascript
Create Flavor
=============
.. rest_method:: POST /v2.0/lbaas/flavors
Creates a flavor.
If the API cannot fulfill the request due to insufficient data or
data that is not valid, the service returns the HTTP ``Bad Request
(400)`` response code with information about the failure in the
response body. Validation errors require that you correct the error
and submit the request again.
If you are not an administrative user the service returns the HTTP ``Forbidden
(403)`` response code.
**New in version 2.6**
.. rest_status_code:: success ../http-status.yaml
- 201
.. rest_status_code:: error ../http-status.yaml
- 400
- 401
- 403
- 500
Request
-------
.. rest_parameters:: ../parameters.yaml
- description: description-optional
- enabled: enabled-optional
- flavor: flavor
- flavor_profile_id: flavor-profile-id
- name: name
Request Example
----------------
.. literalinclude:: examples/flavor-create-request.json
:language: javascript
Curl Example
------------
.. literalinclude:: examples/flavor-create-curl
:language: bash
Response Parameters
-------------------
.. rest_parameters:: ../parameters.yaml
- description: description
- enabled: enabled
- flavor_profile_id: flavor-profile-id
- flavor: flavor
- id: flavor-id
- name: name
Response Example
----------------
.. literalinclude:: examples/flavor-create-response.json
:language: javascript
Show Flavor Details
===================
.. rest_method:: GET /v2.0/lbaas/flavors/{flavor_id}
Shows the details of a flavor.
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 :ref:`filtering`.
This operation does not require a request body.
**New in version 2.6**
.. rest_status_code:: success ../http-status.yaml
- 200
.. rest_status_code:: error ../http-status.yaml
- 401
- 404
- 500
Request
-------
.. rest_parameters:: ../parameters.yaml
- fields: fields
- flavor_id: path-flavor-id
Curl Example
------------
.. literalinclude:: examples/flavor-show-curl
:language: bash
Response Parameters
-------------------
.. rest_parameters:: ../parameters.yaml
- description: description
- enabled: enabled
- flavor_profile_id: flavor-profile-id
- flavor: flavor
- id: flavor-id
- name: name
Response Example
----------------
.. literalinclude:: examples/flavor-show-response.json
:language: javascript
Update a Flavor
===============
.. rest_method:: PUT /v2.0/lbaas/flavors/{flavor_id}
Update a flavor.
If you are not an administrative user the service returns the HTTP ``Forbidden
(403)`` response code.
**New in version 2.6**
.. rest_status_code:: success ../http-status.yaml
- 200
.. rest_status_code:: error ../http-status.yaml
- 400
- 401
- 403
- 404
- 500
Request
-------
.. rest_parameters:: ../parameters.yaml
- description: description-optional
- enabled: enabled-optional
- flavor: flavor
- flavor_id: path-flavor-id
- name: name-optional
Request Example
---------------
.. literalinclude:: examples/flavor-update-request.json
:language: javascript
Curl Example
------------
.. literalinclude:: examples/flavor-update-curl
:language: bash
Response Parameters
-------------------
.. rest_parameters:: ../parameters.yaml
- description: description
- enabled: enabled
- flavor_profile_id: flavor-profile-id
- flavor: flavor
- id: flavor-id
- name: name
Response Example
----------------
.. literalinclude:: examples/flavor-update-response.json
:language: javascript
Remove a Flavor
===============
.. rest_method:: DELETE /v2.0/lbaas/flavors/{flavor_id}
Remove a flavor and its associated configuration.
If any load balancers are using this flavor the service returns the HTTP
``Conflict (409)`` response code.
If you are not an administrative user the service returns the HTTP ``Forbidden
(403)`` response code.
**New in version 2.6**
.. rest_status_code:: success ../http-status.yaml
- 204
.. rest_status_code:: error ../http-status.yaml
- 401
- 403
- 404
- 409
- 500
Request
-------
.. rest_parameters:: ../parameters.yaml
- flavor_id: path-flavor-id
Curl Example
------------
.. literalinclude:: examples/flavor-delete-curl
:language: bash
Response
--------
There is no body content for the response of a successful DELETE request.

View File

@ -0,0 +1,297 @@
.. -*- rst -*-
List Flavor Profiles
====================
.. rest_method:: GET /v2.0/lbaas/flavorprofiles
List all available flavor profiles.
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 :ref:`filtering`.
If you are not an administrative user the service returns the HTTP ``Forbidden
(403)`` response code.
The list might be empty.
**New in version 2.6**
.. rest_status_code:: success ../http-status.yaml
- 200
.. rest_status_code:: error ../http-status.yaml
- 400
- 401
- 403
- 500
Request
-------
.. rest_parameters:: ../parameters.yaml
- fields: fields
Curl Example
------------
.. literalinclude:: examples/flavor-profile-list-curl
:language: bash
Response Parameters
-------------------
.. rest_parameters:: ../parameters.yaml
- flavor_data: flavor-data
- flavorprofiles: flavorprofiles
- id: flavor-profile-id
- name: name
- provider_name: provider-name
Response Example
----------------
.. literalinclude:: examples/flavorprofiles-list-response.json
:language: javascript
Create Flavor Profile
=====================
.. rest_method:: POST /v2.0/lbaas/flavorprofiles
Creates a flavor profile.
If the API cannot fulfill the request due to insufficient data or
data that is not valid, the service returns the HTTP ``Bad Request
(400)`` response code with information about the failure in the
response body. Validation errors require that you correct the error
and submit the request again.
If you are not an administrative user the service returns the HTTP ``Forbidden
(403)`` response code.
**New in version 2.6**
.. rest_status_code:: success ../http-status.yaml
- 201
.. rest_status_code:: error ../http-status.yaml
- 400
- 401
- 403
- 500
Request
-------
.. rest_parameters:: ../parameters.yaml
- flavor_data: flavor-data
- flavorprofile: flavorprofile
- name: name
- provider_name: provider-name
Request Example
----------------
.. literalinclude:: examples/flavorprofile-create-request.json
:language: javascript
Curl Example
------------
.. literalinclude:: examples/flavorprofile-create-curl
:language: bash
Response Parameters
-------------------
.. rest_parameters:: ../parameters.yaml
- flavor_data: flavor-data
- flavorprofile: flavorprofile
- id: flavor-profile-id
- name: name
- provider_name: provider-name
Response Example
----------------
.. literalinclude:: examples/flavorprofile-create-response.json
:language: javascript
Show Flavor Profile Details
===========================
.. rest_method:: GET /v2.0/lbaas/flavorprofiles/{flavorprofile_id}
Shows the details of a flavor profile.
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 :ref:`filtering`.
If you are not an administrative user the service returns the HTTP ``Forbidden
(403)`` response code.
This operation does not require a request body.
**New in version 2.6**
.. rest_status_code:: success ../http-status.yaml
- 200
.. rest_status_code:: error ../http-status.yaml
- 401
- 403
- 404
- 500
Request
-------
.. rest_parameters:: ../parameters.yaml
- fields: fields
- flavorprofile_id: path-flavorprofile-id
Curl Example
------------
.. literalinclude:: examples/flavorprofile-show-curl
:language: bash
Response Parameters
-------------------
.. rest_parameters:: ../parameters.yaml
- flavor_data: flavor-data
- flavorprofile: flavorprofile
- id: flavor-profile-id
- name: name
- provider_name: provider-name
Response Example
----------------
.. literalinclude:: examples/flavorprofile-show-response.json
:language: javascript
Update a Flavor Profile
=======================
.. rest_method:: PUT /v2.0/lbaas/flavorprofiles/{flavorprofile_id}
Update a flavor profile.
If you are not an administrative user the service returns the HTTP ``Forbidden
(403)`` response code.
**New in version 2.6**
.. rest_status_code:: success ../http-status.yaml
- 200
.. rest_status_code:: error ../http-status.yaml
- 400
- 401
- 403
- 404
- 500
Request
-------
.. rest_parameters:: ../parameters.yaml
- flavor_data: flavor-data-optional
- flavorprofile: flavorprofile
- flavorprofile_id: path-flavorprofile-id
- name: name-optional
- provider_name: provider-name-optional
Request Example
---------------
.. literalinclude:: examples/flavorprofile-update-request.json
:language: javascript
Curl Example
------------
.. literalinclude:: examples/flavorprofile-update-curl
:language: bash
Response Parameters
-------------------
.. rest_parameters:: ../parameters.yaml
- flavor_data: flavor-data
- flavorprofile: flavorprofile
- id: flavor-profile-id
- name: name
- provider_name: provider-name
Response Example
----------------
.. literalinclude:: examples/flavorprofile-update-response.json
:language: javascript
Remove a Flavor Profile
=======================
.. rest_method:: DELETE /v2.0/lbaas/flavorprofiles/{flavorprofile_id}
Remove a flavor profile and its associated configuration.
If any flavors using this flavor profile the service returns the HTTP
``Conflict (409)`` response code.
If you are not an administrative user the service returns the HTTP ``Forbidden
(403)`` response code.
**New in version 2.6**
.. rest_status_code:: success ../http-status.yaml
- 204
.. rest_status_code:: error ../http-status.yaml
- 401
- 403
- 404
- 409
- 500
Request
-------
.. rest_parameters:: ../parameters.yaml
- flavorprofile_id: path-flavorprofile-id
Curl Example
------------
.. literalinclude:: examples/flavorprofile-delete-curl
:language: bash
Response
--------
There is no body content for the response of a successful DELETE request.

View File

@ -56,6 +56,16 @@ Providers
---------
.. include:: provider.inc
-------
Flavors
-------
.. include:: flavor.inc
---------------
Flavor Profiles
---------------
.. include:: flavorprofile.inc
--------
Amphorae
--------