diff --git a/pkg/openapi/README.md b/pkg/openapi/README.md index d9fef4df..50603027 100644 --- a/pkg/openapi/README.md +++ b/pkg/openapi/README.md @@ -67,7 +67,6 @@ 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. @@ -126,7 +125,6 @@ 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) diff --git a/pkg/openapi/api/openapi.yaml b/pkg/openapi/api/openapi.yaml index a5099ee4..58acfdde 100644 --- a/pkg/openapi/api/openapi.yaml +++ b/pkg/openapi/api/openapi.yaml @@ -1998,127 +1998,6 @@ 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. @@ -5033,12 +4912,6 @@ components: schema: $ref: '#/components/schemas/SetComputeOnlyNodeData' required: true - SetCordonedNodeData: - content: - application/json: - schema: - $ref: '#/components/schemas/SetCordonedNodeData' - required: true CreateVolumeData: content: application/json: @@ -5992,9 +5865,14 @@ components: - $ref: '#/components/schemas/ReplicaDeploymentInfo_allOf' Node: example: - cordonedAt: 2019-03-29T23:13:13Z + createdAt: 2019-03-10T13:42:42Z 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 @@ -6003,13 +5881,6 @@ 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: @@ -6057,22 +5928,6 @@ components: 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 @@ -6616,26 +6471,6 @@ 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: diff --git a/pkg/openapi/api_default.go b/pkg/openapi/api_default.go index 52ad1cd7..ec01f983 100644 --- a/pkg/openapi/api_default.go +++ b/pkg/openapi/api_default.go @@ -4770,166 +4770,6 @@ 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.QueryEscape(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 diff --git a/pkg/openapi/docs/DefaultApi.md b/pkg/openapi/docs/DefaultApi.md index 0ddc1b45..284b2462 100644 --- a/pkg/openapi/docs/DefaultApi.md +++ b/pkg/openapi/docs/DefaultApi.md @@ -38,7 +38,6 @@ 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. @@ -1330,53 +1329,6 @@ 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) diff --git a/pkg/openapi/docs/Node.md b/pkg/openapi/docs/Node.md index b7bbd692..310b7b5d 100644 --- a/pkg/openapi/docs/Node.md +++ b/pkg/openapi/docs/Node.md @@ -12,8 +12,6 @@ Name | Type | Description | Notes **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] -**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/pkg/openapi/docs/SetCordonedNodeData.md b/pkg/openapi/docs/SetCordonedNodeData.md deleted file mode 100644 index 4a361cfb..00000000 --- a/pkg/openapi/docs/SetCordonedNodeData.md +++ /dev/null @@ -1,12 +0,0 @@ -# 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/pkg/openapi/model_node.go b/pkg/openapi/model_node.go index c9e94dcc..7b1a1c60 100644 --- a/pkg/openapi/model_node.go +++ b/pkg/openapi/model_node.go @@ -28,10 +28,6 @@ type Node struct { 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) 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/pkg/openapi/model_set_cordoned_node_data.go b/pkg/openapi/model_set_cordoned_node_data.go deleted file mode 100644 index a20e0622..00000000 --- a/pkg/openapi/model_set_cordoned_node_data.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * StorageOS API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * API version: 2.5.0 - * Contact: info@storageos.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package openapi -// 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"` -}