Merge pull request 'api-v1, javascript' (#1) from v0.9.x into main

Reviewed-on: #1
This commit is contained in:
Quentin 2023-11-28 15:36:32 +00:00
commit 271b951449
63 changed files with 1602 additions and 558 deletions

View file

@ -6,6 +6,7 @@ docs/AddKeyRequest.md
docs/AddNode200ResponseInner.md docs/AddNode200ResponseInner.md
docs/AllowBucketKeyRequest.md docs/AllowBucketKeyRequest.md
docs/AllowBucketKeyRequestPermissions.md docs/AllowBucketKeyRequestPermissions.md
docs/ApplyLayout200Response.md
docs/BucketApi.md docs/BucketApi.md
docs/BucketInfo.md docs/BucketInfo.md
docs/BucketInfoQuotas.md docs/BucketInfoQuotas.md
@ -15,6 +16,7 @@ docs/ClusterLayout.md
docs/CreateBucketRequest.md docs/CreateBucketRequest.md
docs/CreateBucketRequestLocalAlias.md docs/CreateBucketRequestLocalAlias.md
docs/CreateBucketRequestLocalAliasAllow.md docs/CreateBucketRequestLocalAliasAllow.md
docs/GetHealth200Response.md
docs/GetNodes200Response.md docs/GetNodes200Response.md
docs/ImportKeyRequest.md docs/ImportKeyRequest.md
docs/KeyApi.md docs/KeyApi.md
@ -29,6 +31,9 @@ docs/ListBuckets200ResponseInnerLocalAliasesInner.md
docs/ListKeys200ResponseInner.md docs/ListKeys200ResponseInner.md
docs/NodeClusterInfo.md docs/NodeClusterInfo.md
docs/NodeNetworkInfo.md docs/NodeNetworkInfo.md
docs/NodeRoleChange.md
docs/NodeRoleRemove.md
docs/NodeRoleUpdate.md
docs/NodesApi.md docs/NodesApi.md
docs/UpdateBucketRequest.md docs/UpdateBucketRequest.md
docs/UpdateBucketRequestQuotas.md docs/UpdateBucketRequestQuotas.md
@ -49,6 +54,7 @@ src/model/AddKeyRequest.js
src/model/AddNode200ResponseInner.js src/model/AddNode200ResponseInner.js
src/model/AllowBucketKeyRequest.js src/model/AllowBucketKeyRequest.js
src/model/AllowBucketKeyRequestPermissions.js src/model/AllowBucketKeyRequestPermissions.js
src/model/ApplyLayout200Response.js
src/model/BucketInfo.js src/model/BucketInfo.js
src/model/BucketInfoQuotas.js src/model/BucketInfoQuotas.js
src/model/BucketInfoWebsiteConfig.js src/model/BucketInfoWebsiteConfig.js
@ -57,6 +63,7 @@ src/model/ClusterLayout.js
src/model/CreateBucketRequest.js src/model/CreateBucketRequest.js
src/model/CreateBucketRequestLocalAlias.js src/model/CreateBucketRequestLocalAlias.js
src/model/CreateBucketRequestLocalAliasAllow.js src/model/CreateBucketRequestLocalAliasAllow.js
src/model/GetHealth200Response.js
src/model/GetNodes200Response.js src/model/GetNodes200Response.js
src/model/ImportKeyRequest.js src/model/ImportKeyRequest.js
src/model/KeyInfo.js src/model/KeyInfo.js
@ -69,9 +76,13 @@ src/model/ListBuckets200ResponseInnerLocalAliasesInner.js
src/model/ListKeys200ResponseInner.js src/model/ListKeys200ResponseInner.js
src/model/NodeClusterInfo.js src/model/NodeClusterInfo.js
src/model/NodeNetworkInfo.js src/model/NodeNetworkInfo.js
src/model/NodeRoleChange.js
src/model/NodeRoleRemove.js
src/model/NodeRoleUpdate.js
src/model/UpdateBucketRequest.js src/model/UpdateBucketRequest.js
src/model/UpdateBucketRequestQuotas.js src/model/UpdateBucketRequestQuotas.js
src/model/UpdateBucketRequestWebsiteAccess.js src/model/UpdateBucketRequestWebsiteAccess.js
src/model/UpdateKeyRequest.js src/model/UpdateKeyRequest.js
src/model/UpdateKeyRequestAllow.js src/model/UpdateKeyRequestAllow.js
src/model/UpdateKeyRequestDeny.js src/model/UpdateKeyRequestDeny.js
test/model/GetHealth200Response.spec.js

View file

@ -1,14 +1,14 @@
# garage_administration_api_v0garage_v0_8_0 # garage_administration_api_v0garage_v0_9_0
garage - JavaScript client for garage_administration_api_v0garage_v0_8_0 garage - JavaScript client for garage_administration_api_v0garage_v0_9_0
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks.
*Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: v0.8.0 - API version: v0.9.0
- Package version: v0.8.0 - Package version: v0.9.0
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen - Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
## Installation ## Installation
@ -22,7 +22,7 @@ To publish the library as a [npm](https://www.npmjs.com/), please follow the pro
Then install it via: Then install it via:
```shell ```shell
npm install garage_administration_api_v0garage_v0_8_0 --save npm install garage_administration_api_v0garage_v0_9_0 --save
``` ```
Finally, you need to build the module: Finally, you need to build the module:
@ -45,7 +45,7 @@ Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the follow
npm link npm link
``` ```
To use the link you just defined in your project, switch to the directory you want to use your garage_administration_api_v0garage_v0_8_0 from, and run: To use the link you just defined in your project, switch to the directory you want to use your garage_administration_api_v0garage_v0_9_0 from, and run:
```shell ```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR> npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
@ -101,7 +101,7 @@ module: {
Please follow the [installation](#installation) instruction and execute the following JS code: Please follow the [installation](#installation) instruction and execute the following JS code:
```javascript ```javascript
var garage = require('garage_administration_api_v0garage_v0_8_0'); var garage = require('garage_administration_api_v0garage_v0_9_0');
var defaultClient = garage.ApiClient.instance; var defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
@ -121,35 +121,34 @@ api.allowBucketKey(allowBucketKeyRequest).then(function(data) {
## Documentation for API Endpoints ## Documentation for API Endpoints
All URIs are relative to *http://localhost:3903/v0* All URIs are relative to *http://localhost:3903/v1*
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
*garage.BucketApi* | [**allowBucketKey**](docs/BucketApi.md#allowBucketKey) | **POST** /bucket/allow | Allow key *garage.BucketApi* | [**allowBucketKey**](docs/BucketApi.md#allowBucketKey) | **POST** /bucket/allow | Allow key
*garage.BucketApi* | [**createBucket**](docs/BucketApi.md#createBucket) | **POST** /bucket | Create a bucket *garage.BucketApi* | [**createBucket**](docs/BucketApi.md#createBucket) | **POST** /bucket | Create a bucket
*garage.BucketApi* | [**deleteBucket**](docs/BucketApi.md#deleteBucket) | **DELETE** /bucket?id&#x3D;{bucket_id} | Delete a bucket *garage.BucketApi* | [**deleteBucket**](docs/BucketApi.md#deleteBucket) | **DELETE** /bucket | Delete a bucket
*garage.BucketApi* | [**deleteBucketGlobalAlias**](docs/BucketApi.md#deleteBucketGlobalAlias) | **DELETE** /bucket/alias/global | Delete a global alias *garage.BucketApi* | [**deleteBucketGlobalAlias**](docs/BucketApi.md#deleteBucketGlobalAlias) | **DELETE** /bucket/alias/global | Delete a global alias
*garage.BucketApi* | [**deleteBucketLocalAlias**](docs/BucketApi.md#deleteBucketLocalAlias) | **DELETE** /bucket/alias/local | Delete a local alias *garage.BucketApi* | [**deleteBucketLocalAlias**](docs/BucketApi.md#deleteBucketLocalAlias) | **DELETE** /bucket/alias/local | Delete a local alias
*garage.BucketApi* | [**denyBucketKey**](docs/BucketApi.md#denyBucketKey) | **POST** /bucket/deny | Deny key *garage.BucketApi* | [**denyBucketKey**](docs/BucketApi.md#denyBucketKey) | **POST** /bucket/deny | Deny key
*garage.BucketApi* | [**findBucketInfo**](docs/BucketApi.md#findBucketInfo) | **GET** /bucket?globalAlias&#x3D;{alias} | Find a bucket *garage.BucketApi* | [**getBucketInfo**](docs/BucketApi.md#getBucketInfo) | **GET** /bucket | Get a bucket
*garage.BucketApi* | [**getBucketInfo**](docs/BucketApi.md#getBucketInfo) | **GET** /bucket?id&#x3D;{bucket_id} | Get a bucket *garage.BucketApi* | [**listBuckets**](docs/BucketApi.md#listBuckets) | **GET** /bucket?list | List all buckets
*garage.BucketApi* | [**listBuckets**](docs/BucketApi.md#listBuckets) | **GET** /bucket | List all buckets
*garage.BucketApi* | [**putBucketGlobalAlias**](docs/BucketApi.md#putBucketGlobalAlias) | **PUT** /bucket/alias/global | Add a global alias *garage.BucketApi* | [**putBucketGlobalAlias**](docs/BucketApi.md#putBucketGlobalAlias) | **PUT** /bucket/alias/global | Add a global alias
*garage.BucketApi* | [**putBucketLocalAlias**](docs/BucketApi.md#putBucketLocalAlias) | **PUT** /bucket/alias/local | Add a local alias *garage.BucketApi* | [**putBucketLocalAlias**](docs/BucketApi.md#putBucketLocalAlias) | **PUT** /bucket/alias/local | Add a local alias
*garage.BucketApi* | [**updateBucket**](docs/BucketApi.md#updateBucket) | **PUT** /bucket?id&#x3D;{bucket_id} | Update a bucket *garage.BucketApi* | [**updateBucket**](docs/BucketApi.md#updateBucket) | **PUT** /bucket | Update a bucket
*garage.KeyApi* | [**addKey**](docs/KeyApi.md#addKey) | **POST** /key | Create a new API key *garage.KeyApi* | [**addKey**](docs/KeyApi.md#addKey) | **POST** /key?list | Create a new API key
*garage.KeyApi* | [**deleteKey**](docs/KeyApi.md#deleteKey) | **DELETE** /key?id&#x3D;{access_key} | Delete a key *garage.KeyApi* | [**deleteKey**](docs/KeyApi.md#deleteKey) | **DELETE** /key | Delete a key
*garage.KeyApi* | [**getKey**](docs/KeyApi.md#getKey) | **GET** /key?id&#x3D;{access_key} | Get key information *garage.KeyApi* | [**getKey**](docs/KeyApi.md#getKey) | **GET** /key | Get key information
*garage.KeyApi* | [**importKey**](docs/KeyApi.md#importKey) | **POST** /key/import | Import an existing key *garage.KeyApi* | [**importKey**](docs/KeyApi.md#importKey) | **POST** /key/import | Import an existing key
*garage.KeyApi* | [**listKeys**](docs/KeyApi.md#listKeys) | **GET** /key | List all keys *garage.KeyApi* | [**listKeys**](docs/KeyApi.md#listKeys) | **GET** /key?list | List all keys
*garage.KeyApi* | [**searchKey**](docs/KeyApi.md#searchKey) | **GET** /key?search&#x3D;{pattern} | Select key by pattern *garage.KeyApi* | [**updateKey**](docs/KeyApi.md#updateKey) | **POST** /key | Update a key
*garage.KeyApi* | [**updateKey**](docs/KeyApi.md#updateKey) | **POST** /key?id&#x3D;{access_key} | Update a key
*garage.LayoutApi* | [**addLayout**](docs/LayoutApi.md#addLayout) | **POST** /layout | Send modifications to the cluster layout *garage.LayoutApi* | [**addLayout**](docs/LayoutApi.md#addLayout) | **POST** /layout | Send modifications to the cluster layout
*garage.LayoutApi* | [**applyLayout**](docs/LayoutApi.md#applyLayout) | **POST** /layout/apply | Apply staged layout *garage.LayoutApi* | [**applyLayout**](docs/LayoutApi.md#applyLayout) | **POST** /layout/apply | Apply staged layout
*garage.LayoutApi* | [**getLayout**](docs/LayoutApi.md#getLayout) | **GET** /layout | Details on the current and staged layout *garage.LayoutApi* | [**getLayout**](docs/LayoutApi.md#getLayout) | **GET** /layout | Details on the current and staged layout
*garage.LayoutApi* | [**revertLayout**](docs/LayoutApi.md#revertLayout) | **POST** /layout/revert | Clear staged layout *garage.LayoutApi* | [**revertLayout**](docs/LayoutApi.md#revertLayout) | **POST** /layout/revert | Clear staged layout
*garage.NodesApi* | [**addNode**](docs/NodesApi.md#addNode) | **POST** /connect | Connect target node to other Garage nodes *garage.NodesApi* | [**addNode**](docs/NodesApi.md#addNode) | **POST** /connect | Connect a new node
*garage.NodesApi* | [**getNodes**](docs/NodesApi.md#getNodes) | **GET** /status | Status of this node and other nodes in the cluster *garage.NodesApi* | [**getHealth**](docs/NodesApi.md#getHealth) | **GET** /health | Cluster health report
*garage.NodesApi* | [**getNodes**](docs/NodesApi.md#getNodes) | **GET** /status | Describe cluster
## Documentation for Models ## Documentation for Models
@ -158,6 +157,7 @@ Class | Method | HTTP request | Description
- [garage.AddNode200ResponseInner](docs/AddNode200ResponseInner.md) - [garage.AddNode200ResponseInner](docs/AddNode200ResponseInner.md)
- [garage.AllowBucketKeyRequest](docs/AllowBucketKeyRequest.md) - [garage.AllowBucketKeyRequest](docs/AllowBucketKeyRequest.md)
- [garage.AllowBucketKeyRequestPermissions](docs/AllowBucketKeyRequestPermissions.md) - [garage.AllowBucketKeyRequestPermissions](docs/AllowBucketKeyRequestPermissions.md)
- [garage.ApplyLayout200Response](docs/ApplyLayout200Response.md)
- [garage.BucketInfo](docs/BucketInfo.md) - [garage.BucketInfo](docs/BucketInfo.md)
- [garage.BucketInfoQuotas](docs/BucketInfoQuotas.md) - [garage.BucketInfoQuotas](docs/BucketInfoQuotas.md)
- [garage.BucketInfoWebsiteConfig](docs/BucketInfoWebsiteConfig.md) - [garage.BucketInfoWebsiteConfig](docs/BucketInfoWebsiteConfig.md)
@ -166,6 +166,7 @@ Class | Method | HTTP request | Description
- [garage.CreateBucketRequest](docs/CreateBucketRequest.md) - [garage.CreateBucketRequest](docs/CreateBucketRequest.md)
- [garage.CreateBucketRequestLocalAlias](docs/CreateBucketRequestLocalAlias.md) - [garage.CreateBucketRequestLocalAlias](docs/CreateBucketRequestLocalAlias.md)
- [garage.CreateBucketRequestLocalAliasAllow](docs/CreateBucketRequestLocalAliasAllow.md) - [garage.CreateBucketRequestLocalAliasAllow](docs/CreateBucketRequestLocalAliasAllow.md)
- [garage.GetHealth200Response](docs/GetHealth200Response.md)
- [garage.GetNodes200Response](docs/GetNodes200Response.md) - [garage.GetNodes200Response](docs/GetNodes200Response.md)
- [garage.ImportKeyRequest](docs/ImportKeyRequest.md) - [garage.ImportKeyRequest](docs/ImportKeyRequest.md)
- [garage.KeyInfo](docs/KeyInfo.md) - [garage.KeyInfo](docs/KeyInfo.md)
@ -178,6 +179,9 @@ Class | Method | HTTP request | Description
- [garage.ListKeys200ResponseInner](docs/ListKeys200ResponseInner.md) - [garage.ListKeys200ResponseInner](docs/ListKeys200ResponseInner.md)
- [garage.NodeClusterInfo](docs/NodeClusterInfo.md) - [garage.NodeClusterInfo](docs/NodeClusterInfo.md)
- [garage.NodeNetworkInfo](docs/NodeNetworkInfo.md) - [garage.NodeNetworkInfo](docs/NodeNetworkInfo.md)
- [garage.NodeRoleChange](docs/NodeRoleChange.md)
- [garage.NodeRoleRemove](docs/NodeRoleRemove.md)
- [garage.NodeRoleUpdate](docs/NodeRoleUpdate.md)
- [garage.UpdateBucketRequest](docs/UpdateBucketRequest.md) - [garage.UpdateBucketRequest](docs/UpdateBucketRequest.md)
- [garage.UpdateBucketRequestQuotas](docs/UpdateBucketRequestQuotas.md) - [garage.UpdateBucketRequestQuotas](docs/UpdateBucketRequestQuotas.md)
- [garage.UpdateBucketRequestWebsiteAccess](docs/UpdateBucketRequestWebsiteAccess.md) - [garage.UpdateBucketRequestWebsiteAccess](docs/UpdateBucketRequestWebsiteAccess.md)

View file

@ -0,0 +1,10 @@
# garage.ApplyLayout200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message** | **[String]** | |
**layout** | [**ClusterLayout**](ClusterLayout.md) | |

View file

@ -1,21 +1,20 @@
# garage.BucketApi # garage.BucketApi
All URIs are relative to *http://localhost:3903/v0* All URIs are relative to *http://localhost:3903/v1*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**allowBucketKey**](BucketApi.md#allowBucketKey) | **POST** /bucket/allow | Allow key [**allowBucketKey**](BucketApi.md#allowBucketKey) | **POST** /bucket/allow | Allow key
[**createBucket**](BucketApi.md#createBucket) | **POST** /bucket | Create a bucket [**createBucket**](BucketApi.md#createBucket) | **POST** /bucket | Create a bucket
[**deleteBucket**](BucketApi.md#deleteBucket) | **DELETE** /bucket?id&#x3D;{bucket_id} | Delete a bucket [**deleteBucket**](BucketApi.md#deleteBucket) | **DELETE** /bucket | Delete a bucket
[**deleteBucketGlobalAlias**](BucketApi.md#deleteBucketGlobalAlias) | **DELETE** /bucket/alias/global | Delete a global alias [**deleteBucketGlobalAlias**](BucketApi.md#deleteBucketGlobalAlias) | **DELETE** /bucket/alias/global | Delete a global alias
[**deleteBucketLocalAlias**](BucketApi.md#deleteBucketLocalAlias) | **DELETE** /bucket/alias/local | Delete a local alias [**deleteBucketLocalAlias**](BucketApi.md#deleteBucketLocalAlias) | **DELETE** /bucket/alias/local | Delete a local alias
[**denyBucketKey**](BucketApi.md#denyBucketKey) | **POST** /bucket/deny | Deny key [**denyBucketKey**](BucketApi.md#denyBucketKey) | **POST** /bucket/deny | Deny key
[**findBucketInfo**](BucketApi.md#findBucketInfo) | **GET** /bucket?globalAlias&#x3D;{alias} | Find a bucket [**getBucketInfo**](BucketApi.md#getBucketInfo) | **GET** /bucket | Get a bucket
[**getBucketInfo**](BucketApi.md#getBucketInfo) | **GET** /bucket?id&#x3D;{bucket_id} | Get a bucket [**listBuckets**](BucketApi.md#listBuckets) | **GET** /bucket?list | List all buckets
[**listBuckets**](BucketApi.md#listBuckets) | **GET** /bucket | List all buckets
[**putBucketGlobalAlias**](BucketApi.md#putBucketGlobalAlias) | **PUT** /bucket/alias/global | Add a global alias [**putBucketGlobalAlias**](BucketApi.md#putBucketGlobalAlias) | **PUT** /bucket/alias/global | Add a global alias
[**putBucketLocalAlias**](BucketApi.md#putBucketLocalAlias) | **PUT** /bucket/alias/local | Add a local alias [**putBucketLocalAlias**](BucketApi.md#putBucketLocalAlias) | **PUT** /bucket/alias/local | Add a local alias
[**updateBucket**](BucketApi.md#updateBucket) | **PUT** /bucket?id&#x3D;{bucket_id} | Update a bucket [**updateBucket**](BucketApi.md#updateBucket) | **PUT** /bucket | Update a bucket
@ -30,7 +29,7 @@ Allow key
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
@ -78,7 +77,7 @@ Creates a new bucket, either with a global alias, a local one, or no alias at al
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
@ -117,7 +116,7 @@ Name | Type | Description | Notes
## deleteBucket ## deleteBucket
> deleteBucket(bucketId) > deleteBucket(id)
Delete a bucket Delete a bucket
@ -126,15 +125,15 @@ Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is no
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN" bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new garage.BucketApi(); let apiInstance = new garage.BucketApi();
let bucketId = b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87; // String | The exact bucket identifier, a 32 bytes hexadecimal string let id = b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87; // String | The exact bucket identifier, a 32 bytes hexadecimal string
apiInstance.deleteBucket(bucketId).then(() => { apiInstance.deleteBucket(id).then(() => {
console.log('API called successfully.'); console.log('API called successfully.');
}, (error) => { }, (error) => {
console.error(error); console.error(error);
@ -147,7 +146,7 @@ apiInstance.deleteBucket(bucketId).then(() => {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**bucketId** | **String**| The exact bucket identifier, a 32 bytes hexadecimal string | **id** | **String**| The exact bucket identifier, a 32 bytes hexadecimal string |
### Return type ### Return type
@ -174,7 +173,7 @@ Delete a global alias from the target bucket
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
@ -224,7 +223,7 @@ Delete a local alias, bound to specified account, from the target bucket
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
@ -276,7 +275,7 @@ Deny key
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
@ -313,74 +312,29 @@ Name | Type | Description | Notes
- **Accept**: application/json - **Accept**: application/json
## findBucketInfo
> BucketInfo findBucketInfo(alias)
Find a bucket
Find a bucket by its global alias
### Example
```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new garage.BucketApi();
let alias = my_documents; // String | The exact global alias of one of the existing buckets
apiInstance.findBucketInfo(alias).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**alias** | **String**| The exact global alias of one of the existing buckets |
### Return type
[**BucketInfo**](BucketInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## getBucketInfo ## getBucketInfo
> BucketInfo getBucketInfo(bucketId) > BucketInfo getBucketInfo(opts)
Get a bucket Get a bucket
Given a bucket identifier, get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any). Given a bucket identifier (&#x60;id&#x60;) or a global alias (&#x60;alias&#x60;), get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any).
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN" bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new garage.BucketApi(); let apiInstance = new garage.BucketApi();
let bucketId = b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87; // String | The exact bucket identifier, a 32 bytes hexadecimal string let opts = {
apiInstance.getBucketInfo(bucketId).then((data) => { 'id': b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87, // String | The exact bucket identifier, a 32 bytes hexadecimal string. Incompatible with `alias`.
'alias': my_documents // String | The exact global alias of one of the existing buckets. Incompatible with `id`.
};
apiInstance.getBucketInfo(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data); console.log('API called successfully. Returned data: ' + data);
}, (error) => { }, (error) => {
console.error(error); console.error(error);
@ -393,7 +347,8 @@ apiInstance.getBucketInfo(bucketId).then((data) => {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**bucketId** | **String**| The exact bucket identifier, a 32 bytes hexadecimal string | **id** | **String**| The exact bucket identifier, a 32 bytes hexadecimal string. Incompatible with &#x60;alias&#x60;. | [optional]
**alias** | **String**| The exact global alias of one of the existing buckets. Incompatible with &#x60;id&#x60;. | [optional]
### Return type ### Return type
@ -420,7 +375,7 @@ List all the buckets on the cluster with their UUID and their global and local a
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
@ -464,7 +419,7 @@ Add a global alias to the target bucket
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
@ -514,7 +469,7 @@ Add a local alias, bound to specified account, to the target bucket
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
@ -557,25 +512,25 @@ Name | Type | Description | Notes
## updateBucket ## updateBucket
> BucketInfo updateBucket(bucketId, updateBucketRequest) > BucketInfo updateBucket(id, updateBucketRequest)
Update a bucket Update a bucket
All fields (&#x60;websiteAccess&#x60; and &#x60;quotas&#x60;) are optionnal. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In &#x60;websiteAccess&#x60;: if &#x60;enabled&#x60; is &#x60;true&#x60;, &#x60;indexDocument&#x60; must be specified. The field &#x60;errorDocument&#x60; is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if &#x60;enabled&#x60; is &#x60;false&#x60;, neither &#x60;indexDocument&#x60; nor &#x60;errorDocument&#x60; must be specified. In &#x60;quotas&#x60;: new values of &#x60;maxSize&#x60; and &#x60;maxObjects&#x60; must both be specified, or set to &#x60;null&#x60; to remove the quotas. An absent value will be considered the same as a &#x60;null&#x60;. It is not possible to change only one of the two quotas. All fields (&#x60;websiteAccess&#x60; and &#x60;quotas&#x60;) are optional. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In &#x60;websiteAccess&#x60;: if &#x60;enabled&#x60; is &#x60;true&#x60;, &#x60;indexDocument&#x60; must be specified. The field &#x60;errorDocument&#x60; is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if &#x60;enabled&#x60; is &#x60;false&#x60;, neither &#x60;indexDocument&#x60; nor &#x60;errorDocument&#x60; must be specified. In &#x60;quotas&#x60;: new values of &#x60;maxSize&#x60; and &#x60;maxObjects&#x60; must both be specified, or set to &#x60;null&#x60; to remove the quotas. An absent value will be considered the same as a &#x60;null&#x60;. It is not possible to change only one of the two quotas.
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN" bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new garage.BucketApi(); let apiInstance = new garage.BucketApi();
let bucketId = b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87; // String | The exact bucket identifier, a 32 bytes hexadecimal string let id = b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87; // String | The exact bucket identifier, a 32 bytes hexadecimal string
let updateBucketRequest = new garage.UpdateBucketRequest(); // UpdateBucketRequest | Requested changes on the bucket. Both root fields are optionals. let updateBucketRequest = new garage.UpdateBucketRequest(); // UpdateBucketRequest | Requested changes on the bucket. Both root fields are optionals.
apiInstance.updateBucket(bucketId, updateBucketRequest).then((data) => { apiInstance.updateBucket(id, updateBucketRequest).then((data) => {
console.log('API called successfully. Returned data: ' + data); console.log('API called successfully. Returned data: ' + data);
}, (error) => { }, (error) => {
console.error(error); console.error(error);
@ -588,7 +543,7 @@ apiInstance.updateBucket(bucketId, updateBucketRequest).then((data) => {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**bucketId** | **String**| The exact bucket identifier, a 32 bytes hexadecimal string | **id** | **String**| The exact bucket identifier, a 32 bytes hexadecimal string |
**updateBucketRequest** | [**UpdateBucketRequest**](UpdateBucketRequest.md)| Requested changes on the bucket. Both root fields are optionals. | **updateBucketRequest** | [**UpdateBucketRequest**](UpdateBucketRequest.md)| Requested changes on the bucket. Both root fields are optionals. |
### Return type ### Return type

View file

@ -5,7 +5,7 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**version** | **Number** | | **version** | **Number** | |
**roles** | [**{String: NodeClusterInfo}**](NodeClusterInfo.md) | | **roles** | [**[NodeClusterInfo]**](NodeClusterInfo.md) | |
**stagedRoleChanges** | [**{String: NodeClusterInfo}**](NodeClusterInfo.md) | | **stagedRoleChanges** | [**[NodeRoleChange]**](NodeRoleChange.md) | |

View file

@ -0,0 +1,16 @@
# garage.GetHealth200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**status** | **String** | |
**knownNodes** | **Number** | |
**connectedNodes** | **Number** | |
**storageNodes** | **Number** | |
**storageNodesOk** | **Number** | |
**partitions** | **Number** | |
**partitionsQuorum** | **Number** | |
**partitionsAllOk** | **Number** | |

View file

@ -6,7 +6,10 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**node** | **String** | | **node** | **String** | |
**garageVersion** | **String** | | **garageVersion** | **String** | |
**knownNodes** | [**{String: NodeNetworkInfo}**](NodeNetworkInfo.md) | | **garageFeatures** | **[String]** | |
**rustVersion** | **String** | |
**dbEngine** | **String** | |
**knownNodes** | [**[NodeNetworkInfo]**](NodeNetworkInfo.md) | |
**layout** | [**ClusterLayout**](ClusterLayout.md) | | **layout** | [**ClusterLayout**](ClusterLayout.md) | |

View file

@ -1,16 +1,15 @@
# garage.KeyApi # garage.KeyApi
All URIs are relative to *http://localhost:3903/v0* All URIs are relative to *http://localhost:3903/v1*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**addKey**](KeyApi.md#addKey) | **POST** /key | Create a new API key [**addKey**](KeyApi.md#addKey) | **POST** /key?list | Create a new API key
[**deleteKey**](KeyApi.md#deleteKey) | **DELETE** /key?id&#x3D;{access_key} | Delete a key [**deleteKey**](KeyApi.md#deleteKey) | **DELETE** /key | Delete a key
[**getKey**](KeyApi.md#getKey) | **GET** /key?id&#x3D;{access_key} | Get key information [**getKey**](KeyApi.md#getKey) | **GET** /key | Get key information
[**importKey**](KeyApi.md#importKey) | **POST** /key/import | Import an existing key [**importKey**](KeyApi.md#importKey) | **POST** /key/import | Import an existing key
[**listKeys**](KeyApi.md#listKeys) | **GET** /key | List all keys [**listKeys**](KeyApi.md#listKeys) | **GET** /key?list | List all keys
[**searchKey**](KeyApi.md#searchKey) | **GET** /key?search&#x3D;{pattern} | Select key by pattern [**updateKey**](KeyApi.md#updateKey) | **POST** /key | Update a key
[**updateKey**](KeyApi.md#updateKey) | **POST** /key?id&#x3D;{access_key} | Update a key
@ -25,14 +24,14 @@ Creates a new API access key.
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN" bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new garage.KeyApi(); let apiInstance = new garage.KeyApi();
let addKeyRequest = new garage.AddKeyRequest(); // AddKeyRequest | \"You can set a friendly name for this key, send an empty string instead\" let addKeyRequest = new garage.AddKeyRequest(); // AddKeyRequest | You can set a friendly name for this key. If you don't want to, you can set the name to `null`. *Note: the secret key is returned in the response.*
apiInstance.addKey(addKeyRequest).then((data) => { apiInstance.addKey(addKeyRequest).then((data) => {
console.log('API called successfully. Returned data: ' + data); console.log('API called successfully. Returned data: ' + data);
}, (error) => { }, (error) => {
@ -46,7 +45,7 @@ apiInstance.addKey(addKeyRequest).then((data) => {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**addKeyRequest** | [**AddKeyRequest**](AddKeyRequest.md)| \&quot;You can set a friendly name for this key, send an empty string instead\&quot; | **addKeyRequest** | [**AddKeyRequest**](AddKeyRequest.md)| You can set a friendly name for this key. If you don&#39;t want to, you can set the name to &#x60;null&#x60;. *Note: the secret key is returned in the response.* |
### Return type ### Return type
@ -64,7 +63,7 @@ Name | Type | Description | Notes
## deleteKey ## deleteKey
> deleteKey(accessKey) > deleteKey(id)
Delete a key Delete a key
@ -73,15 +72,15 @@ Delete a key from the cluster. Its access will be removed from all the buckets.
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN" bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new garage.KeyApi(); let apiInstance = new garage.KeyApi();
let accessKey = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage let id = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage
apiInstance.deleteKey(accessKey).then(() => { apiInstance.deleteKey(id).then(() => {
console.log('API called successfully.'); console.log('API called successfully.');
}, (error) => { }, (error) => {
console.error(error); console.error(error);
@ -94,7 +93,7 @@ apiInstance.deleteKey(accessKey).then(() => {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**accessKey** | **String**| The exact API access key generated by Garage | **id** | **String**| The exact API access key generated by Garage |
### Return type ### Return type
@ -112,24 +111,28 @@ null (empty response body)
## getKey ## getKey
> KeyInfo getKey(accessKey) > KeyInfo getKey(opts)
Get key information Get key information
Return information about a specific key and return its information Return information about a specific key like its identifiers, its permissions and buckets on which it has permissions. You can search by specifying the exact key identifier (&#x60;id&#x60;) or by specifying a pattern (&#x60;search&#x60;). For confidentiality reasons, the secret key is not returned by default: you must pass the &#x60;showSecretKey&#x60; query parameter to get it.
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN" bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new garage.KeyApi(); let apiInstance = new garage.KeyApi();
let accessKey = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage let opts = {
apiInstance.getKey(accessKey).then((data) => { 'id': GK31c2f218a2e44f485b94239e, // String | The exact API access key generated by Garage. Incompatible with `search`.
'search': test-k, // String | A pattern (beginning or full string) corresponding to a key identifier or friendly name. Incompatible with `id`.
'showSecretKey': true // String | Wether or not the secret key should be returned in the response
};
apiInstance.getKey(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data); console.log('API called successfully. Returned data: ' + data);
}, (error) => { }, (error) => {
console.error(error); console.error(error);
@ -142,7 +145,9 @@ apiInstance.getKey(accessKey).then((data) => {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**accessKey** | **String**| The exact API access key generated by Garage | **id** | **String**| The exact API access key generated by Garage. Incompatible with &#x60;search&#x60;. | [optional]
**search** | **String**| A pattern (beginning or full string) corresponding to a key identifier or friendly name. Incompatible with &#x60;id&#x60;. | [optional]
**showSecretKey** | **String**| Wether or not the secret key should be returned in the response | [optional] [default to &#39;false&#39;]
### Return type ### Return type
@ -169,7 +174,7 @@ Imports an existing API key. This feature must only be used for migrations and b
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
@ -217,7 +222,7 @@ Returns all API access keys in the cluster.
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
@ -250,75 +255,27 @@ This endpoint does not need any parameter.
- **Accept**: application/json - **Accept**: application/json
## searchKey
> KeyInfo searchKey(pattern)
Select key by pattern
Find the first key matching the given pattern based on its identifier aor friendly name and return its information.
### Example
```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0';
let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new garage.KeyApi();
let pattern = test-k; // String | A pattern (beginning or full string) corresponding to a key identifier or friendly name
apiInstance.searchKey(pattern).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pattern** | **String**| A pattern (beginning or full string) corresponding to a key identifier or friendly name |
### Return type
[**KeyInfo**](KeyInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## updateKey ## updateKey
> KeyInfo updateKey(accessKey, updateKeyRequest) > KeyInfo updateKey(id, updateKeyRequest)
Update a key Update a key
Updates information about the specified API access key. Updates information about the specified API access key. *Note: the secret key is not returned in the response, &#x60;null&#x60; is sent instead.*
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN" bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new garage.KeyApi(); let apiInstance = new garage.KeyApi();
let accessKey = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage let id = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage
let updateKeyRequest = new garage.UpdateKeyRequest(); // UpdateKeyRequest | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove let updateKeyRequest = new garage.UpdateKeyRequest(); // UpdateKeyRequest | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove
apiInstance.updateKey(accessKey, updateKeyRequest).then((data) => { apiInstance.updateKey(id, updateKeyRequest).then((data) => {
console.log('API called successfully. Returned data: ' + data); console.log('API called successfully. Returned data: ' + data);
}, (error) => { }, (error) => {
console.error(error); console.error(error);
@ -331,7 +288,7 @@ apiInstance.updateKey(accessKey, updateKeyRequest).then((data) => {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**accessKey** | **String**| The exact API access key generated by Garage | **id** | **String**| The exact API access key generated by Garage |
**updateKeyRequest** | [**UpdateKeyRequest**](UpdateKeyRequest.md)| For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove | **updateKeyRequest** | [**UpdateKeyRequest**](UpdateKeyRequest.md)| For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove |
### Return type ### Return type

View file

@ -1,6 +1,6 @@
# garage.LayoutApi # garage.LayoutApi
All URIs are relative to *http://localhost:3903/v0* All URIs are relative to *http://localhost:3903/v1*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
@ -13,25 +13,25 @@ Method | HTTP request | Description
## addLayout ## addLayout
> addLayout(requestBody) > ClusterLayout addLayout(nodeRoleChange)
Send modifications to the cluster layout Send modifications to the cluster layout
Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of &#x60;GET /layout&#x60;. Once the set of staged changes is satisfactory, the user may call &#x60;POST /layout/apply&#x60; to apply the changed changes, or &#x60;POST /layout/revert&#x60; to clear all of the staged changes in the layout. Note that setting the capacity to &#x60;null&#x60; will configure the node as a gateway. Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of &#x60;GET /layout&#x60;. Once the set of staged changes is satisfactory, the user may call &#x60;POST /layout/apply&#x60; to apply the changed changes, or &#x60;POST /layout/revert&#x60; to clear all of the staged changes in the layout. Setting the capacity to &#x60;null&#x60; will configure the node as a gateway. Otherwise, capacity must be now set in bytes (before Garage 0.9 it was arbitrary weights). For example to declare 100GB, you must set &#x60;capacity: 100000000000&#x60;. Garage uses internally the International System of Units (SI), it assumes that 1kB &#x3D; 1000 bytes, and displays storage as kB, MB, GB (and not KiB, MiB, GiB that assume 1KiB &#x3D; 1024 bytes).
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN" bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new garage.LayoutApi(); let apiInstance = new garage.LayoutApi();
let requestBody = {key: new garage.NodeClusterInfo()}; // {String: NodeClusterInfo} | To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. let nodeRoleChange = [new garage.NodeRoleChange()]; // [NodeRoleChange] | To add a new node to the layout or to change the configuration of an existing node, simply set the values you want (`zone`, `capacity`, and `tags`). To remove a node, simply pass the `remove: true` field. This logic is represented in OpenAPI with a \"One Of\" object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified.
apiInstance.addLayout(requestBody).then(() => { apiInstance.addLayout(nodeRoleChange).then((data) => {
console.log('API called successfully.'); console.log('API called successfully. Returned data: ' + data);
}, (error) => { }, (error) => {
console.error(error); console.error(error);
}); });
@ -43,11 +43,11 @@ apiInstance.addLayout(requestBody).then(() => {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**requestBody** | [**{String: NodeClusterInfo}**](NodeClusterInfo.md)| To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to &#x60;null&#x60; instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. | **nodeRoleChange** | [**[NodeRoleChange]**](NodeRoleChange.md)| To add a new node to the layout or to change the configuration of an existing node, simply set the values you want (&#x60;zone&#x60;, &#x60;capacity&#x60;, and &#x60;tags&#x60;). To remove a node, simply pass the &#x60;remove: true&#x60; field. This logic is represented in OpenAPI with a \&quot;One Of\&quot; object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. |
### Return type ### Return type
null (empty response body) [**ClusterLayout**](ClusterLayout.md)
### Authorization ### Authorization
@ -56,21 +56,21 @@ null (empty response body)
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: application/json
- **Accept**: Not defined - **Accept**: application/json
## applyLayout ## applyLayout
> applyLayout(layoutVersion) > ApplyLayout200Response applyLayout(layoutVersion)
Apply staged layout Apply staged layout
Applies to the cluster the layout changes currently registered as staged layout changes. Applies to the cluster the layout changes currently registered as staged layout changes. *Note: do not try to parse the &#x60;message&#x60; field of the response, it is given as an array of string specifically because its format is not stable.*
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
@ -78,8 +78,8 @@ bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new garage.LayoutApi(); let apiInstance = new garage.LayoutApi();
let layoutVersion = new garage.LayoutVersion(); // LayoutVersion | Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. let layoutVersion = new garage.LayoutVersion(); // LayoutVersion | Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster.
apiInstance.applyLayout(layoutVersion).then(() => { apiInstance.applyLayout(layoutVersion).then((data) => {
console.log('API called successfully.'); console.log('API called successfully. Returned data: ' + data);
}, (error) => { }, (error) => {
console.error(error); console.error(error);
}); });
@ -95,7 +95,7 @@ Name | Type | Description | Notes
### Return type ### Return type
null (empty response body) [**ApplyLayout200Response**](ApplyLayout200Response.md)
### Authorization ### Authorization
@ -104,7 +104,7 @@ null (empty response body)
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: application/json
- **Accept**: Not defined - **Accept**: application/json
## getLayout ## getLayout
@ -113,12 +113,12 @@ null (empty response body)
Details on the current and staged layout Details on the current and staged layout
Returns the cluster&#39;s current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *The info returned by this endpoint is a subset of the info returned by &#x60;GET /status&#x60;.* Returns the cluster&#39;s current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *Capacity is given in bytes* *The info returned by this endpoint is a subset of the info returned by &#x60;GET /status&#x60;.*
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
@ -162,7 +162,7 @@ Clears all of the staged layout changes.
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];

View file

@ -4,6 +4,6 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**version** | **Number** | | [optional] **version** | **Number** | |

View file

@ -5,7 +5,7 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**zone** | **String** | | **zone** | **String** | |
**capacity** | **Number** | | **capacity** | **Number** | | [optional]
**tags** | **[String]** | User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage | **tags** | **[String]** | User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage |

View file

@ -4,6 +4,7 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**addr** | **String** | | **addr** | **String** | |
**isUp** | **Boolean** | | **isUp** | **Boolean** | |
**lastSeenSecsAgo** | **Number** | | **lastSeenSecsAgo** | **Number** | |

13
docs/NodeRoleChange.md Normal file
View file

@ -0,0 +1,13 @@
# garage.NodeRoleChange
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**remove** | **Boolean** | |
**zone** | **String** | |
**capacity** | **Number** | |
**tags** | **[String]** | |

10
docs/NodeRoleRemove.md Normal file
View file

@ -0,0 +1,10 @@
# garage.NodeRoleRemove
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**remove** | **Boolean** | |

12
docs/NodeRoleUpdate.md Normal file
View file

@ -0,0 +1,12 @@
# garage.NodeRoleUpdate
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**zone** | **String** | |
**capacity** | **Number** | |
**tags** | **[String]** | |

View file

@ -1,11 +1,12 @@
# garage.NodesApi # garage.NodesApi
All URIs are relative to *http://localhost:3903/v0* All URIs are relative to *http://localhost:3903/v1*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**addNode**](NodesApi.md#addNode) | **POST** /connect | Connect target node to other Garage nodes [**addNode**](NodesApi.md#addNode) | **POST** /connect | Connect a new node
[**getNodes**](NodesApi.md#getNodes) | **GET** /status | Status of this node and other nodes in the cluster [**getHealth**](NodesApi.md#getHealth) | **GET** /health | Cluster health report
[**getNodes**](NodesApi.md#getNodes) | **GET** /status | Describe cluster
@ -13,14 +14,14 @@ Method | HTTP request | Description
> [AddNode200ResponseInner] addNode(requestBody) > [AddNode200ResponseInner] addNode(requestBody)
Connect target node to other Garage nodes Connect a new node
Instructs this Garage node to connect to other Garage nodes at specified &#x60;&lt;node_id&gt;@&lt;net_address&gt;&#x60;. &#x60;node_id&#x60; is generated automatically on node start. Instructs this Garage node to connect to other Garage nodes at specified &#x60;&lt;node_id&gt;@&lt;net_address&gt;&#x60;. &#x60;node_id&#x60; is generated automatically on node start.
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];
@ -57,18 +58,62 @@ Name | Type | Description | Notes
- **Accept**: application/json - **Accept**: application/json
## getNodes ## getHealth
> GetNodes200Response getNodes() > GetHealth200Response getHealth()
Status of this node and other nodes in the cluster Cluster health report
Returns the cluster&#39;s current status, including: - ID of the node being queried and its version of the Garage daemon - Live nodes - Currently configured cluster layout - Staged changes to the cluster layout Returns the global status of the cluster, the number of connected nodes (over the number of known ones), the number of healthy storage nodes (over the declared ones), and the number of healthy partitions (over the total).
### Example ### Example
```javascript ```javascript
import garage from 'garage_administration_api_v0garage_v0_8_0'; import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new garage.NodesApi();
apiInstance.getHealth().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**GetHealth200Response**](GetHealth200Response.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## getNodes
> GetNodes200Response getNodes()
Describe cluster
Returns the cluster&#39;s current status, including: - ID of the node being queried and its version of the Garage daemon - Live nodes - Currently configured cluster layout - Staged changes to the cluster layout *Capacity is given in bytes*
### Example
```javascript
import garage from 'garage_administration_api_v0garage_v0_9_0';
let defaultClient = garage.ApiClient.instance; let defaultClient = garage.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth // Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth']; let bearerAuth = defaultClient.authentications['bearerAuth'];

View file

@ -1,6 +1,6 @@
{ {
"name": "garage_administration_api_v0garage_v0_8_0", "name": "garage_administration_api_v0garage_v0_9_0",
"version": "v0.8.0", "version": "v0.9.0",
"description": "Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* ", "description": "Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* ",
"license": "Unlicense", "license": "Unlicense",
"main": "dist/index.js", "main": "dist/index.js",

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -17,7 +17,7 @@ import querystring from "querystring";
/** /**
* @module ApiClient * @module ApiClient
* @version v0.8.0 * @version v0.9.0
*/ */
/** /**
@ -33,11 +33,11 @@ class ApiClient {
* Overrides the default value set in spec file if present * Overrides the default value set in spec file if present
* @param {String} basePath * @param {String} basePath
*/ */
constructor(basePath = 'http://localhost:3903/v0') { constructor(basePath = 'http://localhost:3903/v1') {
/** /**
* The base URL against which to resolve every API call's (relative) path. * The base URL against which to resolve every API call's (relative) path.
* @type {String} * @type {String}
* @default http://localhost:3903/v0 * @default http://localhost:3903/v1
*/ */
this.basePath = basePath.replace(/\/+$/, ''); this.basePath = basePath.replace(/\/+$/, '');
@ -55,7 +55,7 @@ class ApiClient {
* @default {} * @default {}
*/ */
this.defaultHeaders = { this.defaultHeaders = {
'User-Agent': 'OpenAPI-Generator/v0.8.0/Javascript' 'User-Agent': 'OpenAPI-Generator/v0.9.0/Javascript'
}; };
/** /**
@ -594,7 +594,7 @@ class ApiClient {
hostSettings() { hostSettings() {
return [ return [
{ {
'url': "http://localhost:3903/v0", 'url': "http://localhost:3903/v1",
'description': "A local server", 'description': "A local server",
} }
]; ];

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -22,7 +22,7 @@ import UpdateBucketRequest from '../model/UpdateBucketRequest';
/** /**
* Bucket service. * Bucket service.
* @module api/BucketApi * @module api/BucketApi
* @version v0.8.0 * @version v0.9.0
*/ */
export default class BucketApi { export default class BucketApi {
@ -136,20 +136,20 @@ export default class BucketApi {
/** /**
* Delete a bucket * Delete a bucket
* Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is not empty. **Warning:** this will delete all aliases associated with the bucket! * Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is not empty. **Warning:** this will delete all aliases associated with the bucket!
* @param {String} bucketId The exact bucket identifier, a 32 bytes hexadecimal string * @param {String} id The exact bucket identifier, a 32 bytes hexadecimal string
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/ */
deleteBucketWithHttpInfo(bucketId) { deleteBucketWithHttpInfo(id) {
let postBody = null; let postBody = null;
// verify the required parameter 'bucketId' is set // verify the required parameter 'id' is set
if (bucketId === undefined || bucketId === null) { if (id === undefined || id === null) {
throw new Error("Missing the required parameter 'bucketId' when calling deleteBucket"); throw new Error("Missing the required parameter 'id' when calling deleteBucket");
} }
let pathParams = { let pathParams = {
'bucket_id': bucketId
}; };
let queryParams = { let queryParams = {
'id': id
}; };
let headerParams = { let headerParams = {
}; };
@ -161,7 +161,7 @@ export default class BucketApi {
let accepts = []; let accepts = [];
let returnType = null; let returnType = null;
return this.apiClient.callApi( return this.apiClient.callApi(
'/bucket?id={bucket_id}', 'DELETE', '/bucket', 'DELETE',
pathParams, queryParams, headerParams, formParams, postBody, pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null authNames, contentTypes, accepts, returnType, null
); );
@ -170,11 +170,11 @@ export default class BucketApi {
/** /**
* Delete a bucket * Delete a bucket
* Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is not empty. **Warning:** this will delete all aliases associated with the bucket! * Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is not empty. **Warning:** this will delete all aliases associated with the bucket!
* @param {String} bucketId The exact bucket identifier, a 32 bytes hexadecimal string * @param {String} id The exact bucket identifier, a 32 bytes hexadecimal string
* @return {Promise} a {@link https://www.promisejs.org/|Promise} * @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/ */
deleteBucket(bucketId) { deleteBucket(id) {
return this.deleteBucketWithHttpInfo(bucketId) return this.deleteBucketWithHttpInfo(id)
.then(function(response_and_data) { .then(function(response_and_data) {
return response_and_data.data; return response_and_data.data;
}); });
@ -346,22 +346,22 @@ export default class BucketApi {
/** /**
* Find a bucket * Get a bucket
* Find a bucket by its global alias * Given a bucket identifier (`id`) or a global alias (`alias`), get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any).
* @param {String} alias The exact global alias of one of the existing buckets * @param {Object} opts Optional parameters
* @param {String} opts.id The exact bucket identifier, a 32 bytes hexadecimal string. Incompatible with `alias`.
* @param {String} opts.alias The exact global alias of one of the existing buckets. Incompatible with `id`.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BucketInfo} and HTTP response * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BucketInfo} and HTTP response
*/ */
findBucketInfoWithHttpInfo(alias) { getBucketInfoWithHttpInfo(opts) {
opts = opts || {};
let postBody = null; let postBody = null;
// verify the required parameter 'alias' is set
if (alias === undefined || alias === null) {
throw new Error("Missing the required parameter 'alias' when calling findBucketInfo");
}
let pathParams = { let pathParams = {
'alias': alias
}; };
let queryParams = { let queryParams = {
'id': opts['id'],
'alias': opts['alias']
}; };
let headerParams = { let headerParams = {
}; };
@ -373,55 +373,7 @@ export default class BucketApi {
let accepts = ['application/json']; let accepts = ['application/json'];
let returnType = BucketInfo; let returnType = BucketInfo;
return this.apiClient.callApi( return this.apiClient.callApi(
'/bucket?globalAlias={alias}', 'GET', '/bucket', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Find a bucket
* Find a bucket by its global alias
* @param {String} alias The exact global alias of one of the existing buckets
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BucketInfo}
*/
findBucketInfo(alias) {
return this.findBucketInfoWithHttpInfo(alias)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Get a bucket
* Given a bucket identifier, get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any).
* @param {String} bucketId The exact bucket identifier, a 32 bytes hexadecimal string
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BucketInfo} and HTTP response
*/
getBucketInfoWithHttpInfo(bucketId) {
let postBody = null;
// verify the required parameter 'bucketId' is set
if (bucketId === undefined || bucketId === null) {
throw new Error("Missing the required parameter 'bucketId' when calling getBucketInfo");
}
let pathParams = {
'bucket_id': bucketId
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = BucketInfo;
return this.apiClient.callApi(
'/bucket?id={bucket_id}', 'GET',
pathParams, queryParams, headerParams, formParams, postBody, pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null authNames, contentTypes, accepts, returnType, null
); );
@ -429,12 +381,14 @@ export default class BucketApi {
/** /**
* Get a bucket * Get a bucket
* Given a bucket identifier, get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any). * Given a bucket identifier (`id`) or a global alias (`alias`), get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any).
* @param {String} bucketId The exact bucket identifier, a 32 bytes hexadecimal string * @param {Object} opts Optional parameters
* @param {String} opts.id The exact bucket identifier, a 32 bytes hexadecimal string. Incompatible with `alias`.
* @param {String} opts.alias The exact global alias of one of the existing buckets. Incompatible with `id`.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BucketInfo} * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BucketInfo}
*/ */
getBucketInfo(bucketId) { getBucketInfo(opts) {
return this.getBucketInfoWithHttpInfo(bucketId) return this.getBucketInfoWithHttpInfo(opts)
.then(function(response_and_data) { .then(function(response_and_data) {
return response_and_data.data; return response_and_data.data;
}); });
@ -463,7 +417,7 @@ export default class BucketApi {
let accepts = ['application/json']; let accepts = ['application/json'];
let returnType = [ListBuckets200ResponseInner]; let returnType = [ListBuckets200ResponseInner];
return this.apiClient.callApi( return this.apiClient.callApi(
'/bucket', 'GET', '/bucket?list', 'GET',
pathParams, queryParams, headerParams, formParams, postBody, pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null authNames, contentTypes, accepts, returnType, null
); );
@ -601,16 +555,16 @@ export default class BucketApi {
/** /**
* Update a bucket * Update a bucket
* All fields (`websiteAccess` and `quotas`) are optionnal. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if `enabled` is `false`, neither `indexDocument` nor `errorDocument` must be specified. In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` to remove the quotas. An absent value will be considered the same as a `null`. It is not possible to change only one of the two quotas. * All fields (`websiteAccess` and `quotas`) are optional. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if `enabled` is `false`, neither `indexDocument` nor `errorDocument` must be specified. In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` to remove the quotas. An absent value will be considered the same as a `null`. It is not possible to change only one of the two quotas.
* @param {String} bucketId The exact bucket identifier, a 32 bytes hexadecimal string * @param {String} id The exact bucket identifier, a 32 bytes hexadecimal string
* @param {module:model/UpdateBucketRequest} updateBucketRequest Requested changes on the bucket. Both root fields are optionals. * @param {module:model/UpdateBucketRequest} updateBucketRequest Requested changes on the bucket. Both root fields are optionals.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BucketInfo} and HTTP response * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BucketInfo} and HTTP response
*/ */
updateBucketWithHttpInfo(bucketId, updateBucketRequest) { updateBucketWithHttpInfo(id, updateBucketRequest) {
let postBody = updateBucketRequest; let postBody = updateBucketRequest;
// verify the required parameter 'bucketId' is set // verify the required parameter 'id' is set
if (bucketId === undefined || bucketId === null) { if (id === undefined || id === null) {
throw new Error("Missing the required parameter 'bucketId' when calling updateBucket"); throw new Error("Missing the required parameter 'id' when calling updateBucket");
} }
// verify the required parameter 'updateBucketRequest' is set // verify the required parameter 'updateBucketRequest' is set
if (updateBucketRequest === undefined || updateBucketRequest === null) { if (updateBucketRequest === undefined || updateBucketRequest === null) {
@ -618,9 +572,9 @@ export default class BucketApi {
} }
let pathParams = { let pathParams = {
'bucket_id': bucketId
}; };
let queryParams = { let queryParams = {
'id': id
}; };
let headerParams = { let headerParams = {
}; };
@ -632,7 +586,7 @@ export default class BucketApi {
let accepts = ['application/json']; let accepts = ['application/json'];
let returnType = BucketInfo; let returnType = BucketInfo;
return this.apiClient.callApi( return this.apiClient.callApi(
'/bucket?id={bucket_id}', 'PUT', '/bucket', 'PUT',
pathParams, queryParams, headerParams, formParams, postBody, pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null authNames, contentTypes, accepts, returnType, null
); );
@ -640,13 +594,13 @@ export default class BucketApi {
/** /**
* Update a bucket * Update a bucket
* All fields (`websiteAccess` and `quotas`) are optionnal. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if `enabled` is `false`, neither `indexDocument` nor `errorDocument` must be specified. In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` to remove the quotas. An absent value will be considered the same as a `null`. It is not possible to change only one of the two quotas. * All fields (`websiteAccess` and `quotas`) are optional. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if `enabled` is `false`, neither `indexDocument` nor `errorDocument` must be specified. In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` to remove the quotas. An absent value will be considered the same as a `null`. It is not possible to change only one of the two quotas.
* @param {String} bucketId The exact bucket identifier, a 32 bytes hexadecimal string * @param {String} id The exact bucket identifier, a 32 bytes hexadecimal string
* @param {module:model/UpdateBucketRequest} updateBucketRequest Requested changes on the bucket. Both root fields are optionals. * @param {module:model/UpdateBucketRequest} updateBucketRequest Requested changes on the bucket. Both root fields are optionals.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BucketInfo} * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BucketInfo}
*/ */
updateBucket(bucketId, updateBucketRequest) { updateBucket(id, updateBucketRequest) {
return this.updateBucketWithHttpInfo(bucketId, updateBucketRequest) return this.updateBucketWithHttpInfo(id, updateBucketRequest)
.then(function(response_and_data) { .then(function(response_and_data) {
return response_and_data.data; return response_and_data.data;
}); });

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -22,7 +22,7 @@ import UpdateKeyRequest from '../model/UpdateKeyRequest';
/** /**
* Key service. * Key service.
* @module api/KeyApi * @module api/KeyApi
* @version v0.8.0 * @version v0.9.0
*/ */
export default class KeyApi { export default class KeyApi {
@ -42,7 +42,7 @@ export default class KeyApi {
/** /**
* Create a new API key * Create a new API key
* Creates a new API access key. * Creates a new API access key.
* @param {module:model/AddKeyRequest} addKeyRequest \"You can set a friendly name for this key, send an empty string instead\" * @param {module:model/AddKeyRequest} addKeyRequest You can set a friendly name for this key. If you don't want to, you can set the name to `null`. *Note: the secret key is returned in the response.*
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/KeyInfo} and HTTP response * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/KeyInfo} and HTTP response
*/ */
addKeyWithHttpInfo(addKeyRequest) { addKeyWithHttpInfo(addKeyRequest) {
@ -66,7 +66,7 @@ export default class KeyApi {
let accepts = ['application/json']; let accepts = ['application/json'];
let returnType = KeyInfo; let returnType = KeyInfo;
return this.apiClient.callApi( return this.apiClient.callApi(
'/key', 'POST', '/key?list', 'POST',
pathParams, queryParams, headerParams, formParams, postBody, pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null authNames, contentTypes, accepts, returnType, null
); );
@ -75,7 +75,7 @@ export default class KeyApi {
/** /**
* Create a new API key * Create a new API key
* Creates a new API access key. * Creates a new API access key.
* @param {module:model/AddKeyRequest} addKeyRequest \"You can set a friendly name for this key, send an empty string instead\" * @param {module:model/AddKeyRequest} addKeyRequest You can set a friendly name for this key. If you don't want to, you can set the name to `null`. *Note: the secret key is returned in the response.*
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/KeyInfo} * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/KeyInfo}
*/ */
addKey(addKeyRequest) { addKey(addKeyRequest) {
@ -89,20 +89,20 @@ export default class KeyApi {
/** /**
* Delete a key * Delete a key
* Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before. * Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before.
* @param {String} accessKey The exact API access key generated by Garage * @param {String} id The exact API access key generated by Garage
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/ */
deleteKeyWithHttpInfo(accessKey) { deleteKeyWithHttpInfo(id) {
let postBody = null; let postBody = null;
// verify the required parameter 'accessKey' is set // verify the required parameter 'id' is set
if (accessKey === undefined || accessKey === null) { if (id === undefined || id === null) {
throw new Error("Missing the required parameter 'accessKey' when calling deleteKey"); throw new Error("Missing the required parameter 'id' when calling deleteKey");
} }
let pathParams = { let pathParams = {
'access_key': accessKey
}; };
let queryParams = { let queryParams = {
'id': id
}; };
let headerParams = { let headerParams = {
}; };
@ -114,7 +114,7 @@ export default class KeyApi {
let accepts = []; let accepts = [];
let returnType = null; let returnType = null;
return this.apiClient.callApi( return this.apiClient.callApi(
'/key?id={access_key}', 'DELETE', '/key', 'DELETE',
pathParams, queryParams, headerParams, formParams, postBody, pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null authNames, contentTypes, accepts, returnType, null
); );
@ -123,11 +123,11 @@ export default class KeyApi {
/** /**
* Delete a key * Delete a key
* Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before. * Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before.
* @param {String} accessKey The exact API access key generated by Garage * @param {String} id The exact API access key generated by Garage
* @return {Promise} a {@link https://www.promisejs.org/|Promise} * @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/ */
deleteKey(accessKey) { deleteKey(id) {
return this.deleteKeyWithHttpInfo(accessKey) return this.deleteKeyWithHttpInfo(id)
.then(function(response_and_data) { .then(function(response_and_data) {
return response_and_data.data; return response_and_data.data;
}); });
@ -136,21 +136,23 @@ export default class KeyApi {
/** /**
* Get key information * Get key information
* Return information about a specific key and return its information * Return information about a specific key like its identifiers, its permissions and buckets on which it has permissions. You can search by specifying the exact key identifier (`id`) or by specifying a pattern (`search`). For confidentiality reasons, the secret key is not returned by default: you must pass the `showSecretKey` query parameter to get it.
* @param {String} accessKey The exact API access key generated by Garage * @param {Object} opts Optional parameters
* @param {String} opts.id The exact API access key generated by Garage. Incompatible with `search`.
* @param {String} opts.search A pattern (beginning or full string) corresponding to a key identifier or friendly name. Incompatible with `id`.
* @param {module:model/String} opts.showSecretKey Wether or not the secret key should be returned in the response (default to 'false')
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/KeyInfo} and HTTP response * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/KeyInfo} and HTTP response
*/ */
getKeyWithHttpInfo(accessKey) { getKeyWithHttpInfo(opts) {
opts = opts || {};
let postBody = null; let postBody = null;
// verify the required parameter 'accessKey' is set
if (accessKey === undefined || accessKey === null) {
throw new Error("Missing the required parameter 'accessKey' when calling getKey");
}
let pathParams = { let pathParams = {
'access_key': accessKey
}; };
let queryParams = { let queryParams = {
'id': opts['id'],
'search': opts['search'],
'showSecretKey': opts['showSecretKey']
}; };
let headerParams = { let headerParams = {
}; };
@ -162,7 +164,7 @@ export default class KeyApi {
let accepts = ['application/json']; let accepts = ['application/json'];
let returnType = KeyInfo; let returnType = KeyInfo;
return this.apiClient.callApi( return this.apiClient.callApi(
'/key?id={access_key}', 'GET', '/key', 'GET',
pathParams, queryParams, headerParams, formParams, postBody, pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null authNames, contentTypes, accepts, returnType, null
); );
@ -170,12 +172,15 @@ export default class KeyApi {
/** /**
* Get key information * Get key information
* Return information about a specific key and return its information * Return information about a specific key like its identifiers, its permissions and buckets on which it has permissions. You can search by specifying the exact key identifier (`id`) or by specifying a pattern (`search`). For confidentiality reasons, the secret key is not returned by default: you must pass the `showSecretKey` query parameter to get it.
* @param {String} accessKey The exact API access key generated by Garage * @param {Object} opts Optional parameters
* @param {String} opts.id The exact API access key generated by Garage. Incompatible with `search`.
* @param {String} opts.search A pattern (beginning or full string) corresponding to a key identifier or friendly name. Incompatible with `id`.
* @param {module:model/String} opts.showSecretKey Wether or not the secret key should be returned in the response (default to 'false')
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/KeyInfo} * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/KeyInfo}
*/ */
getKey(accessKey) { getKey(opts) {
return this.getKeyWithHttpInfo(accessKey) return this.getKeyWithHttpInfo(opts)
.then(function(response_and_data) { .then(function(response_and_data) {
return response_and_data.data; return response_and_data.data;
}); });
@ -251,7 +256,7 @@ export default class KeyApi {
let accepts = ['application/json']; let accepts = ['application/json'];
let returnType = [ListKeys200ResponseInner]; let returnType = [ListKeys200ResponseInner];
return this.apiClient.callApi( return this.apiClient.callApi(
'/key', 'GET', '/key?list', 'GET',
pathParams, queryParams, headerParams, formParams, postBody, pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null authNames, contentTypes, accepts, returnType, null
); );
@ -270,66 +275,18 @@ export default class KeyApi {
} }
/**
* Select key by pattern
* Find the first key matching the given pattern based on its identifier aor friendly name and return its information.
* @param {String} pattern A pattern (beginning or full string) corresponding to a key identifier or friendly name
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/KeyInfo} and HTTP response
*/
searchKeyWithHttpInfo(pattern) {
let postBody = null;
// verify the required parameter 'pattern' is set
if (pattern === undefined || pattern === null) {
throw new Error("Missing the required parameter 'pattern' when calling searchKey");
}
let pathParams = {
'pattern': pattern
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = KeyInfo;
return this.apiClient.callApi(
'/key?search={pattern}', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Select key by pattern
* Find the first key matching the given pattern based on its identifier aor friendly name and return its information.
* @param {String} pattern A pattern (beginning or full string) corresponding to a key identifier or friendly name
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/KeyInfo}
*/
searchKey(pattern) {
return this.searchKeyWithHttpInfo(pattern)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/** /**
* Update a key * Update a key
* Updates information about the specified API access key. * Updates information about the specified API access key. *Note: the secret key is not returned in the response, `null` is sent instead.*
* @param {String} accessKey The exact API access key generated by Garage * @param {String} id The exact API access key generated by Garage
* @param {module:model/UpdateKeyRequest} updateKeyRequest For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove * @param {module:model/UpdateKeyRequest} updateKeyRequest For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/KeyInfo} and HTTP response * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/KeyInfo} and HTTP response
*/ */
updateKeyWithHttpInfo(accessKey, updateKeyRequest) { updateKeyWithHttpInfo(id, updateKeyRequest) {
let postBody = updateKeyRequest; let postBody = updateKeyRequest;
// verify the required parameter 'accessKey' is set // verify the required parameter 'id' is set
if (accessKey === undefined || accessKey === null) { if (id === undefined || id === null) {
throw new Error("Missing the required parameter 'accessKey' when calling updateKey"); throw new Error("Missing the required parameter 'id' when calling updateKey");
} }
// verify the required parameter 'updateKeyRequest' is set // verify the required parameter 'updateKeyRequest' is set
if (updateKeyRequest === undefined || updateKeyRequest === null) { if (updateKeyRequest === undefined || updateKeyRequest === null) {
@ -337,9 +294,9 @@ export default class KeyApi {
} }
let pathParams = { let pathParams = {
'access_key': accessKey
}; };
let queryParams = { let queryParams = {
'id': id
}; };
let headerParams = { let headerParams = {
}; };
@ -351,7 +308,7 @@ export default class KeyApi {
let accepts = ['application/json']; let accepts = ['application/json'];
let returnType = KeyInfo; let returnType = KeyInfo;
return this.apiClient.callApi( return this.apiClient.callApi(
'/key?id={access_key}', 'POST', '/key', 'POST',
pathParams, queryParams, headerParams, formParams, postBody, pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null authNames, contentTypes, accepts, returnType, null
); );
@ -359,13 +316,13 @@ export default class KeyApi {
/** /**
* Update a key * Update a key
* Updates information about the specified API access key. * Updates information about the specified API access key. *Note: the secret key is not returned in the response, `null` is sent instead.*
* @param {String} accessKey The exact API access key generated by Garage * @param {String} id The exact API access key generated by Garage
* @param {module:model/UpdateKeyRequest} updateKeyRequest For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove * @param {module:model/UpdateKeyRequest} updateKeyRequest For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/KeyInfo} * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/KeyInfo}
*/ */
updateKey(accessKey, updateKeyRequest) { updateKey(id, updateKeyRequest) {
return this.updateKeyWithHttpInfo(accessKey, updateKeyRequest) return this.updateKeyWithHttpInfo(id, updateKeyRequest)
.then(function(response_and_data) { .then(function(response_and_data) {
return response_and_data.data; return response_and_data.data;
}); });

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -13,14 +13,15 @@
import ApiClient from "../ApiClient"; import ApiClient from "../ApiClient";
import ApplyLayout200Response from '../model/ApplyLayout200Response';
import ClusterLayout from '../model/ClusterLayout'; import ClusterLayout from '../model/ClusterLayout';
import LayoutVersion from '../model/LayoutVersion'; import LayoutVersion from '../model/LayoutVersion';
import NodeClusterInfo from '../model/NodeClusterInfo'; import NodeRoleChange from '../model/NodeRoleChange';
/** /**
* Layout service. * Layout service.
* @module api/LayoutApi * @module api/LayoutApi
* @version v0.8.0 * @version v0.9.0
*/ */
export default class LayoutApi { export default class LayoutApi {
@ -39,15 +40,15 @@ export default class LayoutApi {
/** /**
* Send modifications to the cluster layout * Send modifications to the cluster layout
* Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. Note that setting the capacity to `null` will configure the node as a gateway. * Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. Setting the capacity to `null` will configure the node as a gateway. Otherwise, capacity must be now set in bytes (before Garage 0.9 it was arbitrary weights). For example to declare 100GB, you must set `capacity: 100000000000`. Garage uses internally the International System of Units (SI), it assumes that 1kB = 1000 bytes, and displays storage as kB, MB, GB (and not KiB, MiB, GiB that assume 1KiB = 1024 bytes).
* @param {Object.<String, module:model/{String: NodeClusterInfo}>} requestBody To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. * @param {Array.<module:model/NodeRoleChange>} nodeRoleChange To add a new node to the layout or to change the configuration of an existing node, simply set the values you want (`zone`, `capacity`, and `tags`). To remove a node, simply pass the `remove: true` field. This logic is represented in OpenAPI with a \"One Of\" object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ClusterLayout} and HTTP response
*/ */
addLayoutWithHttpInfo(requestBody) { addLayoutWithHttpInfo(nodeRoleChange) {
let postBody = requestBody; let postBody = nodeRoleChange;
// verify the required parameter 'requestBody' is set // verify the required parameter 'nodeRoleChange' is set
if (requestBody === undefined || requestBody === null) { if (nodeRoleChange === undefined || nodeRoleChange === null) {
throw new Error("Missing the required parameter 'requestBody' when calling addLayout"); throw new Error("Missing the required parameter 'nodeRoleChange' when calling addLayout");
} }
let pathParams = { let pathParams = {
@ -61,8 +62,8 @@ export default class LayoutApi {
let authNames = ['bearerAuth']; let authNames = ['bearerAuth'];
let contentTypes = ['application/json']; let contentTypes = ['application/json'];
let accepts = []; let accepts = ['application/json'];
let returnType = null; let returnType = ClusterLayout;
return this.apiClient.callApi( return this.apiClient.callApi(
'/layout', 'POST', '/layout', 'POST',
pathParams, queryParams, headerParams, formParams, postBody, pathParams, queryParams, headerParams, formParams, postBody,
@ -72,12 +73,12 @@ export default class LayoutApi {
/** /**
* Send modifications to the cluster layout * Send modifications to the cluster layout
* Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. Note that setting the capacity to `null` will configure the node as a gateway. * Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. Setting the capacity to `null` will configure the node as a gateway. Otherwise, capacity must be now set in bytes (before Garage 0.9 it was arbitrary weights). For example to declare 100GB, you must set `capacity: 100000000000`. Garage uses internally the International System of Units (SI), it assumes that 1kB = 1000 bytes, and displays storage as kB, MB, GB (and not KiB, MiB, GiB that assume 1KiB = 1024 bytes).
* @param {Object.<String, module:model/{String: NodeClusterInfo}>} requestBody To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. * @param {Array.<module:model/NodeRoleChange>} nodeRoleChange To add a new node to the layout or to change the configuration of an existing node, simply set the values you want (`zone`, `capacity`, and `tags`). To remove a node, simply pass the `remove: true` field. This logic is represented in OpenAPI with a \"One Of\" object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified.
* @return {Promise} a {@link https://www.promisejs.org/|Promise} * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ClusterLayout}
*/ */
addLayout(requestBody) { addLayout(nodeRoleChange) {
return this.addLayoutWithHttpInfo(requestBody) return this.addLayoutWithHttpInfo(nodeRoleChange)
.then(function(response_and_data) { .then(function(response_and_data) {
return response_and_data.data; return response_and_data.data;
}); });
@ -86,9 +87,9 @@ export default class LayoutApi {
/** /**
* Apply staged layout * Apply staged layout
* Applies to the cluster the layout changes currently registered as staged layout changes. * Applies to the cluster the layout changes currently registered as staged layout changes. *Note: do not try to parse the `message` field of the response, it is given as an array of string specifically because its format is not stable.*
* @param {module:model/LayoutVersion} layoutVersion Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. * @param {module:model/LayoutVersion} layoutVersion Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApplyLayout200Response} and HTTP response
*/ */
applyLayoutWithHttpInfo(layoutVersion) { applyLayoutWithHttpInfo(layoutVersion) {
let postBody = layoutVersion; let postBody = layoutVersion;
@ -108,8 +109,8 @@ export default class LayoutApi {
let authNames = ['bearerAuth']; let authNames = ['bearerAuth'];
let contentTypes = ['application/json']; let contentTypes = ['application/json'];
let accepts = []; let accepts = ['application/json'];
let returnType = null; let returnType = ApplyLayout200Response;
return this.apiClient.callApi( return this.apiClient.callApi(
'/layout/apply', 'POST', '/layout/apply', 'POST',
pathParams, queryParams, headerParams, formParams, postBody, pathParams, queryParams, headerParams, formParams, postBody,
@ -119,9 +120,9 @@ export default class LayoutApi {
/** /**
* Apply staged layout * Apply staged layout
* Applies to the cluster the layout changes currently registered as staged layout changes. * Applies to the cluster the layout changes currently registered as staged layout changes. *Note: do not try to parse the `message` field of the response, it is given as an array of string specifically because its format is not stable.*
* @param {module:model/LayoutVersion} layoutVersion Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. * @param {module:model/LayoutVersion} layoutVersion Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster.
* @return {Promise} a {@link https://www.promisejs.org/|Promise} * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApplyLayout200Response}
*/ */
applyLayout(layoutVersion) { applyLayout(layoutVersion) {
return this.applyLayoutWithHttpInfo(layoutVersion) return this.applyLayoutWithHttpInfo(layoutVersion)
@ -133,7 +134,7 @@ export default class LayoutApi {
/** /**
* Details on the current and staged layout * Details on the current and staged layout
* Returns the cluster's current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *The info returned by this endpoint is a subset of the info returned by `GET /status`.* * Returns the cluster's current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *Capacity is given in bytes* *The info returned by this endpoint is a subset of the info returned by `GET /status`.*
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ClusterLayout} and HTTP response * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ClusterLayout} and HTTP response
*/ */
getLayoutWithHttpInfo() { getLayoutWithHttpInfo() {
@ -161,7 +162,7 @@ export default class LayoutApi {
/** /**
* Details on the current and staged layout * Details on the current and staged layout
* Returns the cluster's current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *The info returned by this endpoint is a subset of the info returned by `GET /status`.* * Returns the cluster's current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *Capacity is given in bytes* *The info returned by this endpoint is a subset of the info returned by `GET /status`.*
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ClusterLayout} * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ClusterLayout}
*/ */
getLayout() { getLayout() {

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -14,12 +14,13 @@
import ApiClient from "../ApiClient"; import ApiClient from "../ApiClient";
import AddNode200ResponseInner from '../model/AddNode200ResponseInner'; import AddNode200ResponseInner from '../model/AddNode200ResponseInner';
import GetHealth200Response from '../model/GetHealth200Response';
import GetNodes200Response from '../model/GetNodes200Response'; import GetNodes200Response from '../model/GetNodes200Response';
/** /**
* Nodes service. * Nodes service.
* @module api/NodesApi * @module api/NodesApi
* @version v0.8.0 * @version v0.9.0
*/ */
export default class NodesApi { export default class NodesApi {
@ -37,7 +38,7 @@ export default class NodesApi {
/** /**
* Connect target node to other Garage nodes * Connect a new node
* Instructs this Garage node to connect to other Garage nodes at specified `<node_id>@<net_address>`. `node_id` is generated automatically on node start. * Instructs this Garage node to connect to other Garage nodes at specified `<node_id>@<net_address>`. `node_id` is generated automatically on node start.
* @param {Array.<String>} requestBody * @param {Array.<String>} requestBody
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/AddNode200ResponseInner>} and HTTP response * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/AddNode200ResponseInner>} and HTTP response
@ -70,7 +71,7 @@ export default class NodesApi {
} }
/** /**
* Connect target node to other Garage nodes * Connect a new node
* Instructs this Garage node to connect to other Garage nodes at specified `<node_id>@<net_address>`. `node_id` is generated automatically on node start. * Instructs this Garage node to connect to other Garage nodes at specified `<node_id>@<net_address>`. `node_id` is generated automatically on node start.
* @param {Array.<String>} requestBody * @param {Array.<String>} requestBody
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/AddNode200ResponseInner>} * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/AddNode200ResponseInner>}
@ -84,8 +85,49 @@ export default class NodesApi {
/** /**
* Status of this node and other nodes in the cluster * Cluster health report
* Returns the cluster's current status, including: - ID of the node being queried and its version of the Garage daemon - Live nodes - Currently configured cluster layout - Staged changes to the cluster layout * Returns the global status of the cluster, the number of connected nodes (over the number of known ones), the number of healthy storage nodes (over the declared ones), and the number of healthy partitions (over the total).
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetHealth200Response} and HTTP response
*/
getHealthWithHttpInfo() {
let postBody = null;
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['bearerAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = GetHealth200Response;
return this.apiClient.callApi(
'/health', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Cluster health report
* Returns the global status of the cluster, the number of connected nodes (over the number of known ones), the number of healthy storage nodes (over the declared ones), and the number of healthy partitions (over the total).
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetHealth200Response}
*/
getHealth() {
return this.getHealthWithHttpInfo()
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Describe cluster
* Returns the cluster's current status, including: - ID of the node being queried and its version of the Garage daemon - Live nodes - Currently configured cluster layout - Staged changes to the cluster layout *Capacity is given in bytes*
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetNodes200Response} and HTTP response * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetNodes200Response} and HTTP response
*/ */
getNodesWithHttpInfo() { getNodesWithHttpInfo() {
@ -112,8 +154,8 @@ export default class NodesApi {
} }
/** /**
* Status of this node and other nodes in the cluster * Describe cluster
* Returns the cluster's current status, including: - ID of the node being queried and its version of the Garage daemon - Live nodes - Currently configured cluster layout - Staged changes to the cluster layout * Returns the cluster's current status, including: - ID of the node being queried and its version of the Garage daemon - Live nodes - Currently configured cluster layout - Staged changes to the cluster layout *Capacity is given in bytes*
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetNodes200Response} * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetNodes200Response}
*/ */
getNodes() { getNodes() {

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -17,6 +17,7 @@ import AddKeyRequest from './model/AddKeyRequest';
import AddNode200ResponseInner from './model/AddNode200ResponseInner'; import AddNode200ResponseInner from './model/AddNode200ResponseInner';
import AllowBucketKeyRequest from './model/AllowBucketKeyRequest'; import AllowBucketKeyRequest from './model/AllowBucketKeyRequest';
import AllowBucketKeyRequestPermissions from './model/AllowBucketKeyRequestPermissions'; import AllowBucketKeyRequestPermissions from './model/AllowBucketKeyRequestPermissions';
import ApplyLayout200Response from './model/ApplyLayout200Response';
import BucketInfo from './model/BucketInfo'; import BucketInfo from './model/BucketInfo';
import BucketInfoQuotas from './model/BucketInfoQuotas'; import BucketInfoQuotas from './model/BucketInfoQuotas';
import BucketInfoWebsiteConfig from './model/BucketInfoWebsiteConfig'; import BucketInfoWebsiteConfig from './model/BucketInfoWebsiteConfig';
@ -25,6 +26,7 @@ import ClusterLayout from './model/ClusterLayout';
import CreateBucketRequest from './model/CreateBucketRequest'; import CreateBucketRequest from './model/CreateBucketRequest';
import CreateBucketRequestLocalAlias from './model/CreateBucketRequestLocalAlias'; import CreateBucketRequestLocalAlias from './model/CreateBucketRequestLocalAlias';
import CreateBucketRequestLocalAliasAllow from './model/CreateBucketRequestLocalAliasAllow'; import CreateBucketRequestLocalAliasAllow from './model/CreateBucketRequestLocalAliasAllow';
import GetHealth200Response from './model/GetHealth200Response';
import GetNodes200Response from './model/GetNodes200Response'; import GetNodes200Response from './model/GetNodes200Response';
import ImportKeyRequest from './model/ImportKeyRequest'; import ImportKeyRequest from './model/ImportKeyRequest';
import KeyInfo from './model/KeyInfo'; import KeyInfo from './model/KeyInfo';
@ -37,6 +39,9 @@ import ListBuckets200ResponseInnerLocalAliasesInner from './model/ListBuckets200
import ListKeys200ResponseInner from './model/ListKeys200ResponseInner'; import ListKeys200ResponseInner from './model/ListKeys200ResponseInner';
import NodeClusterInfo from './model/NodeClusterInfo'; import NodeClusterInfo from './model/NodeClusterInfo';
import NodeNetworkInfo from './model/NodeNetworkInfo'; import NodeNetworkInfo from './model/NodeNetworkInfo';
import NodeRoleChange from './model/NodeRoleChange';
import NodeRoleRemove from './model/NodeRoleRemove';
import NodeRoleUpdate from './model/NodeRoleUpdate';
import UpdateBucketRequest from './model/UpdateBucketRequest'; import UpdateBucketRequest from './model/UpdateBucketRequest';
import UpdateBucketRequestQuotas from './model/UpdateBucketRequestQuotas'; import UpdateBucketRequestQuotas from './model/UpdateBucketRequestQuotas';
import UpdateBucketRequestWebsiteAccess from './model/UpdateBucketRequestWebsiteAccess'; import UpdateBucketRequestWebsiteAccess from './model/UpdateBucketRequestWebsiteAccess';
@ -78,7 +83,7 @@ import NodesApi from './api/NodesApi';
* </pre> * </pre>
* </p> * </p>
* @module index * @module index
* @version v0.8.0 * @version v0.9.0
*/ */
export { export {
/** /**
@ -111,6 +116,12 @@ export {
*/ */
AllowBucketKeyRequestPermissions, AllowBucketKeyRequestPermissions,
/**
* The ApplyLayout200Response model constructor.
* @property {module:model/ApplyLayout200Response}
*/
ApplyLayout200Response,
/** /**
* The BucketInfo model constructor. * The BucketInfo model constructor.
* @property {module:model/BucketInfo} * @property {module:model/BucketInfo}
@ -159,6 +170,12 @@ export {
*/ */
CreateBucketRequestLocalAliasAllow, CreateBucketRequestLocalAliasAllow,
/**
* The GetHealth200Response model constructor.
* @property {module:model/GetHealth200Response}
*/
GetHealth200Response,
/** /**
* The GetNodes200Response model constructor. * The GetNodes200Response model constructor.
* @property {module:model/GetNodes200Response} * @property {module:model/GetNodes200Response}
@ -231,6 +248,24 @@ export {
*/ */
NodeNetworkInfo, NodeNetworkInfo,
/**
* The NodeRoleChange model constructor.
* @property {module:model/NodeRoleChange}
*/
NodeRoleChange,
/**
* The NodeRoleRemove model constructor.
* @property {module:model/NodeRoleRemove}
*/
NodeRoleRemove,
/**
* The NodeRoleUpdate model constructor.
* @property {module:model/NodeRoleUpdate}
*/
NodeRoleUpdate,
/** /**
* The UpdateBucketRequest model constructor. * The UpdateBucketRequest model constructor.
* @property {module:model/UpdateBucketRequest} * @property {module:model/UpdateBucketRequest}

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/** /**
* The AddKeyRequest model module. * The AddKeyRequest model module.
* @module model/AddKeyRequest * @module model/AddKeyRequest
* @version v0.8.0 * @version v0.9.0
*/ */
class AddKeyRequest { class AddKeyRequest {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/** /**
* The AddNode200ResponseInner model module. * The AddNode200ResponseInner model module.
* @module model/AddNode200ResponseInner * @module model/AddNode200ResponseInner
* @version v0.8.0 * @version v0.9.0
*/ */
class AddNode200ResponseInner { class AddNode200ResponseInner {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -17,7 +17,7 @@ import AllowBucketKeyRequestPermissions from './AllowBucketKeyRequestPermissions
/** /**
* The AllowBucketKeyRequest model module. * The AllowBucketKeyRequest model module.
* @module model/AllowBucketKeyRequest * @module model/AllowBucketKeyRequest
* @version v0.8.0 * @version v0.9.0
*/ */
class AllowBucketKeyRequest { class AllowBucketKeyRequest {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/** /**
* The AllowBucketKeyRequestPermissions model module. * The AllowBucketKeyRequestPermissions model module.
* @module model/AllowBucketKeyRequestPermissions * @module model/AllowBucketKeyRequestPermissions
* @version v0.8.0 * @version v0.9.0
*/ */
class AllowBucketKeyRequestPermissions { class AllowBucketKeyRequestPermissions {
/** /**

View file

@ -0,0 +1,84 @@
/**
* Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
*
* The version of the OpenAPI document: v0.9.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import ClusterLayout from './ClusterLayout';
/**
* The ApplyLayout200Response model module.
* @module model/ApplyLayout200Response
* @version v0.9.0
*/
class ApplyLayout200Response {
/**
* Constructs a new <code>ApplyLayout200Response</code>.
* @alias module:model/ApplyLayout200Response
* @param message {Array.<String>}
* @param layout {module:model/ClusterLayout}
*/
constructor(message, layout) {
ApplyLayout200Response.initialize(this, message, layout);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, message, layout) {
obj['message'] = message;
obj['layout'] = layout;
}
/**
* Constructs a <code>ApplyLayout200Response</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ApplyLayout200Response} obj Optional instance to populate.
* @return {module:model/ApplyLayout200Response} The populated <code>ApplyLayout200Response</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ApplyLayout200Response();
if (data.hasOwnProperty('message')) {
obj['message'] = ApiClient.convertToType(data['message'], ['String']);
}
if (data.hasOwnProperty('layout')) {
obj['layout'] = ClusterLayout.constructFromObject(data['layout']);
}
}
return obj;
}
}
/**
* @member {Array.<String>} message
*/
ApplyLayout200Response.prototype['message'] = undefined;
/**
* @member {module:model/ClusterLayout} layout
*/
ApplyLayout200Response.prototype['layout'] = undefined;
export default ApplyLayout200Response;

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -19,7 +19,7 @@ import BucketKeyInfo from './BucketKeyInfo';
/** /**
* The BucketInfo model module. * The BucketInfo model module.
* @module model/BucketInfo * @module model/BucketInfo
* @version v0.8.0 * @version v0.9.0
*/ */
class BucketInfo { class BucketInfo {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/** /**
* The BucketInfoQuotas model module. * The BucketInfoQuotas model module.
* @module model/BucketInfoQuotas * @module model/BucketInfoQuotas
* @version v0.8.0 * @version v0.9.0
*/ */
class BucketInfoQuotas { class BucketInfoQuotas {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/** /**
* The BucketInfoWebsiteConfig model module. * The BucketInfoWebsiteConfig model module.
* @module model/BucketInfoWebsiteConfig * @module model/BucketInfoWebsiteConfig
* @version v0.8.0 * @version v0.9.0
*/ */
class BucketInfoWebsiteConfig { class BucketInfoWebsiteConfig {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -17,7 +17,7 @@ import CreateBucketRequestLocalAliasAllow from './CreateBucketRequestLocalAliasA
/** /**
* The BucketKeyInfo model module. * The BucketKeyInfo model module.
* @module model/BucketKeyInfo * @module model/BucketKeyInfo
* @version v0.8.0 * @version v0.9.0
*/ */
class BucketKeyInfo { class BucketKeyInfo {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -13,19 +13,20 @@
import ApiClient from '../ApiClient'; import ApiClient from '../ApiClient';
import NodeClusterInfo from './NodeClusterInfo'; import NodeClusterInfo from './NodeClusterInfo';
import NodeRoleChange from './NodeRoleChange';
/** /**
* The ClusterLayout model module. * The ClusterLayout model module.
* @module model/ClusterLayout * @module model/ClusterLayout
* @version v0.8.0 * @version v0.9.0
*/ */
class ClusterLayout { class ClusterLayout {
/** /**
* Constructs a new <code>ClusterLayout</code>. * Constructs a new <code>ClusterLayout</code>.
* @alias module:model/ClusterLayout * @alias module:model/ClusterLayout
* @param version {Number} * @param version {Number}
* @param roles {Object.<String, module:model/NodeClusterInfo>} * @param roles {Array.<module:model/NodeClusterInfo>}
* @param stagedRoleChanges {Object.<String, module:model/NodeClusterInfo>} * @param stagedRoleChanges {Array.<module:model/NodeRoleChange>}
*/ */
constructor(version, roles, stagedRoleChanges) { constructor(version, roles, stagedRoleChanges) {
@ -58,10 +59,10 @@ class ClusterLayout {
obj['version'] = ApiClient.convertToType(data['version'], 'Number'); obj['version'] = ApiClient.convertToType(data['version'], 'Number');
} }
if (data.hasOwnProperty('roles')) { if (data.hasOwnProperty('roles')) {
obj['roles'] = ApiClient.convertToType(data['roles'], {'String': NodeClusterInfo}); obj['roles'] = ApiClient.convertToType(data['roles'], [NodeClusterInfo]);
} }
if (data.hasOwnProperty('stagedRoleChanges')) { if (data.hasOwnProperty('stagedRoleChanges')) {
obj['stagedRoleChanges'] = ApiClient.convertToType(data['stagedRoleChanges'], {'String': NodeClusterInfo}); obj['stagedRoleChanges'] = ApiClient.convertToType(data['stagedRoleChanges'], [NodeRoleChange]);
} }
} }
return obj; return obj;
@ -76,12 +77,12 @@ class ClusterLayout {
ClusterLayout.prototype['version'] = undefined; ClusterLayout.prototype['version'] = undefined;
/** /**
* @member {Object.<String, module:model/NodeClusterInfo>} roles * @member {Array.<module:model/NodeClusterInfo>} roles
*/ */
ClusterLayout.prototype['roles'] = undefined; ClusterLayout.prototype['roles'] = undefined;
/** /**
* @member {Object.<String, module:model/NodeClusterInfo>} stagedRoleChanges * @member {Array.<module:model/NodeRoleChange>} stagedRoleChanges
*/ */
ClusterLayout.prototype['stagedRoleChanges'] = undefined; ClusterLayout.prototype['stagedRoleChanges'] = undefined;

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -17,7 +17,7 @@ import CreateBucketRequestLocalAlias from './CreateBucketRequestLocalAlias';
/** /**
* The CreateBucketRequest model module. * The CreateBucketRequest model module.
* @module model/CreateBucketRequest * @module model/CreateBucketRequest
* @version v0.8.0 * @version v0.9.0
*/ */
class CreateBucketRequest { class CreateBucketRequest {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -17,7 +17,7 @@ import CreateBucketRequestLocalAliasAllow from './CreateBucketRequestLocalAliasA
/** /**
* The CreateBucketRequestLocalAlias model module. * The CreateBucketRequestLocalAlias model module.
* @module model/CreateBucketRequestLocalAlias * @module model/CreateBucketRequestLocalAlias
* @version v0.8.0 * @version v0.9.0
*/ */
class CreateBucketRequestLocalAlias { class CreateBucketRequestLocalAlias {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/** /**
* The CreateBucketRequestLocalAliasAllow model module. * The CreateBucketRequestLocalAliasAllow model module.
* @module model/CreateBucketRequestLocalAliasAllow * @module model/CreateBucketRequestLocalAliasAllow
* @version v0.8.0 * @version v0.9.0
*/ */
class CreateBucketRequestLocalAliasAllow { class CreateBucketRequestLocalAliasAllow {
/** /**

View file

@ -0,0 +1,143 @@
/**
* Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
*
* The version of the OpenAPI document: v0.9.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The GetHealth200Response model module.
* @module model/GetHealth200Response
* @version v0.9.0
*/
class GetHealth200Response {
/**
* Constructs a new <code>GetHealth200Response</code>.
* @alias module:model/GetHealth200Response
* @param status {String}
* @param knownNodes {Number}
* @param connectedNodes {Number}
* @param storageNodes {Number}
* @param storageNodesOk {Number}
* @param partitions {Number}
* @param partitionsQuorum {Number}
* @param partitionsAllOk {Number}
*/
constructor(status, knownNodes, connectedNodes, storageNodes, storageNodesOk, partitions, partitionsQuorum, partitionsAllOk) {
GetHealth200Response.initialize(this, status, knownNodes, connectedNodes, storageNodes, storageNodesOk, partitions, partitionsQuorum, partitionsAllOk);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, status, knownNodes, connectedNodes, storageNodes, storageNodesOk, partitions, partitionsQuorum, partitionsAllOk) {
obj['status'] = status;
obj['knownNodes'] = knownNodes;
obj['connectedNodes'] = connectedNodes;
obj['storageNodes'] = storageNodes;
obj['storageNodesOk'] = storageNodesOk;
obj['partitions'] = partitions;
obj['partitionsQuorum'] = partitionsQuorum;
obj['partitionsAllOk'] = partitionsAllOk;
}
/**
* Constructs a <code>GetHealth200Response</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/GetHealth200Response} obj Optional instance to populate.
* @return {module:model/GetHealth200Response} The populated <code>GetHealth200Response</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new GetHealth200Response();
if (data.hasOwnProperty('status')) {
obj['status'] = ApiClient.convertToType(data['status'], 'String');
}
if (data.hasOwnProperty('knownNodes')) {
obj['knownNodes'] = ApiClient.convertToType(data['knownNodes'], 'Number');
}
if (data.hasOwnProperty('connectedNodes')) {
obj['connectedNodes'] = ApiClient.convertToType(data['connectedNodes'], 'Number');
}
if (data.hasOwnProperty('storageNodes')) {
obj['storageNodes'] = ApiClient.convertToType(data['storageNodes'], 'Number');
}
if (data.hasOwnProperty('storageNodesOk')) {
obj['storageNodesOk'] = ApiClient.convertToType(data['storageNodesOk'], 'Number');
}
if (data.hasOwnProperty('partitions')) {
obj['partitions'] = ApiClient.convertToType(data['partitions'], 'Number');
}
if (data.hasOwnProperty('partitionsQuorum')) {
obj['partitionsQuorum'] = ApiClient.convertToType(data['partitionsQuorum'], 'Number');
}
if (data.hasOwnProperty('partitionsAllOk')) {
obj['partitionsAllOk'] = ApiClient.convertToType(data['partitionsAllOk'], 'Number');
}
}
return obj;
}
}
/**
* @member {String} status
*/
GetHealth200Response.prototype['status'] = undefined;
/**
* @member {Number} knownNodes
*/
GetHealth200Response.prototype['knownNodes'] = undefined;
/**
* @member {Number} connectedNodes
*/
GetHealth200Response.prototype['connectedNodes'] = undefined;
/**
* @member {Number} storageNodes
*/
GetHealth200Response.prototype['storageNodes'] = undefined;
/**
* @member {Number} storageNodesOk
*/
GetHealth200Response.prototype['storageNodesOk'] = undefined;
/**
* @member {Number} partitions
*/
GetHealth200Response.prototype['partitions'] = undefined;
/**
* @member {Number} partitionsQuorum
*/
GetHealth200Response.prototype['partitionsQuorum'] = undefined;
/**
* @member {Number} partitionsAllOk
*/
GetHealth200Response.prototype['partitionsAllOk'] = undefined;
export default GetHealth200Response;

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -18,7 +18,7 @@ import NodeNetworkInfo from './NodeNetworkInfo';
/** /**
* The GetNodes200Response model module. * The GetNodes200Response model module.
* @module model/GetNodes200Response * @module model/GetNodes200Response
* @version v0.8.0 * @version v0.9.0
*/ */
class GetNodes200Response { class GetNodes200Response {
/** /**
@ -26,12 +26,15 @@ class GetNodes200Response {
* @alias module:model/GetNodes200Response * @alias module:model/GetNodes200Response
* @param node {String} * @param node {String}
* @param garageVersion {String} * @param garageVersion {String}
* @param knownNodes {Object.<String, module:model/NodeNetworkInfo>} * @param garageFeatures {Array.<String>}
* @param rustVersion {String}
* @param dbEngine {String}
* @param knownNodes {Array.<module:model/NodeNetworkInfo>}
* @param layout {module:model/ClusterLayout} * @param layout {module:model/ClusterLayout}
*/ */
constructor(node, garageVersion, knownNodes, layout) { constructor(node, garageVersion, garageFeatures, rustVersion, dbEngine, knownNodes, layout) {
GetNodes200Response.initialize(this, node, garageVersion, knownNodes, layout); GetNodes200Response.initialize(this, node, garageVersion, garageFeatures, rustVersion, dbEngine, knownNodes, layout);
} }
/** /**
@ -39,9 +42,12 @@ class GetNodes200Response {
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use. * Only for internal use.
*/ */
static initialize(obj, node, garageVersion, knownNodes, layout) { static initialize(obj, node, garageVersion, garageFeatures, rustVersion, dbEngine, knownNodes, layout) {
obj['node'] = node; obj['node'] = node;
obj['garageVersion'] = garageVersion; obj['garageVersion'] = garageVersion;
obj['garageFeatures'] = garageFeatures;
obj['rustVersion'] = rustVersion;
obj['dbEngine'] = dbEngine;
obj['knownNodes'] = knownNodes; obj['knownNodes'] = knownNodes;
obj['layout'] = layout; obj['layout'] = layout;
} }
@ -63,8 +69,17 @@ class GetNodes200Response {
if (data.hasOwnProperty('garageVersion')) { if (data.hasOwnProperty('garageVersion')) {
obj['garageVersion'] = ApiClient.convertToType(data['garageVersion'], 'String'); obj['garageVersion'] = ApiClient.convertToType(data['garageVersion'], 'String');
} }
if (data.hasOwnProperty('garageFeatures')) {
obj['garageFeatures'] = ApiClient.convertToType(data['garageFeatures'], ['String']);
}
if (data.hasOwnProperty('rustVersion')) {
obj['rustVersion'] = ApiClient.convertToType(data['rustVersion'], 'String');
}
if (data.hasOwnProperty('dbEngine')) {
obj['dbEngine'] = ApiClient.convertToType(data['dbEngine'], 'String');
}
if (data.hasOwnProperty('knownNodes')) { if (data.hasOwnProperty('knownNodes')) {
obj['knownNodes'] = ApiClient.convertToType(data['knownNodes'], {'String': NodeNetworkInfo}); obj['knownNodes'] = ApiClient.convertToType(data['knownNodes'], [NodeNetworkInfo]);
} }
if (data.hasOwnProperty('layout')) { if (data.hasOwnProperty('layout')) {
obj['layout'] = ClusterLayout.constructFromObject(data['layout']); obj['layout'] = ClusterLayout.constructFromObject(data['layout']);
@ -87,7 +102,22 @@ GetNodes200Response.prototype['node'] = undefined;
GetNodes200Response.prototype['garageVersion'] = undefined; GetNodes200Response.prototype['garageVersion'] = undefined;
/** /**
* @member {Object.<String, module:model/NodeNetworkInfo>} knownNodes * @member {Array.<String>} garageFeatures
*/
GetNodes200Response.prototype['garageFeatures'] = undefined;
/**
* @member {String} rustVersion
*/
GetNodes200Response.prototype['rustVersion'] = undefined;
/**
* @member {String} dbEngine
*/
GetNodes200Response.prototype['dbEngine'] = undefined;
/**
* @member {Array.<module:model/NodeNetworkInfo>} knownNodes
*/ */
GetNodes200Response.prototype['knownNodes'] = undefined; GetNodes200Response.prototype['knownNodes'] = undefined;

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/** /**
* The ImportKeyRequest model module. * The ImportKeyRequest model module.
* @module model/ImportKeyRequest * @module model/ImportKeyRequest
* @version v0.8.0 * @version v0.9.0
*/ */
class ImportKeyRequest { class ImportKeyRequest {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -18,7 +18,7 @@ import KeyInfoPermissions from './KeyInfoPermissions';
/** /**
* The KeyInfo model module. * The KeyInfo model module.
* @module model/KeyInfo * @module model/KeyInfo
* @version v0.8.0 * @version v0.9.0
*/ */
class KeyInfo { class KeyInfo {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -17,7 +17,7 @@ import KeyInfoBucketsInnerPermissions from './KeyInfoBucketsInnerPermissions';
/** /**
* The KeyInfoBucketsInner model module. * The KeyInfoBucketsInner model module.
* @module model/KeyInfoBucketsInner * @module model/KeyInfoBucketsInner
* @version v0.8.0 * @version v0.9.0
*/ */
class KeyInfoBucketsInner { class KeyInfoBucketsInner {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/** /**
* The KeyInfoBucketsInnerPermissions model module. * The KeyInfoBucketsInnerPermissions model module.
* @module model/KeyInfoBucketsInnerPermissions * @module model/KeyInfoBucketsInnerPermissions
* @version v0.8.0 * @version v0.9.0
*/ */
class KeyInfoBucketsInnerPermissions { class KeyInfoBucketsInnerPermissions {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/** /**
* The KeyInfoPermissions model module. * The KeyInfoPermissions model module.
* @module model/KeyInfoPermissions * @module model/KeyInfoPermissions
* @version v0.8.0 * @version v0.9.0
*/ */
class KeyInfoPermissions { class KeyInfoPermissions {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,16 +16,17 @@ import ApiClient from '../ApiClient';
/** /**
* The LayoutVersion model module. * The LayoutVersion model module.
* @module model/LayoutVersion * @module model/LayoutVersion
* @version v0.8.0 * @version v0.9.0
*/ */
class LayoutVersion { class LayoutVersion {
/** /**
* Constructs a new <code>LayoutVersion</code>. * Constructs a new <code>LayoutVersion</code>.
* @alias module:model/LayoutVersion * @alias module:model/LayoutVersion
* @param version {Number}
*/ */
constructor() { constructor(version) {
LayoutVersion.initialize(this); LayoutVersion.initialize(this, version);
} }
/** /**
@ -33,7 +34,8 @@ class LayoutVersion {
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use. * Only for internal use.
*/ */
static initialize(obj) { static initialize(obj, version) {
obj['version'] = version;
} }
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -17,7 +17,7 @@ import ListBuckets200ResponseInnerLocalAliasesInner from './ListBuckets200Respon
/** /**
* The ListBuckets200ResponseInner model module. * The ListBuckets200ResponseInner model module.
* @module model/ListBuckets200ResponseInner * @module model/ListBuckets200ResponseInner
* @version v0.8.0 * @version v0.9.0
*/ */
class ListBuckets200ResponseInner { class ListBuckets200ResponseInner {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/** /**
* The ListBuckets200ResponseInnerLocalAliasesInner model module. * The ListBuckets200ResponseInnerLocalAliasesInner model module.
* @module model/ListBuckets200ResponseInnerLocalAliasesInner * @module model/ListBuckets200ResponseInnerLocalAliasesInner
* @version v0.8.0 * @version v0.9.0
*/ */
class ListBuckets200ResponseInnerLocalAliasesInner { class ListBuckets200ResponseInnerLocalAliasesInner {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/** /**
* The ListKeys200ResponseInner model module. * The ListKeys200ResponseInner model module.
* @module model/ListKeys200ResponseInner * @module model/ListKeys200ResponseInner
* @version v0.8.0 * @version v0.9.0
*/ */
class ListKeys200ResponseInner { class ListKeys200ResponseInner {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,19 +16,18 @@ import ApiClient from '../ApiClient';
/** /**
* The NodeClusterInfo model module. * The NodeClusterInfo model module.
* @module model/NodeClusterInfo * @module model/NodeClusterInfo
* @version v0.8.0 * @version v0.9.0
*/ */
class NodeClusterInfo { class NodeClusterInfo {
/** /**
* Constructs a new <code>NodeClusterInfo</code>. * Constructs a new <code>NodeClusterInfo</code>.
* @alias module:model/NodeClusterInfo * @alias module:model/NodeClusterInfo
* @param zone {String} * @param zone {String}
* @param capacity {Number}
* @param tags {Array.<String>} User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage * @param tags {Array.<String>} User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage
*/ */
constructor(zone, capacity, tags) { constructor(zone, tags) {
NodeClusterInfo.initialize(this, zone, capacity, tags); NodeClusterInfo.initialize(this, zone, tags);
} }
/** /**
@ -36,9 +35,8 @@ class NodeClusterInfo {
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use. * Only for internal use.
*/ */
static initialize(obj, zone, capacity, tags) { static initialize(obj, zone, tags) {
obj['zone'] = zone; obj['zone'] = zone;
obj['capacity'] = capacity;
obj['tags'] = tags; obj['tags'] = tags;
} }

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/** /**
* The NodeNetworkInfo model module. * The NodeNetworkInfo model module.
* @module model/NodeNetworkInfo * @module model/NodeNetworkInfo
* @version v0.8.0 * @version v0.9.0
*/ */
class NodeNetworkInfo { class NodeNetworkInfo {
/** /**
@ -39,8 +39,8 @@ class NodeNetworkInfo {
*/ */
static initialize(obj, addr, isUp, lastSeenSecsAgo, hostname) { static initialize(obj, addr, isUp, lastSeenSecsAgo, hostname) {
obj['addr'] = addr; obj['addr'] = addr;
obj['is_up'] = isUp; obj['isUp'] = isUp;
obj['last_seen_secs_ago'] = lastSeenSecsAgo; obj['lastSeenSecsAgo'] = lastSeenSecsAgo;
obj['hostname'] = hostname; obj['hostname'] = hostname;
} }
@ -55,14 +55,17 @@ class NodeNetworkInfo {
if (data) { if (data) {
obj = obj || new NodeNetworkInfo(); obj = obj || new NodeNetworkInfo();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
if (data.hasOwnProperty('addr')) { if (data.hasOwnProperty('addr')) {
obj['addr'] = ApiClient.convertToType(data['addr'], 'String'); obj['addr'] = ApiClient.convertToType(data['addr'], 'String');
} }
if (data.hasOwnProperty('is_up')) { if (data.hasOwnProperty('isUp')) {
obj['is_up'] = ApiClient.convertToType(data['is_up'], 'Boolean'); obj['isUp'] = ApiClient.convertToType(data['isUp'], 'Boolean');
} }
if (data.hasOwnProperty('last_seen_secs_ago')) { if (data.hasOwnProperty('lastSeenSecsAgo')) {
obj['last_seen_secs_ago'] = ApiClient.convertToType(data['last_seen_secs_ago'], 'Number'); obj['lastSeenSecsAgo'] = ApiClient.convertToType(data['lastSeenSecsAgo'], 'Number');
} }
if (data.hasOwnProperty('hostname')) { if (data.hasOwnProperty('hostname')) {
obj['hostname'] = ApiClient.convertToType(data['hostname'], 'String'); obj['hostname'] = ApiClient.convertToType(data['hostname'], 'String');
@ -74,20 +77,25 @@ class NodeNetworkInfo {
} }
/**
* @member {String} id
*/
NodeNetworkInfo.prototype['id'] = undefined;
/** /**
* @member {String} addr * @member {String} addr
*/ */
NodeNetworkInfo.prototype['addr'] = undefined; NodeNetworkInfo.prototype['addr'] = undefined;
/** /**
* @member {Boolean} is_up * @member {Boolean} isUp
*/ */
NodeNetworkInfo.prototype['is_up'] = undefined; NodeNetworkInfo.prototype['isUp'] = undefined;
/** /**
* @member {Number} last_seen_secs_ago * @member {Number} lastSeenSecsAgo
*/ */
NodeNetworkInfo.prototype['last_seen_secs_ago'] = undefined; NodeNetworkInfo.prototype['lastSeenSecsAgo'] = undefined;
/** /**
* @member {String} hostname * @member {String} hostname

145
src/model/NodeRoleChange.js Normal file
View file

@ -0,0 +1,145 @@
/**
* Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
*
* The version of the OpenAPI document: v0.9.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import NodeRoleRemove from './NodeRoleRemove';
import NodeRoleUpdate from './NodeRoleUpdate';
/**
* The NodeRoleChange model module.
* @module model/NodeRoleChange
* @version v0.9.0
*/
class NodeRoleChange {
/**
* Constructs a new <code>NodeRoleChange</code>.
* @alias module:model/NodeRoleChange
* @implements module:model/NodeRoleRemove
* @implements module:model/NodeRoleUpdate
* @param id {String}
* @param remove {Boolean}
* @param zone {String}
* @param capacity {Number}
* @param tags {Array.<String>}
*/
constructor(id, remove, zone, capacity, tags) {
NodeRoleRemove.initialize(this, id, remove);NodeRoleUpdate.initialize(this, id, zone, capacity, tags);
NodeRoleChange.initialize(this, id, remove, zone, capacity, tags);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, id, remove, zone, capacity, tags) {
obj['id'] = id;
obj['remove'] = remove;
obj['zone'] = zone;
obj['capacity'] = capacity;
obj['tags'] = tags;
}
/**
* Constructs a <code>NodeRoleChange</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/NodeRoleChange} obj Optional instance to populate.
* @return {module:model/NodeRoleChange} The populated <code>NodeRoleChange</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new NodeRoleChange();
NodeRoleRemove.constructFromObject(data, obj);
NodeRoleUpdate.constructFromObject(data, obj);
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
if (data.hasOwnProperty('remove')) {
obj['remove'] = ApiClient.convertToType(data['remove'], 'Boolean');
}
if (data.hasOwnProperty('zone')) {
obj['zone'] = ApiClient.convertToType(data['zone'], 'String');
}
if (data.hasOwnProperty('capacity')) {
obj['capacity'] = ApiClient.convertToType(data['capacity'], 'Number');
}
if (data.hasOwnProperty('tags')) {
obj['tags'] = ApiClient.convertToType(data['tags'], ['String']);
}
}
return obj;
}
}
/**
* @member {String} id
*/
NodeRoleChange.prototype['id'] = undefined;
/**
* @member {Boolean} remove
*/
NodeRoleChange.prototype['remove'] = undefined;
/**
* @member {String} zone
*/
NodeRoleChange.prototype['zone'] = undefined;
/**
* @member {Number} capacity
*/
NodeRoleChange.prototype['capacity'] = undefined;
/**
* @member {Array.<String>} tags
*/
NodeRoleChange.prototype['tags'] = undefined;
// Implement NodeRoleRemove interface:
/**
* @member {String} id
*/
NodeRoleRemove.prototype['id'] = undefined;
/**
* @member {Boolean} remove
*/
NodeRoleRemove.prototype['remove'] = undefined;
// Implement NodeRoleUpdate interface:
/**
* @member {String} id
*/
NodeRoleUpdate.prototype['id'] = undefined;
/**
* @member {String} zone
*/
NodeRoleUpdate.prototype['zone'] = undefined;
/**
* @member {Number} capacity
*/
NodeRoleUpdate.prototype['capacity'] = undefined;
/**
* @member {Array.<String>} tags
*/
NodeRoleUpdate.prototype['tags'] = undefined;
export default NodeRoleChange;

View file

@ -0,0 +1,83 @@
/**
* Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
*
* The version of the OpenAPI document: v0.9.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The NodeRoleRemove model module.
* @module model/NodeRoleRemove
* @version v0.9.0
*/
class NodeRoleRemove {
/**
* Constructs a new <code>NodeRoleRemove</code>.
* @alias module:model/NodeRoleRemove
* @param id {String}
* @param remove {Boolean}
*/
constructor(id, remove) {
NodeRoleRemove.initialize(this, id, remove);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, id, remove) {
obj['id'] = id;
obj['remove'] = remove;
}
/**
* Constructs a <code>NodeRoleRemove</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/NodeRoleRemove} obj Optional instance to populate.
* @return {module:model/NodeRoleRemove} The populated <code>NodeRoleRemove</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new NodeRoleRemove();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
if (data.hasOwnProperty('remove')) {
obj['remove'] = ApiClient.convertToType(data['remove'], 'Boolean');
}
}
return obj;
}
}
/**
* @member {String} id
*/
NodeRoleRemove.prototype['id'] = undefined;
/**
* @member {Boolean} remove
*/
NodeRoleRemove.prototype['remove'] = undefined;
export default NodeRoleRemove;

103
src/model/NodeRoleUpdate.js Normal file
View file

@ -0,0 +1,103 @@
/**
* Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
*
* The version of the OpenAPI document: v0.9.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The NodeRoleUpdate model module.
* @module model/NodeRoleUpdate
* @version v0.9.0
*/
class NodeRoleUpdate {
/**
* Constructs a new <code>NodeRoleUpdate</code>.
* @alias module:model/NodeRoleUpdate
* @param id {String}
* @param zone {String}
* @param capacity {Number}
* @param tags {Array.<String>}
*/
constructor(id, zone, capacity, tags) {
NodeRoleUpdate.initialize(this, id, zone, capacity, tags);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, id, zone, capacity, tags) {
obj['id'] = id;
obj['zone'] = zone;
obj['capacity'] = capacity;
obj['tags'] = tags;
}
/**
* Constructs a <code>NodeRoleUpdate</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/NodeRoleUpdate} obj Optional instance to populate.
* @return {module:model/NodeRoleUpdate} The populated <code>NodeRoleUpdate</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new NodeRoleUpdate();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
if (data.hasOwnProperty('zone')) {
obj['zone'] = ApiClient.convertToType(data['zone'], 'String');
}
if (data.hasOwnProperty('capacity')) {
obj['capacity'] = ApiClient.convertToType(data['capacity'], 'Number');
}
if (data.hasOwnProperty('tags')) {
obj['tags'] = ApiClient.convertToType(data['tags'], ['String']);
}
}
return obj;
}
}
/**
* @member {String} id
*/
NodeRoleUpdate.prototype['id'] = undefined;
/**
* @member {String} zone
*/
NodeRoleUpdate.prototype['zone'] = undefined;
/**
* @member {Number} capacity
*/
NodeRoleUpdate.prototype['capacity'] = undefined;
/**
* @member {Array.<String>} tags
*/
NodeRoleUpdate.prototype['tags'] = undefined;
export default NodeRoleUpdate;

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -18,7 +18,7 @@ import UpdateBucketRequestWebsiteAccess from './UpdateBucketRequestWebsiteAccess
/** /**
* The UpdateBucketRequest model module. * The UpdateBucketRequest model module.
* @module model/UpdateBucketRequest * @module model/UpdateBucketRequest
* @version v0.8.0 * @version v0.9.0
*/ */
class UpdateBucketRequest { class UpdateBucketRequest {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/** /**
* The UpdateBucketRequestQuotas model module. * The UpdateBucketRequestQuotas model module.
* @module model/UpdateBucketRequestQuotas * @module model/UpdateBucketRequestQuotas
* @version v0.8.0 * @version v0.9.0
*/ */
class UpdateBucketRequestQuotas { class UpdateBucketRequestQuotas {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/** /**
* The UpdateBucketRequestWebsiteAccess model module. * The UpdateBucketRequestWebsiteAccess model module.
* @module model/UpdateBucketRequestWebsiteAccess * @module model/UpdateBucketRequestWebsiteAccess
* @version v0.8.0 * @version v0.9.0
*/ */
class UpdateBucketRequestWebsiteAccess { class UpdateBucketRequestWebsiteAccess {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -18,7 +18,7 @@ import UpdateKeyRequestDeny from './UpdateKeyRequestDeny';
/** /**
* The UpdateKeyRequest model module. * The UpdateKeyRequest model module.
* @module model/UpdateKeyRequest * @module model/UpdateKeyRequest
* @version v0.8.0 * @version v0.9.0
*/ */
class UpdateKeyRequest { class UpdateKeyRequest {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/** /**
* The UpdateKeyRequestAllow model module. * The UpdateKeyRequestAllow model module.
* @module model/UpdateKeyRequestAllow * @module model/UpdateKeyRequestAllow
* @version v0.8.0 * @version v0.9.0
*/ */
class UpdateKeyRequestAllow { class UpdateKeyRequestAllow {
/** /**

View file

@ -1,8 +1,8 @@
/** /**
* Garage Administration API v0+garage-v0.8.0 * Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
* *
* The version of the OpenAPI document: v0.8.0 * The version of the OpenAPI document: v0.9.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/** /**
* The UpdateKeyRequestDeny model module. * The UpdateKeyRequestDeny model module.
* @module model/UpdateKeyRequestDeny * @module model/UpdateKeyRequestDeny
* @version v0.8.0 * @version v0.9.0
*/ */
class UpdateKeyRequestDeny { class UpdateKeyRequestDeny {
/** /**

View file

@ -0,0 +1,71 @@
/**
* Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
*
* The version of the OpenAPI document: v0.9.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.garage);
}
}(this, function(expect, garage) {
'use strict';
var instance;
beforeEach(function() {
instance = new garage.ApplyLayout200Response();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('ApplyLayout200Response', function() {
it('should create an instance of ApplyLayout200Response', function() {
// uncomment below and update the code to test ApplyLayout200Response
//var instance = new garage.ApplyLayout200Response();
//expect(instance).to.be.a(garage.ApplyLayout200Response);
});
it('should have the property message (base name: "message")', function() {
// uncomment below and update the code to test the property message
//var instance = new garage.ApplyLayout200Response();
//expect(instance).to.be();
});
it('should have the property layout (base name: "layout")', function() {
// uncomment below and update the code to test the property layout
//var instance = new garage.ApplyLayout200Response();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,107 @@
/**
* Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
*
* The version of the OpenAPI document: v0.9.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.garage);
}
}(this, function(expect, garage) {
'use strict';
var instance;
beforeEach(function() {
instance = new garage.GetHealth200Response();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('GetHealth200Response', function() {
it('should create an instance of GetHealth200Response', function() {
// uncomment below and update the code to test GetHealth200Response
//var instance = new garage.GetHealth200Response();
//expect(instance).to.be.a(garage.GetHealth200Response);
});
it('should have the property status (base name: "status")', function() {
// uncomment below and update the code to test the property status
//var instance = new garage.GetHealth200Response();
//expect(instance).to.be();
});
it('should have the property knownNodes (base name: "knownNodes")', function() {
// uncomment below and update the code to test the property knownNodes
//var instance = new garage.GetHealth200Response();
//expect(instance).to.be();
});
it('should have the property connectedNodes (base name: "connectedNodes")', function() {
// uncomment below and update the code to test the property connectedNodes
//var instance = new garage.GetHealth200Response();
//expect(instance).to.be();
});
it('should have the property storageNodes (base name: "storageNodes")', function() {
// uncomment below and update the code to test the property storageNodes
//var instance = new garage.GetHealth200Response();
//expect(instance).to.be();
});
it('should have the property storageNodesOk (base name: "storageNodesOk")', function() {
// uncomment below and update the code to test the property storageNodesOk
//var instance = new garage.GetHealth200Response();
//expect(instance).to.be();
});
it('should have the property partitions (base name: "partitions")', function() {
// uncomment below and update the code to test the property partitions
//var instance = new garage.GetHealth200Response();
//expect(instance).to.be();
});
it('should have the property partitionsQuorum (base name: "partitionsQuorum")', function() {
// uncomment below and update the code to test the property partitionsQuorum
//var instance = new garage.GetHealth200Response();
//expect(instance).to.be();
});
it('should have the property partitionsAllOk (base name: "partitionsAllOk")', function() {
// uncomment below and update the code to test the property partitionsAllOk
//var instance = new garage.GetHealth200Response();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,89 @@
/**
* Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
*
* The version of the OpenAPI document: v0.9.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.garage);
}
}(this, function(expect, garage) {
'use strict';
var instance;
beforeEach(function() {
instance = new garage.NodeRoleChange();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('NodeRoleChange', function() {
it('should create an instance of NodeRoleChange', function() {
// uncomment below and update the code to test NodeRoleChange
//var instance = new garage.NodeRoleChange();
//expect(instance).to.be.a(garage.NodeRoleChange);
});
it('should have the property id (base name: "id")', function() {
// uncomment below and update the code to test the property id
//var instance = new garage.NodeRoleChange();
//expect(instance).to.be();
});
it('should have the property remove (base name: "remove")', function() {
// uncomment below and update the code to test the property remove
//var instance = new garage.NodeRoleChange();
//expect(instance).to.be();
});
it('should have the property zone (base name: "zone")', function() {
// uncomment below and update the code to test the property zone
//var instance = new garage.NodeRoleChange();
//expect(instance).to.be();
});
it('should have the property capacity (base name: "capacity")', function() {
// uncomment below and update the code to test the property capacity
//var instance = new garage.NodeRoleChange();
//expect(instance).to.be();
});
it('should have the property tags (base name: "tags")', function() {
// uncomment below and update the code to test the property tags
//var instance = new garage.NodeRoleChange();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,71 @@
/**
* Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
*
* The version of the OpenAPI document: v0.9.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.garage);
}
}(this, function(expect, garage) {
'use strict';
var instance;
beforeEach(function() {
instance = new garage.NodeRoleRemove();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('NodeRoleRemove', function() {
it('should create an instance of NodeRoleRemove', function() {
// uncomment below and update the code to test NodeRoleRemove
//var instance = new garage.NodeRoleRemove();
//expect(instance).to.be.a(garage.NodeRoleRemove);
});
it('should have the property id (base name: "id")', function() {
// uncomment below and update the code to test the property id
//var instance = new garage.NodeRoleRemove();
//expect(instance).to.be();
});
it('should have the property remove (base name: "remove")', function() {
// uncomment below and update the code to test the property remove
//var instance = new garage.NodeRoleRemove();
//expect(instance).to.be();
});
});
}));

View file

@ -0,0 +1,83 @@
/**
* Garage Administration API v0+garage-v0.9.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
*
* The version of the OpenAPI document: v0.9.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.garage);
}
}(this, function(expect, garage) {
'use strict';
var instance;
beforeEach(function() {
instance = new garage.NodeRoleUpdate();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('NodeRoleUpdate', function() {
it('should create an instance of NodeRoleUpdate', function() {
// uncomment below and update the code to test NodeRoleUpdate
//var instance = new garage.NodeRoleUpdate();
//expect(instance).to.be.a(garage.NodeRoleUpdate);
});
it('should have the property id (base name: "id")', function() {
// uncomment below and update the code to test the property id
//var instance = new garage.NodeRoleUpdate();
//expect(instance).to.be();
});
it('should have the property zone (base name: "zone")', function() {
// uncomment below and update the code to test the property zone
//var instance = new garage.NodeRoleUpdate();
//expect(instance).to.be();
});
it('should have the property capacity (base name: "capacity")', function() {
// uncomment below and update the code to test the property capacity
//var instance = new garage.NodeRoleUpdate();
//expect(instance).to.be();
});
it('should have the property tags (base name: "tags")', function() {
// uncomment below and update the code to test the property tags
//var instance = new garage.NodeRoleUpdate();
//expect(instance).to.be();
});
});
}));