diff --git a/v2/.openapi-generator/FILES b/v2/.openapi-generator/FILES index f5bf10f..c3b6d60 100644 --- a/v2/.openapi-generator/FILES +++ b/v2/.openapi-generator/FILES @@ -1,4 +1,5 @@ .gitignore +.openapi-generator-ignore .travis.yml README.md api/openapi.yaml @@ -46,10 +47,14 @@ docs/ReplicaDeploymentInfoAllOf.md docs/ReplicaHealth.md docs/ResizeVolumeRequest.md docs/SetComputeOnlyNodeData.md +docs/SetCordonedNodeData.md docs/SetFailureModeIntentRequestData.md docs/SetFailureModeRequest.md docs/SetFailureThresholdRequestData.md +docs/SetPlacementStrategyData.md docs/SetReplicasRequest.md +docs/Strategy.md +docs/StrategyOptions.md docs/SyncProgress.md docs/UpdateAuthenticatedUserData.md docs/UpdateClusterData.md @@ -107,10 +112,14 @@ model_replica_deployment_info_all_of.go model_replica_health.go model_resize_volume_request.go model_set_compute_only_node_data.go +model_set_cordoned_node_data.go model_set_failure_mode_intent_request_data.go model_set_failure_mode_request.go model_set_failure_threshold_request_data.go +model_set_placement_strategy_data.go model_set_replicas_request.go +model_strategy.go +model_strategy_options.go model_sync_progress.go model_update_authenticated_user_data.go model_update_cluster_data.go diff --git a/v2/README.md b/v2/README.md index c709c23..e1596e5 100644 --- a/v2/README.md +++ b/v2/README.md @@ -5,8 +5,8 @@ No description provided (generated by Openapi Generator https://github.com/opena ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. -- API version: 2.4.0 -- Package version: 2.4.0 +- API version: v2.5.0-beta1 +- Package version: v2.5.0-beta1 - Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit [https://storageos.com](https://storageos.com) @@ -67,7 +67,9 @@ Class | Method | HTTP request | Description *DefaultApi* | [**RefreshJwt**](docs/DefaultApi.md#refreshjwt) | **Post** /auth/refresh | Refresh the JWT *DefaultApi* | [**ResizeVolume**](docs/DefaultApi.md#resizevolume) | **Put** /namespaces/{namespaceID}/volumes/{id}/size | Increase the size of a volume. *DefaultApi* | [**SetComputeOnly**](docs/DefaultApi.md#setcomputeonly) | **Put** /nodes/{id}/compute-only | Modify the computeonly behaviour state for a node +*DefaultApi* | [**SetCordoned**](docs/DefaultApi.md#setcordoned) | **Put** /nodes/{id}/cordon | Modify the cordoned state for a node *DefaultApi* | [**SetFailureMode**](docs/DefaultApi.md#setfailuremode) | **Put** /namespaces/{namespaceID}/volumes/{id}/failure-mode | Set the failure mode of the volume. +*DefaultApi* | [**SetPlacementStrategy**](docs/DefaultApi.md#setplacementstrategy) | **Put** /namespaces/{namespaceID}/volumes/{id}/placement-strategy | Sets the placement strategy of the volume. *DefaultApi* | [**SetReplicas**](docs/DefaultApi.md#setreplicas) | **Put** /namespaces/{namespaceID}/volumes/{id}/replicas | Set the number of replicas to maintain for the volume. *DefaultApi* | [**Spec**](docs/DefaultApi.md#spec) | **Get** /openapi | Serves this openapi spec file *DefaultApi* | [**UpdateAuthenticatedUser**](docs/DefaultApi.md#updateauthenticateduser) | **Put** /users/self | Update the authenticated user's information @@ -124,10 +126,14 @@ Class | Method | HTTP request | Description - [ReplicaHealth](docs/ReplicaHealth.md) - [ResizeVolumeRequest](docs/ResizeVolumeRequest.md) - [SetComputeOnlyNodeData](docs/SetComputeOnlyNodeData.md) + - [SetCordonedNodeData](docs/SetCordonedNodeData.md) - [SetFailureModeIntentRequestData](docs/SetFailureModeIntentRequestData.md) - [SetFailureModeRequest](docs/SetFailureModeRequest.md) - [SetFailureThresholdRequestData](docs/SetFailureThresholdRequestData.md) + - [SetPlacementStrategyData](docs/SetPlacementStrategyData.md) - [SetReplicasRequest](docs/SetReplicasRequest.md) + - [Strategy](docs/Strategy.md) + - [StrategyOptions](docs/StrategyOptions.md) - [SyncProgress](docs/SyncProgress.md) - [UpdateAuthenticatedUserData](docs/UpdateAuthenticatedUserData.md) - [UpdateClusterData](docs/UpdateClusterData.md) diff --git a/v2/api/openapi.yaml b/v2/api/openapi.yaml index 4197bf7..eed3ebc 100644 --- a/v2/api/openapi.yaml +++ b/v2/api/openapi.yaml @@ -5,7 +5,7 @@ info: name: StorageOS url: https://storageos.com title: StorageOS API - version: 2.4.0 + version: v2.5.0-beta1 externalDocs: description: The latest StorageOS user documentation url: https://docs.storageos.com/ @@ -1607,7 +1607,7 @@ paths: schema: $ref: '#/components/schemas/AcceptedMessage' description: | - An aynchronous request has been accepted + An asynchronous request has been accepted "400": content: application/json: @@ -1932,7 +1932,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Node' - description: The node was successfullly updated + description: The node was successfully updated "400": content: application/json: @@ -1998,6 +1998,127 @@ paths: security: - jwt: [] summary: Modify the computeonly behaviour state for a node + /nodes/{id}/cordon: + put: + description: | + Set the cordoned state for the node corresponding to id given by the request. + operationId: setCordoned + parameters: + - description: ID of a Node + explode: false + in: path + name: id + required: true + schema: + $ref: '#/components/schemas/NodeID' + style: simple + - description: | + If set to true this value indicates that the user wants to ignore entity version constraints, thereby "forcing" the operation. + explode: true + in: query + name: ignore-version + required: false + schema: + $ref: '#/components/schemas/IgnoreVersion' + style: form + requestBody: + $ref: '#/components/requestBodies/SetCordonedNodeData' + content: + application/json: + schema: + example: + cordoned: true + version: NDI0MjQyNDI0MjQyNDI0MjQy + properties: + cordoned: + description: | + Marks the node's desired cordoned state state. A cordoned node will not have new volume deployments scheduled on it. + example: true + type: boolean + version: + description: | + An opaque representation of an entity version at the time it was obtained from the API. + All operations that mutate the entity must include this version field in the request unchanged. + The format of this type is undefined and may change but the defined properties will not change. + example: NDI0MjQyNDI0MjQyNDI0MjQy + maxLength: 30 + type: string + title: SetCordonedNodeData + type: object + description: Desired cordoned state for the node. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Node' + description: The node was successfully updated + "400": + content: + application/json: + example: + error: a short description of the validation failure + schema: + $ref: '#/components/schemas/Error' + description: The request does not conform to the API specification. + "401": + content: + application/json: + example: + error: authentication required + schema: + $ref: '#/components/schemas/Error' + description: | + The requested endpoint requires authentication - you must log in first. + If attempting to log in, your credentials were not recognised. + "403": + content: + application/json: + example: + error: unauthorised + schema: + $ref: '#/components/schemas/Error' + description: | + The authenticated user does not have permission to perform the requested action. + "404": + content: + application/json: + example: + error: not found + schema: + $ref: '#/components/schemas/Error' + description: | + A referenced resource does not exist. + "412": + content: + application/json: + example: + error: attempting to write stale object + schema: + $ref: '#/components/schemas/Error' + description: | + The entity to be wrote has been concurrently updated by another request - the submitted entity data has been replaced. + The caller should fetch the entity again, check the actions are still required and resubmit the request with the new entity version field. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: | + The request caused an internal server error and should be retried. + Check the health of the node/cluster and if the error persists, contact support. + "503": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: | + The server is currently unable to handle the request due to a temporary store failure. + Check the health of the node/cluster and if the error persists, contact support. + security: + - jwt: [] + summary: Modify the cordoned state for a node /policies: get: description: Fetch the list of policy groups in the cluster. @@ -2558,6 +2679,10 @@ paths: schema: example: namespaceID: c5666b58-b805-4215-ab4a-cb094948ccc6 + placementStrategy: + options: + topologyKey: my.custom.zone.label + strategy: recommended name: data description: This volume contains the data for my app fsType: ext4 @@ -2599,6 +2724,8 @@ paths: example: 5000 minimum: 0 type: uint64 + placementStrategy: + $ref: '#/components/schemas/Strategy' required: - fsType - name @@ -2621,7 +2748,7 @@ paths: schema: $ref: '#/components/schemas/AcceptedMessage' description: | - An aynchronous request has been accepted + An asynchronous request has been accepted "400": content: application/json: @@ -2770,7 +2897,7 @@ paths: schema: $ref: '#/components/schemas/AcceptedMessage' description: | - An aynchronous request has been accepted + An asynchronous request has been accepted "400": content: application/json: @@ -3851,7 +3978,7 @@ paths: schema: $ref: '#/components/schemas/AcceptedMessage' description: | - An aynchronous request has been accepted + An asynchronous request has been accepted "400": content: application/json: @@ -4143,7 +4270,7 @@ paths: schema: $ref: '#/components/schemas/AcceptedMessage' description: | - An aynchronous request has been accepted + An asynchronous request has been accepted "400": content: application/json: @@ -4219,6 +4346,157 @@ paths: security: - jwt: [] summary: Increase the size of a volume. + /namespaces/{namespaceID}/volumes/{id}/placement-strategy: + put: + description: | + Sets the desired behaviour of the volume identified by id when provisioning new replicas. + The already placed replicas will not be moved, instead, during future failovers, node restarts (containing the volume replicas) and any other operation that requires a replica to be provisioned will now follow this rule thus having an "eventually consistent" response. + operationId: setPlacementStrategy + parameters: + - description: ID of a Namespace + explode: false + in: path + name: namespaceID + required: true + schema: + $ref: '#/components/schemas/NamespaceID' + style: simple + - description: ID of a Volume + explode: false + in: path + name: id + required: true + schema: + $ref: '#/components/schemas/VolumeID' + style: simple + - description: | + If set to true this value indicates that the user wants to ignore entity version constraints, thereby "forcing" the operation. + explode: true + in: query + name: ignore-version + required: false + schema: + $ref: '#/components/schemas/IgnoreVersion' + style: form + requestBody: + $ref: '#/components/requestBodies/SetPlacementStrategyData' + content: + application/json: + schema: + example: + placementStrategy: + options: + topologyKey: my.custom.zone.label + strategy: recommended + version: NDI0MjQyNDI0MjQyNDI0MjQy + properties: + placementStrategy: + $ref: '#/components/schemas/Strategy' + version: + description: | + An opaque representation of an entity version at the time it was obtained from the API. + All operations that mutate the entity must include this version field in the request unchanged. + The format of this type is undefined and may change but the defined properties will not change. + example: NDI0MjQyNDI0MjQyNDI0MjQy + maxLength: 30 + type: string + title: SetPlacementStrategyData + type: object + description: Placement strategy to use + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AcceptedMessage' + description: | + An asynchronous request has been accepted + "400": + content: + application/json: + example: + error: a short description of the validation failure + schema: + $ref: '#/components/schemas/Error' + description: The request does not conform to the API specification. + "401": + content: + application/json: + example: + error: authentication required + schema: + $ref: '#/components/schemas/Error' + description: | + The requested endpoint requires authentication - you must log in first. + If attempting to log in, your credentials were not recognised. + "403": + content: + application/json: + example: + error: unauthorised + schema: + $ref: '#/components/schemas/Error' + description: | + The authenticated user does not have permission to perform the requested action. + "404": + content: + application/json: + example: + error: not found + schema: + $ref: '#/components/schemas/Error' + description: | + A referenced resource does not exist. + "409": + content: + application/json: + example: + error: label \"a\" with value \"b\" conflicts with label \"c\" with + value \"d\" + schema: + $ref: '#/components/schemas/Error' + description: | + The requested configuration change for the referenced entity cannot be made as it would result in a conflict which invalidates the resultant config. + "412": + content: + application/json: + example: + error: attempting to write stale object + schema: + $ref: '#/components/schemas/Error' + description: | + The entity to be wrote has been concurrently updated by another request - the submitted entity data has been replaced. + The caller should fetch the entity again, check the actions are still required and resubmit the request with the new entity version field. + "422": + content: + application/json: + example: + error: invalid state for operation (currently "deleted") + schema: + $ref: '#/components/schemas/Error' + description: | + An action was requested that cannot be performed on the entity in it's current state. + As an example, this error might be returned when trying to delete a currently mounted volume. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: | + The request caused an internal server error and should be retried. + Check the health of the node/cluster and if the error persists, contact support. + "503": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: | + The server is currently unable to handle the request due to a temporary store failure. + Check the health of the node/cluster and if the error persists, contact support. + security: + - jwt: [] + summary: Sets the placement strategy of the volume. /cluster: get: description: | @@ -4270,7 +4548,8 @@ paths: - jwt: [] summary: Retrieves the cluster's global configuration settings put: - description: Update the global configuration settings to use for the cluster. + description: | + Update the global configuration settings to use for the cluster. Updating the cluster log level does not require a restart operationId: updateCluster parameters: - description: | @@ -4599,7 +4878,7 @@ paths: type: string description: | The server is returning an incomplete diagnostic bundle. - A bundle may contain partial information if one or more nodes failed to respond, or some other error occured during the collection process. + A bundle may contain partial information if one or more nodes failed to respond, or some other error occurred during the collection process. The returned bundle is still valid and should be sent to StorageOS. "503": content: @@ -4754,6 +5033,12 @@ components: schema: $ref: '#/components/schemas/SetComputeOnlyNodeData' required: true + SetCordonedNodeData: + content: + application/json: + schema: + $ref: '#/components/schemas/SetCordonedNodeData' + required: true CreateVolumeData: content: application/json: @@ -4856,6 +5141,12 @@ components: schema: $ref: '#/components/schemas/UpdateClusterData' required: true + SetPlacementStrategyData: + content: + application/json: + schema: + $ref: '#/components/schemas/SetPlacementStrategyData' + required: true AttachVolumeData: content: application/json: @@ -5003,7 +5294,7 @@ components: schema: $ref: '#/components/schemas/AcceptedMessage' description: | - An aynchronous request has been accepted + An asynchronous request has been accepted schemas: OpenAPISpec: description: | @@ -5333,6 +5624,23 @@ components: - json example: json type: string + Strategy: + description: | + The logic to use when placing the volume replicas across the available nodes. Possible options for this field include an availability zone aware rule and recommended rule in which multiple factors like available disk space, recent number of errors on the nodes, etc, are taken into consideration. Defaults to using a recommended placement strategy. + example: + options: + topologyKey: my.custom.zone.label + strategy: recommended + properties: + strategy: + default: recommended + enum: + - recommended + - topology-aware + type: string + options: + $ref: '#/components/schemas/Strategy_options' + type: object ClusterID: description: | A unique identifier for a cluster. The format of this type is undefined and may change but the defined properties will not change. @@ -5684,14 +5992,9 @@ components: - $ref: '#/components/schemas/ReplicaDeploymentInfo_allOf' Node: example: - createdAt: 2019-03-10T13:42:42Z + cordonedAt: 2019-03-29T23:13:13Z gossipEndpoint: '["192.0.2.1:5711"]' - ioEndpoint: '["192.0.2.1:5703"]' - name: db1.lcy.storageos.network health: online - id: c5666b58-b805-4215-ab4a-cb094948ccc6 - supervisorEndpoint: '["192.0.2.1:5704"]' - clusteringEndpoint: '["192.0.2.1:5710"]' version: NDI0MjQyNDI0MjQyNDI0MjQy capacity: total: 42 @@ -5700,6 +6003,13 @@ components: labels: env: prod rack: db-1 + createdAt: 2019-03-10T13:42:42Z + ioEndpoint: '["192.0.2.1:5703"]' + name: db1.lcy.storageos.network + cordoned: false + id: c5666b58-b805-4215-ab4a-cb094948ccc6 + supervisorEndpoint: '["192.0.2.1:5704"]' + clusteringEndpoint: '["192.0.2.1:5710"]' updatedAt: 2019-03-29T23:13:13Z properties: id: @@ -5742,11 +6052,27 @@ components: type: string clusteringEndpoint: description: | - Endpoint at which we operate our clustering GRPC API. + Endpoint at which we operate our clustering gRPC API. This value is set on startup by the corresponding environment variable (INTERNAL_API_ADVERTISE_ADDRESS) example: '["192.0.2.1:5710"]' readOnly: true type: string + cordoned: + default: false + description: | + Cordoned describes the cordoned state of the node. + A cordoned node will not have new volume deployments scheduled on it + readOnly: true + type: boolean + cordonedAt: + description: | + The time the node has been cordoned. This field's purpose is informative only. + + String format is RFC3339. + example: 2019-03-29T23:13:13Z + format: date-time + readOnly: true + type: string labels: additionalProperties: type: string @@ -6290,6 +6616,26 @@ components: type: string title: SetComputeOnlyNodeData type: object + SetCordonedNodeData: + example: + cordoned: true + version: NDI0MjQyNDI0MjQyNDI0MjQy + properties: + cordoned: + description: | + Marks the node's desired cordoned state state. A cordoned node will not have new volume deployments scheduled on it. + example: true + type: boolean + version: + description: | + An opaque representation of an entity version at the time it was obtained from the API. + All operations that mutate the entity must include this version field in the request unchanged. + The format of this type is undefined and may change but the defined properties will not change. + example: NDI0MjQyNDI0MjQyNDI0MjQy + maxLength: 30 + type: string + title: SetCordonedNodeData + type: object _policies_specs: properties: namespaceID: @@ -6406,6 +6752,10 @@ components: CreateVolumeData: example: namespaceID: c5666b58-b805-4215-ab4a-cb094948ccc6 + placementStrategy: + options: + topologyKey: my.custom.zone.label + strategy: recommended name: data description: This volume contains the data for my app fsType: ext4 @@ -6447,6 +6797,8 @@ components: example: 5000 minimum: 0 type: uint64 + placementStrategy: + $ref: '#/components/schemas/Strategy' required: - fsType - name @@ -6586,6 +6938,26 @@ components: type: string title: ResizeVolumeRequest type: object + SetPlacementStrategyData: + example: + placementStrategy: + options: + topologyKey: my.custom.zone.label + strategy: recommended + version: NDI0MjQyNDI0MjQyNDI0MjQy + properties: + placementStrategy: + $ref: '#/components/schemas/Strategy' + version: + description: | + An opaque representation of an entity version at the time it was obtained from the API. + All operations that mutate the entity must include this version field in the request unchanged. + The format of this type is undefined and may change but the defined properties will not change. + example: NDI0MjQyNDI0MjQyNDI0MjQy + maxLength: 30 + type: string + title: SetPlacementStrategyData + type: object UpdateClusterData: example: disableVersionCheck: false @@ -6685,7 +7057,7 @@ components: \ NFS administrator to prevent the client from writing as \"root\" to\ \ the NFS share, instead mapping the client to a new UID/GID (usually\ \ nfsnobody, -2).\n\"none\" performs no UID/GID alterations, using the\ - \ values sent by the client.\n\"root\" mapps UID & GID 0 to the values\ + \ values sent by the client.\n\"root\" maps UID & GID 0 to the values\ \ specified.\n\"rootuid\" maps UID 0 and a GID of any value to the value\ \ specified.\n\"all\" maps changes all UID and GID values to those specified.\n" enum: @@ -6695,6 +7067,19 @@ components: - all example: root type: string + Strategy_options: + description: | + Used together with topology-aware strategy to further specify how the placement should be done. + example: + topologyKey: my.custom.zone.label + nullable: true + properties: + topologyKey: + default: topology.kubernetes.io/zone + description: | + Indicates the node label used to decribe the topology used for data placement decisions. If two nodes are labelled with this key and have identical values for that label, the scheduler treats both nodes as being in the same topology domain. When topology-aware provisioning is enabled, the scheduler tries to spread a volume's master and replica copies across different topology domains. + example: my.custom.zone.label + type: string UserSession_allOf_session: properties: expiresInSeconds: diff --git a/v2/api_default.go b/v2/api_default.go index 722d286..277fcf6 100644 --- a/v2/api_default.go +++ b/v2/api_default.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ @@ -4770,6 +4770,166 @@ func (a *DefaultApiService) SetComputeOnly(ctx _context.Context, id string, setC return localVarReturnValue, localVarHTTPResponse, nil } +// SetCordonedOpts Optional parameters for the method 'SetCordoned' +type SetCordonedOpts struct { + IgnoreVersion optional.Bool +} + +/* +SetCordoned Modify the cordoned state for a node +Set the cordoned state for the node corresponding to id given by the request. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id ID of a Node + * @param setCordonedNodeData + * @param optional nil or *SetCordonedOpts - Optional Parameters: + * @param "IgnoreVersion" (optional.Bool) - If set to true this value indicates that the user wants to ignore entity version constraints, thereby \"forcing\" the operation. +@return Node +*/ +func (a *DefaultApiService) SetCordoned(ctx _context.Context, id string, setCordonedNodeData SetCordonedNodeData, localVarOptionals *SetCordonedOpts) (Node, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPut + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Node + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/nodes/{id}/cordon" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.PathEscape(parameterToString(id, "")) , -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if localVarOptionals != nil && localVarOptionals.IgnoreVersion.IsSet() { + localVarQueryParams.Add("ignore-version", parameterToString(localVarOptionals.IgnoreVersion.Value(), "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = &setCordonedNodeData + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + // SetFailureModeOpts Optional parameters for the method 'SetFailureMode' type SetFailureModeOpts struct { IgnoreVersion optional.Bool @@ -4953,6 +5113,189 @@ func (a *DefaultApiService) SetFailureMode(ctx _context.Context, namespaceID str return localVarReturnValue, localVarHTTPResponse, nil } +// SetPlacementStrategyOpts Optional parameters for the method 'SetPlacementStrategy' +type SetPlacementStrategyOpts struct { + IgnoreVersion optional.Bool +} + +/* +SetPlacementStrategy Sets the placement strategy of the volume. +Sets the desired behaviour of the volume identified by id when provisioning new replicas. The already placed replicas will not be moved, instead, during future failovers, node restarts (containing the volume replicas) and any other operation that requires a replica to be provisioned will now follow this rule thus having an \"eventually consistent\" response. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param namespaceID ID of a Namespace + * @param id ID of a Volume + * @param setPlacementStrategyData + * @param optional nil or *SetPlacementStrategyOpts - Optional Parameters: + * @param "IgnoreVersion" (optional.Bool) - If set to true this value indicates that the user wants to ignore entity version constraints, thereby \"forcing\" the operation. +@return AcceptedMessage +*/ +func (a *DefaultApiService) SetPlacementStrategy(ctx _context.Context, namespaceID string, id string, setPlacementStrategyData SetPlacementStrategyData, localVarOptionals *SetPlacementStrategyOpts) (AcceptedMessage, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPut + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue AcceptedMessage + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/namespaces/{namespaceID}/volumes/{id}/placement-strategy" + localVarPath = strings.Replace(localVarPath, "{"+"namespaceID"+"}", _neturl.PathEscape(parameterToString(namespaceID, "")) , -1) + + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.PathEscape(parameterToString(id, "")) , -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if localVarOptionals != nil && localVarOptionals.IgnoreVersion.IsSet() { + localVarQueryParams.Add("ignore-version", parameterToString(localVarOptionals.IgnoreVersion.Value(), "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = &setPlacementStrategyData + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + // SetReplicasOpts Optional parameters for the method 'SetReplicas' type SetReplicasOpts struct { IgnoreVersion optional.Bool @@ -5365,7 +5708,7 @@ type UpdateClusterOpts struct { /* UpdateCluster Update the cluster's global configuration settings -Update the global configuration settings to use for the cluster. +Update the global configuration settings to use for the cluster. Updating the cluster log level does not require a restart * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param updateClusterData * @param optional nil or *UpdateClusterOpts - Optional Parameters: diff --git a/v2/client.go b/v2/client.go index 227c931..6b8e78f 100644 --- a/v2/client.go +++ b/v2/client.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ @@ -41,7 +41,7 @@ var ( xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) ) -// APIClient manages communication with the StorageOS API API v2.4.0 +// APIClient manages communication with the StorageOS API API vv2.5.0-beta1 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration diff --git a/v2/configuration.go b/v2/configuration.go index 71c91c4..272bbc5 100644 --- a/v2/configuration.go +++ b/v2/configuration.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ @@ -85,7 +85,7 @@ func NewConfiguration() *Configuration { cfg := &Configuration{ BasePath: "http://localhost/v2", DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/2.4.0/go", + UserAgent: "OpenAPI-Generator/v2.5.0-beta1/go", Debug: false, Servers: []ServerConfiguration{ { diff --git a/v2/docs/CreateVolumeData.md b/v2/docs/CreateVolumeData.md index a7219ad..689b4c0 100644 --- a/v2/docs/CreateVolumeData.md +++ b/v2/docs/CreateVolumeData.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **FsType** | [**FsType**](FsType.md) | | **Description** | **string** | | [optional] **SizeBytes** | **uint64** | A volume's size in bytes | +**PlacementStrategy** | [**Strategy**](Strategy.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/v2/docs/DefaultApi.md b/v2/docs/DefaultApi.md index 89753c7..0ddc1b4 100644 --- a/v2/docs/DefaultApi.md +++ b/v2/docs/DefaultApi.md @@ -38,7 +38,9 @@ Method | HTTP request | Description [**RefreshJwt**](DefaultApi.md#RefreshJwt) | **Post** /auth/refresh | Refresh the JWT [**ResizeVolume**](DefaultApi.md#ResizeVolume) | **Put** /namespaces/{namespaceID}/volumes/{id}/size | Increase the size of a volume. [**SetComputeOnly**](DefaultApi.md#SetComputeOnly) | **Put** /nodes/{id}/compute-only | Modify the computeonly behaviour state for a node +[**SetCordoned**](DefaultApi.md#SetCordoned) | **Put** /nodes/{id}/cordon | Modify the cordoned state for a node [**SetFailureMode**](DefaultApi.md#SetFailureMode) | **Put** /namespaces/{namespaceID}/volumes/{id}/failure-mode | Set the failure mode of the volume. +[**SetPlacementStrategy**](DefaultApi.md#SetPlacementStrategy) | **Put** /namespaces/{namespaceID}/volumes/{id}/placement-strategy | Sets the placement strategy of the volume. [**SetReplicas**](DefaultApi.md#SetReplicas) | **Put** /namespaces/{namespaceID}/volumes/{id}/replicas | Set the number of replicas to maintain for the volume. [**Spec**](DefaultApi.md#Spec) | **Get** /openapi | Serves this openapi spec file [**UpdateAuthenticatedUser**](DefaultApi.md#UpdateAuthenticatedUser) | **Put** /users/self | Update the authenticated user's information @@ -1328,6 +1330,53 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## SetCordoned + +> Node SetCordoned(ctx, id, setCordonedNodeData, optional) + +Modify the cordoned state for a node + +Set the cordoned state for the node corresponding to id given by the request. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string**| ID of a Node | +**setCordonedNodeData** | [**SetCordonedNodeData**](SetCordonedNodeData.md)| | + **optional** | ***SetCordonedOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a SetCordonedOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ignoreVersion** | **optional.Bool**| If set to true this value indicates that the user wants to ignore entity version constraints, thereby \"forcing\" the operation. | [default to false] + +### Return type + +[**Node**](Node.md) + +### Authorization + +[jwt](../README.md#jwt) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## SetFailureMode > Volume SetFailureMode(ctx, namespaceID, id, setFailureModeRequest, optional) @@ -1377,6 +1426,55 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## SetPlacementStrategy + +> AcceptedMessage SetPlacementStrategy(ctx, namespaceID, id, setPlacementStrategyData, optional) + +Sets the placement strategy of the volume. + +Sets the desired behaviour of the volume identified by id when provisioning new replicas. The already placed replicas will not be moved, instead, during future failovers, node restarts (containing the volume replicas) and any other operation that requires a replica to be provisioned will now follow this rule thus having an \"eventually consistent\" response. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**namespaceID** | **string**| ID of a Namespace | +**id** | **string**| ID of a Volume | +**setPlacementStrategyData** | [**SetPlacementStrategyData**](SetPlacementStrategyData.md)| | + **optional** | ***SetPlacementStrategyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a SetPlacementStrategyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **ignoreVersion** | **optional.Bool**| If set to true this value indicates that the user wants to ignore entity version constraints, thereby \"forcing\" the operation. | [default to false] + +### Return type + +[**AcceptedMessage**](AcceptedMessage.md) + +### Authorization + +[jwt](../README.md#jwt) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## SetReplicas > AcceptedMessage SetReplicas(ctx, namespaceID, id, setReplicasRequest, optional) @@ -1507,7 +1605,7 @@ Name | Type | Description | Notes Update the cluster's global configuration settings -Update the global configuration settings to use for the cluster. +Update the global configuration settings to use for the cluster. Updating the cluster log level does not require a restart ### Required Parameters diff --git a/v2/docs/NfsAclSquashConfig.md b/v2/docs/NfsAclSquashConfig.md index 09d6c75..a1259dd 100644 --- a/v2/docs/NfsAclSquashConfig.md +++ b/v2/docs/NfsAclSquashConfig.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Uid** | **int64** | | [optional] **Gid** | **int64** | | [optional] -**Squash** | **string** | SquashConfig defines the root squashing behaviour. When a client creates a file, it sends the user UID from the client. If the client is running as root, this sends uid=0. Root squashing allows the NFS administrator to prevent the client from writing as \"root\" to the NFS share, instead mapping the client to a new UID/GID (usually nfsnobody, -2). \"none\" performs no UID/GID alterations, using the values sent by the client. \"root\" mapps UID & GID 0 to the values specified. \"rootuid\" maps UID 0 and a GID of any value to the value specified. \"all\" maps changes all UID and GID values to those specified. | [optional] +**Squash** | **string** | SquashConfig defines the root squashing behaviour. When a client creates a file, it sends the user UID from the client. If the client is running as root, this sends uid=0. Root squashing allows the NFS administrator to prevent the client from writing as \"root\" to the NFS share, instead mapping the client to a new UID/GID (usually nfsnobody, -2). \"none\" performs no UID/GID alterations, using the values sent by the client. \"root\" maps UID & GID 0 to the values specified. \"rootuid\" maps UID 0 and a GID of any value to the value specified. \"all\" maps changes all UID and GID values to those specified. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/v2/docs/Node.md b/v2/docs/Node.md index 7641d9a..b7bbd69 100644 --- a/v2/docs/Node.md +++ b/v2/docs/Node.md @@ -11,7 +11,9 @@ Name | Type | Description | Notes **IoEndpoint** | **string** | Endpoint at which we operate our dataplane's dfs service. (used for IO operations) This value is set on startup by the corresponding environment variable (IO_ADVERTISE_ADDRESS) | [optional] [readonly] **SupervisorEndpoint** | **string** | Endpoint at which we operate our dataplane's supervisor service (used for sync). This value is set on startup by the corresponding environment variable (SUPERVISOR_ADVERTISE_ADDRESS) | [optional] [readonly] **GossipEndpoint** | **string** | Endpoint at which we operate our health checking service. This value is set on startup by the corresponding environment variable (GOSSIP_ADVERTISE_ADDRESS) | [optional] [readonly] -**ClusteringEndpoint** | **string** | Endpoint at which we operate our clustering GRPC API. This value is set on startup by the corresponding environment variable (INTERNAL_API_ADVERTISE_ADDRESS) | [optional] [readonly] +**ClusteringEndpoint** | **string** | Endpoint at which we operate our clustering gRPC API. This value is set on startup by the corresponding environment variable (INTERNAL_API_ADVERTISE_ADDRESS) | [optional] [readonly] +**Cordoned** | **bool** | Cordoned describes the cordoned state of the node. A cordoned node will not have new volume deployments scheduled on it | [optional] [readonly] [default to false] +**CordonedAt** | [**time.Time**](time.Time.md) | The time the node has been cordoned. This field's purpose is informative only. String format is RFC3339. | [optional] [readonly] **Labels** | **map[string]string** | A set of arbitrary key value labels to apply to the entity. | [optional] **CreatedAt** | [**time.Time**](time.Time.md) | The time the entity was created. This timestamp is set by the node that created the entity, and may not be correct if the node's local clock was skewed. This value is for the user's informative purposes only, and correctness is not required. String format is RFC3339. | [optional] [readonly] **UpdatedAt** | [**time.Time**](time.Time.md) | The time the entity was last updated. This timestamp is set by the node that last updated the entity, and may not be correct if the node's local clock was skewed. This value is for the user's informative purposes only, and correctness is not required. String format is RFC3339. | [optional] [readonly] diff --git a/v2/docs/SetCordonedNodeData.md b/v2/docs/SetCordonedNodeData.md new file mode 100644 index 0000000..4a361cf --- /dev/null +++ b/v2/docs/SetCordonedNodeData.md @@ -0,0 +1,12 @@ +# SetCordonedNodeData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cordoned** | **bool** | Marks the node's desired cordoned state state. A cordoned node will not have new volume deployments scheduled on it. | [optional] +**Version** | **string** | An opaque representation of an entity version at the time it was obtained from the API. All operations that mutate the entity must include this version field in the request unchanged. The format of this type is undefined and may change but the defined properties will not change. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/SetPlacementStrategyData.md b/v2/docs/SetPlacementStrategyData.md new file mode 100644 index 0000000..7ebe55d --- /dev/null +++ b/v2/docs/SetPlacementStrategyData.md @@ -0,0 +1,12 @@ +# SetPlacementStrategyData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PlacementStrategy** | [**Strategy**](Strategy.md) | | [optional] +**Version** | **string** | An opaque representation of an entity version at the time it was obtained from the API. All operations that mutate the entity must include this version field in the request unchanged. The format of this type is undefined and may change but the defined properties will not change. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/Strategy.md b/v2/docs/Strategy.md new file mode 100644 index 0000000..1de4268 --- /dev/null +++ b/v2/docs/Strategy.md @@ -0,0 +1,12 @@ +# Strategy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Strategy** | **string** | | [optional] [default to STRATEGY_RECOMMENDED] +**Options** | Pointer to [**StrategyOptions**](Strategy_options.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/StrategyOptions.md b/v2/docs/StrategyOptions.md new file mode 100644 index 0000000..eb68f57 --- /dev/null +++ b/v2/docs/StrategyOptions.md @@ -0,0 +1,11 @@ +# StrategyOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TopologyKey** | **string** | Indicates the node label used to decribe the topology used for data placement decisions. If two nodes are labelled with this key and have identical values for that label, the scheduler treats both nodes as being in the same topology domain. When topology-aware provisioning is enabled, the scheduler tries to spread a volume's master and replica copies across different topology domains. | [optional] [default to topology.kubernetes.io/zone] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/model__policies__id__specs.go b/v2/model__policies__id__specs.go index 3f2dab7..7312c56 100644 --- a/v2/model__policies__id__specs.go +++ b/v2/model__policies__id__specs.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model__policies_specs.go b/v2/model__policies_specs.go index 72ecb31..3d487ee 100644 --- a/v2/model__policies_specs.go +++ b/v2/model__policies_specs.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_accepted_message.go b/v2/model_accepted_message.go index 398bcab..637cc9b 100644 --- a/v2/model_accepted_message.go +++ b/v2/model_accepted_message.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_attach_nfs_volume_data.go b/v2/model_attach_nfs_volume_data.go index 9d42839..728a88b 100644 --- a/v2/model_attach_nfs_volume_data.go +++ b/v2/model_attach_nfs_volume_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_attach_type.go b/v2/model_attach_type.go index 3e26f9b..1cafab6 100644 --- a/v2/model_attach_type.go +++ b/v2/model_attach_type.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_attach_volume_data.go b/v2/model_attach_volume_data.go index 8a7b1a1..c09a32a 100644 --- a/v2/model_attach_volume_data.go +++ b/v2/model_attach_volume_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_auth_user_data.go b/v2/model_auth_user_data.go index 4c3ffad..3b8ec2b 100644 --- a/v2/model_auth_user_data.go +++ b/v2/model_auth_user_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_capacity_stats.go b/v2/model_capacity_stats.go index cee017e..ec6421b 100644 --- a/v2/model_capacity_stats.go +++ b/v2/model_capacity_stats.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_cluster.go b/v2/model_cluster.go index 42ac288..a92b639 100644 --- a/v2/model_cluster.go +++ b/v2/model_cluster.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_create_namespace_data.go b/v2/model_create_namespace_data.go index 605f26d..03de94a 100644 --- a/v2/model_create_namespace_data.go +++ b/v2/model_create_namespace_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_create_policy_group_data.go b/v2/model_create_policy_group_data.go index c070563..2d2c393 100644 --- a/v2/model_create_policy_group_data.go +++ b/v2/model_create_policy_group_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_create_user_data.go b/v2/model_create_user_data.go index 81c6e8c..6386747 100644 --- a/v2/model_create_user_data.go +++ b/v2/model_create_user_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_create_volume_data.go b/v2/model_create_volume_data.go index 77e1d42..e4e469b 100644 --- a/v2/model_create_volume_data.go +++ b/v2/model_create_volume_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ @@ -21,4 +21,5 @@ type CreateVolumeData struct { Description string `json:"description,omitempty"` // A volume's size in bytes SizeBytes uint64 `json:"sizeBytes"` + PlacementStrategy Strategy `json:"placementStrategy,omitempty"` } diff --git a/v2/model_deployment_info.go b/v2/model_deployment_info.go index dac81f6..27de9e5 100644 --- a/v2/model_deployment_info.go +++ b/v2/model_deployment_info.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_error.go b/v2/model_error.go index 805bcbe..27be35d 100644 --- a/v2/model_error.go +++ b/v2/model_error.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_failure_mode_intent.go b/v2/model_failure_mode_intent.go index 639f3ee..c68e93a 100644 --- a/v2/model_failure_mode_intent.go +++ b/v2/model_failure_mode_intent.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_fs_type.go b/v2/model_fs_type.go index 88713d7..23cbc62 100644 --- a/v2/model_fs_type.go +++ b/v2/model_fs_type.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_licence.go b/v2/model_licence.go index 3eb6cce..25e93c6 100644 --- a/v2/model_licence.go +++ b/v2/model_licence.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_log_format.go b/v2/model_log_format.go index 3cca4d4..a9c1f7a 100644 --- a/v2/model_log_format.go +++ b/v2/model_log_format.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_log_level.go b/v2/model_log_level.go index a64d182..a9d7bdd 100644 --- a/v2/model_log_level.go +++ b/v2/model_log_level.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_master_deployment_info.go b/v2/model_master_deployment_info.go index dc5d501..df3b486 100644 --- a/v2/model_master_deployment_info.go +++ b/v2/model_master_deployment_info.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_master_deployment_info_all_of.go b/v2/model_master_deployment_info_all_of.go index 24ed9ca..e0d4089 100644 --- a/v2/model_master_deployment_info_all_of.go +++ b/v2/model_master_deployment_info_all_of.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_master_health.go b/v2/model_master_health.go index 0a597ec..e7c7a7b 100644 --- a/v2/model_master_health.go +++ b/v2/model_master_health.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_namespace.go b/v2/model_namespace.go index 27b858b..addbb80 100644 --- a/v2/model_namespace.go +++ b/v2/model_namespace.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_nfs_acl.go b/v2/model_nfs_acl.go index e3722e3..86d21c5 100644 --- a/v2/model_nfs_acl.go +++ b/v2/model_nfs_acl.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_nfs_acl_identity.go b/v2/model_nfs_acl_identity.go index 3bbfd0e..1c46109 100644 --- a/v2/model_nfs_acl_identity.go +++ b/v2/model_nfs_acl_identity.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_nfs_acl_squash_config.go b/v2/model_nfs_acl_squash_config.go index aa6accf..044a842 100644 --- a/v2/model_nfs_acl_squash_config.go +++ b/v2/model_nfs_acl_squash_config.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ @@ -13,6 +13,6 @@ package api type NfsAclSquashConfig struct { Uid int64 `json:"uid,omitempty"` Gid int64 `json:"gid,omitempty"` - // SquashConfig defines the root squashing behaviour. When a client creates a file, it sends the user UID from the client. If the client is running as root, this sends uid=0. Root squashing allows the NFS administrator to prevent the client from writing as \"root\" to the NFS share, instead mapping the client to a new UID/GID (usually nfsnobody, -2). \"none\" performs no UID/GID alterations, using the values sent by the client. \"root\" mapps UID & GID 0 to the values specified. \"rootuid\" maps UID 0 and a GID of any value to the value specified. \"all\" maps changes all UID and GID values to those specified. + // SquashConfig defines the root squashing behaviour. When a client creates a file, it sends the user UID from the client. If the client is running as root, this sends uid=0. Root squashing allows the NFS administrator to prevent the client from writing as \"root\" to the NFS share, instead mapping the client to a new UID/GID (usually nfsnobody, -2). \"none\" performs no UID/GID alterations, using the values sent by the client. \"root\" maps UID & GID 0 to the values specified. \"rootuid\" maps UID 0 and a GID of any value to the value specified. \"all\" maps changes all UID and GID values to those specified. Squash string `json:"squash,omitempty"` } diff --git a/v2/model_nfs_config.go b/v2/model_nfs_config.go index 830fd19..db5973b 100644 --- a/v2/model_nfs_config.go +++ b/v2/model_nfs_config.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_nfs_export_config.go b/v2/model_nfs_export_config.go index 0636a3d..d8417a1 100644 --- a/v2/model_nfs_export_config.go +++ b/v2/model_nfs_export_config.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_nfs_volume_exports.go b/v2/model_nfs_volume_exports.go index bfe6a00..05d31ae 100644 --- a/v2/model_nfs_volume_exports.go +++ b/v2/model_nfs_volume_exports.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_nfs_volume_mount_endpoint.go b/v2/model_nfs_volume_mount_endpoint.go index 0ccb4ec..122b62e 100644 --- a/v2/model_nfs_volume_mount_endpoint.go +++ b/v2/model_nfs_volume_mount_endpoint.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_node.go b/v2/model_node.go index 92689a4..88d69c4 100644 --- a/v2/model_node.go +++ b/v2/model_node.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ @@ -26,8 +26,12 @@ type Node struct { SupervisorEndpoint string `json:"supervisorEndpoint,omitempty"` // Endpoint at which we operate our health checking service. This value is set on startup by the corresponding environment variable (GOSSIP_ADVERTISE_ADDRESS) GossipEndpoint string `json:"gossipEndpoint,omitempty"` - // Endpoint at which we operate our clustering GRPC API. This value is set on startup by the corresponding environment variable (INTERNAL_API_ADVERTISE_ADDRESS) + // Endpoint at which we operate our clustering gRPC API. This value is set on startup by the corresponding environment variable (INTERNAL_API_ADVERTISE_ADDRESS) ClusteringEndpoint string `json:"clusteringEndpoint,omitempty"` + // Cordoned describes the cordoned state of the node. A cordoned node will not have new volume deployments scheduled on it + Cordoned bool `json:"cordoned,omitempty"` + // The time the node has been cordoned. This field's purpose is informative only. String format is RFC3339. + CordonedAt time.Time `json:"cordonedAt,omitempty"` // A set of arbitrary key value labels to apply to the entity. Labels map[string]string `json:"labels,omitempty"` // The time the entity was created. This timestamp is set by the node that created the entity, and may not be correct if the node's local clock was skewed. This value is for the user's informative purposes only, and correctness is not required. String format is RFC3339. diff --git a/v2/model_node_health.go b/v2/model_node_health.go index 03194fe..864f852 100644 --- a/v2/model_node_health.go +++ b/v2/model_node_health.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_policy_group.go b/v2/model_policy_group.go index b3d53a8..e40fded 100644 --- a/v2/model_policy_group.go +++ b/v2/model_policy_group.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_policy_group_users.go b/v2/model_policy_group_users.go index 264a9b2..a173a0e 100644 --- a/v2/model_policy_group_users.go +++ b/v2/model_policy_group_users.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_replica_deployment_info.go b/v2/model_replica_deployment_info.go index 51a645f..db5f170 100644 --- a/v2/model_replica_deployment_info.go +++ b/v2/model_replica_deployment_info.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_replica_deployment_info_all_of.go b/v2/model_replica_deployment_info_all_of.go index 7152b7e..cc5d30f 100644 --- a/v2/model_replica_deployment_info_all_of.go +++ b/v2/model_replica_deployment_info_all_of.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_replica_health.go b/v2/model_replica_health.go index 34b97ef..676d424 100644 --- a/v2/model_replica_health.go +++ b/v2/model_replica_health.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_resize_volume_request.go b/v2/model_resize_volume_request.go index f83160d..644e63b 100644 --- a/v2/model_resize_volume_request.go +++ b/v2/model_resize_volume_request.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_set_compute_only_node_data.go b/v2/model_set_compute_only_node_data.go index 0f2c185..d26051a 100644 --- a/v2/model_set_compute_only_node_data.go +++ b/v2/model_set_compute_only_node_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_set_cordoned_node_data.go b/v2/model_set_cordoned_node_data.go new file mode 100644 index 0000000..44ebd24 --- /dev/null +++ b/v2/model_set_cordoned_node_data.go @@ -0,0 +1,18 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: v2.5.0-beta1 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// SetCordonedNodeData struct for SetCordonedNodeData +type SetCordonedNodeData struct { + // Marks the node's desired cordoned state state. A cordoned node will not have new volume deployments scheduled on it. + Cordoned bool `json:"cordoned,omitempty"` + // An opaque representation of an entity version at the time it was obtained from the API. All operations that mutate the entity must include this version field in the request unchanged. The format of this type is undefined and may change but the defined properties will not change. + Version string `json:"version,omitempty"` +} diff --git a/v2/model_set_failure_mode_intent_request_data.go b/v2/model_set_failure_mode_intent_request_data.go index 31b1ced..16fc6fc 100644 --- a/v2/model_set_failure_mode_intent_request_data.go +++ b/v2/model_set_failure_mode_intent_request_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_set_failure_mode_request.go b/v2/model_set_failure_mode_request.go index d97fde3..7f7b3a1 100644 --- a/v2/model_set_failure_mode_request.go +++ b/v2/model_set_failure_mode_request.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_set_failure_threshold_request_data.go b/v2/model_set_failure_threshold_request_data.go index 506573d..197c92e 100644 --- a/v2/model_set_failure_threshold_request_data.go +++ b/v2/model_set_failure_threshold_request_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_set_placement_strategy_data.go b/v2/model_set_placement_strategy_data.go new file mode 100644 index 0000000..13a122f --- /dev/null +++ b/v2/model_set_placement_strategy_data.go @@ -0,0 +1,17 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: v2.5.0-beta1 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// SetPlacementStrategyData struct for SetPlacementStrategyData +type SetPlacementStrategyData struct { + PlacementStrategy Strategy `json:"placementStrategy,omitempty"` + // An opaque representation of an entity version at the time it was obtained from the API. All operations that mutate the entity must include this version field in the request unchanged. The format of this type is undefined and may change but the defined properties will not change. + Version string `json:"version,omitempty"` +} diff --git a/v2/model_set_replicas_request.go b/v2/model_set_replicas_request.go index 31fdb50..d2519a5 100644 --- a/v2/model_set_replicas_request.go +++ b/v2/model_set_replicas_request.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_strategy.go b/v2/model_strategy.go new file mode 100644 index 0000000..4a5e8a2 --- /dev/null +++ b/v2/model_strategy.go @@ -0,0 +1,16 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: v2.5.0-beta1 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// Strategy The logic to use when placing the volume replicas across the available nodes. Possible options for this field include an availability zone aware rule and recommended rule in which multiple factors like available disk space, recent number of errors on the nodes, etc, are taken into consideration. Defaults to using a recommended placement strategy. +type Strategy struct { + Strategy string `json:"strategy,omitempty"` + Options *StrategyOptions `json:"options,omitempty"` +} diff --git a/v2/model_strategy_options.go b/v2/model_strategy_options.go new file mode 100644 index 0000000..27e7a04 --- /dev/null +++ b/v2/model_strategy_options.go @@ -0,0 +1,16 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: v2.5.0-beta1 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// StrategyOptions Used together with topology-aware strategy to further specify how the placement should be done. +type StrategyOptions struct { + // Indicates the node label used to decribe the topology used for data placement decisions. If two nodes are labelled with this key and have identical values for that label, the scheduler treats both nodes as being in the same topology domain. When topology-aware provisioning is enabled, the scheduler tries to spread a volume's master and replica copies across different topology domains. + TopologyKey string `json:"topologyKey,omitempty"` +} diff --git a/v2/model_sync_progress.go b/v2/model_sync_progress.go index d5b0893..b04fb42 100644 --- a/v2/model_sync_progress.go +++ b/v2/model_sync_progress.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_update_authenticated_user_data.go b/v2/model_update_authenticated_user_data.go index c9e1e61..baa405e 100644 --- a/v2/model_update_authenticated_user_data.go +++ b/v2/model_update_authenticated_user_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_update_cluster_data.go b/v2/model_update_cluster_data.go index cff9d0c..1e75300 100644 --- a/v2/model_update_cluster_data.go +++ b/v2/model_update_cluster_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_update_licence.go b/v2/model_update_licence.go index e087144..274c69a 100644 --- a/v2/model_update_licence.go +++ b/v2/model_update_licence.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_update_namespace_data.go b/v2/model_update_namespace_data.go index 186cdc9..4b6e476 100644 --- a/v2/model_update_namespace_data.go +++ b/v2/model_update_namespace_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_update_node_data.go b/v2/model_update_node_data.go index 9baabd9..cfba23c 100644 --- a/v2/model_update_node_data.go +++ b/v2/model_update_node_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_update_policy_group_data.go b/v2/model_update_policy_group_data.go index b6db463..d692270 100644 --- a/v2/model_update_policy_group_data.go +++ b/v2/model_update_policy_group_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_update_user_data.go b/v2/model_update_user_data.go index 5d0a212..34bce06 100644 --- a/v2/model_update_user_data.go +++ b/v2/model_update_user_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_update_volume_data.go b/v2/model_update_volume_data.go index 6354fc6..171f3c3 100644 --- a/v2/model_update_volume_data.go +++ b/v2/model_update_volume_data.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_user.go b/v2/model_user.go index cf678d1..b494d03 100644 --- a/v2/model_user.go +++ b/v2/model_user.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_user_session.go b/v2/model_user_session.go index 2c05662..3dc1482 100644 --- a/v2/model_user_session.go +++ b/v2/model_user_session.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_user_session_all_of.go b/v2/model_user_session_all_of.go index 565e8a1..a2ed702 100644 --- a/v2/model_user_session_all_of.go +++ b/v2/model_user_session_all_of.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_user_session_all_of_session.go b/v2/model_user_session_all_of_session.go index 5f90ee2..34d9e56 100644 --- a/v2/model_user_session_all_of_session.go +++ b/v2/model_user_session_all_of_session.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/model_volume.go b/v2/model_volume.go index 03431f2..46c89df 100644 --- a/v2/model_volume.go +++ b/v2/model_volume.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/v2/openapi.yaml b/v2/openapi.yaml index 931c159..4845232 100644 --- a/v2/openapi.yaml +++ b/v2/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.2" info: title: "StorageOS API" - version: "2.4.0" + version: "v2.5.0-beta1" contact: name: StorageOS url: https://storageos.com @@ -297,7 +297,7 @@ components: "none" performs no UID/GID alterations, using the values sent by the client. - "root" mapps UID & GID 0 to the values specified. + "root" maps UID & GID 0 to the values specified. "rootuid" maps UID 0 and a GID of any value to the value specified. @@ -406,6 +406,42 @@ components: nodes that are already operational. example: "json" + Strategy: + type: object + properties: + strategy: + type: string + enum: + - recommended + - topology-aware + default: recommended + options: + type: object + properties: + topologyKey: + type: string + default: topology.kubernetes.io/zone + example: my.custom.zone.label + description: > + Indicates the node label used to decribe the topology + used for data placement decisions. If two nodes are + labelled with this key and have identical values + for that label, the scheduler treats both nodes + as being in the same topology domain. + When topology-aware provisioning is enabled, + the scheduler tries to spread a volume's master + and replica copies across different topology domains. + nullable: true + description: > + Used together with topology-aware strategy to further + specify how the placement should be done. + description: > + The logic to use when placing the volume replicas across the + available nodes. Possible options for this field include an + availability zone aware rule and recommended rule in which + multiple factors like available disk space, recent number of + errors on the nodes, etc, are taken into consideration. + Defaults to using a recommended placement strategy. # ------------------------------------------------------------------------------ # UUIDs # ------------------------------------------------------------------------------ @@ -708,12 +744,29 @@ components: type: string readOnly: true description: > - Endpoint at which we operate our clustering GRPC API. + Endpoint at which we operate our clustering gRPC API. This value is set on startup by the corresponding environment variable (INTERNAL_API_ADVERTISE_ADDRESS) example: - "192.0.2.1:5710" + cordoned: + type: boolean + readOnly: true + default: false + description: > + Cordoned describes the cordoned state of the node. + + A cordoned node will not have new volume deployments scheduled on it + cordonedAt: + type: string + format: date-time + readOnly: true + description: | + The time the node has been cordoned. This field's purpose is informative only. + + String format is RFC3339. + example: "2019-03-29T23:13:13Z" labels: $ref: "#/components/schemas/Labels" createdAt: @@ -1151,7 +1204,7 @@ components: Accepted: description: > - An aynchronous request has been accepted + An asynchronous request has been accepted content: application/json: schema: @@ -2140,7 +2193,66 @@ paths: $ref: "#/components/schemas/Version" responses: "200": - description: The node was successfullly updated + description: The node was successfully updated + content: + application/json: + schema: + $ref: "#/components/schemas/Node" + + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorised" + "403": + $ref: "#/components/responses/Forbidden" + "404": + $ref: "#/components/responses/NotFound" + "412": + $ref: "#/components/responses/StaleWrite" + "500": + $ref: "#/components/responses/ServerError" + "503": + $ref: "#/components/responses/StoreError" + + /nodes/{id}/cordon: + parameters: + - name: id + in: path + description: ID of a Node + required: true + schema: + $ref: "#/components/schemas/NodeID" + + put: + summary: Modify the cordoned state for a node + operationId: setCordoned + description: > + Set the cordoned state for the node corresponding + to id given by the request. + security: + - jwt: [] + parameters: + - $ref: "#/components/parameters/IgnoreVersion" + requestBody: + description: Desired cordoned state for the node. + required: true + content: + application/json: + schema: + type: object + title: SetCordonedNodeData + properties: + cordoned: + type: boolean + description: > + Marks the node's desired cordoned state state. + A cordoned node will not have new volume deployments scheduled on it. + example: true + version: + $ref: "#/components/schemas/Version" + responses: + "200": + description: The node was successfully updated content: application/json: schema: @@ -2484,6 +2596,8 @@ paths: A volume's size in bytes minimum: 0 example: 5000 + placementStrategy: + $ref: "#/components/schemas/Strategy" responses: "201": description: The volume was successfully created @@ -3259,6 +3373,79 @@ paths: "503": $ref: "#/components/responses/StoreError" + /namespaces/{namespaceID}/volumes/{id}/placement-strategy: + parameters: + - name: namespaceID + in: path + description: ID of a Namespace + required: true + schema: + $ref: "#/components/schemas/NamespaceID" + - name: id + in: path + description: ID of a Volume + required: true + schema: + $ref: "#/components/schemas/VolumeID" + put: + summary: Sets the placement strategy of the volume. + operationId: setPlacementStrategy + description: > + Sets the desired behaviour of the volume identified by id when + provisioning new replicas. + + The already placed replicas will not be moved, instead, during + future failovers, node restarts (containing the volume replicas) + and any other operation that requires a replica to be + provisioned will now follow this rule thus having an "eventually + consistent" response. + security: + - jwt: [] + parameters: + - $ref: "#/components/parameters/IgnoreVersion" + requestBody: + description: Placement strategy to use + required: true + content: + application/json: + schema: + type: object + title: SetPlacementStrategyData + properties: + placementStrategy: + $ref: "#/components/schemas/Strategy" + version: + $ref: "#/components/schemas/Version" + responses: + "200": + $ref: "#/components/responses/Accepted" + "400": + $ref: "#/components/responses/BadRequest" + + "401": + $ref: "#/components/responses/Unauthorised" + + "403": + $ref: "#/components/responses/Forbidden" + + "404": + $ref: "#/components/responses/NotFound" + + "409": + $ref: "#/components/responses/InvalidResult" + + "412": + $ref: "#/components/responses/StaleWrite" + + "422": + $ref: "#/components/responses/InvalidStateTransition" + + "500": + $ref: "#/components/responses/ServerError" + + "503": + $ref: "#/components/responses/StoreError" + /cluster: get: summary: Retrieves the cluster's global configuration settings @@ -3291,7 +3478,9 @@ paths: put: summary: Update the cluster's global configuration settings operationId: updateCluster - description: Update the global configuration settings to use for the cluster. + description: > + Update the global configuration settings to use for the cluster. + Updating the cluster log level does not require a restart security: - jwt: [] parameters: @@ -3487,7 +3676,7 @@ paths: The server is returning an incomplete diagnostic bundle. A bundle may contain partial information if one or more - nodes failed to respond, or some other error occured + nodes failed to respond, or some other error occurred during the collection process. The returned bundle is still valid and should be sent to @@ -3573,4 +3762,4 @@ paths: content: text/yaml: schema: - $ref: "#/components/schemas/OpenAPISpec" \ No newline at end of file + $ref: "#/components/schemas/OpenAPISpec" diff --git a/v2/response.go b/v2/response.go index 0181995..76d3432 100644 --- a/v2/response.go +++ b/v2/response.go @@ -3,7 +3,7 @@ * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * API version: 2.4.0 + * API version: v2.5.0-beta1 * Contact: info@storageos.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */