Skip to content

Latest commit

 

History

History
698 lines (487 loc) · 23.6 KB

File metadata and controls

698 lines (487 loc) · 23.6 KB

kowabunga.PoolApi

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

Method HTTP request Description
create_template POST /pool/{poolId}/template
delete_storage_pool DELETE /pool/{poolId}
list_storage_pool_templates GET /pool/{poolId}/templates
list_storage_pool_volumes GET /pool/{poolId}/volumes
list_storage_pools GET /pool
read_storage_pool GET /pool/{poolId}
set_storage_pool_default_template PATCH /pool/{poolId}/template/{templateId}/default
update_storage_pool PUT /pool/{poolId}

create_template

Template create_template(pool_id, template)

Creates a new image template.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.models.template import Template
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.PoolApi(api_client)
    pool_id = 'pool_id_example' # str | The ID of the storage pool.
    template = kowabunga.Template() # Template | Template payload.

    try:
        api_response = api_instance.create_template(pool_id, template)
        print("The response of PoolApi->create_template:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling PoolApi->create_template: %s\n" % e)

Parameters

Name Type Description Notes
pool_id str The ID of the storage pool.
template Template Template payload.

Return type

Template

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 image template 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_storage_pool

delete_storage_pool(pool_id)

Deletes an existing storage pool.

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.PoolApi(api_client)
    pool_id = 'pool_id_example' # str | The ID of the storage pool.

    try:
        api_instance.delete_storage_pool(pool_id)
    except Exception as e:
        print("Exception when calling PoolApi->delete_storage_pool: %s\n" % e)

Parameters

Name Type Description Notes
pool_id str The ID of the storage pool.

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 storage pool 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_storage_pool_templates

List[str] list_storage_pool_templates(pool_id)

Returns the IDs of image template 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.PoolApi(api_client)
    pool_id = 'pool_id_example' # str | The ID of the storage pool.

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

Parameters

Name Type Description Notes
pool_id str The ID of the storage pool.

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 image template 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_storage_pool_volumes

List[str] list_storage_pool_volumes(pool_id)

Returns the IDs of storage volume 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.PoolApi(api_client)
    pool_id = 'pool_id_example' # str | The ID of the storage pool.

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

Parameters

Name Type Description Notes
pool_id str The ID of the storage pool.

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 storage volume 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_storage_pools

List[str] list_storage_pools()

Returns the IDs of storage pool 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.PoolApi(api_client)

    try:
        api_response = api_instance.list_storage_pools()
        print("The response of PoolApi->list_storage_pools:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling PoolApi->list_storage_pools: %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 storage pool 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_storage_pool

StoragePool read_storage_pool(pool_id)

Returns a storage pool.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.models.storage_pool import StoragePool
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.PoolApi(api_client)
    pool_id = 'pool_id_example' # str | The ID of the storage pool.

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

Parameters

Name Type Description Notes
pool_id str The ID of the storage pool.

Return type

StoragePool

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Returns the storage pool 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]

set_storage_pool_default_template

set_storage_pool_default_template(pool_id, template_id)

Performs a storage pool setting of default template.

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.PoolApi(api_client)
    pool_id = 'pool_id_example' # str | The ID of the storage pool.
    template_id = 'template_id_example' # str | The ID of the image template.

    try:
        api_instance.set_storage_pool_default_template(pool_id, template_id)
    except Exception as e:
        print("Exception when calling PoolApi->set_storage_pool_default_template: %s\n" % e)

Parameters

Name Type Description Notes
pool_id str The ID of the storage pool.
template_id str The ID of the image template.

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 storage pool setting of default template is successful. -
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. -

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

update_storage_pool

StoragePool update_storage_pool(pool_id, storage_pool)

Updates a storage pool configuration.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.models.storage_pool import StoragePool
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.PoolApi(api_client)
    pool_id = 'pool_id_example' # str | The ID of the storage pool.
    storage_pool = kowabunga.StoragePool() # StoragePool | StoragePool payload.

    try:
        api_response = api_instance.update_storage_pool(pool_id, storage_pool)
        print("The response of PoolApi->update_storage_pool:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling PoolApi->update_storage_pool: %s\n" % e)

Parameters

Name Type Description Notes
pool_id str The ID of the storage pool.
storage_pool StoragePool StoragePool payload.

Return type

StoragePool

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Returns the storage pool 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]