Browse Source
This patch adds the load balancer section to the v2 API reference. Change-Id: Ibe5b6372ba859f47e6738e97ff14c66f58514e42 Partial-Bug: #1558385changes/57/438757/10
23 changed files with 1520 additions and 15 deletions
@ -1,6 +1,55 @@
|
||||
200: |
||||
default: | |
||||
The synchronous request was successful. |
||||
Request was successful. |
||||
201: |
||||
default: | |
||||
Request has been fulfilled and new resource created. |
||||
202: |
||||
default: | |
||||
Request is accepted, but processing may take some time. |
||||
203: |
||||
default: | |
||||
Returned information is not full set, but a subset. |
||||
204: |
||||
default: | |
||||
Request fulfilled but service does not return anything. |
||||
300: |
||||
default: | |
||||
The resource corresponds to more than one representation. |
||||
400: |
||||
default: | |
||||
Some content in the request was invalid. |
||||
401: |
||||
default: | |
||||
Access is denied due to invalid credentials. |
||||
403: |
||||
default: | |
||||
Policy does not allow current user to do this operation. |
||||
404: |
||||
default: | |
||||
The requested resource could not be found. |
||||
405: |
||||
default: | |
||||
Method is not valid for this endpoint and resource. |
||||
409: |
||||
default: | |
||||
This resource has an action in progress that would conflict with this |
||||
request. |
||||
413: |
||||
default: | |
||||
This operation cannot be completed. |
||||
415: |
||||
default: | |
||||
The entity of the request is in a format not supported by the requested |
||||
resource for the method. |
||||
500: |
||||
default: | |
||||
The request encountered an unexpected failure. |
||||
Something went wrong with the service which prevents it from fulfilling |
||||
the request. |
||||
501: |
||||
default: | |
||||
The service does not have the functionality required to fulfill this |
||||
request. |
||||
503: |
||||
default: | |
||||
The service cannot handle the request right now. |
||||
|
@ -0,0 +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": "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"}}' http://198.51.100.10:9876/v2.0/lbaas/loadbalancers |
@ -0,0 +1,11 @@
|
||||
{ |
||||
"loadbalancer": { |
||||
"description": "My favorite load balancer", |
||||
"admin_state_up": true, |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", |
||||
"vip_address": "203.0.113.50", |
||||
"provider": "octavia", |
||||
"name": "best_load_balancer" |
||||
} |
||||
} |
@ -0,0 +1,20 @@
|
||||
{ |
||||
"loadbalancer": { |
||||
"description": "My favorite load balancer", |
||||
"admin_state_up": true, |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"provisioning_status": "PENDING_CREATE", |
||||
"flavor": "", |
||||
"vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", |
||||
"vip_address": "203.0.113.50", |
||||
"vip_network_id": "d0d217df-3958-4fbf-a3c2-8dad2908c709", |
||||
"vip_port_id": "b4ca07d1-a31e-43e2-891a-7d14f419f342", |
||||
"provider": "octavia", |
||||
"created_at": "2017-02-28T00:41:44", |
||||
"updated_at": "2017-02-28T00:43:30", |
||||
"id": "607226db-27ef-4d41-ae89-f2a800e9c2db", |
||||
"operating_status": "ONLINE", |
||||
"name": "best_load_balancer" |
||||
} |
||||
} |
@ -0,0 +1 @@
|
||||
curl -X DELETE -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/loadbalancers/4b9b652c-537a-44bf-bbe8-85a690625597 |
@ -0,0 +1,87 @@
|
||||
{ |
||||
"loadbalancer": { |
||||
"description": "My favorite load balancer", |
||||
"admin_state_up": true, |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"flavor": "", |
||||
"listeners": [ |
||||
{ |
||||
"name": "http_listener", |
||||
"protocol": "HTTP", |
||||
"protocol_port": 80, |
||||
"default_pool": { |
||||
"name": "rr_pool", |
||||
"protocol": "HTTP", |
||||
"lb_algorithm": "ROUND_ROBIN", |
||||
"health_monitor": { |
||||
"type": "HTTP", |
||||
"delay": "3", |
||||
"expected_codes": "200,201,202", |
||||
"http_method": "GET", |
||||
"max_retries": 2, |
||||
"timeout": 1, |
||||
"url_path": "/index.html" |
||||
}, |
||||
"members": [ |
||||
{ |
||||
"ip_address": "'192.0.2.16'", |
||||
"protocol_port": 80 |
||||
}, |
||||
{ |
||||
"ip_address": "'192.0.2.19'", |
||||
"protocol_port": 80 |
||||
} |
||||
] |
||||
} |
||||
}, |
||||
{ |
||||
"name": "https_listener", |
||||
"protocol": "HTTPS", |
||||
"protocol_port": 443, |
||||
"default_pool": { |
||||
"name": "https_pool" |
||||
} |
||||
}, |
||||
{ |
||||
"name": "redirect_listener", |
||||
"protocol": "HTTP", |
||||
"protocol_port": 8080, |
||||
"l7policies": [ |
||||
{ |
||||
"action": "REDIRECT_TO_URL", |
||||
"name": "redirect_policy", |
||||
"redirect_url": "https://www.example.com/", |
||||
"admin_state_up": true |
||||
} |
||||
] |
||||
} |
||||
], |
||||
"pools": [ |
||||
{ |
||||
"name": "https_pool", |
||||
"protocol": "HTTPS", |
||||
"lb_algorithm": "ROUND_ROBIN", |
||||
"health_monitor": { |
||||
"type": "HTTPS", |
||||
"delay": "3", |
||||
"max_retries": 2, |
||||
"timeout": 1 |
||||
}, |
||||
"members": [ |
||||
{ |
||||
"ip_address": "'192.0.2.16'", |
||||
"protocol_port": 80 |
||||
}, |
||||
{ |
||||
"ip_address": "'192.0.2.19'", |
||||
"protocol_port": 80 |
||||
} |
||||
] |
||||
} |
||||
], |
||||
"vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", |
||||
"vip_address": "203.0.113.50", |
||||
"provider": "octavia", |
||||
"name": "best_load_balancer" |
||||
} |
||||
} |
@ -0,0 +1,234 @@
|
||||
{ |
||||
"loadbalancer": { |
||||
"description": "My favorite load balancer", |
||||
"admin_state_up": true, |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"provisioning_status": "ACTIVE", |
||||
"flavor": "", |
||||
"vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", |
||||
"listeners": [ |
||||
{ |
||||
"l7policies": [], |
||||
"protocol": "HTTP", |
||||
"description": "", |
||||
"default_tls_container_ref": null, |
||||
"admin_state_up": true, |
||||
"default_pool": { |
||||
"lb_algorithm": "ROUND_ROBIN", |
||||
"protocol": "HTTP", |
||||
"description": "", |
||||
"admin_state_up": true, |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"session_persistence": null, |
||||
"healthmonitor": { |
||||
"name": "", |
||||
"admin_state_up": true, |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"delay": 3, |
||||
"expected_codes": "200,201,202", |
||||
"max_retries": 2, |
||||
"http_method": "GET", |
||||
"timeout": 1, |
||||
"max_retries_down": 3, |
||||
"url_path": "/index.html", |
||||
"type": "HTTP", |
||||
"id": "a8a2aa3f-d099-4752-8265-e6472f8147f9" |
||||
}, |
||||
"members": [ |
||||
{ |
||||
"name": "", |
||||
"weight": 1, |
||||
"admin_state_up": true, |
||||
"subnet_id": "bbb35f84-35cc-4b2f-84c2-a6a29bba68aa", |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"address": "192.0.2.16", |
||||
"protocol_port": 80, |
||||
"id": "7d19ad6c-d549-453e-a5cd-05382c6be96a" |
||||
}, |
||||
{ |
||||
"name": "", |
||||
"weight": 1, |
||||
"admin_state_up": true, |
||||
"subnet_id": "bbb35f84-35cc-4b2f-84c2-a6a29bba68aa", |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"address": "192.0.2.19", |
||||
"protocol_port": 80, |
||||
"id": "a167402b-caa6-41d5-b4d4-bde7f2cbfa5e" |
||||
} |
||||
], |
||||
"id": "c8cec227-410a-4a5b-af13-ecf38c2b0abb", |
||||
"name": "rr_pool" |
||||
}, |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"default_tls_container_id": null, |
||||
"connection_limit": -1, |
||||
"sni_container_refs": [], |
||||
"protocol_port": 80, |
||||
"id": "a99995c6-4f04-4ed3-a37f-ae58f6e7e5e1", |
||||
"name": "http_listener" |
||||
}, |
||||
{ |
||||
"l7policies": [], |
||||
"protocol": "HTTPS", |
||||
"description": "", |
||||
"default_tls_container_ref": null, |
||||
"admin_state_up": true, |
||||
"default_pool": { |
||||
"lb_algorithm": "ROUND_ROBIN", |
||||
"protocol": "HTTPS", |
||||
"description": "", |
||||
"admin_state_up": true, |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"session_persistence": null, |
||||
"healthmonitor": { |
||||
"name": "", |
||||
"admin_state_up": true, |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"delay": 3, |
||||
"expected_codes": "200,201,202", |
||||
"max_retries": 2, |
||||
"http_method": "GET", |
||||
"timeout": 1, |
||||
"max_retries_down": 3, |
||||
"url_path": "/index.html", |
||||
"type": "HTTPS", |
||||
"id": "d5bb7712-26b7-4809-8c14-3b407c0cb00d" |
||||
}, |
||||
"members": [ |
||||
{ |
||||
"name": "", |
||||
"weight": 1, |
||||
"admin_state_up": true, |
||||
"subnet_id": "bbb35f84-35cc-4b2f-84c2-a6a29bba68aa", |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"address": "192.0.2.16", |
||||
"protocol_port": 80, |
||||
"id": "f83832d5-1f22-45fa-866a-4abea36e0886" |
||||
}, |
||||
{ |
||||
"name": "", |
||||
"weight": 1, |
||||
"admin_state_up": true, |
||||
"subnet_id": "bbb35f84-35cc-4b2f-84c2-a6a29bba68aa", |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"address": "192.0.2.19", |
||||
"protocol_port": 80, |
||||
"id": "f83832d5-1f22-45fa-866a-4abea36e0886" |
||||
} |
||||
], |
||||
"id": "b0577aff-c1f9-40c6-9a3b-7b1d2a669136", |
||||
"name": "https_pool" |
||||
}, |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"default_tls_container_id": null, |
||||
"connection_limit": -1, |
||||
"sni_container_refs": [], |
||||
"protocol_port": 443, |
||||
"id": "73c6c564-f215-48e9-91d6-f10bb3454954", |
||||
"name": "https_listener" |
||||
}, |
||||
{ |
||||
"l7policies": [ |
||||
{ |
||||
"description": "", |
||||
"admin_state_up": true, |
||||
"rules": [], |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"listener_id": "95de30ec-67f4-437b-b3f3-22c5d9ef9828", |
||||
"redirect_url": "https://www.example.com/", |
||||
"action": "REDIRECT_TO_URL", |
||||
"position": 1, |
||||
"id": "d0553837-f890-4981-b99a-f7cbd6a76577", |
||||
"name": "redirect_policy" |
||||
} |
||||
], |
||||
"protocol": "HTTP", |
||||
"description": "", |
||||
"default_tls_container_ref": null, |
||||
"admin_state_up": true, |
||||
"default_pool": null, |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"default_tls_container_id": null, |
||||
"connection_limit": -1, |
||||
"sni_container_refs": [], |
||||
"protocol_port": 8080, |
||||
"id": "95de30ec-67f4-437b-b3f3-22c5d9ef9828", |
||||
"name": "redirect_listener" |
||||
} |
||||
], |
||||
"vip_address": "203.0.113.50", |
||||
"vip_network_id": "d0d217df-3958-4fbf-a3c2-8dad2908c709", |
||||
"vip_port_id": "b4ca07d1-a31e-43e2-891a-7d14f419f342", |
||||
"provider": "octavia", |
||||
"pools": [ |
||||
{ |
||||
"lb_algorithm": "ROUND_ROBIN", |
||||
"protocol": "HTTPS", |
||||
"description": "", |
||||
"admin_state_up": true, |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"session_persistence": null, |
||||
"healthmonitor": { |
||||
"name": "", |
||||
"admin_state_up": true, |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"delay": 3, |
||||
"expected_codes": "200,201,202", |
||||
"max_retries": 2, |
||||
"http_method": "GET", |
||||
"timeout": 1, |
||||
"max_retries_down": 3, |
||||
"url_path": "/index.html", |
||||
"type": "HTTPS", |
||||
"id": "d5bb7712-26b7-4809-8c14-3b407c0cb00d" |
||||
}, |
||||
"members": [ |
||||
{ |
||||
"name": "", |
||||
"weight": 1, |
||||
"admin_state_up": true, |
||||
"subnet_id": "bbb35f84-35cc-4b2f-84c2-a6a29bba68aa", |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"address": "192.0.2.16", |
||||
"protocol_port": 80, |
||||
"id": "f83832d5-1f22-45fa-866a-4abea36e0886" |
||||
}, |
||||
{ |
||||
"name": "", |
||||
"weight": 1, |
||||
"admin_state_up": true, |
||||
"subnet_id": "bbb35f84-35cc-4b2f-84c2-a6a29bba68aa", |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"address": "192.0.2.19", |
||||
"protocol_port": 80, |
||||
"id": "f83832d5-1f22-45fa-866a-4abea36e0886" |
||||
} |
||||
], |
||||
"id": "b0577aff-c1f9-40c6-9a3b-7b1d2a669136", |
||||
"name": "https_pool" |
||||
} |
||||
], |
||||
"created_at": "2017-02-28T00:41:44", |
||||
"updated_at": "2017-02-28T00:43:30", |
||||
"id": "607226db-27ef-4d41-ae89-f2a800e9c2db", |
||||
"operating_status": "ONLINE", |
||||
"name": "best_load_balancer" |
||||
} |
||||
} |
@ -0,0 +1 @@
|
||||
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/loadbalancers/8a562351-f0fb-424c-a0af-513461424ea5 |
@ -0,0 +1,20 @@
|
||||
{ |
||||
"loadbalancer": { |
||||
"description": "My favorite load balancer", |
||||
"admin_state_up": true, |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"provisioning_status": "PENDING_CREATE", |
||||
"flavor": "", |
||||
"vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", |
||||
"vip_address": "203.0.113.50", |
||||
"vip_network_id": "d0d217df-3958-4fbf-a3c2-8dad2908c709", |
||||
"vip_port_id": "b4ca07d1-a31e-43e2-891a-7d14f419f342", |
||||
"provider": "octavia", |
||||
"created_at": "2017-02-28T00:41:44", |
||||
"updated_at": "2017-02-28T00:43:30", |
||||
"id": "8a562351-f0fb-424c-a0af-513461424ea5", |
||||
"operating_status": "ONLINE", |
||||
"name": "best_load_balancer" |
||||
} |
||||
} |
@ -0,0 +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 |
@ -0,0 +1,9 @@
|
||||
{ |
||||
"stats": { |
||||
"bytes_in": 131342840, |
||||
"total_connections": 52378345, |
||||
"active_connections": 97258, |
||||
"bytes_out": 1549542372, |
||||
"request_errors": 0 |
||||
} |
||||
} |
@ -0,0 +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 |
@ -0,0 +1,113 @@
|
||||
{ |
||||
"statuses": { |
||||
"loadbalancer": { |
||||
"name": "excellent_load_balancer", |
||||
"provisioning_status": "ACTIVE", |
||||
"listeners": [ |
||||
{ |
||||
"name": "HTTP_listener", |
||||
"provisioning_status": "ACTIVE", |
||||
"pools": [ |
||||
{ |
||||
"name": "HTTP_pool", |
||||
"provisioning_status": "ACTIVE", |
||||
"healthmonitor": { |
||||
"type": "HTTP", |
||||
"id": "0b608787-ea2d-48c7-89a1-8b8c24fa3b17", |
||||
"name": "HTTP_health_monitor", |
||||
"provisioning_status": "ACTIVE" |
||||
}, |
||||
"members": [ |
||||
{ |
||||
"name": "", |
||||
"provisioning_status": "ACTIVE", |
||||
"address": "192.0.2.20", |
||||
"protocol_port": 80, |
||||
"id": "3c6857f4-057a-405a-9134-bdeaa8796c8a", |
||||
"operating_status": "ERROR" |
||||
}, |
||||
{ |
||||
"name": "", |
||||
"provisioning_status": "ACTIVE", |
||||
"address": "192.0.2.21", |
||||
"protocol_port": 80, |
||||
"id": "f7495909-1706-4c91-83b4-641dab6962ac", |
||||
"operating_status": "ONLINE" |
||||
} |
||||
], |
||||
"id": "89a47f78-cf81-480b-ad74-bba4177eeb81", |
||||
"operating_status": "DEGRADED" |
||||
} |
||||
], |
||||
"l7policies": [], |
||||
"id": "78febaf6-1e63-47c6-af5f-7b5e23fd7094", |
||||
"operating_status": "DEGRADED" |
||||
}, |
||||
{ |
||||
"name": "redirect_listener", |
||||
"provisioning_status": "ACTIVE", |
||||
"pools": [], |
||||
"l7policies": [ |
||||
{ |
||||
"action": "REDIRECT_TO_URL", |
||||
"rules": [ |
||||
{ |
||||
"type": "PATH", |
||||
"id": "27f3007a-a1cb-4e17-9696-0e578d617715", |
||||
"provisioning_status": "ACTIVE" |
||||
} |
||||
], |
||||
"id": "2e8f3139-0673-43f9-aae4-c7a9460e3233", |
||||
"name": "redirect_policy", |
||||
"provisioning_status": "ACTIVE" |
||||
} |
||||
], |
||||
"id": "1341fbaf-ad4f-4cfe-a943-ad5e14e664cb", |
||||
"operating_status": "ONLINE" |
||||
} |
||||
], |
||||
"pools": [ |
||||
{ |
||||
"name": "HTTP_pool", |
||||
"provisioning_status": "ACTIVE", |
||||
"healthmonitor": { |
||||
"type": "HTTP", |
||||
"id": "0b608787-ea2d-48c7-89a1-8b8c24fa3b17", |
||||
"name": "HTTP_health_monitor", |
||||
"provisioning_status": "ACTIVE" |
||||
}, |
||||
"members": [ |
||||
{ |
||||
"name": "", |
||||
"provisioning_status": "ACTIVE", |
||||
"address": "192.0.2.20", |
||||
"protocol_port": 80, |
||||
"id": "3c6857f4-057a-405a-9134-bdeaa8796c8a", |
||||
"operating_status": "ERROR" |
||||
}, |
||||
{ |
||||
"name": "", |
||||
"provisioning_status": "ACTIVE", |
||||
"address": "192.0.2.21", |
||||
"protocol_port": 80, |
||||
"id": "f7495909-1706-4c91-83b4-641dab6962ac", |
||||
"operating_status": "ONLINE" |
||||
} |
||||
], |
||||
"id": "89a47f78-cf81-480b-ad74-bba4177eeb81", |
||||
"operating_status": "DEGRADED" |
||||
}, |
||||
{ |
||||
"name": "source_ip_pool", |
||||
"provisioning_status": "ACTIVE", |
||||
"healthmonitor": {}, |
||||
"members": [], |
||||
"id": "8189d6a9-646e-4d23-b742-548dab991951", |
||||
"operating_status": "ONLINE" |
||||
} |
||||
], |
||||
"id": "84faceee-cb97-48d0-93df-9e41d40d4cb4", |
||||
"operating_status": "DEGRADED" |
||||
} |
||||
} |
||||
} |
@ -0,0 +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"}' http://198.51.100.10:9876/v2.0/lbaas/loadbalancers/8b6fc468-07d5-4d8b-a0b9-695060e72c31 |
@ -0,0 +1,7 @@
|
||||
{ |
||||
"loadbalancer": { |
||||
"description": "Temporarily disabled load balancer", |
||||
"admin_state_up": false, |
||||
"name": "disabled_load_balancer" |
||||
} |
||||
} |
@ -0,0 +1,20 @@
|
||||
{ |
||||
"loadbalancer": { |
||||
"description": "Temporarily disabled load balancer", |
||||
"admin_state_up": false, |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"provisioning_status": "PENDING_UPDATE", |
||||
"flavor": "", |
||||
"vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", |
||||
"vip_address": "203.0.113.50", |
||||
"vip_network_id": "d0d217df-3958-4fbf-a3c2-8dad2908c709", |
||||
"vip_port_id": "b4ca07d1-a31e-43e2-891a-7d14f419f342", |
||||
"provider": "octavia", |
||||
"created_at": "2017-02-28T00:41:44", |
||||
"updated_at": "2017-02-28T00:43:30", |
||||
"id": "8b6fc468-07d5-4d8b-a0b9-695060e72c31", |
||||
"operating_status": "ONLINE", |
||||
"name": "disabled_load_balancer" |
||||
} |
||||
} |
@ -0,0 +1 @@
|
||||
curl -X GET -H "X-Auth-Token: <token>" http://198.51.100.10:9876/v2.0/lbaas/loadbalancers?project_id=e3cd678b11784734bc366148aa37580e |
@ -0,0 +1,32 @@
|
||||
{ |
||||
"loadbalancers": [ |
||||
{ |
||||
"description": "My favorite load balancer", |
||||
"admin_state_up": true, |
||||
"tenant_id": "e3cd678b11784734bc366148aa37580e", |
||||
"project_id": "e3cd678b11784734bc366148aa37580e", |
||||
"provisioning_status": "ACTIVE", |
||||
"flavor": "a7ae5d5a-d855-4f9a-b187-af66b53f4d04", |
||||
"vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", |
||||
"listeners": [ |
||||
{ |
||||
"id": "023f2e34-7806-443b-bfae-16c324569a3d" |
||||
} |
||||
], |
||||
"vip_address": "203.0.113.50", |
||||
"vip_network_id": "d0d217df-3958-4fbf-a3c2-8dad2908c709", |
||||
"vip_port_id": "b4ca07d1-a31e-43e2-891a-7d14f419f342", |
||||
"provider": "octavia", |
||||
"pools": [ |
||||
{ |
||||
"id": "9aa16cdc-8d18-47b9-aba9-ec044531a79f" |
||||
} |
||||
], |
||||
"created_at": "2017-02-28T00:41:44", |
||||
"updated_at": "2017-02-28T00:43:30", |
||||
"id": "607226db-27ef-4d41-ae89-f2a800e9c2db", |
||||
"operating_status": "ONLINE", |
||||
"name": "best_load_balancer" |
||||
} |
||||
] |
||||
} |
@ -0,0 +1,542 @@
|
||||
.. -*- rst -*- |
||||
|
||||
List load balancers |
||||
=================== |
||||
|
||||
.. rest_method:: GET /v2.0/lbaas/loadbalancers |
||||
|
||||
Lists all load balancers for the project. |
||||
|
||||
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`. |
||||
|
||||
Administrative users can specify a project ID that is different than their own |
||||
to list load balancers for other projects. |
||||
|
||||
The list might be empty. |
||||
|
||||
.. 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 |
||||
- project_id: project_id_query |
||||
- tenant_id: tenant_id_query |
||||
|
||||
Curl Example |
||||
------------ |
||||
|
||||
.. literalinclude:: examples/loadbalancers-list-curl |
||||
:language: bash |
||||
|
||||
Response Parameters |
||||
------------------- |
||||
|
||||
.. rest_parameters:: ../parameters.yaml |
||||
|
||||
- admin_state_up: admin_state_up |
||||
- created_at: created_at |
||||
- description: description |
||||
- flavor: flavor-id |
||||
- id: loadbalancer-id |
||||
- listeners: listeners |
||||
- loadbalancers: loadbalancers |
||||
- name: name |
||||
- operating_status: operating_status |
||||
- pools: pools_ids |
||||
- project_id: project_id |
||||
- provider: provider |
||||
- provisioning_status: provisioning_status |
||||
- tenant_id: tenant_id |
||||
- vip_address: vip_address |
||||
- vip_network_id: vip_network_id |
||||
- vip_port_id: vip_port_id |
||||
- vip_subnet_id: vip_subnet_id |
||||
|
||||
Response Example |
||||
---------------- |
||||
|
||||
.. literalinclude:: examples/loadbalancers-list-response.json |
||||
:language: javascript |
||||
|
||||
Create a load balancer |
||||
====================== |
||||
|
||||
.. rest_method:: POST /v2.0/lbaas/loadbalancers |
||||
|
||||
Creates a load balancer. |
||||
|
||||
This operation provisions a new load balancer by using the |
||||
configuration that you define in the request object. After the API |
||||
validates the request and starts the provisioning process, the API |
||||
returns a response object that contains a unique ID and the status |
||||
of provisioning the load balancer. |
||||
|
||||
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 |
||||
the provisioning operation. When the load balancer status changes |
||||
to ``ACTIVE``, the load balancer is successfully provisioned and |
||||
is ready for further configuration. |
||||
|
||||
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. |
||||
|
||||
Administrative users can specify a project ID that is different than |
||||
their own to create load balancers for other projects. |
||||
|
||||
There are three ways to specify a Virtual IP (VIP) network for the load |
||||
balancer: provide a ``vip_port_id``, supply a ``vip_subnet_id``, or provide a |
||||
``vip_network_id``. Providing a neutron port ID for the ``vip_port_id`` tells |
||||
octavia to use this port for the VIP. Some port settings may be changed or |
||||
removed as required by octavia, but the IP address will be retained. |
||||
Specifying a neutron subnet ID will tell octavia to create a neutron port |
||||
on this subnet and allocate an IP address from the subnet if the |
||||
``vip_address`` was not specified. If ``vip_address`` was specified, octavia |
||||
will attempt to allocate the ``vip_address`` from the subnet for the VIP |
||||
address. Finally, when a ``vip_network_ip`` is specified octavia will select |
||||
a subnet from the network, preferring IPv4 over IPv6 subnets. |
||||
|
||||
An optional ``flavor`` attribute can be used to create the load balancer |
||||
using a pre-configured octavia flavor. Flavors are created by the operator |
||||
to allow custom load balancer configurations, such as allocating more |
||||
memory for the load balancer. |
||||
|
||||
You can also specify the ``provider`` attribute when you create a |
||||
load balancer. The ``provider`` attribute specifies which backend should |
||||
be used to create the load balancer. This could be the default provider |
||||
(``octavia``) or a vendor supplied ``provider`` if one has been installed. |
||||
Setting both a flavor and a provider will result in a conflict error. |
||||
|
||||
.. rest_status_code:: success ../http-status.yaml |
||||
|
||||
- 201 |
||||
|
||||
.. rest_status_code:: error ../http-status.yaml |
||||
|
||||
- 400 |
||||
- 401 |
||||
- 403 |
||||
- 404 |
||||
- 500 |
||||
- 503 |
||||
|
||||
Request |
||||
------- |
||||
|
||||
.. rest_parameters:: ../parameters.yaml |
||||
|
||||
- admin_state_up: admin_state_up-default-optional |
||||
- description: description-optional |
||||
- flavor: flavor-id-optional |
||||
- listeners: listeners-optional |
||||
- loadbalancer: loadbalancer |
||||
- name: name-optional |
||||
- project_id: project_id-optional |
||||
- provider: provider-optional |
||||
- tenant_id: tenant_id |
||||
- vip_address: vip_address-optional |
||||
- vip_network_id: vip_network_id-optional |
||||
- vip_port_id: vip_port_id-optional |
||||
- vip_subnet_id: vip_subnet_id-optional |
||||
|
||||
Request Example |
||||
---------------- |
||||
|
||||
.. literalinclude:: examples/loadbalancer-create-request.json |
||||
:language: javascript |
||||
|
||||
Curl Example |
||||
------------ |
||||
|
||||
.. literalinclude:: examples/loadbalancer-create-curl |
||||
:language: bash |
||||
|
||||
Response Parameters |
||||
------------------- |
||||
|
||||
.. rest_parameters:: ../parameters.yaml |
||||
|
||||
- admin_state_up: admin_state_up |
||||
- created_at: created_at |
||||
- description: description |
||||
- flavor: flavor-id |
||||
- id: loadbalancer-id |
||||
- listeners: listeners |
||||
- loadbalancer: loadbalancer |
||||
- name: name |
||||
- operating_status: operating_status |
||||
- pools: pools_ids |
||||
- project_id: project_id |
||||
- provider: provider |
||||
- provisioning_status: provisioning_status |
||||
- tenant_id: tenant_id |
||||
- vip_address: vip_address |
||||
- vip_network_id: vip_network_id |
||||
- vip_port_id: vip_port_id |
||||
- vip_subnet_id: vip_subnet_id |
||||
|
||||
Response Example |
||||
---------------- |
||||
|
||||
.. literalinclude:: examples/loadbalancer-create-response.json |
||||
:language: javascript |
||||
|
||||
Creating a Fully Populated Load Balancer |
||||
---------------------------------------- |
||||
|
||||
You can configure all documented features of the load balancer at |
||||
creation time by specifying the additional elements or attributes |
||||
in the request. |
||||
|
||||
Request Example |
||||
--------------- |
||||
|
||||
.. literalinclude:: examples/loadbalancer-full-create-request.json |
||||
:language: javascript |
||||
|
||||
Response Example |
||||
---------------- |
||||
|
||||
.. literalinclude:: examples/loadbalancer-full-create-response.json |
||||
:language: javascript |
||||
|
||||
Show load balancer details |
||||
========================== |
||||
|
||||
.. rest_method:: GET /v2.0/lbaas/loadbalancers/{loadbalancer_id} |
||||
|
||||
Shows the details of a load balancer. |
||||
|
||||
If you are not an administrative user and the load balancer object does not |
||||
belong to your project, the service returns the HTTP ``Forbidden (403)`` |
||||
response code. |
||||
|
||||
This operation does not require a request body. |
||||
|
||||
.. rest_status_code:: success ../http-status.yaml |
||||
|
||||
- 200 |
||||
|
||||
.. rest_status_code:: error ../http-status.yaml |
||||
|
||||
- 401 |
||||
- 403 |
||||
- 404 |
||||
- 500 |
||||
|
||||
Request |
||||
------- |
||||
|
||||
.. rest_parameters:: ../parameters.yaml |
||||
|
||||
- loadbalancer_id: path-loadbalancer-id |
||||
|
||||
Curl Example |
||||
------------ |
||||
|
||||
.. literalinclude:: examples/loadbalancer-show-curl |
||||
:language: bash |
||||
|
||||
Response Parameters |
||||
------------------- |
||||
|
||||
.. rest_parameters:: ../parameters.yaml |
||||
|
||||
- admin_state_up: admin_state_up |
||||
- created_at: created_at |
||||
- description: description |
||||
- flavor: flavor-id |
||||
- id: loadbalancer-id |
||||
- loadbalancer: loadbalancer |
||||
- listeners: listeners |
||||
- name: name |
||||
- operating_status: operating_status |
||||
- pools: pools_ids |
||||
- project_id: project_id |
||||
- provider: provider |
||||
- provisioning_status: provisioning_status |
||||
- tenant_id: tenant_id |
||||
- vip_address: vip_address |
||||
- vip_network_id: vip_network_id |
||||
- vip_port_id: vip_port_id |
||||
- vip_subnet_id: vip_subnet_id |
||||
|
||||
Response Example |
||||
---------------- |
||||
|
||||
.. literalinclude:: examples/loadbalancer-show-response.json |
||||
:language: javascript |
||||
|
||||
Update a load balancer |
||||
====================== |
||||
|
||||
.. rest_method:: PUT /v2.0/lbaas/loadbalancers/{loadbalancer_id} |
||||
|
||||
Updates a load balancer. |
||||
|
||||
If the request is valid, the service returns the ``Accepted (202)`` |
||||
response code. To confirm the update, check that the load balancer |
||||
provisioning status is ``ACTIVE``. If the status is |
||||
``PENDING_UPDATE``, use a GET operation to poll the load balancer |
||||
object for changes. |
||||
|
||||
This operation returns the updated load balancer object with the |
||||
``ACTIVE``, ``PENDING_UPDATE``, or ``ERROR`` provisioning status. |
||||
|
||||
.. rest_status_code:: success ../http-status.yaml |
||||
|
||||
- 202 |
||||
|
||||
.. rest_status_code:: error ../http-status.yaml |
||||
|
||||
- 400 |
||||
- 401 |
||||
- 403 |
||||
- 404 |
||||
- 409 |
||||
- 500 |
||||
|
||||
Request |
||||
------- |
||||
|
||||
.. rest_parameters:: ../parameters.yaml |
||||
|
||||
- admin_state_up: admin_state_up-optional |
||||
- description: description-optional |
||||
- loadbalancer: loadbalancer |
||||
- loadbalancer_id: path-loadbalancer-id |
||||
- name: name-optional |
||||
|
||||
Request Example |
||||
--------------- |
||||
|
||||
.. literalinclude:: examples/loadbalancer-update-request.json |
||||
:language: javascript |
||||
|
||||
Curl Example |
||||
------------ |
||||
|
||||
.. literalinclude:: examples/loadbalancer-update-curl |
||||
:language: bash |
||||
|
||||
Response Parameters |
||||
------------------- |
||||
|
||||
.. rest_parameters:: ../parameters.yaml |
||||
|
||||
- admin_state_up: admin_state_up |
||||
- created_at: created_at |
||||
- description: description |
||||
- flavor: flavor-id |
||||
- id: loadbalancer-id |
||||
- listeners: listeners |
||||
- loadbalancer: loadbalancer |
||||
- name: name |
||||
- operating_status: operating_status |
||||
- pools: pools_ids |
||||
- project_id: project_id |
||||
- provider: provider |
||||
- provisioning_status: provisioning_status |
||||
- tenant_id: tenant_id |
||||
- vip_address: vip_address |
||||
- vip_network_id: vip_network_id |
||||
- vip_port_id: vip_port_id |
||||
- vip_subnet_id: vip_subnet_id |
||||
|
||||
Response Example |
||||
---------------- |
||||
|
||||
.. literalinclude:: examples/loadbalancer-update-response.json |
||||
:language: javascript |
||||
|
||||
Remove a load balancer |
||||
====================== |
||||
|
||||
.. rest_method:: DELETE /v2.0/lbaas/loadbalancers/{loadbalancer_id} |
||||
|
||||
Removes a load balancer and its associated configuration from the project. |
||||
|
||||
The API immediately purges any and all configuration data, depending on the |
||||
configuration settings.. You cannot recover it. |
||||
|
||||
.. rest_status_code:: success ../http-status.yaml |
||||
|
||||
- 204 |
||||
|
||||
.. rest_status_code:: error ../http-status.yaml |
||||
|
||||
- 400 |
||||
- 401 |
||||
- 403 |
||||
- 404 |
||||
- 409 |
||||
- 500 |
||||
|
||||
Request |
||||
------- |
||||
|
||||
.. rest_parameters:: ../parameters.yaml |
||||
|
||||
- loadbalancer_id: path-loadbalancer-id |
||||
|
||||
Curl Example |
||||
------------ |
||||
|
||||
.. literalinclude:: examples/loadbalancer-delete-curl |
||||
:language: bash |
||||
|
||||
Response |
||||
-------- |
||||
|
||||
There is no body content for the response of a successful DELETE request. |
||||
|
||||
Get load balancer statistics |
||||
============================ |
||||
|