- Python 99.9%
- Shell 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| .openapi-generator | ||
| docs | ||
| garage_admin_sdk | ||
| test | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .openapi-generator-ignore | ||
| .travis.yml | ||
| git_push.sh | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
| setup.cfg | ||
| setup.py | ||
| test-requirements.txt | ||
| tox.ini | ||
garage-admin-sdk-python
Administrate your Garage cluster programmatically, including status, layout, keys, buckets, and maintenance tasks.
Disclaimer: This API may change in future Garage versions. Read the changelog and upgrade your scripts before upgrading. Additionally, this specification is early stage and can contain bugs, so be careful and please report any issues on our issue tracker.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: v2.3.0
- Package version: 2.1.0.1
- Generator version: 7.18.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://garagehq.deuxfleurs.fr/
Requirements.
Python 3.9+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-python.git
(you may need to run pip with root permission: sudo pip install git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-python.git)
Then import the package:
import garage_admin_sdk
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import garage_admin_sdk
Tests
Execute pytest to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import garage_admin_sdk
from garage_admin_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3903
# See configuration.py for a list of all supported configuration parameters.
configuration = garage_admin_sdk.Configuration(
host = "http://localhost:3903"
)
# 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 Bearer authorization: bearerAuth
configuration = garage_admin_sdk.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = garage_admin_sdk.AccessKeyApi(api_client)
body = garage_admin_sdk.UpdateKeyRequestBody() # UpdateKeyRequestBody |
try:
api_response = api_instance.create_key(body)
print("The response of AccessKeyApi->create_key:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling AccessKeyApi->create_key: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to http://localhost:3903
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AccessKeyApi | create_key | POST /v2/CreateKey | |
| AccessKeyApi | delete_key | POST /v2/DeleteKey | |
| AccessKeyApi | get_key_info | GET /v2/GetKeyInfo | |
| AccessKeyApi | import_key | POST /v2/ImportKey | |
| AccessKeyApi | list_keys | GET /v2/ListKeys | |
| AccessKeyApi | update_key | POST /v2/UpdateKey | |
| AdminAPITokenApi | create_admin_token | POST /v2/CreateAdminToken | |
| AdminAPITokenApi | delete_admin_token | POST /v2/DeleteAdminToken | |
| AdminAPITokenApi | get_admin_token_info | GET /v2/GetAdminTokenInfo | |
| AdminAPITokenApi | get_current_admin_token_info | GET /v2/GetCurrentAdminTokenInfo | |
| AdminAPITokenApi | list_admin_tokens | GET /v2/ListAdminTokens | |
| AdminAPITokenApi | update_admin_token | POST /v2/UpdateAdminToken | |
| BlockApi | get_block_info | POST /v2/GetBlockInfo | |
| BlockApi | list_block_errors | GET /v2/ListBlockErrors | |
| BlockApi | purge_blocks | POST /v2/PurgeBlocks | |
| BlockApi | retry_block_resync | POST /v2/RetryBlockResync | |
| BucketApi | cleanup_incomplete_uploads | POST /v2/CleanupIncompleteUploads | |
| BucketApi | create_bucket | POST /v2/CreateBucket | |
| BucketApi | delete_bucket | POST /v2/DeleteBucket | |
| BucketApi | get_bucket_info | GET /v2/GetBucketInfo | |
| BucketApi | inspect_object | GET /v2/InspectObject | |
| BucketApi | list_buckets | GET /v2/ListBuckets | |
| BucketApi | update_bucket | POST /v2/UpdateBucket | |
| BucketAliasApi | add_bucket_alias | POST /v2/AddBucketAlias | |
| BucketAliasApi | remove_bucket_alias | POST /v2/RemoveBucketAlias | |
| ClusterApi | connect_cluster_nodes | POST /v2/ConnectClusterNodes | |
| ClusterApi | get_cluster_health | GET /v2/GetClusterHealth | |
| ClusterApi | get_cluster_statistics | GET /v2/GetClusterStatistics | |
| ClusterApi | get_cluster_status | GET /v2/GetClusterStatus | |
| ClusterLayoutApi | apply_cluster_layout | POST /v2/ApplyClusterLayout | |
| ClusterLayoutApi | cluster_layout_skip_dead_nodes | POST /v2/ClusterLayoutSkipDeadNodes | |
| ClusterLayoutApi | get_cluster_layout | GET /v2/GetClusterLayout | |
| ClusterLayoutApi | get_cluster_layout_history | GET /v2/GetClusterLayoutHistory | |
| ClusterLayoutApi | preview_cluster_layout_changes | POST /v2/PreviewClusterLayoutChanges | |
| ClusterLayoutApi | revert_cluster_layout | POST /v2/RevertClusterLayout | |
| ClusterLayoutApi | update_cluster_layout | POST /v2/UpdateClusterLayout | |
| NodeApi | create_metadata_snapshot | POST /v2/CreateMetadataSnapshot | |
| NodeApi | get_node_info | GET /v2/GetNodeInfo | |
| NodeApi | get_node_statistics | GET /v2/GetNodeStatistics | |
| NodeApi | launch_repair_operation | POST /v2/LaunchRepairOperation | |
| PermissionApi | allow_bucket_key | POST /v2/AllowBucketKey | |
| PermissionApi | deny_bucket_key | POST /v2/DenyBucketKey | |
| SpecialEndpointsApi | check_domain | GET /check | |
| SpecialEndpointsApi | health | GET /health | |
| SpecialEndpointsApi | metrics | GET /metrics | |
| WorkerApi | get_worker_info | POST /v2/GetWorkerInfo | |
| WorkerApi | get_worker_variable | POST /v2/GetWorkerVariable | |
| WorkerApi | list_workers | POST /v2/ListWorkers | |
| WorkerApi | set_worker_variable | POST /v2/SetWorkerVariable |
Documentation For Models
- ApiBucketKeyPerm
- ApiBucketQuotas
- ApplyClusterLayoutRequest
- ApplyClusterLayoutResponse
- BlockError
- BlockVersion
- BlockVersionBacklink
- BlockVersionBacklinkOneOf
- BlockVersionBacklinkOneOf1
- BlockVersionBacklinkOneOf1Upload
- BlockVersionBacklinkOneOfObject
- BucketAliasEnum
- BucketAliasEnumOneOf
- BucketAliasEnumOneOf1
- BucketKeyPermChangeRequest
- BucketLocalAlias
- CleanupIncompleteUploadsRequest
- CleanupIncompleteUploadsResponse
- ClusterLayoutSkipDeadNodesRequest
- ClusterLayoutSkipDeadNodesResponse
- ClusterLayoutVersion
- ClusterLayoutVersionStatus
- ConnectNodeResponse
- CorsRule
- CreateAdminTokenResponse
- CreateBucketLocalAlias
- CreateBucketRequest
- FreeSpaceResp
- GetAdminTokenInfoResponse
- GetBucketInfoKey
- GetBucketInfoResponse
- GetBucketInfoWebsiteResponse
- GetClusterHealthResponse
- GetClusterLayoutHistoryResponse
- GetClusterLayoutResponse
- GetClusterStatisticsResponse
- GetClusterStatusResponse
- GetKeyInfoResponse
- ImportKeyRequest
- InspectObjectBlock
- InspectObjectResponse
- InspectObjectVersion
- KeyInfoBucketResponse
- KeyPerm
- LayoutNodeRole
- LayoutParameters
- LifecycleAbortIncompleteMpu
- LifecycleExpiration
- LifecycleFilter
- LifecycleRule
- ListBucketsResponseItem
- ListKeysResponseItem
- LocalGetBlockInfoRequest
- LocalGetBlockInfoResponse
- LocalGetNodeInfoResponse
- LocalGetNodeStatisticsResponse
- LocalGetWorkerInfoRequest
- LocalGetWorkerVariableRequest
- LocalLaunchRepairOperationRequest
- LocalListWorkersRequest
- LocalPurgeBlocksResponse
- LocalRetryBlockResyncRequest
- LocalRetryBlockResyncRequestOneOf
- LocalRetryBlockResyncRequestOneOf1
- LocalRetryBlockResyncResponse
- LocalSetWorkerVariableRequest
- LocalSetWorkerVariableResponse
- MultiResponseLocalCreateMetadataSnapshotResponse
- MultiResponseLocalGetBlockInfoResponse
- MultiResponseLocalGetBlockInfoResponseSuccessValue
- MultiResponseLocalGetNodeInfoResponse
- MultiResponseLocalGetNodeInfoResponseSuccessValue
- MultiResponseLocalGetNodeStatisticsResponse
- MultiResponseLocalGetNodeStatisticsResponseSuccessValue
- MultiResponseLocalGetWorkerInfoResponse
- MultiResponseLocalGetWorkerVariableResponse
- MultiResponseLocalLaunchRepairOperationResponse
- MultiResponseLocalListBlockErrorsResponse
- MultiResponseLocalListWorkersResponse
- MultiResponseLocalPurgeBlocksResponse
- MultiResponseLocalPurgeBlocksResponseSuccessValue
- MultiResponseLocalRetryBlockResyncResponse
- MultiResponseLocalRetryBlockResyncResponseSuccessValue
- MultiResponseLocalSetWorkerVariableResponse
- MultiResponseLocalSetWorkerVariableResponseSuccessValue
- NodeAssignedRole
- NodeBlockManagerStats
- NodeResp
- NodeRoleChange
- NodeRoleChangeEnum
- NodeRoleChangeEnumOneOf
- NodeRoleChangeRequest
- NodeRoleChangeRequestOneOf
- NodeRoleChangeRequestOneOf1
- NodeTableStats
- NodeUpdateTrackers
- PreviewClusterLayoutChangesResponse
- PreviewClusterLayoutChangesResponseOneOf
- PreviewClusterLayoutChangesResponseOneOf1
- RepairType
- RepairTypeOneOf
- ScrubCommand
- UpdateAdminTokenRequestBody
- UpdateBucketRequestBody
- UpdateBucketWebsiteAccess
- UpdateClusterLayoutRequest
- UpdateKeyRequestBody
- WebsiteCondition
- WebsiteRedirect
- WebsiteRoutingRule
- WorkerInfoResp
- WorkerLastError
- WorkerStateResp
- WorkerStateRespOneOf
- WorkerStateRespOneOfThrottled
- ZoneRedundancy
- ZoneRedundancyOneOf
Documentation For Authorization
Authentication schemes defined for the API:
bearerAuth
- Type: Bearer authentication