All URIs are relative to http://0.0.0.0/v2
Method | HTTP request | Description |
---|---|---|
create_ring | POST /services/haproxy/configuration/rings | Add a ring |
delete_ring | DELETE /services/haproxy/configuration/rings/{name} | Delete a ring |
get_ring | GET /services/haproxy/configuration/rings/{name} | Return a ring |
get_rings | GET /services/haproxy/configuration/rings | Return an array of rings |
replace_ring | PUT /services/haproxy/configuration/rings/{name} | Replace a ring |
Ring create_ring(body, transaction_id=transaction_id, version=version, force_reload=force_reload)
Add a ring
Adds a new ring to the configuration file.
from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = dataplaneapi.RingApi(dataplaneapi.ApiClient(configuration))
body = dataplaneapi.Ring() # Ring |
transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)
version = 56 # int | Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. (optional)
force_reload = false # bool | If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. (optional) (default to false)
try:
# Add a ring
api_response = api_instance.create_ring(body, transaction_id=transaction_id, version=version, force_reload=force_reload)
pprint(api_response)
except ApiException as e:
print("Exception when calling RingApi->create_ring: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | Ring | ||
transaction_id | str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. | [optional] |
version | int | Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. | [optional] |
force_reload | bool | If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. | [optional] [default to false] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_ring(name, transaction_id=transaction_id, version=version, force_reload=force_reload)
Delete a ring
Deletes a ring from the configuration by it's name.
from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = dataplaneapi.RingApi(dataplaneapi.ApiClient(configuration))
name = 'name_example' # str | Ring name
transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)
version = 56 # int | Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. (optional)
force_reload = false # bool | If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. (optional) (default to false)
try:
# Delete a ring
api_instance.delete_ring(name, transaction_id=transaction_id, version=version, force_reload=force_reload)
except ApiException as e:
print("Exception when calling RingApi->delete_ring: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | Ring name | |
transaction_id | str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. | [optional] |
version | int | Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. | [optional] |
force_reload | bool | If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. | [optional] [default to false] |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse20061 get_ring(name, transaction_id=transaction_id)
Return a ring
Returns one ring configuration by it's name.
from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = dataplaneapi.RingApi(dataplaneapi.ApiClient(configuration))
name = 'name_example' # str | Ring name
transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)
try:
# Return a ring
api_response = api_instance.get_ring(name, transaction_id=transaction_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling RingApi->get_ring: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | Ring name | |
transaction_id | str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse20060 get_rings(transaction_id=transaction_id)
Return an array of rings
Returns an array of all configured rings.
from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = dataplaneapi.RingApi(dataplaneapi.ApiClient(configuration))
transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)
try:
# Return an array of rings
api_response = api_instance.get_rings(transaction_id=transaction_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling RingApi->get_rings: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
transaction_id | str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Ring replace_ring(body, name, transaction_id=transaction_id, version=version, force_reload=force_reload)
Replace a ring
Replaces a ring configuration by it's name.
from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = dataplaneapi.RingApi(dataplaneapi.ApiClient(configuration))
body = dataplaneapi.Ring() # Ring |
name = 'name_example' # str | Ring name
transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)
version = 56 # int | Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. (optional)
force_reload = false # bool | If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. (optional) (default to false)
try:
# Replace a ring
api_response = api_instance.replace_ring(body, name, transaction_id=transaction_id, version=version, force_reload=force_reload)
pprint(api_response)
except ApiException as e:
print("Exception when calling RingApi->replace_ring: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | Ring | ||
name | str | Ring name | |
transaction_id | str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. | [optional] |
version | int | Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. | [optional] |
force_reload | bool | If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. | [optional] [default to false] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]