Skip to content

Latest commit

 

History

History
529 lines (370 loc) · 17.8 KB

File metadata and controls

529 lines (370 loc) · 17.8 KB

kowabunga.SubnetApi

All URIs are relative to https://raw.githubusercontent.com/api/v1

Method HTTP request Description
create_adapter POST /subnet/{subnetId}/adapter
delete_subnet DELETE /subnet/{subnetId}
list_subnet_adapters GET /subnet/{subnetId}/adapters
list_subnets GET /subnet
read_subnet GET /subnet/{subnetId}
update_subnet PUT /subnet/{subnetId}

create_adapter

Adapter create_adapter(subnet_id, adapter, assign_ip=assign_ip)

Creates a new network adapter.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.models.adapter import Adapter
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = kowabunga.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kowabunga.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kowabunga.SubnetApi(api_client)
    subnet_id = 'subnet_id_example' # str | The ID of the network subnet.
    adapter = kowabunga.Adapter() # Adapter | Adapter payload.
    assign_ip = True # bool | Whether Kowabunga should pick and assign an IP address to this adapter. (optional)

    try:
        api_response = api_instance.create_adapter(subnet_id, adapter, assign_ip=assign_ip)
        print("The response of SubnetApi->create_adapter:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SubnetApi->create_adapter: %s\n" % e)

Parameters

Name Type Description Notes
subnet_id str The ID of the network subnet.
adapter Adapter Adapter payload.
assign_ip bool Whether Kowabunga should pick and assign an IP address to this adapter. [optional]

Return type

Adapter

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Returns the newly created network adapter object. -
400 BadRequest error: Bad request (wrong input parameters). -
401 Unauthorized error: Unauthorized resource access (wrong auth/credentials). -
403 Forbidden error: Forbidden resource access (restricted access control). -
404 NotFound error: Specified resource does not exist. -
409 Conflict error: A similar resource already exists or resource is still being referenced somewhere. -
422 UnprocessableEntity error: Server can't process request. -
507 InsufficientResource error: Server can't allocate resources (logical quotas or physical limits hit). -

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

delete_subnet

delete_subnet(subnet_id)

Deletes an existing network subnet.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = kowabunga.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kowabunga.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kowabunga.SubnetApi(api_client)
    subnet_id = 'subnet_id_example' # str | The ID of the network subnet.

    try:
        api_instance.delete_subnet(subnet_id)
    except Exception as e:
        print("Exception when calling SubnetApi->delete_subnet: %s\n" % e)

Parameters

Name Type Description Notes
subnet_id str The ID of the network subnet.

Return type

void (empty response body)

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The network subnet has been successfully removed. -
401 Unauthorized error: Unauthorized resource access (wrong auth/credentials). -
403 Forbidden error: Forbidden resource access (restricted access control). -
404 NotFound error: Specified resource does not exist. -
409 Conflict error: A similar resource already exists or resource is still being referenced somewhere. -
422 UnprocessableEntity error: Server can't process request. -

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

list_subnet_adapters

List[str] list_subnet_adapters(subnet_id)

Returns the IDs of network adapter objects.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = kowabunga.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kowabunga.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kowabunga.SubnetApi(api_client)
    subnet_id = 'subnet_id_example' # str | The ID of the network subnet.

    try:
        api_response = api_instance.list_subnet_adapters(subnet_id)
        print("The response of SubnetApi->list_subnet_adapters:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SubnetApi->list_subnet_adapters: %s\n" % e)

Parameters

Name Type Description Notes
subnet_id str The ID of the network subnet.

Return type

List[str]

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Returns an array of network adapter IDs. -
401 Unauthorized error: Unauthorized resource access (wrong auth/credentials). -
403 Forbidden error: Forbidden resource access (restricted access control). -
404 NotFound error: Specified resource does not exist. -

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

list_subnets

List[str] list_subnets()

Returns the IDs of network subnet objects.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = kowabunga.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kowabunga.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kowabunga.SubnetApi(api_client)

    try:
        api_response = api_instance.list_subnets()
        print("The response of SubnetApi->list_subnets:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SubnetApi->list_subnets: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[str]

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Returns an array of network subnet IDs. -
401 Unauthorized error: Unauthorized resource access (wrong auth/credentials). -
403 Forbidden error: Forbidden resource access (restricted access control). -

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

read_subnet

Subnet read_subnet(subnet_id)

Returns a network subnet.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.models.subnet import Subnet
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = kowabunga.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kowabunga.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kowabunga.SubnetApi(api_client)
    subnet_id = 'subnet_id_example' # str | The ID of the network subnet.

    try:
        api_response = api_instance.read_subnet(subnet_id)
        print("The response of SubnetApi->read_subnet:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SubnetApi->read_subnet: %s\n" % e)

Parameters

Name Type Description Notes
subnet_id str The ID of the network subnet.

Return type

Subnet

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Returns the network subnet object. -
401 Unauthorized error: Unauthorized resource access (wrong auth/credentials). -
403 Forbidden error: Forbidden resource access (restricted access control). -
404 NotFound error: Specified resource does not exist. -

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

update_subnet

Subnet update_subnet(subnet_id, subnet)

Updates a network subnet configuration.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.models.subnet import Subnet
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = kowabunga.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kowabunga.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kowabunga.SubnetApi(api_client)
    subnet_id = 'subnet_id_example' # str | The ID of the network subnet.
    subnet = kowabunga.Subnet() # Subnet | Subnet payload.

    try:
        api_response = api_instance.update_subnet(subnet_id, subnet)
        print("The response of SubnetApi->update_subnet:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SubnetApi->update_subnet: %s\n" % e)

Parameters

Name Type Description Notes
subnet_id str The ID of the network subnet.
subnet Subnet Subnet payload.

Return type

Subnet

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Returns the network subnet object. -
400 BadRequest error: Bad request (wrong input parameters). -
401 Unauthorized error: Unauthorized resource access (wrong auth/credentials). -
403 Forbidden error: Forbidden resource access (restricted access control). -
404 NotFound error: Specified resource does not exist. -
422 UnprocessableEntity error: Server can't process request. -
507 InsufficientResource error: Server can't allocate resources (logical quotas or physical limits hit). -

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