api-v1, initial commit

This commit is contained in:
Quentin 2023-11-22 18:30:42 +01:00
parent 635d3c1517
commit c31d1d046f
Signed by: quentin
GPG Key ID: E9602264D639FF68
59 changed files with 1124 additions and 250 deletions

View File

@ -6,6 +6,7 @@ docs/AddKeyRequest.md
docs/AddNode200ResponseInner.md
docs/AllowBucketKeyRequest.md
docs/AllowBucketKeyRequestPermissions.md
docs/ApplyLayout200Response.md
docs/BucketApi.md
docs/BucketInfo.md
docs/BucketInfoQuotas.md
@ -29,6 +30,9 @@ docs/ListBuckets200ResponseInnerLocalAliasesInner.md
docs/ListKeys200ResponseInner.md
docs/NodeClusterInfo.md
docs/NodeNetworkInfo.md
docs/NodeRoleChange.md
docs/NodeRoleRemove.md
docs/NodeRoleUpdate.md
docs/NodesApi.md
docs/UpdateBucketRequest.md
docs/UpdateBucketRequestQuotas.md
@ -49,6 +53,7 @@ src/model/AddKeyRequest.js
src/model/AddNode200ResponseInner.js
src/model/AllowBucketKeyRequest.js
src/model/AllowBucketKeyRequestPermissions.js
src/model/ApplyLayout200Response.js
src/model/BucketInfo.js
src/model/BucketInfoQuotas.js
src/model/BucketInfoWebsiteConfig.js
@ -69,9 +74,16 @@ src/model/ListBuckets200ResponseInnerLocalAliasesInner.js
src/model/ListKeys200ResponseInner.js
src/model/NodeClusterInfo.js
src/model/NodeNetworkInfo.js
src/model/NodeRoleChange.js
src/model/NodeRoleRemove.js
src/model/NodeRoleUpdate.js
src/model/UpdateBucketRequest.js
src/model/UpdateBucketRequestQuotas.js
src/model/UpdateBucketRequestWebsiteAccess.js
src/model/UpdateKeyRequest.js
src/model/UpdateKeyRequestAllow.js
src/model/UpdateKeyRequestDeny.js
test/model/ApplyLayout200Response.spec.js
test/model/NodeRoleChange.spec.js
test/model/NodeRoleRemove.spec.js
test/model/NodeRoleUpdate.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.
*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:
- API version: v0.8.0
- Package version: v0.8.0
- API version: v0.9.0
- Package version: v0.9.0
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
## Installation
@ -22,7 +22,7 @@ To publish the library as a [npm](https://www.npmjs.com/), please follow the pro
Then install it via:
```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:
@ -45,7 +45,7 @@ Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the follow
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
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
@ -101,7 +101,7 @@ module: {
Please follow the [installation](#installation) instruction and execute the following JS code:
```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;
// Configure Bearer access token for authorization: bearerAuth
@ -121,7 +121,7 @@ api.allowBucketKey(allowBucketKeyRequest).then(function(data) {
## 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
------------ | ------------- | ------------- | -------------
@ -158,6 +158,7 @@ Class | Method | HTTP request | Description
- [garage.AddNode200ResponseInner](docs/AddNode200ResponseInner.md)
- [garage.AllowBucketKeyRequest](docs/AllowBucketKeyRequest.md)
- [garage.AllowBucketKeyRequestPermissions](docs/AllowBucketKeyRequestPermissions.md)
- [garage.ApplyLayout200Response](docs/ApplyLayout200Response.md)
- [garage.BucketInfo](docs/BucketInfo.md)
- [garage.BucketInfoQuotas](docs/BucketInfoQuotas.md)
- [garage.BucketInfoWebsiteConfig](docs/BucketInfoWebsiteConfig.md)
@ -178,6 +179,9 @@ Class | Method | HTTP request | Description
- [garage.ListKeys200ResponseInner](docs/ListKeys200ResponseInner.md)
- [garage.NodeClusterInfo](docs/NodeClusterInfo.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.UpdateBucketRequestQuotas](docs/UpdateBucketRequestQuotas.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,6 +1,6 @@
# garage.BucketApi
All URIs are relative to *http://localhost:3903/v0*
All URIs are relative to *http://localhost:3903/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
@ -30,7 +30,7 @@ Allow key
### Example
```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'];
@ -78,7 +78,7 @@ Creates a new bucket, either with a global alias, a local one, or no alias at al
### Example
```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'];
@ -126,7 +126,7 @@ Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is no
### Example
```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'];
@ -174,7 +174,7 @@ Delete a global alias from the target bucket
### Example
```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'];
@ -224,7 +224,7 @@ Delete a local alias, bound to specified account, from the target bucket
### Example
```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'];
@ -276,7 +276,7 @@ Deny key
### Example
```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'];
@ -324,7 +324,7 @@ Find a bucket by its global alias
### Example
```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'];
@ -372,7 +372,7 @@ Given a bucket identifier, get its information. It includes its aliases, its web
### Example
```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'];
@ -420,7 +420,7 @@ List all the buckets on the cluster with their UUID and their global and local a
### Example
```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'];
@ -464,7 +464,7 @@ Add a global alias to the target bucket
### Example
```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'];
@ -514,7 +514,7 @@ Add a local alias, bound to specified account, to the target bucket
### Example
```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'];
@ -561,12 +561,12 @@ Name | Type | Description | Notes
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
```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'];

View File

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

View File

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

View File

@ -1,6 +1,6 @@
# garage.KeyApi
All URIs are relative to *http://localhost:3903/v0*
All URIs are relative to *http://localhost:3903/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
@ -25,14 +25,14 @@ Creates a new API access key.
### Example
```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.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) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
@ -46,7 +46,7 @@ apiInstance.addKey(addKeyRequest).then((data) => {
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
@ -73,7 +73,7 @@ Delete a key from the cluster. Its access will be removed from all the buckets.
### Example
```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'];
@ -112,16 +112,16 @@ null (empty response body)
## getKey
> KeyInfo getKey(accessKey)
> KeyInfo getKey(accessKey, opts)
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. For confidentiality reasons, the secret key is not returned by default: you must pass the &#x60;showSecretKey&#x60; query parameter to get it.
### Example
```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'];
@ -129,7 +129,10 @@ bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new garage.KeyApi();
let accessKey = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage
apiInstance.getKey(accessKey).then((data) => {
let opts = {
'showSecretKey': true // Boolean | Wether or not the secret key should be returned in the response
};
apiInstance.getKey(accessKey, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
@ -143,6 +146,7 @@ apiInstance.getKey(accessKey).then((data) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**accessKey** | **String**| The exact API access key generated by Garage |
**showSecretKey** | **Boolean**| Wether or not the secret key should be returned in the response | [optional] [default to false]
### Return type
@ -169,7 +173,7 @@ Imports an existing API key. This feature must only be used for migrations and b
### Example
```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'];
@ -217,7 +221,7 @@ Returns all API access keys in the cluster.
### Example
```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'];
@ -252,16 +256,16 @@ This endpoint does not need any parameter.
## searchKey
> KeyInfo searchKey(pattern)
> KeyInfo searchKey(pattern, opts)
Select key by pattern
Find the first key matching the given pattern based on its identifier aor friendly name and return its information.
Find the first key matching the given pattern based on its identifier or friendly name and return its information. For confidentiality reasons, the secret key is not returned by default: you must pass the &#x60;showSecretKey&#x60; query parameter to get it.
### Example
```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'];
@ -269,7 +273,10 @@ 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) => {
let opts = {
'showSecretKey': true // Boolean | Wether or not the secret key should be returned in the response
};
apiInstance.searchKey(pattern, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
@ -283,6 +290,7 @@ apiInstance.searchKey(pattern).then((data) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pattern** | **String**| A pattern (beginning or full string) corresponding to a key identifier or friendly name |
**showSecretKey** | **Boolean**| Wether or not the secret key should be returned in the response | [optional] [default to false]
### Return type
@ -304,12 +312,12 @@ Name | Type | Description | Notes
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
```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'];

View File

@ -1,6 +1,6 @@
# garage.LayoutApi
All URIs are relative to *http://localhost:3903/v0*
All URIs are relative to *http://localhost:3903/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
@ -13,25 +13,25 @@ Method | HTTP request | Description
## addLayout
> addLayout(requestBody)
> ClusterLayout addLayout(nodeRoleChange)
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
```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.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.
apiInstance.addLayout(requestBody).then(() => {
console.log('API called successfully.');
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(nodeRoleChange).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
@ -43,11 +43,11 @@ apiInstance.addLayout(requestBody).then(() => {
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
null (empty response body)
[**ClusterLayout**](ClusterLayout.md)
### Authorization
@ -56,21 +56,21 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
- **Accept**: application/json
## applyLayout
> applyLayout(layoutVersion)
> ApplyLayout200Response applyLayout(layoutVersion)
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
```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'];
@ -78,8 +78,8 @@ bearerAuth.accessToken = "YOUR ACCESS TOKEN"
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.
apiInstance.applyLayout(layoutVersion).then(() => {
console.log('API called successfully.');
apiInstance.applyLayout(layoutVersion).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
@ -95,7 +95,7 @@ Name | Type | Description | Notes
### Return type
null (empty response body)
[**ApplyLayout200Response**](ApplyLayout200Response.md)
### Authorization
@ -104,7 +104,7 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
- **Accept**: application/json
## getLayout
@ -113,12 +113,12 @@ null (empty response body)
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
```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'];
@ -162,7 +162,7 @@ Clears all of the staged layout changes.
### Example
```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'];

View File

@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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 |

View File

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

13
docs/NodeRoleChange.md Normal file
View File

@ -0,0 +1,13 @@
# garage.NodeRoleChange
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**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** | | [optional]
**remove** | **Boolean** | |

12
docs/NodeRoleUpdate.md Normal file
View File

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

View File

@ -1,6 +1,6 @@
# garage.NodesApi
All URIs are relative to *http://localhost:3903/v0*
All URIs are relative to *http://localhost:3903/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
@ -20,7 +20,7 @@ Instructs this Garage node to connect to other Garage nodes at specified &#x60;&
### Example
```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'];
@ -63,12 +63,12 @@ Name | Type | Description | Notes
Status of this node and other nodes in the 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
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_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'];

View File

@ -1,6 +1,6 @@
{
"name": "garage_administration_api_v0garage_v0_8_0",
"version": "v0.8.0",
"name": "garage_administration_api_v0garage_v0_9_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!* ",
"license": "Unlicense",
"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!*
*
* 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).
@ -17,7 +17,7 @@ import querystring from "querystring";
/**
* @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
* @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.
* @type {String}
* @default http://localhost:3903/v0
* @default http://localhost:3903/v1
*/
this.basePath = basePath.replace(/\/+$/, '');
@ -55,7 +55,7 @@ class ApiClient {
* @default {}
*/
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() {
return [
{
'url': "http://localhost:3903/v0",
'url': "http://localhost:3903/v1",
'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!*
*
* 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).
@ -22,7 +22,7 @@ import UpdateBucketRequest from '../model/UpdateBucketRequest';
/**
* Bucket service.
* @module api/BucketApi
* @version v0.8.0
* @version v0.9.0
*/
export default class BucketApi {
@ -601,7 +601,7 @@ export default class BucketApi {
/**
* 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 {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
@ -640,7 +640,7 @@ export default class BucketApi {
/**
* 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 {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}

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!*
*
* 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).
@ -22,7 +22,7 @@ import UpdateKeyRequest from '../model/UpdateKeyRequest';
/**
* Key service.
* @module api/KeyApi
* @version v0.8.0
* @version v0.9.0
*/
export default class KeyApi {
@ -42,7 +42,7 @@ export default class KeyApi {
/**
* Create a new API 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
*/
addKeyWithHttpInfo(addKeyRequest) {
@ -75,7 +75,7 @@ export default class KeyApi {
/**
* Create a new API 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}
*/
addKey(addKeyRequest) {
@ -136,11 +136,14 @@ export default class KeyApi {
/**
* 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. 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 {Boolean} 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
*/
getKeyWithHttpInfo(accessKey) {
getKeyWithHttpInfo(accessKey, opts) {
opts = opts || {};
let postBody = null;
// verify the required parameter 'accessKey' is set
if (accessKey === undefined || accessKey === null) {
@ -151,6 +154,7 @@ export default class KeyApi {
'access_key': accessKey
};
let queryParams = {
'showSecretKey': opts['showSecretKey']
};
let headerParams = {
};
@ -170,12 +174,14 @@ export default class KeyApi {
/**
* 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. 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 {Boolean} 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}
*/
getKey(accessKey) {
return this.getKeyWithHttpInfo(accessKey)
getKey(accessKey, opts) {
return this.getKeyWithHttpInfo(accessKey, opts)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -272,11 +278,14 @@ 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.
* Find the first key matching the given pattern based on its identifier or friendly name and return its information. For confidentiality reasons, the secret key is not returned by default: you must pass the `showSecretKey` query parameter to get it.
* @param {String} pattern A pattern (beginning or full string) corresponding to a key identifier or friendly name
* @param {Object} opts Optional parameters
* @param {Boolean} 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
*/
searchKeyWithHttpInfo(pattern) {
searchKeyWithHttpInfo(pattern, opts) {
opts = opts || {};
let postBody = null;
// verify the required parameter 'pattern' is set
if (pattern === undefined || pattern === null) {
@ -287,6 +296,7 @@ export default class KeyApi {
'pattern': pattern
};
let queryParams = {
'showSecretKey': opts['showSecretKey']
};
let headerParams = {
};
@ -306,12 +316,14 @@ 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.
* Find the first key matching the given pattern based on its identifier or friendly name and return its information. For confidentiality reasons, the secret key is not returned by default: you must pass the `showSecretKey` query parameter to get it.
* @param {String} pattern A pattern (beginning or full string) corresponding to a key identifier or friendly name
* @param {Object} opts Optional parameters
* @param {Boolean} 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}
*/
searchKey(pattern) {
return this.searchKeyWithHttpInfo(pattern)
searchKey(pattern, opts) {
return this.searchKeyWithHttpInfo(pattern, opts)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -320,7 +332,7 @@ export default class KeyApi {
/**
* 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 {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
@ -359,7 +371,7 @@ export default class KeyApi {
/**
* 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 {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}

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!*
*
* 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).
@ -13,14 +13,15 @@
import ApiClient from "../ApiClient";
import ApplyLayout200Response from '../model/ApplyLayout200Response';
import ClusterLayout from '../model/ClusterLayout';
import LayoutVersion from '../model/LayoutVersion';
import NodeClusterInfo from '../model/NodeClusterInfo';
import NodeRoleChange from '../model/NodeRoleChange';
/**
* Layout service.
* @module api/LayoutApi
* @version v0.8.0
* @version v0.9.0
*/
export default class LayoutApi {
@ -39,15 +40,15 @@ export default class LayoutApi {
/**
* 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.
* @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.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
* 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 {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 data of type {@link module:model/ClusterLayout} and HTTP response
*/
addLayoutWithHttpInfo(requestBody) {
let postBody = requestBody;
// verify the required parameter 'requestBody' is set
if (requestBody === undefined || requestBody === null) {
throw new Error("Missing the required parameter 'requestBody' when calling addLayout");
addLayoutWithHttpInfo(nodeRoleChange) {
let postBody = nodeRoleChange;
// verify the required parameter 'nodeRoleChange' is set
if (nodeRoleChange === undefined || nodeRoleChange === null) {
throw new Error("Missing the required parameter 'nodeRoleChange' when calling addLayout");
}
let pathParams = {
@ -61,8 +62,8 @@ export default class LayoutApi {
let authNames = ['bearerAuth'];
let contentTypes = ['application/json'];
let accepts = [];
let returnType = null;
let accepts = ['application/json'];
let returnType = ClusterLayout;
return this.apiClient.callApi(
'/layout', 'POST',
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. 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.
* @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.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
* 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 {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 data of type {@link module:model/ClusterLayout}
*/
addLayout(requestBody) {
return this.addLayoutWithHttpInfo(requestBody)
addLayout(nodeRoleChange) {
return this.addLayoutWithHttpInfo(nodeRoleChange)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -86,9 +87,9 @@ export default class LayoutApi {
/**
* 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.
* @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) {
let postBody = layoutVersion;
@ -108,8 +109,8 @@ export default class LayoutApi {
let authNames = ['bearerAuth'];
let contentTypes = ['application/json'];
let accepts = [];
let returnType = null;
let accepts = ['application/json'];
let returnType = ApplyLayout200Response;
return this.apiClient.callApi(
'/layout/apply', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
@ -119,9 +120,9 @@ export default class LayoutApi {
/**
* 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.
* @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) {
return this.applyLayoutWithHttpInfo(layoutVersion)
@ -133,7 +134,7 @@ export default class LayoutApi {
/**
* 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
*/
getLayoutWithHttpInfo() {
@ -161,7 +162,7 @@ export default class LayoutApi {
/**
* 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}
*/
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!*
*
* 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).
@ -19,7 +19,7 @@ import GetNodes200Response from '../model/GetNodes200Response';
/**
* Nodes service.
* @module api/NodesApi
* @version v0.8.0
* @version v0.9.0
*/
export default class NodesApi {
@ -85,7 +85,7 @@ export default class NodesApi {
/**
* Status of this node and other nodes in the 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 an object containing data of type {@link module:model/GetNodes200Response} and HTTP response
*/
getNodesWithHttpInfo() {
@ -113,7 +113,7 @@ export default class NodesApi {
/**
* Status of this node and other nodes in the 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}
*/
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!*
*
* 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).
@ -17,6 +17,7 @@ import AddKeyRequest from './model/AddKeyRequest';
import AddNode200ResponseInner from './model/AddNode200ResponseInner';
import AllowBucketKeyRequest from './model/AllowBucketKeyRequest';
import AllowBucketKeyRequestPermissions from './model/AllowBucketKeyRequestPermissions';
import ApplyLayout200Response from './model/ApplyLayout200Response';
import BucketInfo from './model/BucketInfo';
import BucketInfoQuotas from './model/BucketInfoQuotas';
import BucketInfoWebsiteConfig from './model/BucketInfoWebsiteConfig';
@ -37,6 +38,9 @@ import ListBuckets200ResponseInnerLocalAliasesInner from './model/ListBuckets200
import ListKeys200ResponseInner from './model/ListKeys200ResponseInner';
import NodeClusterInfo from './model/NodeClusterInfo';
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 UpdateBucketRequestQuotas from './model/UpdateBucketRequestQuotas';
import UpdateBucketRequestWebsiteAccess from './model/UpdateBucketRequestWebsiteAccess';
@ -78,7 +82,7 @@ import NodesApi from './api/NodesApi';
* </pre>
* </p>
* @module index
* @version v0.8.0
* @version v0.9.0
*/
export {
/**
@ -111,6 +115,12 @@ export {
*/
AllowBucketKeyRequestPermissions,
/**
* The ApplyLayout200Response model constructor.
* @property {module:model/ApplyLayout200Response}
*/
ApplyLayout200Response,
/**
* The BucketInfo model constructor.
* @property {module:model/BucketInfo}
@ -231,6 +241,24 @@ export {
*/
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.
* @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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The AddKeyRequest model module.
* @module model/AddKeyRequest
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The AddNode200ResponseInner model module.
* @module model/AddNode200ResponseInner
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -17,7 +17,7 @@ import AllowBucketKeyRequestPermissions from './AllowBucketKeyRequestPermissions
/**
* The AllowBucketKeyRequest model module.
* @module model/AllowBucketKeyRequest
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The AllowBucketKeyRequestPermissions model module.
* @module model/AllowBucketKeyRequestPermissions
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -19,7 +19,7 @@ import BucketKeyInfo from './BucketKeyInfo';
/**
* The BucketInfo model module.
* @module model/BucketInfo
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The BucketInfoQuotas model module.
* @module model/BucketInfoQuotas
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The BucketInfoWebsiteConfig model module.
* @module model/BucketInfoWebsiteConfig
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -17,7 +17,7 @@ import CreateBucketRequestLocalAliasAllow from './CreateBucketRequestLocalAliasA
/**
* The BucketKeyInfo model module.
* @module model/BucketKeyInfo
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -13,19 +13,20 @@
import ApiClient from '../ApiClient';
import NodeClusterInfo from './NodeClusterInfo';
import NodeRoleChange from './NodeRoleChange';
/**
* The ClusterLayout model module.
* @module model/ClusterLayout
* @version v0.8.0
* @version v0.9.0
*/
class ClusterLayout {
/**
* Constructs a new <code>ClusterLayout</code>.
* @alias module:model/ClusterLayout
* @param version {Number}
* @param roles {Object.<String, module:model/NodeClusterInfo>}
* @param stagedRoleChanges {Object.<String, module:model/NodeClusterInfo>}
* @param roles {Array.<module:model/NodeClusterInfo>}
* @param stagedRoleChanges {Array.<module:model/NodeRoleChange>}
*/
constructor(version, roles, stagedRoleChanges) {
@ -58,10 +59,10 @@ class ClusterLayout {
obj['version'] = ApiClient.convertToType(data['version'], 'Number');
}
if (data.hasOwnProperty('roles')) {
obj['roles'] = ApiClient.convertToType(data['roles'], {'String': NodeClusterInfo});
obj['roles'] = ApiClient.convertToType(data['roles'], [NodeClusterInfo]);
}
if (data.hasOwnProperty('stagedRoleChanges')) {
obj['stagedRoleChanges'] = ApiClient.convertToType(data['stagedRoleChanges'], {'String': NodeClusterInfo});
obj['stagedRoleChanges'] = ApiClient.convertToType(data['stagedRoleChanges'], [NodeRoleChange]);
}
}
return obj;
@ -76,12 +77,12 @@ class ClusterLayout {
ClusterLayout.prototype['version'] = undefined;
/**
* @member {Object.<String, module:model/NodeClusterInfo>} roles
* @member {Array.<module:model/NodeClusterInfo>} roles
*/
ClusterLayout.prototype['roles'] = undefined;
/**
* @member {Object.<String, module:model/NodeClusterInfo>} stagedRoleChanges
* @member {Array.<module:model/NodeRoleChange>} stagedRoleChanges
*/
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!*
*
* 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).
@ -17,7 +17,7 @@ import CreateBucketRequestLocalAlias from './CreateBucketRequestLocalAlias';
/**
* The CreateBucketRequest model module.
* @module model/CreateBucketRequest
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -17,7 +17,7 @@ import CreateBucketRequestLocalAliasAllow from './CreateBucketRequestLocalAliasA
/**
* The CreateBucketRequestLocalAlias model module.
* @module model/CreateBucketRequestLocalAlias
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The CreateBucketRequestLocalAliasAllow model module.
* @module model/CreateBucketRequestLocalAliasAllow
* @version v0.8.0
* @version v0.9.0
*/
class CreateBucketRequestLocalAliasAllow {
/**

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!*
*
* 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).
@ -18,7 +18,7 @@ import NodeNetworkInfo from './NodeNetworkInfo';
/**
* The GetNodes200Response model module.
* @module model/GetNodes200Response
* @version v0.8.0
* @version v0.9.0
*/
class GetNodes200Response {
/**
@ -26,12 +26,15 @@ class GetNodes200Response {
* @alias module:model/GetNodes200Response
* @param node {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}
*/
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).
* 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['garageVersion'] = garageVersion;
obj['garageFeatures'] = garageFeatures;
obj['rustVersion'] = rustVersion;
obj['dbEngine'] = dbEngine;
obj['knownNodes'] = knownNodes;
obj['layout'] = layout;
}
@ -63,8 +69,17 @@ class GetNodes200Response {
if (data.hasOwnProperty('garageVersion')) {
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')) {
obj['knownNodes'] = ApiClient.convertToType(data['knownNodes'], {'String': NodeNetworkInfo});
obj['knownNodes'] = ApiClient.convertToType(data['knownNodes'], [NodeNetworkInfo]);
}
if (data.hasOwnProperty('layout')) {
obj['layout'] = ClusterLayout.constructFromObject(data['layout']);
@ -87,7 +102,22 @@ GetNodes200Response.prototype['node'] = 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;

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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The ImportKeyRequest model module.
* @module model/ImportKeyRequest
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -18,7 +18,7 @@ import KeyInfoPermissions from './KeyInfoPermissions';
/**
* The KeyInfo model module.
* @module model/KeyInfo
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -17,7 +17,7 @@ import KeyInfoBucketsInnerPermissions from './KeyInfoBucketsInnerPermissions';
/**
* The KeyInfoBucketsInner model module.
* @module model/KeyInfoBucketsInner
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The KeyInfoBucketsInnerPermissions model module.
* @module model/KeyInfoBucketsInnerPermissions
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The KeyInfoPermissions model module.
* @module model/KeyInfoPermissions
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The LayoutVersion model module.
* @module model/LayoutVersion
* @version v0.8.0
* @version v0.9.0
*/
class LayoutVersion {
/**

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!*
*
* 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).
@ -17,7 +17,7 @@ import ListBuckets200ResponseInnerLocalAliasesInner from './ListBuckets200Respon
/**
* The ListBuckets200ResponseInner model module.
* @module model/ListBuckets200ResponseInner
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The ListBuckets200ResponseInnerLocalAliasesInner model module.
* @module model/ListBuckets200ResponseInnerLocalAliasesInner
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The ListKeys200ResponseInner model module.
* @module model/ListKeys200ResponseInner
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -16,19 +16,18 @@ import ApiClient from '../ApiClient';
/**
* The NodeClusterInfo model module.
* @module model/NodeClusterInfo
* @version v0.8.0
* @version v0.9.0
*/
class NodeClusterInfo {
/**
* Constructs a new <code>NodeClusterInfo</code>.
* @alias module:model/NodeClusterInfo
* @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
*/
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).
* Only for internal use.
*/
static initialize(obj, zone, capacity, tags) {
static initialize(obj, zone, tags) {
obj['zone'] = zone;
obj['capacity'] = capacity;
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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The NodeNetworkInfo model module.
* @module model/NodeNetworkInfo
* @version v0.8.0
* @version v0.9.0
*/
class NodeNetworkInfo {
/**
@ -39,8 +39,8 @@ class NodeNetworkInfo {
*/
static initialize(obj, addr, isUp, lastSeenSecsAgo, hostname) {
obj['addr'] = addr;
obj['is_up'] = isUp;
obj['last_seen_secs_ago'] = lastSeenSecsAgo;
obj['isUp'] = isUp;
obj['lastSeenSecsAgo'] = lastSeenSecsAgo;
obj['hostname'] = hostname;
}
@ -55,14 +55,17 @@ class NodeNetworkInfo {
if (data) {
obj = obj || new NodeNetworkInfo();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
if (data.hasOwnProperty('addr')) {
obj['addr'] = ApiClient.convertToType(data['addr'], 'String');
}
if (data.hasOwnProperty('is_up')) {
obj['is_up'] = ApiClient.convertToType(data['is_up'], 'Boolean');
if (data.hasOwnProperty('isUp')) {
obj['isUp'] = ApiClient.convertToType(data['isUp'], 'Boolean');
}
if (data.hasOwnProperty('last_seen_secs_ago')) {
obj['last_seen_secs_ago'] = ApiClient.convertToType(data['last_seen_secs_ago'], 'Number');
if (data.hasOwnProperty('lastSeenSecsAgo')) {
obj['lastSeenSecsAgo'] = ApiClient.convertToType(data['lastSeenSecsAgo'], 'Number');
}
if (data.hasOwnProperty('hostname')) {
obj['hostname'] = ApiClient.convertToType(data['hostname'], 'String');
@ -74,20 +77,25 @@ class NodeNetworkInfo {
}
/**
* @member {String} id
*/
NodeNetworkInfo.prototype['id'] = undefined;
/**
* @member {String} addr
*/
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

143
src/model/NodeRoleChange.js Normal file
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';
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 remove {Boolean}
* @param zone {String}
* @param capacity {Number}
* @param tags {Array.<String>}
*/
constructor(remove, zone, capacity, tags) {
NodeRoleRemove.initialize(this, remove);NodeRoleUpdate.initialize(this, zone, capacity, tags);
NodeRoleChange.initialize(this, 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, remove, zone, capacity, tags) {
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,81 @@
/**
* 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 remove {Boolean}
*/
constructor(remove) {
NodeRoleRemove.initialize(this, 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, remove) {
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;

101
src/model/NodeRoleUpdate.js Normal file
View File

@ -0,0 +1,101 @@
/**
* 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 zone {String}
* @param capacity {Number}
* @param tags {Array.<String>}
*/
constructor(zone, capacity, tags) {
NodeRoleUpdate.initialize(this, 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, zone, capacity, tags) {
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!*
*
* 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).
@ -18,7 +18,7 @@ import UpdateBucketRequestWebsiteAccess from './UpdateBucketRequestWebsiteAccess
/**
* The UpdateBucketRequest model module.
* @module model/UpdateBucketRequest
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The UpdateBucketRequestQuotas model module.
* @module model/UpdateBucketRequestQuotas
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The UpdateBucketRequestWebsiteAccess model module.
* @module model/UpdateBucketRequestWebsiteAccess
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -18,7 +18,7 @@ import UpdateKeyRequestDeny from './UpdateKeyRequestDeny';
/**
* The UpdateKeyRequest model module.
* @module model/UpdateKeyRequest
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The UpdateKeyRequestAllow model module.
* @module model/UpdateKeyRequestAllow
* @version v0.8.0
* @version v0.9.0
*/
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!*
*
* 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).
@ -16,7 +16,7 @@ import ApiClient from '../ApiClient';
/**
* The UpdateKeyRequestDeny model module.
* @module model/UpdateKeyRequestDeny
* @version v0.8.0
* @version v0.9.0
*/
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,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();
});
});
}));