diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 82ee1a4..a214586 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -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 diff --git a/README.md b/README.md index 92269dd..63cef99 100644 --- a/README.md +++ b/README.md @@ -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/ @@ -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) diff --git a/docs/ApplyLayout200Response.md b/docs/ApplyLayout200Response.md new file mode 100644 index 0000000..db3869e --- /dev/null +++ b/docs/ApplyLayout200Response.md @@ -0,0 +1,10 @@ +# garage.ApplyLayout200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **[String]** | | +**layout** | [**ClusterLayout**](ClusterLayout.md) | | + + diff --git a/docs/BucketApi.md b/docs/BucketApi.md index d68fa36..82fd123 100644 --- a/docs/BucketApi.md +++ b/docs/BucketApi.md @@ -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 (`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. ### 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']; diff --git a/docs/ClusterLayout.md b/docs/ClusterLayout.md index 7918431..5947aa3 100644 --- a/docs/ClusterLayout.md +++ b/docs/ClusterLayout.md @@ -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) | | diff --git a/docs/GetNodes200Response.md b/docs/GetNodes200Response.md index bcf6758..72b313f 100644 --- a/docs/GetNodes200Response.md +++ b/docs/GetNodes200Response.md @@ -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) | | diff --git a/docs/KeyApi.md b/docs/KeyApi.md index d5fbb90..3e2bc72 100644 --- a/docs/KeyApi.md +++ b/docs/KeyApi.md @@ -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)| \"You can set a friendly name for this key, send an empty string instead\" | + **addKeyRequest** | [**AddKeyRequest**](AddKeyRequest.md)| 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 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 `showSecretKey` 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 `showSecretKey` 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, `null` 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']; diff --git a/docs/LayoutApi.md b/docs/LayoutApi.md index e0c3373..d7c08ec 100644 --- a/docs/LayoutApi.md +++ b/docs/LayoutApi.md @@ -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 `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. Note that setting the capacity to `null` will configure the node as a gateway. +Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. Setting the capacity to `null` will configure the node as a gateway. Otherwise, capacity must be now set in bytes (before Garage 0.9 it was arbitrary weights). For example to declare 100GB, you must set `capacity: 100000000000`. Garage uses internally the International System of Units (SI), it assumes that 1kB = 1000 bytes, and displays storage as kB, MB, GB (and not KiB, MiB, GiB that assume 1KiB = 1024 bytes). ### 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 `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. | + **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 (`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 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 `message` 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'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`.* ### 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']; diff --git a/docs/NodeClusterInfo.md b/docs/NodeClusterInfo.md index da13ef3..3985982 100644 --- a/docs/NodeClusterInfo.md +++ b/docs/NodeClusterInfo.md @@ -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 | diff --git a/docs/NodeNetworkInfo.md b/docs/NodeNetworkInfo.md index 943734c..24ec70c 100644 --- a/docs/NodeNetworkInfo.md +++ b/docs/NodeNetworkInfo.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] **addr** | **String** | | **isUp** | **Boolean** | | **lastSeenSecsAgo** | **Number** | | diff --git a/docs/NodeRoleChange.md b/docs/NodeRoleChange.md new file mode 100644 index 0000000..d9c7ecb --- /dev/null +++ b/docs/NodeRoleChange.md @@ -0,0 +1,13 @@ +# garage.NodeRoleChange + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**remove** | **Boolean** | | +**zone** | **String** | | +**capacity** | **Number** | | +**tags** | **[String]** | | + + diff --git a/docs/NodeRoleRemove.md b/docs/NodeRoleRemove.md new file mode 100644 index 0000000..9282b0a --- /dev/null +++ b/docs/NodeRoleRemove.md @@ -0,0 +1,10 @@ +# garage.NodeRoleRemove + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**remove** | **Boolean** | | + + diff --git a/docs/NodeRoleUpdate.md b/docs/NodeRoleUpdate.md new file mode 100644 index 0000000..d45744e --- /dev/null +++ b/docs/NodeRoleUpdate.md @@ -0,0 +1,12 @@ +# garage.NodeRoleUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**zone** | **String** | | +**capacity** | **Number** | | +**tags** | **[String]** | | + + diff --git a/docs/NodesApi.md b/docs/NodesApi.md index bdfc6e9..78cf6bb 100644 --- a/docs/NodesApi.md +++ b/docs/NodesApi.md @@ -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 `& ### 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'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* ### 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']; diff --git a/package.json b/package.json index 038f6f8..053f222 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/ApiClient.js b/src/ApiClient.js index 4ce2245..f3680df 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -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", } ]; diff --git a/src/api/BucketApi.js b/src/api/BucketApi.js index ffd0821..ebac5cb 100644 --- a/src/api/BucketApi.js +++ b/src/api/BucketApi.js @@ -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} diff --git a/src/api/KeyApi.js b/src/api/KeyApi.js index 6c90bd9..5e84686 100644 --- a/src/api/KeyApi.js +++ b/src/api/KeyApi.js @@ -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} diff --git a/src/api/LayoutApi.js b/src/api/LayoutApi.js index c07ca46..8800ff5 100644 --- a/src/api/LayoutApi.js +++ b/src/api/LayoutApi.js @@ -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.} 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.} 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.} 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.} 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() { diff --git a/src/api/NodesApi.js b/src/api/NodesApi.js index 73a1344..66f9756 100644 --- a/src/api/NodesApi.js +++ b/src/api/NodesApi.js @@ -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() { diff --git a/src/index.js b/src/index.js index 76bb8d3..ee07b9c 100644 --- a/src/index.js +++ b/src/index.js @@ -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'; * *

* @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} diff --git a/src/model/AddKeyRequest.js b/src/model/AddKeyRequest.js index 07edeb3..c65367d 100644 --- a/src/model/AddKeyRequest.js +++ b/src/model/AddKeyRequest.js @@ -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 { /** diff --git a/src/model/AddNode200ResponseInner.js b/src/model/AddNode200ResponseInner.js index 56df484..19b3f1a 100644 --- a/src/model/AddNode200ResponseInner.js +++ b/src/model/AddNode200ResponseInner.js @@ -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 { /** diff --git a/src/model/AllowBucketKeyRequest.js b/src/model/AllowBucketKeyRequest.js index fade968..d83149b 100644 --- a/src/model/AllowBucketKeyRequest.js +++ b/src/model/AllowBucketKeyRequest.js @@ -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 { /** diff --git a/src/model/AllowBucketKeyRequestPermissions.js b/src/model/AllowBucketKeyRequestPermissions.js index e478375..c7b5e18 100644 --- a/src/model/AllowBucketKeyRequestPermissions.js +++ b/src/model/AllowBucketKeyRequestPermissions.js @@ -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 { /** diff --git a/src/model/ApplyLayout200Response.js b/src/model/ApplyLayout200Response.js new file mode 100644 index 0000000..abd5daf --- /dev/null +++ b/src/model/ApplyLayout200Response.js @@ -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 ApplyLayout200Response. + * @alias module:model/ApplyLayout200Response + * @param message {Array.} + * @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 ApplyLayout200Response from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj 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 ApplyLayout200Response 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.} message + */ +ApplyLayout200Response.prototype['message'] = undefined; + +/** + * @member {module:model/ClusterLayout} layout + */ +ApplyLayout200Response.prototype['layout'] = undefined; + + + + + + +export default ApplyLayout200Response; + diff --git a/src/model/BucketInfo.js b/src/model/BucketInfo.js index fae6a1d..e737189 100644 --- a/src/model/BucketInfo.js +++ b/src/model/BucketInfo.js @@ -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 { /** diff --git a/src/model/BucketInfoQuotas.js b/src/model/BucketInfoQuotas.js index 20ee780..5024dbb 100644 --- a/src/model/BucketInfoQuotas.js +++ b/src/model/BucketInfoQuotas.js @@ -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 { /** diff --git a/src/model/BucketInfoWebsiteConfig.js b/src/model/BucketInfoWebsiteConfig.js index ff65bc1..4a7b23b 100644 --- a/src/model/BucketInfoWebsiteConfig.js +++ b/src/model/BucketInfoWebsiteConfig.js @@ -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 { /** diff --git a/src/model/BucketKeyInfo.js b/src/model/BucketKeyInfo.js index 1275ee5..950ec18 100644 --- a/src/model/BucketKeyInfo.js +++ b/src/model/BucketKeyInfo.js @@ -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 { /** diff --git a/src/model/ClusterLayout.js b/src/model/ClusterLayout.js index c4d4961..a044090 100644 --- a/src/model/ClusterLayout.js +++ b/src/model/ClusterLayout.js @@ -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 ClusterLayout. * @alias module:model/ClusterLayout * @param version {Number} - * @param roles {Object.} - * @param stagedRoleChanges {Object.} + * @param roles {Array.} + * @param stagedRoleChanges {Array.} */ 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.} roles + * @member {Array.} roles */ ClusterLayout.prototype['roles'] = undefined; /** - * @member {Object.} stagedRoleChanges + * @member {Array.} stagedRoleChanges */ ClusterLayout.prototype['stagedRoleChanges'] = undefined; diff --git a/src/model/CreateBucketRequest.js b/src/model/CreateBucketRequest.js index bf45a1a..35aa7a9 100644 --- a/src/model/CreateBucketRequest.js +++ b/src/model/CreateBucketRequest.js @@ -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 { /** diff --git a/src/model/CreateBucketRequestLocalAlias.js b/src/model/CreateBucketRequestLocalAlias.js index 00c6e7d..92dbe94 100644 --- a/src/model/CreateBucketRequestLocalAlias.js +++ b/src/model/CreateBucketRequestLocalAlias.js @@ -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 { /** diff --git a/src/model/CreateBucketRequestLocalAliasAllow.js b/src/model/CreateBucketRequestLocalAliasAllow.js index b7888ed..209077c 100644 --- a/src/model/CreateBucketRequestLocalAliasAllow.js +++ b/src/model/CreateBucketRequestLocalAliasAllow.js @@ -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 { /** diff --git a/src/model/GetNodes200Response.js b/src/model/GetNodes200Response.js index a00d797..e6e2769 100644 --- a/src/model/GetNodes200Response.js +++ b/src/model/GetNodes200Response.js @@ -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.} + * @param garageFeatures {Array.} + * @param rustVersion {String} + * @param dbEngine {String} + * @param knownNodes {Array.} * @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.} knownNodes + * @member {Array.} garageFeatures + */ +GetNodes200Response.prototype['garageFeatures'] = undefined; + +/** + * @member {String} rustVersion + */ +GetNodes200Response.prototype['rustVersion'] = undefined; + +/** + * @member {String} dbEngine + */ +GetNodes200Response.prototype['dbEngine'] = undefined; + +/** + * @member {Array.} knownNodes */ GetNodes200Response.prototype['knownNodes'] = undefined; diff --git a/src/model/ImportKeyRequest.js b/src/model/ImportKeyRequest.js index 128c0e5..d552ae0 100644 --- a/src/model/ImportKeyRequest.js +++ b/src/model/ImportKeyRequest.js @@ -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 { /** diff --git a/src/model/KeyInfo.js b/src/model/KeyInfo.js index de2d7d8..eaff04f 100644 --- a/src/model/KeyInfo.js +++ b/src/model/KeyInfo.js @@ -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 { /** diff --git a/src/model/KeyInfoBucketsInner.js b/src/model/KeyInfoBucketsInner.js index 0d8f8af..1eafdc7 100644 --- a/src/model/KeyInfoBucketsInner.js +++ b/src/model/KeyInfoBucketsInner.js @@ -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 { /** diff --git a/src/model/KeyInfoBucketsInnerPermissions.js b/src/model/KeyInfoBucketsInnerPermissions.js index 0894689..bd96515 100644 --- a/src/model/KeyInfoBucketsInnerPermissions.js +++ b/src/model/KeyInfoBucketsInnerPermissions.js @@ -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 { /** diff --git a/src/model/KeyInfoPermissions.js b/src/model/KeyInfoPermissions.js index 5ba0016..7487e21 100644 --- a/src/model/KeyInfoPermissions.js +++ b/src/model/KeyInfoPermissions.js @@ -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 { /** diff --git a/src/model/LayoutVersion.js b/src/model/LayoutVersion.js index 36e4a4c..5b01521 100644 --- a/src/model/LayoutVersion.js +++ b/src/model/LayoutVersion.js @@ -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 { /** diff --git a/src/model/ListBuckets200ResponseInner.js b/src/model/ListBuckets200ResponseInner.js index ef9668e..89cfd1a 100644 --- a/src/model/ListBuckets200ResponseInner.js +++ b/src/model/ListBuckets200ResponseInner.js @@ -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 { /** diff --git a/src/model/ListBuckets200ResponseInnerLocalAliasesInner.js b/src/model/ListBuckets200ResponseInnerLocalAliasesInner.js index e04921c..5e54692 100644 --- a/src/model/ListBuckets200ResponseInnerLocalAliasesInner.js +++ b/src/model/ListBuckets200ResponseInnerLocalAliasesInner.js @@ -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 { /** diff --git a/src/model/ListKeys200ResponseInner.js b/src/model/ListKeys200ResponseInner.js index b1ab612..5ac8208 100644 --- a/src/model/ListKeys200ResponseInner.js +++ b/src/model/ListKeys200ResponseInner.js @@ -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 { /** diff --git a/src/model/NodeClusterInfo.js b/src/model/NodeClusterInfo.js index d1d9a26..5b81c3c 100644 --- a/src/model/NodeClusterInfo.js +++ b/src/model/NodeClusterInfo.js @@ -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 NodeClusterInfo. * @alias module:model/NodeClusterInfo * @param zone {String} - * @param capacity {Number} * @param tags {Array.} 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; } diff --git a/src/model/NodeNetworkInfo.js b/src/model/NodeNetworkInfo.js index e3ef062..c27bf74 100644 --- a/src/model/NodeNetworkInfo.js +++ b/src/model/NodeNetworkInfo.js @@ -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 diff --git a/src/model/NodeRoleChange.js b/src/model/NodeRoleChange.js new file mode 100644 index 0000000..c8be3cc --- /dev/null +++ b/src/model/NodeRoleChange.js @@ -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 NodeRoleChange. + * @alias module:model/NodeRoleChange + * @implements module:model/NodeRoleRemove + * @implements module:model/NodeRoleUpdate + * @param remove {Boolean} + * @param zone {String} + * @param capacity {Number} + * @param tags {Array.} + */ + 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 NodeRoleChange from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj 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 NodeRoleChange 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.} 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.} tags + */ +NodeRoleUpdate.prototype['tags'] = undefined; + + + + +export default NodeRoleChange; + diff --git a/src/model/NodeRoleRemove.js b/src/model/NodeRoleRemove.js new file mode 100644 index 0000000..31dc351 --- /dev/null +++ b/src/model/NodeRoleRemove.js @@ -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 NodeRoleRemove. + * @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 NodeRoleRemove from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj 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 NodeRoleRemove 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; + diff --git a/src/model/NodeRoleUpdate.js b/src/model/NodeRoleUpdate.js new file mode 100644 index 0000000..4dfb40b --- /dev/null +++ b/src/model/NodeRoleUpdate.js @@ -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 NodeRoleUpdate. + * @alias module:model/NodeRoleUpdate + * @param zone {String} + * @param capacity {Number} + * @param tags {Array.} + */ + 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 NodeRoleUpdate from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj 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 NodeRoleUpdate 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.} tags + */ +NodeRoleUpdate.prototype['tags'] = undefined; + + + + + + +export default NodeRoleUpdate; + diff --git a/src/model/UpdateBucketRequest.js b/src/model/UpdateBucketRequest.js index 4085301..59720b3 100644 --- a/src/model/UpdateBucketRequest.js +++ b/src/model/UpdateBucketRequest.js @@ -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 { /** diff --git a/src/model/UpdateBucketRequestQuotas.js b/src/model/UpdateBucketRequestQuotas.js index 7ffc0d9..b86e54a 100644 --- a/src/model/UpdateBucketRequestQuotas.js +++ b/src/model/UpdateBucketRequestQuotas.js @@ -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 { /** diff --git a/src/model/UpdateBucketRequestWebsiteAccess.js b/src/model/UpdateBucketRequestWebsiteAccess.js index 8b088e0..96f1b24 100644 --- a/src/model/UpdateBucketRequestWebsiteAccess.js +++ b/src/model/UpdateBucketRequestWebsiteAccess.js @@ -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 { /** diff --git a/src/model/UpdateKeyRequest.js b/src/model/UpdateKeyRequest.js index c641e7f..320c5aa 100644 --- a/src/model/UpdateKeyRequest.js +++ b/src/model/UpdateKeyRequest.js @@ -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 { /** diff --git a/src/model/UpdateKeyRequestAllow.js b/src/model/UpdateKeyRequestAllow.js index 18a7d70..059b08f 100644 --- a/src/model/UpdateKeyRequestAllow.js +++ b/src/model/UpdateKeyRequestAllow.js @@ -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 { /** diff --git a/src/model/UpdateKeyRequestDeny.js b/src/model/UpdateKeyRequestDeny.js index cb0286d..177ab38 100644 --- a/src/model/UpdateKeyRequestDeny.js +++ b/src/model/UpdateKeyRequestDeny.js @@ -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 { /** diff --git a/test/model/ApplyLayout200Response.spec.js b/test/model/ApplyLayout200Response.spec.js new file mode 100644 index 0000000..76bd6ab --- /dev/null +++ b/test/model/ApplyLayout200Response.spec.js @@ -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(); + }); + + }); + +})); diff --git a/test/model/NodeRoleChange.spec.js b/test/model/NodeRoleChange.spec.js new file mode 100644 index 0000000..e29bd43 --- /dev/null +++ b/test/model/NodeRoleChange.spec.js @@ -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(); + }); + + }); + +})); diff --git a/test/model/NodeRoleRemove.spec.js b/test/model/NodeRoleRemove.spec.js new file mode 100644 index 0000000..0e26c44 --- /dev/null +++ b/test/model/NodeRoleRemove.spec.js @@ -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(); + }); + + }); + +})); diff --git a/test/model/NodeRoleUpdate.spec.js b/test/model/NodeRoleUpdate.spec.js new file mode 100644 index 0000000..3348ccf --- /dev/null +++ b/test/model/NodeRoleUpdate.spec.js @@ -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(); + }); + + }); + +}));