Skip to content

Latest commit

 

History

History
298 lines (215 loc) · 11.7 KB

RingApi.md

File metadata and controls

298 lines (215 loc) · 11.7 KB

swagger_client.RingApi

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

create_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.

Example

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)

Parameters

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]

Return type

Ring

Authorization

basic_auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_ring

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.

Example

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)

Parameters

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]

Return type

void (empty response body)

Authorization

basic_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_ring

InlineResponse20061 get_ring(name, transaction_id=transaction_id)

Return a ring

Returns one ring configuration by it's name.

Example

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)

Parameters

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]

Return type

InlineResponse20061

Authorization

basic_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_rings

InlineResponse20060 get_rings(transaction_id=transaction_id)

Return an array of rings

Returns an array of all configured rings.

Example

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)

Parameters

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]

Return type

InlineResponse20060

Authorization

basic_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

replace_ring

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.

Example

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)

Parameters

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]

Return type

Ring

Authorization

basic_auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]