Fix version discovery for the Octavia API

This adds the required "links" part of the version discovery document.

Change-Id: I18e75116e1da47991d68b0842892f1036adec41a
Story: 2001796
Task: 12518
changes/60/559460/9
Michael Johnson 5 years ago
parent 8f3eeb5b2e
commit 87fca27e37
  1. 37
      api-ref/source/examples/versions-get-resp.json
  2. 16
      api-ref/source/index.rst
  3. 6
      api-ref/source/parameters.yaml
  4. 4
      api-ref/source/v1/octaviaapi.rst
  5. 6
      api-ref/source/v2/amphora.inc
  6. 2
      api-ref/source/v2/examples/amphora-failover-curl
  7. 2
      api-ref/source/v2/examples/amphora-list-curl
  8. 2
      api-ref/source/v2/examples/amphora-show-curl
  9. 2
      api-ref/source/v2/examples/healthmonitor-create-curl
  10. 2
      api-ref/source/v2/examples/healthmonitor-delete-curl
  11. 2
      api-ref/source/v2/examples/healthmonitor-list-curl
  12. 2
      api-ref/source/v2/examples/healthmonitor-show-curl
  13. 2
      api-ref/source/v2/examples/healthmonitor-update-curl
  14. 2
      api-ref/source/v2/examples/l7policies-list-curl
  15. 2
      api-ref/source/v2/examples/l7policy-create-curl
  16. 2
      api-ref/source/v2/examples/l7policy-delete-curl
  17. 2
      api-ref/source/v2/examples/l7policy-show-curl
  18. 2
      api-ref/source/v2/examples/l7policy-update-curl
  19. 2
      api-ref/source/v2/examples/l7rule-create-curl
  20. 2
      api-ref/source/v2/examples/l7rule-delete-curl
  21. 2
      api-ref/source/v2/examples/l7rule-show-curl
  22. 2
      api-ref/source/v2/examples/l7rule-update-curl
  23. 2
      api-ref/source/v2/examples/l7rules-list-curl
  24. 2
      api-ref/source/v2/examples/listener-create-curl
  25. 2
      api-ref/source/v2/examples/listener-delete-curl
  26. 2
      api-ref/source/v2/examples/listener-show-curl
  27. 2
      api-ref/source/v2/examples/listener-stats-curl
  28. 2
      api-ref/source/v2/examples/listener-update-curl
  29. 2
      api-ref/source/v2/examples/listeners-list-curl
  30. 2
      api-ref/source/v2/examples/loadbalancer-create-curl
  31. 2
      api-ref/source/v2/examples/loadbalancer-delete-curl
  32. 2
      api-ref/source/v2/examples/loadbalancer-failover-curl
  33. 2
      api-ref/source/v2/examples/loadbalancer-show-curl
  34. 2
      api-ref/source/v2/examples/loadbalancer-stats-curl
  35. 2
      api-ref/source/v2/examples/loadbalancer-status-curl
  36. 2
      api-ref/source/v2/examples/loadbalancer-update-curl
  37. 2
      api-ref/source/v2/examples/loadbalancers-list-curl
  38. 2
      api-ref/source/v2/examples/member-batch-update-curl
  39. 2
      api-ref/source/v2/examples/member-create-curl
  40. 2
      api-ref/source/v2/examples/member-delete-curl
  41. 2
      api-ref/source/v2/examples/member-show-curl
  42. 2
      api-ref/source/v2/examples/member-update-curl
  43. 2
      api-ref/source/v2/examples/members-list-curl
  44. 2
      api-ref/source/v2/examples/pool-create-curl
  45. 2
      api-ref/source/v2/examples/pool-delete-curl
  46. 2
      api-ref/source/v2/examples/pool-show-curl
  47. 2
      api-ref/source/v2/examples/pool-update-curl
  48. 2
      api-ref/source/v2/examples/pools-list-curl
  49. 2
      api-ref/source/v2/examples/provider-list-curl
  50. 2
      api-ref/source/v2/examples/quota-reset-curl
  51. 2
      api-ref/source/v2/examples/quota-show-curl
  52. 2
      api-ref/source/v2/examples/quota-update-curl
  53. 2
      api-ref/source/v2/examples/quotas-defaults-curl
  54. 2
      api-ref/source/v2/examples/quotas-list-curl
  55. 64
      api-ref/source/v2/general.inc
  56. 12
      api-ref/source/v2/healthmonitor.inc
  57. 6
      api-ref/source/v2/index.rst
  58. 12
      api-ref/source/v2/l7policy.inc
  59. 12
      api-ref/source/v2/l7rule.inc
  60. 14
      api-ref/source/v2/listener.inc
  61. 18
      api-ref/source/v2/loadbalancer.inc
  62. 14
      api-ref/source/v2/member.inc
  63. 12
      api-ref/source/v2/pool.inc
  64. 2
      api-ref/source/v2/provider.inc
  65. 10
      api-ref/source/v2/quota.inc
  66. 48
      octavia/api/root_controller.py
  67. 4
      octavia/api/v2/controllers/__init__.py
  68. 6
      octavia/policies/amphora.py
  69. 12
      octavia/policies/healthmonitor.py
  70. 12
      octavia/policies/l7policy.py
  71. 10
      octavia/policies/l7rule.py
  72. 14
      octavia/policies/listener.py
  73. 18
      octavia/policies/loadbalancer.py
  74. 10
      octavia/policies/member.py
  75. 12
      octavia/policies/pool.py
  76. 2
      octavia/policies/provider.py
  77. 12
      octavia/policies/quota.py
  78. 23
      octavia/tests/functional/api/test_root_controller.py
  79. 14
      octavia/tests/functional/api/v2/base.py
  80. 13
      octavia/tests/functional/api/v2/test_load_balancer.py
  81. 4
      octavia/tests/tempest/v2/clients/quotas_client.py
  82. 6
      octavia/tests/unit/api/hooks/test_query_parameters.py

@ -1,14 +1,27 @@
{
"versions": [
{
"id": "v2.0",
"status": "CURRENT",
"updated": "2017-02-17T00:00:00Z"
},
{
"id": "v1",
"status": "DEPRECATED",
"updated": "2014-12-11T00:00:00Z"
}
]
"versions": [{
"status": "DEPRECATED",
"updated": "2014-12-11T00:00:00Z",
"id": "v1",
"links": [{
"href": "http://10.21.21.53/load-balancer/v1",
"rel": "self"
}]
}, {
"status": "SUPPORTED",
"updated": "2016-12-11T00:00:00Z",
"id": "v2.0",
"links": [{
"href": "http://10.21.21.53/load-balancer/v2",
"rel": "self"
}]
}, {
"status": "CURRENT",
"updated": "2018-04-20T00:00:00Z",
"id": "v2.1",
"links": [{
"href": "http://10.21.21.53/load-balancer/v2",
"rel": "self"
}]
}]
}

@ -9,15 +9,15 @@ the Octavia project.
Current API version
:doc:`Octavia API v2.0<v2/index>`
:doc:`Octavia API v2<v2/index>`
Supported API version
:doc:`v1/octaviaapi`
None
Deprecated API version
None
:doc:`v1/octaviaapi`
.. toctree::
:hidden:
@ -25,6 +25,11 @@ Deprecated API version
v2/index
v1/octaviaapi
Octavia API minor releases are additive to the API major revision and share
the same URL path. Minor revision changes to the API are called out in the API
reference in the section the change occured in. Subsquent minor versions are a
superset of the previous versions of the same major revision.
The API status reflects the state of the endpoint on the service.
* Current indicates a stable version that is up-to-date, recent, and might
@ -46,12 +51,12 @@ The API status reflects the state of the endpoint on the service.
API Discovery
-------------
List All Major Versions
List All Versions
=======================
.. rest_method:: GET /
This fetches all the information about all known major API versions in the
This fetches all the information about all known API versions in the
deployment.
Response codes
@ -71,6 +76,7 @@ Response
.. rest_parameters:: parameters.yaml
- id: api_version_id
- links: links
- status: api_version_status
- updated_at: updated_at

@ -644,6 +644,12 @@ lb-network-ip:
in: body
required: true
type: string
links:
description: |
A list of relative links. Includes the self link for the API.
in: body
required: true
type: array
listener:
description: |
A listener object.

@ -1,5 +1,5 @@
Octavia API v1 (SUPPORTED)
==========================
Octavia API v1 (DEPRECATED)
===========================
Authentication
--------------

@ -3,7 +3,7 @@
List Amphora
============
.. rest_method:: GET /v2.0/octavia/amphorae
.. rest_method:: GET /v2/octavia/amphorae
Lists all amphora for the project.
@ -80,7 +80,7 @@ Response Example
Show Amphora details
===========================
.. rest_method:: GET /v2.0/octavia/amphorae/{amphora_id}
.. rest_method:: GET /v2/octavia/amphorae/{amphora_id}
Shows the details of an amphora.
@ -154,7 +154,7 @@ Response Example
Failover Amphora
================
.. rest_method:: PUT /v2.0/octavia/amphorae/{amphora_id}/failover
.. rest_method:: PUT /v2/octavia/amphorae/{amphora_id}/failover
Force an amphora to failover.

@ -1 +1 @@
curl -X PUT -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/octavia/amphorae/6bd55cd3-802e-447e-a518-1e74e23bb106/failover
curl -X PUT -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/octavia/amphorae/6bd55cd3-802e-447e-a518-1e74e23bb106/failover

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/octavia/amphorae?loadbalancer_id=09eedfc6-2c55-41a8-a75c-2cd4e95212ca
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/octavia/amphorae?loadbalancer_id=09eedfc6-2c55-41a8-a75c-2cd4e95212ca

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/octavia/amphorae/6bd55cd3-802e-447e-a518-1e74e23bb106
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/octavia/amphorae/6bd55cd3-802e-447e-a518-1e74e23bb106

@ -1 +1 @@
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"healthmonitor":{"name":"super-pool-health-monitor","admin_state_up":true,"pool_id":"4029d267-3983-4224-a3d0-afb3fe16a2cd","delay":"10","expected_codes":"200","max_retries":"1","http_method":"GET","timeout":"5","url_path":"/","type":"HTTP","max_retries_down":3}}' http://198.51.100.10:9876/v2.0/lbaas/healthmonitors
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"healthmonitor":{"name":"super-pool-health-monitor","admin_state_up":true,"pool_id":"4029d267-3983-4224-a3d0-afb3fe16a2cd","delay":"10","expected_codes":"200","max_retries":"1","http_method":"GET","timeout":"5","url_path":"/","type":"HTTP","max_retries_down":3}}' http://198.51.100.10:9876/v2/lbaas/healthmonitors

@ -1 +1 @@
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/healthmonitors/8ed3c5ac-6efa-420c-bedb-99ba14e58db5
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/healthmonitors/8ed3c5ac-6efa-420c-bedb-99ba14e58db5

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/healthmonitors?project_id=e3cd678b11784734bc366148aa37580e
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/healthmonitors?project_id=e3cd678b11784734bc366148aa37580e

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/healthmonitors/8ed3c5ac-6efa-420c-bedb-99ba14e58db5
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/healthmonitors/8ed3c5ac-6efa-420c-bedb-99ba14e58db5

@ -1 +1 @@
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"healthmonitor":{"name":"super-pool-health-monitor-updated","admin_state_up":true,"delay":5,"expected_codes":"200","http_method":"HEAD","timeout":2,"url_path":"/index.html","max_retries":2,"max_retries_down":2}}' http://198.51.100.10:9876/v2.0/lbaas/healthmonitors/8ed3c5ac-6efa-420c-bedb-99ba14e58db5
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"healthmonitor":{"name":"super-pool-health-monitor-updated","admin_state_up":true,"delay":5,"expected_codes":"200","http_method":"HEAD","timeout":2,"url_path":"/index.html","max_retries":2,"max_retries_down":2}}' http://198.51.100.10:9876/v2/lbaas/healthmonitors/8ed3c5ac-6efa-420c-bedb-99ba14e58db5

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/l7policies?project_id=e3cd678b11784734bc366148aa37580e
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/l7policies?project_id=e3cd678b11784734bc366148aa37580e

@ -1 +1 @@
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"l7policy":{"description":"Redirect requests to example.com","admin_state_up":true,"listener_id":"023f2e34-7806-443b-bfae-16c324569a3d","redirect_url":"http://www.example.com","name":"redirect-example.com","action":"REDIRECT_TO_URL","position":1}}' http://198.51.100.10:9876/v2.0/lbaas/l7policies
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"l7policy":{"description":"Redirect requests to example.com","admin_state_up":true,"listener_id":"023f2e34-7806-443b-bfae-16c324569a3d","redirect_url":"http://www.example.com","name":"redirect-example.com","action":"REDIRECT_TO_URL","position":1}}' http://198.51.100.10:9876/v2/lbaas/l7policies

@ -1 +1 @@
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/l7policies/8a1412f0-4c32-4257-8b07-af4770b604fd
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/l7policies/8a1412f0-4c32-4257-8b07-af4770b604fd

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/l7policies/8a1412f0-4c32-4257-8b07-af4770b604fd
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/l7policies/8a1412f0-4c32-4257-8b07-af4770b604fd

@ -1 +1 @@
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"l7policy":{"description":"Redirect requests to images.example.com","admin_state_up":true,"redirect_url":"http://images.example.com","name":"redirect-images.example.com","action":"REDIRECT_TO_URL","position":1}}' http://198.51.100.10:9876/v2.0/lbaas/l7policies/8a1412f0-4c32-4257-8b07-af4770b604fd
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"l7policy":{"description":"Redirect requests to images.example.com","admin_state_up":true,"redirect_url":"http://images.example.com","name":"redirect-images.example.com","action":"REDIRECT_TO_URL","position":1}}' http://198.51.100.10:9876/v2/lbaas/l7policies/8a1412f0-4c32-4257-8b07-af4770b604fd

@ -1 +1 @@
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"rule":{"compare_type":"REGEX","invert":false,"type":"PATH","value":"/images*","admin_state_up":true}}' http://198.51.100.10:9876/v2.0/lbaas/l7policies/8a1412f0-4c32-4257-8b07-af4770b604fd/rules
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"rule":{"compare_type":"REGEX","invert":false,"type":"PATH","value":"/images*","admin_state_up":true}}' http://198.51.100.10:9876/v2/lbaas/l7policies/8a1412f0-4c32-4257-8b07-af4770b604fd/rules

@ -1 +1 @@
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/l7policies/8a1412f0-4c32-4257-8b07-af4770b604fd/rules/16621dbb-a736-4888-a57a-3ecd53df784c
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/l7policies/8a1412f0-4c32-4257-8b07-af4770b604fd/rules/16621dbb-a736-4888-a57a-3ecd53df784c

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/l7policies/8a1412f0-4c32-4257-8b07-af4770b604fd/rules/16621dbb-a736-4888-a57a-3ecd53df784c
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/l7policies/8a1412f0-4c32-4257-8b07-af4770b604fd/rules/16621dbb-a736-4888-a57a-3ecd53df784c

@ -1 +1 @@
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"rule":{"compare_type":"REGEX","invert":true,"type":"PATH","value":"/images/special*","admin_state_up":true}}' http://198.51.100.10:9876/v2.0/lbaas/l7policies/8a1412f0-4c32-4257-8b07-af4770b604fd/rules/16621dbb-a736-4888-a57a-3ecd53df784c
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"rule":{"compare_type":"REGEX","invert":true,"type":"PATH","value":"/images/special*","admin_state_up":true}}' http://198.51.100.10:9876/v2/lbaas/l7policies/8a1412f0-4c32-4257-8b07-af4770b604fd/rules/16621dbb-a736-4888-a57a-3ecd53df784c

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/l7policies/8a1412f0-4c32-4257-8b07-af4770b604fd/rules
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/l7policies/8a1412f0-4c32-4257-8b07-af4770b604fd/rules

@ -1 +1 @@
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"listener": {"protocol": "TERMINATED_HTTPS", "description": "A great TLS listener", "admin_state_up": true, "connection_limit": 200, "protocol_port": "443", "loadbalancer_id": "607226db-27ef-4d41-ae89-f2a800e9c2db", "name": "great_tls_listener", "insert_headers": {"X-Forwarded-For": "true", "X-Forwarded-Port": "true"}, "default_tls_container_ref": "http://198.51.100.10:9311/v1/containers/a570068c-d295-4780-91d4-3046a325db51", "sni_container_refs": ["http://198.51.100.10:9311/v1/containers/a570068c-d295-4780-91d4-3046a325db51", "http://198.51.100.10:9311/v1/containers/aaebb31e-7761-4826-8cb4-2b829caca3ee"], "timeout_client_data": 50000, "timeout_member_connect": 5000, "timeout_member_data": 50000, "timeout_tcp_inspect": 0}}' http://198.51.100.10:9876/v2.0/lbaas/listeners
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"listener": {"protocol": "TERMINATED_HTTPS", "description": "A great TLS listener", "admin_state_up": true, "connection_limit": 200, "protocol_port": "443", "loadbalancer_id": "607226db-27ef-4d41-ae89-f2a800e9c2db", "name": "great_tls_listener", "insert_headers": {"X-Forwarded-For": "true", "X-Forwarded-Port": "true"}, "default_tls_container_ref": "http://198.51.100.10:9311/v1/containers/a570068c-d295-4780-91d4-3046a325db51", "sni_container_refs": ["http://198.51.100.10:9311/v1/containers/a570068c-d295-4780-91d4-3046a325db51", "http://198.51.100.10:9311/v1/containers/aaebb31e-7761-4826-8cb4-2b829caca3ee"], "timeout_client_data": 50000, "timeout_member_connect": 5000, "timeout_member_data": 50000, "timeout_tcp_inspect": 0}}' http://198.51.100.10:9876/v2/lbaas/listeners

@ -1 +1 @@
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/listeners/023f2e34-7806-443b-bfae-16c324569a3d
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/listeners/023f2e34-7806-443b-bfae-16c324569a3d

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/listeners/023f2e34-7806-443b-bfae-16c324569a3d
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/listeners/023f2e34-7806-443b-bfae-16c324569a3d

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/listeners/023f2e34-7806-443b-bfae-16c324569a3d/stats
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/listeners/023f2e34-7806-443b-bfae-16c324569a3d/stats

@ -1 +1 @@
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"listener": {"description": "An updated great TLS listener", "admin_state_up": true, "connection_limit": 200, "name": "great_updated_tls_listener", "insert_headers": {"X-Forwarded-For": "false", "X-Forwarded-Port": "true"}, "default_tls_container_ref": "http://198.51.100.10:9311/v1/containers/a570068c-d295-4780-91d4-3046a325db51", "sni_container_refs": ["http://198.51.100.10:9311/v1/containers/a570068c-d295-4780-91d4-3046a325db51", "http://198.51.100.10:9311/v1/containers/aaebb31e-7761-4826-8cb4-2b829caca3ee"], "timeout_client_data": 100000, "timeout_member_connect": 1000, "timeout_member_data": 100000, "timeout_tcp_inspect": 5}}' http://198.51.100.10:9876/v2.0/lbaas/listeners/023f2e34-7806-443b-bfae-16c324569a3d
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"listener": {"description": "An updated great TLS listener", "admin_state_up": true, "connection_limit": 200, "name": "great_updated_tls_listener", "insert_headers": {"X-Forwarded-For": "false", "X-Forwarded-Port": "true"}, "default_tls_container_ref": "http://198.51.100.10:9311/v1/containers/a570068c-d295-4780-91d4-3046a325db51", "sni_container_refs": ["http://198.51.100.10:9311/v1/containers/a570068c-d295-4780-91d4-3046a325db51", "http://198.51.100.10:9311/v1/containers/aaebb31e-7761-4826-8cb4-2b829caca3ee"], "timeout_client_data": 100000, "timeout_member_connect": 1000, "timeout_member_data": 100000, "timeout_tcp_inspect": 5}}' http://198.51.100.10:9876/v2/lbaas/listeners/023f2e34-7806-443b-bfae-16c324569a3d

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/listeners?project_id=e3cd678b11784734bc366148aa37580e
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/listeners?project_id=e3cd678b11784734bc366148aa37580e

@ -1 +1 @@
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"loadbalancer": {"description": "My favorite load balancer", "admin_state_up": true, "project_id": "e3cd678b11784734bc366148aa37580e", "flavor_id": "a7ae5d5a-d855-4f9a-b187-af66b53f4d04", "vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", "vip_address": "203.0.113.50", "provider": "octavia", "name": "best_load_balancer", "vip_qos_policy_id": "ec4f78ca-8da8-4e99-8a1a-e3b94595a7a3"}}' http://198.51.100.10:9876/v2.0/lbaas/loadbalancers
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"loadbalancer": {"description": "My favorite load balancer", "admin_state_up": true, "project_id": "e3cd678b11784734bc366148aa37580e", "flavor_id": "a7ae5d5a-d855-4f9a-b187-af66b53f4d04", "vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", "vip_address": "203.0.113.50", "provider": "octavia", "name": "best_load_balancer", "vip_qos_policy_id": "ec4f78ca-8da8-4e99-8a1a-e3b94595a7a3"}}' http://198.51.100.10:9876/v2/lbaas/loadbalancers

@ -1 +1 @@
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/loadbalancers/4b9b652c-537a-44bf-bbe8-85a690625597
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/loadbalancers/4b9b652c-537a-44bf-bbe8-85a690625597

@ -1 +1 @@
curl -X PUT -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/loadbalancers/4a13c573-623c-4d23-8a9c-581dc17ceb1f/failover
curl -X PUT -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/loadbalancers/4a13c573-623c-4d23-8a9c-581dc17ceb1f/failover

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/loadbalancers/8a562351-f0fb-424c-a0af-513461424ea5
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/loadbalancers/8a562351-f0fb-424c-a0af-513461424ea5

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/loadbalancers/4a13c573-623c-4d23-8a9c-581dc17ceb1f/stats
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/loadbalancers/4a13c573-623c-4d23-8a9c-581dc17ceb1f/stats

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/loadbalancers/bda6f032-80d3-414a-b395-e79c374e3929/status
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/loadbalancers/bda6f032-80d3-414a-b395-e79c374e3929/status

@ -1 +1 @@
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"loadbalancer": {"description": "Temporarily disabled load balancer", "admin_state_up": false, "name": "disabled_load_balancer", "vip_qos_policy_id": "ec4f78ca-8da8-4e99-8a1a-e3b94595a7a3"}}' http://198.51.100.10:9876/v2.0/lbaas/loadbalancers/8b6fc468-07d5-4d8b-a0b9-695060e72c31
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"loadbalancer": {"description": "Temporarily disabled load balancer", "admin_state_up": false, "name": "disabled_load_balancer", "vip_qos_policy_id": "ec4f78ca-8da8-4e99-8a1a-e3b94595a7a3"}}' http://198.51.100.10:9876/v2/lbaas/loadbalancers/8b6fc468-07d5-4d8b-a0b9-695060e72c31

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/loadbalancers?project_id=e3cd678b11784734bc366148aa37580e
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/loadbalancers?project_id=e3cd678b11784734bc366148aa37580e

@ -1 +1 @@
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"members":[{"name":"web-server-1","weight":"20","admin_state_up":true,"subnet_id":"bbb35f84-35cc-4b2f-84c2-a6a29bba68aa","address":"192.0.2.16","protocol_port":"80","monitor_port":8080},{"name":"web-server-2","weight":"10","admin_state_up":true,"subnet_id":"bbb35f84-35cc-4b2f-84c2-a6a29bba68aa","address":"192.0.2.17","protocol_port":"80","monitor_port":8080}]}' http://198.51.100.10:9876/v2.0/lbaas/pools/4029d267-3983-4224-a3d0-afb3fe16a2cd/members
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"members":[{"name":"web-server-1","weight":"20","admin_state_up":true,"subnet_id":"bbb35f84-35cc-4b2f-84c2-a6a29bba68aa","address":"192.0.2.16","protocol_port":"80","monitor_port":8080},{"name":"web-server-2","weight":"10","admin_state_up":true,"subnet_id":"bbb35f84-35cc-4b2f-84c2-a6a29bba68aa","address":"192.0.2.17","protocol_port":"80","monitor_port":8080}]}' http://198.51.100.10:9876/v2/lbaas/pools/4029d267-3983-4224-a3d0-afb3fe16a2cd/members

@ -1 +1 @@
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"member":{"name":"web-server-1","weight":"20","admin_state_up":true,"subnet_id":"bbb35f84-35cc-4b2f-84c2-a6a29bba68aa","address":"192.0.2.16","protocol_port":"80","monitor_port":8080,"backup":false}}' http://198.51.100.10:9876/v2.0/lbaas/pools/4029d267-3983-4224-a3d0-afb3fe16a2cd/members
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"member":{"name":"web-server-1","weight":"20","admin_state_up":true,"subnet_id":"bbb35f84-35cc-4b2f-84c2-a6a29bba68aa","address":"192.0.2.16","protocol_port":"80","monitor_port":8080,"backup":false}}' http://198.51.100.10:9876/v2/lbaas/pools/4029d267-3983-4224-a3d0-afb3fe16a2cd/members

@ -1 +1 @@
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/pools/4029d267-3983-4224-a3d0-afb3fe16a2cd/members/957a1ace-1bd2-449b-8455-820b6e4b63f3
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/pools/4029d267-3983-4224-a3d0-afb3fe16a2cd/members/957a1ace-1bd2-449b-8455-820b6e4b63f3

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/pools/24a43e68-36de-45f6-89cf-c03df583131d/members/957a1ace-1bd2-449b-8455-820b6e4b63f3
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/pools/24a43e68-36de-45f6-89cf-c03df583131d/members/957a1ace-1bd2-449b-8455-820b6e4b63f3

@ -1 +1 @@
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"member":{"name":"web-server-1-2","weight":"0","admin_state_up":"true","monitor_address":"192.0.2.40","monitor_port":8888,"backup":false}}' http://198.51.100.10:9876/v2.0/lbaas/pools/4029d267-3983-4224-a3d0-afb3fe16a2cd/members/957a1ace-1bd2-449b-8455-820b6e4b63f3
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"member":{"name":"web-server-1-2","weight":"0","admin_state_up":"true","monitor_address":"192.0.2.40","monitor_port":8888,"backup":false}}' http://198.51.100.10:9876/v2/lbaas/pools/4029d267-3983-4224-a3d0-afb3fe16a2cd/members/957a1ace-1bd2-449b-8455-820b6e4b63f3

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/pools/24a43e68-36de-45f6-89cf-c03df583131d/members?project_id=e3cd678b11784734bc366148aa37580e
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/pools/24a43e68-36de-45f6-89cf-c03df583131d/members?project_id=e3cd678b11784734bc366148aa37580e

@ -1 +1 @@
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"pool":{"lb_algorithm":"ROUND_ROBIN","protocol":"HTTP","description":"Super Round Robin Pool","admin_state_up":true,"session_persistence":{"cookie_name":"ChocolateChip","type":"APP_COOKIE"},"listener_id":"023f2e34-7806-443b-bfae-16c324569a3d","name":"super-pool"}}' http://198.51.100.10:9876/v2.0/lbaas/pools
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"pool":{"lb_algorithm":"ROUND_ROBIN","protocol":"HTTP","description":"Super Round Robin Pool","admin_state_up":true,"session_persistence":{"cookie_name":"ChocolateChip","type":"APP_COOKIE"},"listener_id":"023f2e34-7806-443b-bfae-16c324569a3d","name":"super-pool"}}' http://198.51.100.10:9876/v2/lbaas/pools

@ -1 +1 @@
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/pools/4029d267-3983-4224-a3d0-afb3fe16a2cd
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/pools/4029d267-3983-4224-a3d0-afb3fe16a2cd

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/pools/24a43e68-36de-45f6-89cf-c03df583131d
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/pools/24a43e68-36de-45f6-89cf-c03df583131d

@ -1 +1 @@
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"pool":{"lb_algorithm":"LEAST_CONNECTIONS","session_persistence":{"type":"SOURCE_IP"},"description":"second description","name":"second_name"}}' http://198.51.100.10:9876/v2.0/lbaas/pools/4029d267-3983-4224-a3d0-afb3fe16a2cd
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"pool":{"lb_algorithm":"LEAST_CONNECTIONS","session_persistence":{"type":"SOURCE_IP"},"description":"second description","name":"second_name"}}' http://198.51.100.10:9876/v2/lbaas/pools/4029d267-3983-4224-a3d0-afb3fe16a2cd

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/pools?project_id=e3cd678b11784734bc366148aa37580e
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/pools?project_id=e3cd678b11784734bc366148aa37580e

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

@ -1 +1 @@
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/quotas/e3cd678b11784734bc366148aa37580e
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/quotas/e3cd678b11784734bc366148aa37580e

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

@ -1 +1 @@
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"quota":{"load_balancer":10,"listener":-1,"member":50,"pool":-1,"health_monitor":-1}}' http://198.51.100.10:9876/v2.0/lbaas/quotas/e3cd678b11784734bc366148aa37580e
curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"quota":{"load_balancer":10,"listener":-1,"member":50,"pool":-1,"health_monitor":-1}}' http://198.51.100.10:9876/v2/lbaas/quotas/e3cd678b11784734bc366148aa37580e

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

@ -1 +1 @@
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/quotas?project_id=e3cd678b11784734bc366148aa37580e
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2/lbaas/quotas?project_id=e3cd678b11784734bc366148aa37580e

@ -1,8 +1,14 @@
.. -*- rst -*-
This section introduces readers to OpenStack Octavia v2.0 ReSTful HTTP API and
This section introduces readers to OpenStack Octavia v2 ReSTful HTTP API and
provides guidelines on how to use it.
.. note::
To clarify the Octavia API versioning we have updated the endpoint to
support both the previously documented /v2.0 and the new path of /v2.
They are exactly the same API and /v2.0 will be a supported alias for the
life of the v2 API.
Service Endpoints
=================
@ -40,8 +46,8 @@ returned with the identity token.
For instance, if the ``endpoint URL`` is ``http://198.51.100.10:9876/`` then
the full API call for ``/v2.0/lbaas/loadbalancers`` is
``http://198.51.100.10:9876/v2.0/lbaas/loadbalancers``.
the full API call for ``/v2/lbaas/loadbalancers`` is
``http://198.51.100.10:9876/v2/lbaas/loadbalancers``.
Depending on the deployment, the ``load-balancer`` ``endpoint URL`` might be
http or https, a custom port, a custom path, and include your project id. The
@ -51,8 +57,8 @@ applications, even if they are only expected to work at a single site. It
should always be discovered from the Identity token.
As such, for the rest of this document we will be using short hand where ``GET
/v2.0/lbaas/loadbalancers`` really means ``GET
{your_load-balancer_endpoint_URL}/v2.0/lbaas/loadbalancers``.
/v2/lbaas/loadbalancers`` really means ``GET
{your_load-balancer_endpoint_URL}/v2/lbaas/loadbalancers``.
Neutron-lbaas and Octavia v2 APIs
=================================
@ -78,7 +84,7 @@ applications to access load balancing via the Octavia v2 API.
Authentication and authorization
================================
The Octavia API v2.0 uses the `OpenStack Identity service
The Octavia API v2 uses the `OpenStack Identity service
<https://docs.openstack.org/keystone/latest/>`_ as the default authentication
service. When Keystone is enabled, users that submit requests to the Octavia
service must provide an authentication token in **X-Auth-Token** request
@ -106,19 +112,19 @@ deployment to deployment.
Request and response formats
============================
The Octavia API v2.0 supports JSON data serialization request and response
The Octavia API v2 supports JSON data serialization request and response
formats only.
Request format
--------------
The Octavia API v2.0 only accepts requests with the JSON data serialization
The Octavia API v2 only accepts requests with the JSON data serialization
format. The ``Content-Type`` header is ignored.
Response format
---------------
The Octavia API v2.0 always responds with the JSON data serialization
The Octavia API v2 always responds with the JSON data serialization
format. The ``Accept`` header is ignored.
Query extension
@ -134,16 +140,16 @@ Query extension
Filtering and column selection
==============================
The Octavia API v2.0 supports filtering based on all top level attributes of
The Octavia API v2 supports filtering based on all top level attributes of
a resource. Filters are applicable to all list requests.
For example, the following request returns all loadbalancers named ``foobar``:
.. code::
GET /v2.0/lbaas/loadbalancers?name=foobar
GET /v2/lbaas/loadbalancers?name=foobar
When you specify multiple filters, the Octavia API v2.0 returns only objects
When you specify multiple filters, the Octavia API v2 returns only objects
that meet all filtering criteria. The operation applies an AND condition among
the filters.
@ -156,23 +162,23 @@ Alternatively, you can issue a distinct request for each filter and build a
response set from the received responses on the client-side.
By default, Octavia returns all attributes for any show or list call. The
Octavia API v2.0 has a mechanism to limit the set of attributes returned.
Octavia API v2 has a mechanism to limit the set of attributes returned.
For example, return ``id``.
You can use the ``fields`` query parameter to control the attributes returned
from the Octavia API v2.0.
from the Octavia API v2.
For example, the following request returns only ``id`` and ``name`` for each
load balancer:
.. code::
GET /v2.0/lbaas/loadbalancers.json?fields=id&fields=name
GET /v2/lbaas/loadbalancers.json?fields=id&fields=name
Synchronous versus asynchronous plug-in behavior
================================================
The Octavia API v2.0 presents a logical model of load balancers consisting
The Octavia API v2 presents a logical model of load balancers consisting
of listeners, pools, and members. It is up to the OpenStack Octavia plug-in
to communicate with the underlying infrastructure to ensure load balancing
is consistent with the logical model. A plug-in might perform these
@ -194,10 +200,10 @@ Octavia plug-in has successfully completed the configuration of the resource.
Bulk-create
===========
The Octavia v2.0 API does not support bulk create. You cannot create more than
The Octavia v2 API does not support bulk create. You cannot create more than
one load balancer per API call.
The Octavia v2.0 API does support single call create which allows you to
The Octavia v2 API does support single call create which allows you to
create a fully populated load balancer in one API call. This is discussed
in the load balancer create section of this reference.
@ -226,17 +232,17 @@ with three items. The first page was retrieved through:
.. code::
GET http://198.51.100.10:9876/v2.0/lbaas/loadbalancers.json?limit=2
GET http://198.51.100.10:9876/v2/lbaas/loadbalancers.json?limit=2
If a particular plug-in does not support pagination operations the Octavia API
v2.0 will emulate the pagination behavior so that users can expect the same
v2 will emulate the pagination behavior so that users can expect the same
behavior regardless of the particular plug-in running in the background.
**Example load balancer list, first page: JSON request**
.. code::
GET /v2.0/lbaas/loadbalancers.json?limit=2 HTTP/1.1
GET /v2/lbaas/loadbalancers.json?limit=2 HTTP/1.1
Host: 198.51.100.10:9876
Content-Type: application/json
Accept: application/json
@ -281,11 +287,11 @@ behavior regardless of the particular plug-in running in the background.
],
"loadbalancers_links": [
{
"href": "http://198.51.100.10:9876/v2.0/lbaas/loadbalancers.json?limit=2&marker=0fdb0ca7-0a38-4aea-891c-daaed40bcafe",
"href": "http://198.51.100.10:9876/v2/lbaas/loadbalancers.json?limit=2&marker=0fdb0ca7-0a38-4aea-891c-daaed40bcafe",
"rel": "next"
},
{
"href": "http://198.51.100.10:9876/v2.0/lbaas/loadbalancers.json?limit=2&marker=34d5f4a5-cbbc-43a0-878f-b8a26370e6e7&page_reverse=True",
"href": "http://198.51.100.10:9876/v2/lbaas/loadbalancers.json?limit=2&marker=34d5f4a5-cbbc-43a0-878f-b8a26370e6e7&page_reverse=True",
"rel": "previous"
}
]
@ -298,7 +304,7 @@ The last page won't show the "next" links
.. code::
GET /v2.0/lbaas/loadbalancers.json?limit=2&marker=4ef465f3-0233-44af-b93d-9d3eae4daf85 HTTP/1.1
GET /v2/lbaas/loadbalancers.json?limit=2&marker=4ef465f3-0233-44af-b93d-9d3eae4daf85 HTTP/1.1
Host: 198.51.100.10:9876
Content-Type: application/json
Accept: application/json
@ -329,7 +335,7 @@ The last page won't show the "next" links
],
"loadbalancers_links": [
{
"href": "http://198.51.100.10:9876/v2.0/lbaas/loadbalancers.json?limit=2&marker=4ef465f3-0233-44af-b93d-9d3eae4daf85&page_reverse=True",
"href": "http://198.51.100.10:9876/v2/lbaas/loadbalancers.json?limit=2&marker=4ef465f3-0233-44af-b93d-9d3eae4daf85&page_reverse=True",
"rel": "previous"
}
]
@ -380,14 +386,14 @@ and the number of ``sort_key`` and ``sort_dir`` provided must be same. The
values are ``asc`` (ascending) and ``desc`` (descending).
If a particular plug-in does not support sorting operations the Octavia API
v2.0 emulates the sorting behavior so that users can expect the same behavior
v2 emulates the sorting behavior so that users can expect the same behavior
regardless of the particular plug-in that runs in the background.
Response Codes
==============
The following HTTP response status codes are used by the Octavia v2.0 API.
The following HTTP response status codes are used by the Octavia v2 API.
Success
-------
@ -406,7 +412,7 @@ Success
Faults
------
The Octavia API v2.0 returns an error response if a failure occurs while
The Octavia API v2 returns an error response if a failure occurs while
processing a request. Octavia uses only standard HTTP error codes.
4\ *nn* errors indicate problems in the particular request being sent from
the client.
@ -445,7 +451,7 @@ the client.
Status Codes
============
Octavia API v2.0 entities have two status codes present in the response body.
Octavia API v2 entities have two status codes present in the response body.
The ``provisioning_status`` describes the lifecycle status of the entity while
the ``operating_status`` provides the observed status of the entity.

@ -3,7 +3,7 @@
List Health Monitors
====================
.. rest_method:: GET /v2.0/lbaas/healthmonitors
.. rest_method:: GET /v2/lbaas/healthmonitors
Lists all health monitors for the project.
@ -72,7 +72,7 @@ Response Example
Create Health Monitor
=====================
.. rest_method:: POST /v2.0/lbaas/healthmonitors
.. rest_method:: POST /v2/lbaas/healthmonitors
Creates a health monitor on a pool.
@ -88,7 +88,7 @@ In the response, the health monitor :ref:`provisioning status<prov_status>` is
``ACTIVE``, ``PENDING_CREATE``, or ``ERROR``.
If the status is ``PENDING_CREATE``, issue GET
``/v2.0/lbaas/healthmonitors/{healthmonitor_id}`` to view the progress of
``/v2/lbaas/healthmonitors/{healthmonitor_id}`` to view the progress of
the provisioning operation. When the health monitor status changes
to ``ACTIVE``, the health monitor is successfully provisioned and
is ready for further configuration.
@ -209,7 +209,7 @@ Response Example
Show Health Monitor details
===========================
.. rest_method:: GET /v2.0/lbaas/healthmonitors/{healthmonitor_id}
.. rest_method:: GET /v2/lbaas/healthmonitors/{healthmonitor_id}
Shows the details of a health monitor.
@ -276,7 +276,7 @@ Response Example
Update a Health Monitor
=======================
.. rest_method:: PUT /v2.0/lbaas/healthmonitors/{healthmonitor_id}
.. rest_method:: PUT /v2/lbaas/healthmonitors/{healthmonitor_id}
Update an existing health monitor.
@ -361,7 +361,7 @@ Response Example
Remove a Health Monitor
=======================
.. rest_method:: DELETE /v2.0/lbaas/healthmonitors/{healthmonitor_id}
.. rest_method:: DELETE /v2/lbaas/healthmonitors/{healthmonitor_id}
Removes a health monitor and its associated configuration from the project.

@ -1,8 +1,8 @@
:tocdepth: 3
==========================
Octavia API v2.0 (Current)
==========================
========================
Octavia API v2 (Current)
========================
.. rest_expand_all::

@ -3,7 +3,7 @@
List L7 Policies
================
.. rest_method:: GET /v2.0/lbaas/l7policies
.. rest_method:: GET /v2/lbaas/l7policies
Lists all L7 policies for the project.
@ -70,7 +70,7 @@ Response Example
Create an L7 Policy
===================
.. rest_method:: POST /v2.0/lbaas/l7policies
.. rest_method:: POST /v2/lbaas/l7policies
Creates a L7 policy.
@ -84,7 +84,7 @@ In the response, the L7 policy :ref:`provisioning status<prov_status>` is
``ACTIVE``, ``PENDING_CREATE``, or ``ERROR``.
If the status is ``PENDING_CREATE``, issue GET
``/v2.0/lbaas/l7policies/{l7policy_id}`` to view the progress of
``/v2/lbaas/l7policies/{l7policy_id}`` to view the progress of
the provisioning operation. When the L7 policy status changes
to ``ACTIVE``, the L7 policy is successfully provisioned and
is ready for further configuration.
@ -181,7 +181,7 @@ Response Example
Show L7 Policy details
==========================
.. rest_method:: GET /v2.0/lbaas/l7policies/{l7policy_id}
.. rest_method:: GET /v2/lbaas/l7policies/{l7policy_id}
Shows the details of a L7 policy.
@ -247,7 +247,7 @@ Response Example
Update a L7 Policy
==================
.. rest_method:: PUT /v2.0/lbaas/l7policies/{l7policy_id}
.. rest_method:: PUT /v2/lbaas/l7policies/{l7policy_id}
Updates a L7 policy.
@ -332,7 +332,7 @@ Response Example
Remove a L7 Policy
==================
.. rest_method:: DELETE /v2.0/lbaas/l7policies/{l7policy_id}
.. rest_method:: DELETE /v2/lbaas/l7policies/{l7policy_id}
Removes a L7 policy and its associated configuration from the project.

@ -3,7 +3,7 @@
List L7 Rules
=============
.. rest_method:: GET /v2.0/lbaas/l7policies/{l7policy_id}/rules
.. rest_method:: GET /v2/lbaas/l7policies/{l7policy_id}/rules
Lists all L7 rules for the project.
@ -68,7 +68,7 @@ Response Example
Create an L7 Rule
=================
.. rest_method:: POST /v2.0/lbaas/l7policies/{l7policy_id}/rules
.. rest_method:: POST /v2/lbaas/l7policies/{l7policy_id}/rules
Creates a L7 rule.
@ -82,7 +82,7 @@ In the response, the L7 rule :ref:`provisioning status<prov_status>` is
``ACTIVE``, ``PENDING_CREATE``, or ``ERROR``.
If the status is ``PENDING_CREATE``, issue GET
``/v2.0/lbaas/l7policies/{l7policy_id}/rules/{l7rule_id}`` to view the
``/v2/lbaas/l7policies/{l7policy_id}/rules/{l7rule_id}`` to view the
progress of the provisioning operation. When the L7 rule status changes
to ``ACTIVE``, the L7 rule is successfully provisioned and
is ready for further configuration.
@ -166,7 +166,7 @@ Response Example
Show L7 Rule details
==========================
.. rest_method:: GET /v2.0/lbaas/l7policies/{l7policy_id}/rules/{l7rule_id}
.. rest_method:: GET /v2/lbaas/l7policies/{l7policy_id}/rules/{l7rule_id}
Shows the details of a L7 rule.
@ -229,7 +229,7 @@ Response Example
Update a L7 Rule
================
.. rest_method:: PUT /v2.0/lbaas/l7policies/{l7policy_id}/rules/{l7rule_id}
.. rest_method:: PUT /v2/lbaas/l7policies/{l7policy_id}/rules/{l7rule_id}
Updates a L7 rule.
@ -308,7 +308,7 @@ Response Example
Remove a L7 Rule
================
.. rest_method:: DELETE /v2.0/lbaas/l7policies/{l7policy_id}/rules/{l7rule_id}
.. rest_method:: DELETE /v2/lbaas/l7policies/{l7policy_id}/rules/{l7rule_id}
Removes a L7 rule and its associated configuration from the project.

@ -3,7 +3,7 @@
List Listeners
==============
.. rest_method:: GET /v2.0/lbaas/listeners
.. rest_method:: GET /v2/lbaas/listeners
Lists all listeners for the project.
@ -78,7 +78,7 @@ Response Example
Create Listener
===============
.. rest_method:: POST /v2.0/lbaas/listeners
.. rest_method:: POST /v2/lbaas/listeners
Creates a listener for a load balancer.
@ -95,7 +95,7 @@ In the response, the listener :ref:`provisioning status<prov_status>` is
``ACTIVE``, ``PENDING_CREATE``, or ``ERROR``.
If the status is ``PENDING_CREATE``, issue GET
``/v2.0/lbaas/listeners/{listener_id}`` to view the progress of
``/v2/lbaas/listeners/{listener_id}`` to view the progress of
the provisioning operation. When the listener status changes
to ``ACTIVE``, the listener is successfully provisioned and
is ready for further configuration.
@ -227,7 +227,7 @@ Response Example
Show Listener details
=====================
.. rest_method:: GET /v2.0/lbaas/listeners/{listener_id}
.. rest_method:: GET /v2/lbaas/listeners/{listener_id}
Shows the details of a listener.
@ -300,7 +300,7 @@ Response Example
Update a Listener
=================
.. rest_method:: PUT /v2.0/lbaas/listeners/{listener_id}
.. rest_method:: PUT /v2/lbaas/listeners/{listener_id}
Update an existing listener.
@ -394,7 +394,7 @@ Response Example
Remove a Listener
=================
.. rest_method:: DELETE /v2.0/lbaas/listeners/{listener_id}
.. rest_method:: DELETE /v2/lbaas/listeners/{listener_id}
Removes a listener and its associated configuration from the project.
@ -435,7 +435,7 @@ There is no body content for the response of a successful DELETE request.
Get Listener statistics
=======================
.. rest_method:: GET /v2.0/lbaas/listeners/{listener_id}/stats
.. rest_method:: GET /v2/lbaas/listeners/{listener_id}/stats
Shows the current statistics for a listener.

@ -3,7 +3,7 @@
List Load Balancers
===================
.. rest_method:: GET /v2.0/lbaas/loadbalancers
.. rest_method:: GET /v2/lbaas/loadbalancers
Lists all load balancers for the project.
@ -74,7 +74,7 @@ Response Example
Create a Load Balancer
======================
.. rest_method:: POST /v2.0/lbaas/loadbalancers
.. rest_method:: POST /v2/lbaas/loadbalancers
Creates a load balancer.
@ -88,7 +88,7 @@ In the response, the load balancer :ref:`provisioning status<prov_status>` is
``ACTIVE``, ``PENDING_CREATE``, or ``ERROR``.
If the status is ``PENDING_CREATE``, issue GET
``/v2.0/lbaas/loadbalancers/{loadbalancer_id}`` to view the progress of
``/v2/lbaas/loadbalancers/{loadbalancer_id}`` to view the progress of
the provisioning operation. When the load balancer status changes
to ``ACTIVE``, the load balancer is successfully provisioned and
is ready for further configuration.
@ -243,7 +243,7 @@ Response Example
Show Load Balancer details
==========================
.. rest_method:: GET /v2.0/lbaas/loadbalancers/{loadbalancer_id}
.. rest_method:: GET /v2/lbaas/loadbalancers/{loadbalancer_id}
Shows the details of a load balancer.
@ -312,7 +312,7 @@ Response Example
Update a Load Balancer
======================
.. rest_method:: PUT /v2.0/lbaas/loadbalancers/{loadbalancer_id}
.. rest_method:: PUT /v2/lbaas/loadbalancers/{loadbalancer_id}
Updates a load balancer.
@ -396,7 +396,7 @@ Response Example
Remove a Load Balancer
======================
.. rest_method:: DELETE /v2.0/lbaas/loadbalancers/{loadbalancer_id}
.. rest_method:: DELETE /v2/lbaas/loadbalancers/{loadbalancer_id}
Removes a load balancer and its associated configuration from the project.
@ -441,7 +441,7 @@ There is no body content for the response of a successful DELETE request.
Get Load Balancer statistics
============================
.. rest_method:: GET /v2.0/lbaas/loadbalancers/{loadbalancer_id}/stats
.. rest_method:: GET /v2/lbaas/loadbalancers/{loadbalancer_id}/stats
Shows the current statistics for a load balancer.
@ -499,7 +499,7 @@ Response Example
Get the Load Balancer status tree
=================================
.. rest_method:: GET /v2.0/lbaas/loadbalancers/{loadbalancer_id}/status
.. rest_method:: GET /v2/lbaas/loadbalancers/{loadbalancer_id}/status
Shows the status tree for a load balancer.
@ -574,7 +574,7 @@ Response Example
Failover a load balancer
========================
.. rest_method:: PUT /v2.0/lbaas/loadbalancers/{loadbalancer_id}/failover
.. rest_method:: PUT /v2/lbaas/loadbalancers/{loadbalancer_id}/failover
Performs a failover of a load balancer.

@ -3,7 +3,7 @@
List Members
============
.. rest_method:: GET /v2.0/lbaas/pools/{pool_id}/members
.. rest_method:: GET /v2/lbaas/pools/{pool_id}/members
Lists all members for the project.
@ -71,7 +71,7 @@ Response Example
Create Member
=============
.. rest_method:: POST /v2.0/lbaas/pools/{pool_id}/members
.. rest_method:: POST /v2/lbaas/pools/{pool_id}/members
This operation provisions a member and adds it to a pool by using
the configuration that you define in the request object. After the
@ -82,7 +82,7 @@ In the response, the member :ref:`provisioning status<prov_status>` is
``ACTIVE``, ``PENDING_CREATE``, or ``ERROR``.
If the status is ``PENDING_CREATE``, issue GET
``/v2.0/lbaas/pools/{pool_id}/members/{member_id}`` to view the progress of
``/v2/lbaas/pools/{pool_id}/members/{member_id}`` to view the progress of
the provisioning operation. When the member status changes
to ``ACTIVE``, the member is successfully provisioned and
is ready for further configuration.
@ -200,7 +200,7 @@ Response Example
Show Member details
===================
.. rest_method:: GET /v2.0/lbaas/pools/{pool_id}/members/{member-id}
.. rest_method:: GET /v2/lbaas/pools/{pool_id}/members/{member-id}
Shows the details of a pool member.
@ -266,7 +266,7 @@ Response Example
Update a Member
===============
.. rest_method:: PUT /v2.0/lbaas/pools/{pool_id}/members/{member_id}
.. rest_method:: PUT /v2/lbaas/pools/{pool_id}/members/{member_id}
Update an existing member.
@ -351,7 +351,7 @@ Response Example
Batch Update Members
====================
.. rest_method:: PUT /v2.0/lbaas/pools/{pool_id}/members
.. rest_method:: PUT /v2/lbaas/pools/{pool_id}/members
Set the state of members for a pool in one API call. This may include
creating new members, deleting old members, and updating existing members.
@ -423,7 +423,7 @@ There is no body content for the response of a successful PUT request.
Remove a Member
===============
.. rest_method:: DELETE /v2.0/lbaas/pools/{pool_id}/members/{member_id}
.. rest_method:: DELETE /v2/lbaas/pools/{pool_id}/members/{member_id}
Removes a member and its associated configuration from the pool.

@ -3,7 +3,7 @@
List Pools
==========
.. rest_method:: GET /v2.0/lbaas/pools
.. rest_method:: GET /v2/lbaas/pools
Lists all pools for the project.
@ -71,7 +71,7 @@ Response Example
Create Pool
===========
.. rest_method:: POST /v2.0/lbaas/pools
.. rest_method:: POST /v2/lbaas/pools
Creates a pool for a load balancer.
@ -87,7 +87,7 @@ In the response, the pool :ref:`provisioning status<prov_status>` is
``ACTIVE``, ``PENDING_CREATE``, or ``ERROR``.
If the status is ``PENDING_CREATE``, issue GET
``/v2.0/lbaas/pools/{pool_id}`` to view the progress of
``/v2/lbaas/pools/{pool_id}`` to view the progress of
the provisioning operation. When the pool status changes
to ``ACTIVE``, the pool is successfully provisioned and
is ready for further configuration.
@ -252,7 +252,7 @@ Response Example
Show Pool details
=================
.. rest_method:: GET /v2.0/lbaas/pools/{pool_id}
.. rest_method:: GET /v2/lbaas/pools/{pool_id}
Shows the details of a pool.
@ -318,7 +318,7 @@ Response Example
Update a Pool
=============
.. rest_method:: PUT /v2.0/lbaas/pools/{pool_id}
.. rest_method:: PUT /v2/lbaas/pools/{pool_id}
Update an existing pool.
@ -398,7 +398,7 @@ Response Example
Remove a Pool
=============
.. rest_method:: DELETE /v2.0/lbaas/pools/{pool_id}
.. rest_method:: DELETE /v2/lbaas/pools/{pool_id}
Removes a pool and its associated configuration from the load balancer.

@ -3,7 +3,7 @@
List Providers
==============
.. rest_method:: GET /v2.0/lbaas/providers
.. rest_method:: GET /v2/lbaas/providers
Lists all enabled provider drivers.

@ -3,7 +3,7 @@
List Quota
==========
.. rest_method:: GET /v2.0/lbaas/quotas
.. rest_method:: GET /v2/lbaas/quotas
Lists all quotas for the project.
@ -66,7 +66,7 @@ Response Example
Show Quota Defaults
===================
.. rest_method:: GET /v2.0/lbaas/quotas/defaults
.. rest_method:: GET /v2/lbaas/quotas/defaults
Show the quota defaults configured for the deployment.
@ -113,7 +113,7 @@ Response Example
Show Project Quota
==================
.. rest_method:: GET /v2.0/lbaas/quotas/{project_id}
.. rest_method:: GET /v2/lbaas/quotas/{project_id}
Show the quota for the project.
@ -170,7 +170,7 @@ Response Example
Update a Quota
==============
.. rest_method:: PUT /v2.0/lbaas/quotas/{project_id}
.. rest_method:: PUT /v2/lbaas/quotas/{project_id}
Updates a quota for a project.
@ -244,7 +244,7 @@ Response Example
Reset a Quota
=============
.. rest_method:: DELETE /v2.0/lbaas/quotas/{project_id}
.. rest_method:: DELETE /v2/lbaas/quotas/{project_id}
Resets a project quota to use the deployment default quota.

@ -14,6 +14,7 @@
from oslo_config import cfg
from oslo_log import log as logging
from pecan import request as pecan_request
from pecan import rest
from wsme import types as wtypes
from wsmeext import pecan as wsme_pecan
@ -28,37 +29,50 @@ LOG = logging.getLogger(__name__)
class RootController(rest.RestController):
"""The controller with which the pecan wsgi app should be created."""
_versions = None
def __init__(self):
super(RootController, self).__init__()
self._versions = []
v1_enabled = CONF.api_settings.api_v1_enabled
v2_enabled = CONF.api_settings.api_v2_enabled
if v1_enabled:
self.v1 = v1_controller.V1Controller()
self._versions.append(
{
'status': 'SUPPORTED',
'updated': '2014-12-11T00:00:00Z',
'id': 'v1'
})
if v2_enabled:
setattr(self, 'v2.0', v2_controller.V2Controller())
self._versions.append(
{
'status': 'CURRENT',
'updated': '2018-04-20T00:00:00Z',
'id': 'v2.1'
})
setattr(self, 'v2', v2_controller.V2Controller())
if not (v1_enabled or v2_enabled):
LOG.warning("Both v1 and v2.0 API endpoints are disabled -- is "
LOG.warning("Both v1 and v2 API endpoints are disabled -- is "
"this intentional?")
elif v1_enabled and v2_enabled:
LOG.warning("Both v1 and v2.0 API endpoints are enabled -- it is "
LOG.warning("Both v1 and v2 API endpoints are enabled -- it is "
"a security risk to expose the v1 endpoint publicly,"
"so please make sure access to it is secured.")
def _add_a_version(self, versions, version, url_version, status,
timestamp, base_url):
versions.append({
'id': version,
'status': status,
'updated': timestamp,
'links': [{
'href': base_url + url_version,
'rel': 'self'
}]
})
@wsme_pecan.wsexpose(wtypes.text)
def get(self):
return {'versions': self._versions}
host_url = pecan_request.path_url
if not host_url.endswith('/'):
host_url = '{}/'.format(host_url)
versions = []
if CONF.api_settings.api_v1_enabled:
self._add_a_version(versions, 'v1', 'v1', 'DEPRECATED',
'2014-12-11T00:00:00Z', host_url)
if CONF.api_settings.api_v2_enabled:
self._add_a_version(versions, 'v2.0', 'v2', 'SUPPORTED',
'2016-12-11T00:00:00Z', host_url)
self._add_a_version(versions, 'v2.1', 'v2', 'CURRENT',
'2018-04-20T00:00:00Z', host_url)
return {'versions': versions}

@ -46,7 +46,7 @@ class BaseV2Controller(base.BaseController):
@wsme_pecan.wsexpose(wtypes.text)
def get(self):
return "v2.0"
return "v2"