From 4a40ca22babb0e7cc23aabf245bb81382de9d637 Mon Sep 17 00:00:00 2001 From: Alex Vest Date: Wed, 20 May 2020 15:19:14 +0100 Subject: [PATCH] Update API to v2.0.0 --- v2/.openapi-generator/VERSION | 2 +- v2/README.md | 19 +- v2/api/openapi.yaml | 669 ++++++++++++--------- v2/api_default.go | 569 ++++++------------ v2/client.go | 10 + v2/docs/CapacityStats.md | 13 + v2/docs/Cluster.md | 1 - v2/docs/DefaultApi.md | 111 ++-- v2/docs/DeploymentInfo.md | 4 +- v2/docs/Licence.md | 2 + v2/docs/MasterDeploymentInfo.md | 14 + v2/docs/MasterDeploymentInfoAllOf.md | 11 + v2/docs/MasterHealth.md | 10 + v2/docs/Node.md | 3 +- v2/docs/NodeHealth.md | 10 + v2/docs/PoliciesIdSpecs.md | 13 + v2/docs/PolicyGroup.md | 2 +- v2/docs/ReplicaDeploymentInfo.md | 15 + v2/docs/ReplicaDeploymentInfoAllOf.md | 12 + v2/docs/ReplicaHealth.md | 10 + v2/docs/SyncProgress.md | 13 + v2/docs/UpdateClusterData.md | 1 - v2/docs/UpdateLicence.md | 12 + v2/docs/UpdatePolicyGroupData.md | 2 +- v2/docs/UserSession.md | 18 + v2/docs/UserSessionAllOf.md | 11 + v2/docs/UserSessionAllOfSession.md | 12 + v2/docs/Volume.md | 5 +- v2/model__policies__id__specs.go | 20 + v2/model_capacity_stats.go | 20 + v2/model_cluster.go | 1 - v2/model_deployment_info.go | 6 +- v2/model_licence.go | 4 + v2/model_master_deployment_info.go | 21 + v2/model_master_deployment_info_all_of.go | 15 + v2/model_master_health.go | 20 + v2/model_node.go | 3 +- v2/model_node_health.go | 20 + v2/model_policy_group.go | 2 +- v2/model_replica_deployment_info.go | 22 + v2/model_replica_deployment_info_all_of.go | 16 + v2/model_replica_health.go | 25 + v2/model_sync_progress.go | 20 + v2/model_update_cluster_data.go | 2 - v2/model_update_licence.go | 18 + v2/model_update_policy_group_data.go | 2 +- v2/model_user_session.go | 31 + v2/model_user_session_all_of.go | 15 + v2/model_user_session_all_of_session.go | 18 + v2/model_volume.go | 5 +- v2/openapi.yaml | 354 ++++++++--- 51 files changed, 1399 insertions(+), 835 deletions(-) create mode 100644 v2/docs/CapacityStats.md create mode 100644 v2/docs/MasterDeploymentInfo.md create mode 100644 v2/docs/MasterDeploymentInfoAllOf.md create mode 100644 v2/docs/MasterHealth.md create mode 100644 v2/docs/NodeHealth.md create mode 100644 v2/docs/PoliciesIdSpecs.md create mode 100644 v2/docs/ReplicaDeploymentInfo.md create mode 100644 v2/docs/ReplicaDeploymentInfoAllOf.md create mode 100644 v2/docs/ReplicaHealth.md create mode 100644 v2/docs/SyncProgress.md create mode 100644 v2/docs/UpdateLicence.md create mode 100644 v2/docs/UserSession.md create mode 100644 v2/docs/UserSessionAllOf.md create mode 100644 v2/docs/UserSessionAllOfSession.md create mode 100644 v2/model__policies__id__specs.go create mode 100644 v2/model_capacity_stats.go create mode 100644 v2/model_master_deployment_info.go create mode 100644 v2/model_master_deployment_info_all_of.go create mode 100644 v2/model_master_health.go create mode 100644 v2/model_node_health.go create mode 100644 v2/model_replica_deployment_info.go create mode 100644 v2/model_replica_deployment_info_all_of.go create mode 100644 v2/model_replica_health.go create mode 100644 v2/model_sync_progress.go create mode 100644 v2/model_update_licence.go create mode 100644 v2/model_user_session.go create mode 100644 v2/model_user_session_all_of.go create mode 100644 v2/model_user_session_all_of_session.go diff --git a/v2/.openapi-generator/VERSION b/v2/.openapi-generator/VERSION index bfbf77e..d99e716 100644 --- a/v2/.openapi-generator/VERSION +++ b/v2/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0-SNAPSHOT \ No newline at end of file +5.0.0-SNAPSHOT \ No newline at end of file diff --git a/v2/README.md b/v2/README.md index c24873e..19f3dad 100644 --- a/v2/README.md +++ b/v2/README.md @@ -51,6 +51,7 @@ Class | Method | HTTP request | Description *DefaultApi* | [**GetAuthenticatedUser**](docs/DefaultApi.md#getauthenticateduser) | **Get** /users/self | Get the currently authenticated user's information *DefaultApi* | [**GetCluster**](docs/DefaultApi.md#getcluster) | **Get** /cluster | Retrieves the cluster's global configuration settings *DefaultApi* | [**GetDiagnostics**](docs/DefaultApi.md#getdiagnostics) | **Get** /diagnostics | Retrieves a diagnostics bundle from the target node +*DefaultApi* | [**GetLicence**](docs/DefaultApi.md#getlicence) | **Get** /cluster/licence | Retrieves the cluster's licence information *DefaultApi* | [**GetNamespace**](docs/DefaultApi.md#getnamespace) | **Get** /namespaces/{id} | Fetch a namespace *DefaultApi* | [**GetNode**](docs/DefaultApi.md#getnode) | **Get** /nodes/{id} | Fetch a node *DefaultApi* | [**GetPolicyGroup**](docs/DefaultApi.md#getpolicygroup) | **Get** /policies/{id} | Fetch a policy group @@ -65,11 +66,11 @@ Class | Method | HTTP request | Description *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 *DefaultApi* | [**UpdateCluster**](docs/DefaultApi.md#updatecluster) | **Put** /cluster | Update the cluster's global configuration settings +*DefaultApi* | [**UpdateLicence**](docs/DefaultApi.md#updatelicence) | **Put** /cluster/licence | Update the licence global configuration settings *DefaultApi* | [**UpdateNamespace**](docs/DefaultApi.md#updatenamespace) | **Put** /namespaces/{id} | Update a namespace *DefaultApi* | [**UpdateNode**](docs/DefaultApi.md#updatenode) | **Put** /nodes/{id} | Update a node *DefaultApi* | [**UpdatePolicyGroup**](docs/DefaultApi.md#updatepolicygroup) | **Put** /policies/{id} | Update a policy group *DefaultApi* | [**UpdateUser**](docs/DefaultApi.md#updateuser) | **Put** /users/{id} | Update a user -*DefaultApi* | [**UpdateVolume**](docs/DefaultApi.md#updatevolume) | **Put** /namespaces/{namespaceID}/volumes/{id} | Update a volume ## Documentation For Models @@ -77,6 +78,7 @@ Class | Method | HTTP request | Description - [AcceptedMessage](docs/AcceptedMessage.md) - [AttachVolumeData](docs/AttachVolumeData.md) - [AuthUserData](docs/AuthUserData.md) + - [CapacityStats](docs/CapacityStats.md) - [Cluster](docs/Cluster.md) - [CreateNamespaceData](docs/CreateNamespaceData.md) - [CreatePolicyGroupData](docs/CreatePolicyGroupData.md) @@ -85,23 +87,34 @@ Class | Method | HTTP request | Description - [DeploymentInfo](docs/DeploymentInfo.md) - [Error](docs/Error.md) - [FsType](docs/FsType.md) - - [Health](docs/Health.md) - [Licence](docs/Licence.md) - [LogFormat](docs/LogFormat.md) - [LogLevel](docs/LogLevel.md) + - [MasterDeploymentInfo](docs/MasterDeploymentInfo.md) + - [MasterDeploymentInfoAllOf](docs/MasterDeploymentInfoAllOf.md) + - [MasterHealth](docs/MasterHealth.md) - [Namespace](docs/Namespace.md) - [Node](docs/Node.md) + - [NodeHealth](docs/NodeHealth.md) + - [PoliciesIdSpecs](docs/PoliciesIdSpecs.md) - [PoliciesSpecs](docs/PoliciesSpecs.md) - [PolicyGroup](docs/PolicyGroup.md) - [PolicyGroupUsers](docs/PolicyGroupUsers.md) + - [ReplicaDeploymentInfo](docs/ReplicaDeploymentInfo.md) + - [ReplicaDeploymentInfoAllOf](docs/ReplicaDeploymentInfoAllOf.md) + - [ReplicaHealth](docs/ReplicaHealth.md) + - [SyncProgress](docs/SyncProgress.md) - [UpdateAuthenticatedUserData](docs/UpdateAuthenticatedUserData.md) - [UpdateClusterData](docs/UpdateClusterData.md) + - [UpdateLicence](docs/UpdateLicence.md) - [UpdateNamespaceData](docs/UpdateNamespaceData.md) - [UpdateNodeData](docs/UpdateNodeData.md) - [UpdatePolicyGroupData](docs/UpdatePolicyGroupData.md) - [UpdateUserData](docs/UpdateUserData.md) - - [UpdateVolumeData](docs/UpdateVolumeData.md) - [User](docs/User.md) + - [UserSession](docs/UserSession.md) + - [UserSessionAllOf](docs/UserSessionAllOf.md) + - [UserSessionAllOfSession](docs/UserSessionAllOfSession.md) - [Volume](docs/Volume.md) diff --git a/v2/api/openapi.yaml b/v2/api/openapi.yaml index 57fddc0..78f84ac 100644 --- a/v2/api/openapi.yaml +++ b/v2/api/openapi.yaml @@ -42,7 +42,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/User' + $ref: '#/components/schemas/UserSession' description: Successfully authenticated the returned user. headers: Authorization: @@ -52,6 +52,14 @@ paths: schema: type: string style: simple + Authorization-Expires-Seconds: + description: | + A formatted string representing the number of seconds after which the login session will expire. + explode: false + schema: + example: 60 + type: uint64 + style: simple "400": content: application/json: @@ -93,6 +101,10 @@ paths: operationId: refreshJwt responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserSession' description: Refresh was successful headers: Authorization: @@ -101,6 +113,14 @@ paths: schema: type: string style: simple + Authorization-Expires-In: + description: | + A formatted string representing the duration after which the refreshed token will expire. + explode: false + schema: + example: 60 + type: uint64 + style: simple "401": content: application/json: @@ -522,7 +542,6 @@ paths: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string title: UpdateUserData type: object @@ -858,7 +877,6 @@ paths: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string title: UpdateAuthenticatedUserData type: object @@ -1087,7 +1105,7 @@ paths: env: prod rack: db-1 externalDocs: - url: https://docs.storageos.com/docs/reference/labels + url: https://docs.storageos.com/v2/openapi-help/labels type: object title: CreateNamespaceData type: object @@ -1370,7 +1388,7 @@ paths: env: prod rack: db-1 externalDocs: - url: https://docs.storageos.com/docs/reference/labels + url: https://docs.storageos.com/v2/openapi-help/labels type: object version: description: | @@ -1379,7 +1397,6 @@ paths: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string title: UpdateNamespaceData type: object @@ -1735,7 +1752,7 @@ paths: env: prod rack: db-1 externalDocs: - url: https://docs.storageos.com/docs/reference/labels + url: https://docs.storageos.com/v2/openapi-help/labels type: object version: description: | @@ -1744,7 +1761,6 @@ paths: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string title: UpdateNodeData type: object @@ -2196,7 +2212,7 @@ paths: resourceType: volume readOnly: true items: - $ref: '#/components/schemas/_policies_specs' + $ref: '#/components/schemas/_policies__id__specs' nullable: true type: array version: @@ -2206,7 +2222,6 @@ paths: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string title: UpdatePolicyGroupData type: object @@ -2396,7 +2411,7 @@ paths: env: prod rack: db-1 externalDocs: - url: https://docs.storageos.com/docs/reference/labels + url: https://docs.storageos.com/v2/openapi-help/labels type: object name: description: | @@ -2500,6 +2515,15 @@ paths: 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. + "507": + content: + application/json: + example: + error: insufficient storage capacity available + schema: + $ref: '#/components/schemas/Error' + description: | + Available storage is not enough to handle the request. security: - jwt: [] summary: Create a new Volume in the specified namespace @@ -2732,153 +2756,6 @@ paths: security: - jwt: [] summary: Fetch a volume - put: - description: Update the volume identified by id. - operationId: updateVolume - 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 - requestBody: - $ref: '#/components/requestBodies/UpdateVolumeData' - content: - application/json: - schema: - example: - name: new-volume-name - description: This volume contains the data for my app - version: NDI0MjQyNDI0MjQyNDI0MjQy - labels: - env: prod - rack: db-1 - properties: - name: - description: | - desired new volume name - example: new-volume-name - type: string - labels: - additionalProperties: - type: string - description: | - A set of arbitrary key value labels to apply to the entity. - example: - env: prod - rack: db-1 - externalDocs: - url: https://docs.storageos.com/docs/reference/labels - type: object - description: - example: This volume contains the data for my app - type: string - 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 - minLength: 1 - type: string - title: UpdateVolumeData - type: object - description: update a volume to a desired state. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Volume' - description: The volume 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. - "451": - content: - application/json: - example: - error: insufficient allowed capacity (bytes) (used 53687091200, allowed - 53687091200, requested 5000000) - schema: - $ref: '#/components/schemas/Error' - description: | - The requested operation failed because your storageOS licence does not allow it, either create an account for a free licence or buy a professional licence. - "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: Update a volume /namespaces/{namespaceID}/volumes/{id}/attach: delete: description: Detach the volume identified by id. @@ -3173,7 +3050,6 @@ paths: application/json: schema: example: - licenceKey: licenceKey disableVersionCheck: false disableCrashReporting: false logFormat: json @@ -3181,11 +3057,6 @@ paths: disableTelemetry: false version: NDI0MjQyNDI0MjQyNDI0MjQy properties: - licenceKey: - description: | - A StorageOS product licence key, used to register a cluster. The format of this type is opaque and may change. - If this field is empty we assume that the called does not want to update the cluster's licence, and do not perform any operation. - type: string disableTelemetry: default: false description: | @@ -3215,7 +3086,6 @@ paths: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string title: UpdateClusterData type: object @@ -3284,6 +3154,148 @@ paths: security: - jwt: [] summary: Update the cluster's global configuration settings + /cluster/licence: + get: + description: | + Retrieves the cluster's current licence information + operationId: getLicence + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Licence' + description: The cluster's licence information. + "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. + "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: Retrieves the cluster's licence information + put: + description: Update the cluster's licence. + operationId: updateLicence + requestBody: + $ref: '#/components/requestBodies/UpdateLicence' + content: + application/json: + schema: + example: + version: NDI0MjQyNDI0MjQyNDI0MjQy + key: key + properties: + key: + description: | + A StorageOS product licence key, used to register a cluster. The format of this type is opaque and may change. + type: string + 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: UpdateLicence + type: object + description: | + A StorageOS product licence key, used to register a cluster. The format of this type is opaque and may change. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Licence' + description: The provided licence was successfully applied. + "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. + "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: Update the licence global configuration settings /diagnostics: get: description: | @@ -3408,12 +3420,6 @@ components: schema: $ref: '#/components/schemas/CreateVolumeData' required: true - UpdateVolumeData: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateVolumeData' - required: true UpdateUserData: content: application/json: @@ -3426,6 +3432,12 @@ components: schema: $ref: '#/components/schemas/CreateUserData' required: true + UpdateLicence: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateLicence' + required: true CreatePolicyGroupData: content: application/json: @@ -3543,6 +3555,15 @@ components: $ref: '#/components/schemas/Error' description: | A referenced resource does not exist. + InsufficientStorage: + content: + application/json: + example: + error: insufficient storage capacity available + schema: + $ref: '#/components/schemas/Error' + description: | + Available storage is not enough to handle the request. StaleWrite: content: application/json: @@ -3610,7 +3631,6 @@ components: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string IgnoreVersion: default: false @@ -3660,9 +3680,19 @@ components: - block example: ext4 type: string - Health: + NodeHealth: + description: | + The operational health of a node entity + enum: + - online + - offline + - unknown + example: online + readOnly: true + type: string + MasterHealth: description: | - The operational health of an entity + The operational health of a volume master deployment enum: - online - offline @@ -3670,6 +3700,63 @@ components: example: online readOnly: true type: string + ReplicaHealth: + description: | + The operational health of a volume replica deployment + enum: + - recovering + - provisioning + - provisioned + - syncing + - ready + - deleted + - failed + - unknown + example: ready + readOnly: true + type: string + SyncProgress: + description: "The progress report for an ongoing sync. \n" + properties: + bytesRemaining: + description: | + Number of bytes left remaining to complete the sync. + example: 500000 + type: uint64 + throughputBytes: + description: | + The average throughput of the sync given as bytes per second. + example: 100000 + type: uint64 + estimatedSecondsRemaining: + description: | + The estimated time left for the sync to complete, given in seconds. When this field has a value of 0 either the sync is complete or no duration estimate could be made. The values reported for bytesRemaining and throughputBytes provide the client with the information needed to choose what to display. + example: 5 + type: uint64 + readOnly: true + type: object + CapacityStats: + example: + total: 42 + available: 42 + free: 42 + properties: + total: + description: | + Total bytes in the filesystem + example: 42 + type: uint64 + free: + description: | + Free bytes in the filesystem available to root user + example: 42 + type: uint64 + available: + description: | + Byte value available to an unprivileged user + example: 42 + type: uint64 + type: object Labels: additionalProperties: type: string @@ -3679,7 +3766,7 @@ components: env: prod rack: db-1 externalDocs: - url: https://docs.storageos.com/docs/reference/labels + url: https://docs.storageos.com/v2/openapi-help/labels type: object LogLevel: default: info @@ -3743,12 +3830,6 @@ components: Cluster: example: disableVersionCheck: false - licence: - clusterCapacityBytes: 1000000 - kind: basic - clusterID: c5666b58-b805-4215-ab4a-cb094948ccc6 - expiresAt: 2019-03-10T13:42:42Z - customerName: Desmond createdAt: 2019-03-10T13:42:42Z disableCrashReporting: false logFormat: json @@ -3764,8 +3845,6 @@ components: example: c5666b58-b805-4215-ab4a-cb094948ccc6 readOnly: true type: string - licence: - $ref: '#/components/schemas/Licence' disableTelemetry: default: false description: Disables collection of telemetry data across the cluster. @@ -3814,7 +3893,6 @@ components: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string type: object User: @@ -3883,22 +3961,17 @@ components: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string type: object + UserSession: + allOf: + - $ref: '#/components/schemas/User' + - $ref: '#/components/schemas/UserSession_allOf' Volume: example: replicas: - - inode: 1223 - syncing: true - health: online - id: c5666b58-b805-4215-ab4a-cb094948ccc6 - nodeID: c5666b58-b805-4215-ab4a-cb094948ccc6 - - inode: 1223 - syncing: true - health: online - id: c5666b58-b805-4215-ab4a-cb094948ccc6 - nodeID: c5666b58-b805-4215-ab4a-cb094948ccc6 + - null + - null description: This volume contains the data for my app fsType: ext4 version: NDI0MjQyNDI0MjQyNDI0MjQy @@ -3908,7 +3981,6 @@ components: master: "" sizeBytes: 5000 attachedOn: "" - inode: 42 createdAt: 2019-03-10T13:42:42Z namespaceID: "" name: app-data @@ -3943,22 +4015,18 @@ components: env: prod rack: db-1 externalDocs: - url: https://docs.storageos.com/docs/reference/labels + url: https://docs.storageos.com/v2/openapi-help/labels type: object fsType: $ref: '#/components/schemas/FsType' - inode: - example: 42 - readOnly: true - type: uint32 master: allOf: - - $ref: '#/components/schemas/DeploymentInfo' + - $ref: '#/components/schemas/MasterDeploymentInfo' readOnly: true replicas: default: [] items: - $ref: '#/components/schemas/DeploymentInfo' + $ref: '#/components/schemas/ReplicaDeploymentInfo' nullable: true readOnly: true type: array @@ -3995,16 +4063,9 @@ components: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string type: object DeploymentInfo: - example: - inode: 1223 - syncing: true - health: online - id: c5666b58-b805-4215-ab4a-cb094948ccc6 - nodeID: c5666b58-b805-4215-ab4a-cb094948ccc6 properties: id: description: | @@ -4017,17 +4078,19 @@ components: example: c5666b58-b805-4215-ab4a-cb094948ccc6 readOnly: true type: string - inode: - example: 1223 - readOnly: true - type: uint32 - health: - $ref: '#/components/schemas/Health' - syncing: + promotable: description: | - indicates if a volume is undergoing data synchronization operations + Indicates if the volume deployment is eligible for promotion type: boolean type: object + MasterDeploymentInfo: + allOf: + - $ref: '#/components/schemas/DeploymentInfo' + - $ref: '#/components/schemas/MasterDeploymentInfo_allOf' + ReplicaDeploymentInfo: + allOf: + - $ref: '#/components/schemas/DeploymentInfo' + - $ref: '#/components/schemas/ReplicaDeploymentInfo_allOf' Node: example: createdAt: 2019-03-10T13:42:42Z @@ -4039,6 +4102,10 @@ components: supervisorEndpoint: '["192.0.2.1:5704"]' clusteringEndpoint: '["192.0.2.1:5710"]' version: NDI0MjQyNDI0MjQyNDI0MjQy + capacity: + total: 42 + available: 42 + free: 42 labels: env: prod rack: db-1 @@ -4058,7 +4125,9 @@ components: readOnly: true type: string health: - $ref: '#/components/schemas/Health' + $ref: '#/components/schemas/NodeHealth' + capacity: + $ref: '#/components/schemas/CapacityStats' ioEndpoint: description: | Endpoint at which we operate our dataplane's dfs service. (used for IO operations) @@ -4096,7 +4165,7 @@ components: env: prod rack: db-1 externalDocs: - url: https://docs.storageos.com/docs/reference/labels + url: https://docs.storageos.com/v2/openapi-help/labels type: object createdAt: description: | @@ -4125,7 +4194,6 @@ components: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string type: object Namespace: @@ -4157,7 +4225,7 @@ components: env: prod rack: db-1 externalDocs: - url: https://docs.storageos.com/docs/reference/labels + url: https://docs.storageos.com/v2/openapi-help/labels type: object createdAt: description: | @@ -4186,7 +4254,6 @@ components: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string type: object PolicyGroup: @@ -4243,7 +4310,7 @@ components: resourceType: volume readOnly: true items: - $ref: '#/components/schemas/_policies_specs' + $ref: '#/components/schemas/_policies__id__specs' nullable: true type: array createdAt: @@ -4273,7 +4340,6 @@ components: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string type: object Licence: @@ -4281,8 +4347,10 @@ components: A representation of a cluster's licence properties example: clusterCapacityBytes: 1000000 - kind: basic + kind: unregistered clusterID: c5666b58-b805-4215-ab4a-cb094948ccc6 + usedBytes: 42 + version: NDI0MjQyNDI0MjQyNDI0MjQy expiresAt: 2019-03-10T13:42:42Z customerName: Desmond properties: @@ -4308,16 +4376,29 @@ components: example: 1000000 minimum: 0 type: uint64 + usedBytes: + description: | + Sum of the size of all volumes in the cluster + example: 42 + type: uint64 kind: description: | Denotes which category the licence belongs to - example: basic + example: unregistered type: string customerName: description: | A user friendly reference to the customer example: Desmond type: string + 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 type: object AcceptedMessage: example: @@ -4446,7 +4527,6 @@ components: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string title: UpdateUserData type: object @@ -4469,7 +4549,6 @@ components: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string title: UpdateAuthenticatedUserData type: object @@ -4495,7 +4574,7 @@ components: env: prod rack: db-1 externalDocs: - url: https://docs.storageos.com/docs/reference/labels + url: https://docs.storageos.com/v2/openapi-help/labels type: object title: CreateNamespaceData type: object @@ -4515,7 +4594,7 @@ components: env: prod rack: db-1 externalDocs: - url: https://docs.storageos.com/docs/reference/labels + url: https://docs.storageos.com/v2/openapi-help/labels type: object version: description: | @@ -4524,7 +4603,6 @@ components: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string title: UpdateNamespaceData type: object @@ -4544,7 +4622,7 @@ components: env: prod rack: db-1 externalDocs: - url: https://docs.storageos.com/docs/reference/labels + url: https://docs.storageos.com/v2/openapi-help/labels type: object version: description: | @@ -4553,7 +4631,6 @@ components: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string title: UpdateNodeData type: object @@ -4569,8 +4646,12 @@ components: The resource type this policy grants access to. enum: - '*' - - volume + - cluster + - namespace + - node - policy + - user + - volume example: volume type: string readOnly: @@ -4609,6 +4690,28 @@ components: type: array title: CreatePolicyGroupData type: object + _policies__id__specs: + properties: + namespaceID: + description: | + A unique identifier for a namespace. The format of this type is undefined and may change but the defined properties will not change.. + example: c5666b58-b805-4215-ab4a-cb094948ccc6 + type: string + resourceType: + description: | + The resource type this policy grants access to. + enum: + - '*' + - volume + - policy + example: volume + type: string + readOnly: + default: false + description: | + If true, disallows requests that attempt to mutate the resource. + example: false + type: boolean UpdatePolicyGroupData: example: specs: @@ -4631,7 +4734,7 @@ components: resourceType: volume readOnly: true items: - $ref: '#/components/schemas/_policies_specs' + $ref: '#/components/schemas/_policies__id__specs' nullable: true type: array version: @@ -4641,7 +4744,6 @@ components: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string title: UpdatePolicyGroupData type: object @@ -4670,7 +4772,7 @@ components: env: prod rack: db-1 externalDocs: - url: https://docs.storageos.com/docs/reference/labels + url: https://docs.storageos.com/v2/openapi-help/labels type: object name: description: | @@ -4696,45 +4798,6 @@ components: - sizeBytes title: CreateVolumeData type: object - UpdateVolumeData: - example: - name: new-volume-name - description: This volume contains the data for my app - version: NDI0MjQyNDI0MjQyNDI0MjQy - labels: - env: prod - rack: db-1 - properties: - name: - description: | - desired new volume name - example: new-volume-name - type: string - labels: - additionalProperties: - type: string - description: | - A set of arbitrary key value labels to apply to the entity. - example: - env: prod - rack: db-1 - externalDocs: - url: https://docs.storageos.com/docs/reference/labels - type: object - description: - example: This volume contains the data for my app - type: string - 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 - minLength: 1 - type: string - title: UpdateVolumeData - type: object AttachVolumeData: example: nodeID: c5666b58-b805-4215-ab4a-cb094948ccc6 @@ -4749,7 +4812,6 @@ components: type: object UpdateClusterData: example: - licenceKey: licenceKey disableVersionCheck: false disableCrashReporting: false logFormat: json @@ -4757,11 +4819,6 @@ components: disableTelemetry: false version: NDI0MjQyNDI0MjQyNDI0MjQy properties: - licenceKey: - description: | - A StorageOS product licence key, used to register a cluster. The format of this type is opaque and may change. - If this field is empty we assume that the called does not want to update the cluster's licence, and do not perform any operation. - type: string disableTelemetry: default: false description: | @@ -4791,10 +4848,54 @@ components: The format of this type is undefined and may change but the defined properties will not change. example: NDI0MjQyNDI0MjQyNDI0MjQy maxLength: 30 - minLength: 1 type: string title: UpdateClusterData type: object + UpdateLicence: + example: + version: NDI0MjQyNDI0MjQyNDI0MjQy + key: key + properties: + key: + description: | + A StorageOS product licence key, used to register a cluster. The format of this type is opaque and may change. + type: string + 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: UpdateLicence + type: object + UserSession_allOf_session: + properties: + expiresInSeconds: + description: | + The maximum duration which the auth session will remain valid for in seconds. + example: 60 + minimum: 0 + type: uint64 + token: + description: | + The JWT token for the auth session. + type: string + UserSession_allOf: + properties: + session: + $ref: '#/components/schemas/UserSession_allOf_session' + MasterDeploymentInfo_allOf: + properties: + health: + $ref: '#/components/schemas/MasterHealth' + ReplicaDeploymentInfo_allOf: + properties: + health: + $ref: '#/components/schemas/ReplicaHealth' + syncProgress: + $ref: '#/components/schemas/SyncProgress' PolicyGroup_users: properties: id: diff --git a/v2/api_default.go b/v2/api_default.go index 9357806..4403f1f 100644 --- a/v2/api_default.go +++ b/v2/api_default.go @@ -175,16 +175,16 @@ AuthenticateUser Authenticate a user Generate a new JWT token for a user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param authUserData -@return User +@return UserSession */ -func (a *DefaultApiService) AuthenticateUser(ctx _context.Context, authUserData AuthUserData) (User, *_nethttp.Response, error) { +func (a *DefaultApiService) AuthenticateUser(ctx _context.Context, authUserData AuthUserData) (UserSession, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue User + localVarReturnValue UserSession ) // create path and map variables @@ -233,16 +233,6 @@ func (a *DefaultApiService) AuthenticateUser(ctx _context.Context, authUserData body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v User - 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 == 400 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -360,16 +350,6 @@ func (a *DefaultApiService) CreateNamespace(ctx _context.Context, createNamespac body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 201 { - var v Namespace - 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 == 400 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -507,16 +487,6 @@ func (a *DefaultApiService) CreatePolicyGroup(ctx _context.Context, createPolicy body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 201 { - var v PolicyGroup - 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 == 400 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -654,16 +624,6 @@ func (a *DefaultApiService) CreateUser(ctx _context.Context, createUserData Crea body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 201 { - var v User - 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 == 400 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -814,18 +774,8 @@ func (a *DefaultApiService) CreateVolume(ctx _context.Context, namespaceID strin body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 201 { - var v Volume - 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 == 202 { - var v AcceptedMessage + 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() @@ -834,7 +784,7 @@ func (a *DefaultApiService) CreateVolume(ctx _context.Context, namespaceID strin newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 400 { + if localVarHTTPResponse.StatusCode == 401 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -844,7 +794,7 @@ func (a *DefaultApiService) CreateVolume(ctx _context.Context, namespaceID strin newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 401 { + if localVarHTTPResponse.StatusCode == 403 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -854,7 +804,7 @@ func (a *DefaultApiService) CreateVolume(ctx _context.Context, namespaceID strin newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 403 { + if localVarHTTPResponse.StatusCode == 409 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -864,7 +814,7 @@ func (a *DefaultApiService) CreateVolume(ctx _context.Context, namespaceID strin newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 409 { + if localVarHTTPResponse.StatusCode == 451 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -874,7 +824,7 @@ func (a *DefaultApiService) CreateVolume(ctx _context.Context, namespaceID strin newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 451 { + if localVarHTTPResponse.StatusCode == 500 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -884,7 +834,7 @@ func (a *DefaultApiService) CreateVolume(ctx _context.Context, namespaceID strin newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 500 { + if localVarHTTPResponse.StatusCode == 503 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -894,7 +844,7 @@ func (a *DefaultApiService) CreateVolume(ctx _context.Context, namespaceID strin newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 503 { + if localVarHTTPResponse.StatusCode == 507 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -945,9 +895,6 @@ func (a *DefaultApiService) DeleteAuthenticatedUser(ctx _context.Context, versio localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if strlen(version) < 1 { - return nil, reportError("version must have at least 1 elements") - } if strlen(version) > 30 { return nil, reportError("version must have less than 30 elements") } @@ -1232,9 +1179,6 @@ func (a *DefaultApiService) DeleteNamespace(ctx _context.Context, id string, ver localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if strlen(version) < 1 { - return nil, reportError("version must have at least 1 elements") - } if strlen(version) > 30 { return nil, reportError("version must have less than 30 elements") } @@ -1398,9 +1342,6 @@ func (a *DefaultApiService) DeleteNode(ctx _context.Context, id string, version localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if strlen(version) < 1 { - return nil, reportError("version must have at least 1 elements") - } if strlen(version) > 30 { return nil, reportError("version must have less than 30 elements") } @@ -1450,16 +1391,6 @@ func (a *DefaultApiService) DeleteNode(ctx _context.Context, id string, version body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 202 { - var v AcceptedMessage - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } if localVarHTTPResponse.StatusCode == 400 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1575,9 +1506,6 @@ func (a *DefaultApiService) DeletePolicyGroup(ctx _context.Context, id string, v localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if strlen(version) < 1 { - return nil, reportError("version must have at least 1 elements") - } if strlen(version) > 30 { return nil, reportError("version must have less than 30 elements") } @@ -1875,9 +1803,6 @@ func (a *DefaultApiService) DeleteUser(ctx _context.Context, id string, version localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if strlen(version) < 1 { - return nil, reportError("version must have at least 1 elements") - } if strlen(version) > 30 { return nil, reportError("version must have less than 30 elements") } @@ -2034,9 +1959,6 @@ func (a *DefaultApiService) DeleteVolume(ctx _context.Context, namespaceID strin localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if strlen(version) < 1 { - return nil, reportError("version must have at least 1 elements") - } if strlen(version) > 30 { return nil, reportError("version must have less than 30 elements") } @@ -2086,16 +2008,6 @@ func (a *DefaultApiService) DeleteVolume(ctx _context.Context, namespaceID strin body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 202 { - var v AcceptedMessage - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } if localVarHTTPResponse.StatusCode == 400 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -2224,9 +2136,6 @@ func (a *DefaultApiService) DetachVolume(ctx _context.Context, namespaceID strin localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if strlen(version) < 1 { - return nil, reportError("version must have at least 1 elements") - } if strlen(version) > 30 { return nil, reportError("version must have less than 30 elements") } @@ -2428,16 +2337,6 @@ func (a *DefaultApiService) GetAuthenticatedUser(ctx _context.Context) (User, *_ body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v User - 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")) @@ -2562,16 +2461,6 @@ func (a *DefaultApiService) GetCluster(ctx _context.Context) (Cluster, *_nethttp body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v Cluster - 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")) @@ -2686,8 +2575,28 @@ func (a *DefaultApiService) GetDiagnostics(ctx _context.Context) (*os.File, *_ne body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v *os.File + 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 == 500 { + var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2696,6 +2605,90 @@ func (a *DefaultApiService) GetDiagnostics(ctx _context.Context) (*os.File, *_ne 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 +} + +/* +GetLicence Retrieves the cluster's licence information +Retrieves the cluster's current licence information + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@return Licence +*/ +func (a *DefaultApiService) GetLicence(ctx _context.Context) (Licence, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Licence + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/cluster/licence" + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // 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 + } + 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 == 401 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -2813,16 +2806,6 @@ func (a *DefaultApiService) GetNamespace(ctx _context.Context, id string) (Names body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v Namespace - 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 == 400 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -2960,16 +2943,6 @@ func (a *DefaultApiService) GetNode(ctx _context.Context, id string) (Node, *_ne body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v Node - 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")) @@ -3097,16 +3070,6 @@ func (a *DefaultApiService) GetPolicyGroup(ctx _context.Context, id string) (Pol body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v PolicyGroup - 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 == 400 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -3244,16 +3207,6 @@ func (a *DefaultApiService) GetUser(ctx _context.Context, id string) (User, *_ne body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v User - 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")) @@ -3384,16 +3337,6 @@ func (a *DefaultApiService) GetVolume(ctx _context.Context, namespaceID string, body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v Volume - 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 == 400 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -3528,16 +3471,6 @@ func (a *DefaultApiService) ListNamespaces(ctx _context.Context) ([]Namespace, * body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v []Namespace - 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")) @@ -3652,16 +3585,6 @@ func (a *DefaultApiService) ListNodes(ctx _context.Context) ([]Node, *_nethttp.R body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v []Node - 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")) @@ -3776,16 +3699,6 @@ func (a *DefaultApiService) ListPolicyGroups(ctx _context.Context) ([]PolicyGrou body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v []PolicyGroup - 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")) @@ -3900,16 +3813,6 @@ func (a *DefaultApiService) ListUsers(ctx _context.Context) ([]User, *_nethttp.R body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v []User - 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")) @@ -4027,16 +3930,6 @@ func (a *DefaultApiService) ListVolumes(ctx _context.Context, namespaceID string body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v []Volume - 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")) @@ -4095,14 +3988,16 @@ func (a *DefaultApiService) ListVolumes(ctx _context.Context, namespaceID string RefreshJwt Refresh the JWT Obtain a fresh token with an updated expiry deadline. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@return UserSession */ -func (a *DefaultApiService) RefreshJwt(ctx _context.Context) (*_nethttp.Response, error) { +func (a *DefaultApiService) RefreshJwt(ctx _context.Context) (UserSession, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + localVarReturnValue UserSession ) // create path and map variables @@ -4130,18 +4025,18 @@ func (a *DefaultApiService) RefreshJwt(ctx _context.Context) (*_nethttp.Response } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return nil, err + return localVarReturnValue, nil, err } localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -4154,34 +4049,43 @@ func (a *DefaultApiService) RefreshJwt(ctx _context.Context) (*_nethttp.Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarHTTPResponse, newErr + 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 localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarHTTPResponse, newErr + 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 localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v } - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + 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 } /* @@ -4244,15 +4148,6 @@ func (a *DefaultApiService) Spec(ctx _context.Context) (string, *_nethttp.Respon body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v string - 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 } @@ -4331,16 +4226,6 @@ func (a *DefaultApiService) UpdateAuthenticatedUser(ctx _context.Context, update body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v User - 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 == 400 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -4488,16 +4373,6 @@ func (a *DefaultApiService) UpdateCluster(ctx _context.Context, updateClusterDat body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v Cluster - 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 == 400 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -4573,27 +4448,24 @@ func (a *DefaultApiService) UpdateCluster(ctx _context.Context, updateClusterDat } /* -UpdateNamespace Update a namespace -Update the namespace identified by id. +UpdateLicence Update the licence global configuration settings +Update the cluster's licence. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id ID of a namespace - * @param updateNamespaceData -@return Namespace + * @param updateLicence +@return Licence */ -func (a *DefaultApiService) UpdateNamespace(ctx _context.Context, id string, updateNamespaceData UpdateNamespaceData) (Namespace, *_nethttp.Response, error) { +func (a *DefaultApiService) UpdateLicence(ctx _context.Context, updateLicence UpdateLicence) (Licence, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Namespace + localVarReturnValue Licence ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/namespaces/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.QueryEscape(parameterToString(id, "")) , -1) - + localVarPath := a.client.cfg.BasePath + "/cluster/licence" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} @@ -4616,7 +4488,7 @@ func (a *DefaultApiService) UpdateNamespace(ctx _context.Context, id string, upd localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &updateNamespaceData + localVarPostBody = &updateLicence r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err @@ -4638,16 +4510,6 @@ func (a *DefaultApiService) UpdateNamespace(ctx _context.Context, id string, upd body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v Namespace - 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 == 400 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -4678,16 +4540,6 @@ func (a *DefaultApiService) UpdateNamespace(ctx _context.Context, id string, upd 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")) @@ -4733,25 +4585,25 @@ func (a *DefaultApiService) UpdateNamespace(ctx _context.Context, id string, upd } /* -UpdateNode Update a node -Update the node identified by id. +UpdateNamespace Update a namespace +Update the namespace identified by id. * @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 updateNodeData -@return Node + * @param id ID of a namespace + * @param updateNamespaceData +@return Namespace */ -func (a *DefaultApiService) UpdateNode(ctx _context.Context, id string, updateNodeData UpdateNodeData) (Node, *_nethttp.Response, error) { +func (a *DefaultApiService) UpdateNamespace(ctx _context.Context, id string, updateNamespaceData UpdateNamespaceData) (Namespace, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Node + localVarReturnValue Namespace ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/nodes/{id}" + localVarPath := a.client.cfg.BasePath + "/namespaces/{id}" localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.QueryEscape(parameterToString(id, "")) , -1) localVarHeaderParams := make(map[string]string) @@ -4776,7 +4628,7 @@ func (a *DefaultApiService) UpdateNode(ctx _context.Context, id string, updateNo localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &updateNodeData + localVarPostBody = &updateNamespaceData r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err @@ -4798,16 +4650,6 @@ func (a *DefaultApiService) UpdateNode(ctx _context.Context, id string, updateNo body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v Node - 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 == 400 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -4893,25 +4735,25 @@ func (a *DefaultApiService) UpdateNode(ctx _context.Context, id string, updateNo } /* -UpdatePolicyGroup Update a policy group -Update the policy group identified by id. +UpdateNode Update a node +Update the node identified by id. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id ID of a policy group - * @param updatePolicyGroupData -@return PolicyGroup + * @param id ID of a node + * @param updateNodeData +@return Node */ -func (a *DefaultApiService) UpdatePolicyGroup(ctx _context.Context, id string, updatePolicyGroupData UpdatePolicyGroupData) (PolicyGroup, *_nethttp.Response, error) { +func (a *DefaultApiService) UpdateNode(ctx _context.Context, id string, updateNodeData UpdateNodeData) (Node, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue PolicyGroup + localVarReturnValue Node ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/policies/{id}" + localVarPath := a.client.cfg.BasePath + "/nodes/{id}" localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.QueryEscape(parameterToString(id, "")) , -1) localVarHeaderParams := make(map[string]string) @@ -4936,7 +4778,7 @@ func (a *DefaultApiService) UpdatePolicyGroup(ctx _context.Context, id string, u localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &updatePolicyGroupData + localVarPostBody = &updateNodeData r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err @@ -4958,16 +4800,6 @@ func (a *DefaultApiService) UpdatePolicyGroup(ctx _context.Context, id string, u body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v PolicyGroup - 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 == 400 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -5053,25 +4885,25 @@ func (a *DefaultApiService) UpdatePolicyGroup(ctx _context.Context, id string, u } /* -UpdateUser Update a user -Update the user identified by id. This request will not succeed if the target account is the currently authenticated account. Use the separate users/self endpoint for this purpose. +UpdatePolicyGroup Update a policy group +Update the policy group identified by id. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id ID of a user - * @param updateUserData -@return User + * @param id ID of a policy group + * @param updatePolicyGroupData +@return PolicyGroup */ -func (a *DefaultApiService) UpdateUser(ctx _context.Context, id string, updateUserData UpdateUserData) (User, *_nethttp.Response, error) { +func (a *DefaultApiService) UpdatePolicyGroup(ctx _context.Context, id string, updatePolicyGroupData UpdatePolicyGroupData) (PolicyGroup, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue User + localVarReturnValue PolicyGroup ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/users/{id}" + localVarPath := a.client.cfg.BasePath + "/policies/{id}" localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.QueryEscape(parameterToString(id, "")) , -1) localVarHeaderParams := make(map[string]string) @@ -5096,7 +4928,7 @@ func (a *DefaultApiService) UpdateUser(ctx _context.Context, id string, updateUs localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &updateUserData + localVarPostBody = &updatePolicyGroupData r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err @@ -5118,16 +4950,6 @@ func (a *DefaultApiService) UpdateUser(ctx _context.Context, id string, updateUs body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v User - 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 == 400 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -5213,28 +5035,25 @@ func (a *DefaultApiService) UpdateUser(ctx _context.Context, id string, updateUs } /* -UpdateVolume Update a volume -Update the volume identified by id. +UpdateUser Update a user +Update the user identified by id. This request will not succeed if the target account is the currently authenticated account. Use the separate users/self endpoint for this purpose. * @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 updateVolumeData -@return Volume + * @param id ID of a user + * @param updateUserData +@return User */ -func (a *DefaultApiService) UpdateVolume(ctx _context.Context, namespaceID string, id string, updateVolumeData UpdateVolumeData) (Volume, *_nethttp.Response, error) { +func (a *DefaultApiService) UpdateUser(ctx _context.Context, id string, updateUserData UpdateUserData) (User, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Volume + localVarReturnValue User ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/namespaces/{namespaceID}/volumes/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"namespaceID"+"}", _neturl.QueryEscape(parameterToString(namespaceID, "")) , -1) - + localVarPath := a.client.cfg.BasePath + "/users/{id}" localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.QueryEscape(parameterToString(id, "")) , -1) localVarHeaderParams := make(map[string]string) @@ -5259,7 +5078,7 @@ func (a *DefaultApiService) UpdateVolume(ctx _context.Context, namespaceID strin localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &updateVolumeData + localVarPostBody = &updateUserData r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err @@ -5281,16 +5100,6 @@ func (a *DefaultApiService) UpdateVolume(ctx _context.Context, namespaceID strin body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v Volume - 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 == 400 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -5341,16 +5150,6 @@ func (a *DefaultApiService) UpdateVolume(ctx _context.Context, namespaceID strin newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 451 { - 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")) diff --git a/v2/client.go b/v2/client.go index ac97853..7d02762 100644 --- a/v2/client.go +++ b/v2/client.go @@ -18,6 +18,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "log" "mime/multipart" "net/http" @@ -367,6 +368,15 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err *s = string(b) return nil } + if f, ok := v.(**os.File); ok { + *f, err = ioutil.TempFile("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + _, err = (*f).Seek(0, io.SeekStart) + return + } if xmlCheck.MatchString(contentType) { if err = xml.Unmarshal(b, v); err != nil { return err diff --git a/v2/docs/CapacityStats.md b/v2/docs/CapacityStats.md new file mode 100644 index 0000000..fc2ef04 --- /dev/null +++ b/v2/docs/CapacityStats.md @@ -0,0 +1,13 @@ +# CapacityStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Total** | **uint64** | Total bytes in the filesystem | [optional] +**Free** | **uint64** | Free bytes in the filesystem available to root user | [optional] +**Available** | **uint64** | Byte value available to an unprivileged user | [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/Cluster.md b/v2/docs/Cluster.md index 1d96009..7fff1b4 100644 --- a/v2/docs/Cluster.md +++ b/v2/docs/Cluster.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **string** | A unique identifier for a cluster. The format of this type is undefined and may change but the defined properties will not change. | [optional] [readonly] -**Licence** | [**Licence**](Licence.md) | | [optional] **DisableTelemetry** | **bool** | Disables collection of telemetry data across the cluster. | [optional] [default to false] **DisableCrashReporting** | **bool** | Disables collection of reports for any fatal crashes across the cluster. | [optional] [default to false] **DisableVersionCheck** | **bool** | Disables the mechanism responsible for checking if there is an updated version of StorageOS available for installation. | [optional] [default to false] diff --git a/v2/docs/DefaultApi.md b/v2/docs/DefaultApi.md index 530c9ce..03262aa 100644 --- a/v2/docs/DefaultApi.md +++ b/v2/docs/DefaultApi.md @@ -22,6 +22,7 @@ Method | HTTP request | Description [**GetAuthenticatedUser**](DefaultApi.md#GetAuthenticatedUser) | **Get** /users/self | Get the currently authenticated user's information [**GetCluster**](DefaultApi.md#GetCluster) | **Get** /cluster | Retrieves the cluster's global configuration settings [**GetDiagnostics**](DefaultApi.md#GetDiagnostics) | **Get** /diagnostics | Retrieves a diagnostics bundle from the target node +[**GetLicence**](DefaultApi.md#GetLicence) | **Get** /cluster/licence | Retrieves the cluster's licence information [**GetNamespace**](DefaultApi.md#GetNamespace) | **Get** /namespaces/{id} | Fetch a namespace [**GetNode**](DefaultApi.md#GetNode) | **Get** /nodes/{id} | Fetch a node [**GetPolicyGroup**](DefaultApi.md#GetPolicyGroup) | **Get** /policies/{id} | Fetch a policy group @@ -36,11 +37,11 @@ Method | HTTP request | Description [**Spec**](DefaultApi.md#Spec) | **Get** /openapi | Serves this openapi spec file [**UpdateAuthenticatedUser**](DefaultApi.md#UpdateAuthenticatedUser) | **Put** /users/self | Update the authenticated user's information [**UpdateCluster**](DefaultApi.md#UpdateCluster) | **Put** /cluster | Update the cluster's global configuration settings +[**UpdateLicence**](DefaultApi.md#UpdateLicence) | **Put** /cluster/licence | Update the licence global configuration settings [**UpdateNamespace**](DefaultApi.md#UpdateNamespace) | **Put** /namespaces/{id} | Update a namespace [**UpdateNode**](DefaultApi.md#UpdateNode) | **Put** /nodes/{id} | Update a node [**UpdatePolicyGroup**](DefaultApi.md#UpdatePolicyGroup) | **Put** /policies/{id} | Update a policy group [**UpdateUser**](DefaultApi.md#UpdateUser) | **Put** /users/{id} | Update a user -[**UpdateVolume**](DefaultApi.md#UpdateVolume) | **Put** /namespaces/{namespaceID}/volumes/{id} | Update a volume @@ -82,7 +83,7 @@ Name | Type | Description | Notes ## AuthenticateUser -> User AuthenticateUser(ctx, authUserData) +> UserSession AuthenticateUser(ctx, authUserData) Authenticate a user @@ -98,7 +99,7 @@ Name | Type | Description | Notes ### Return type -[**User**](User.md) +[**UserSession**](UserSession.md) ### Authorization @@ -750,6 +751,36 @@ This endpoint does not need any parameter. [[Back to README]](../README.md) +## GetLicence + +> Licence GetLicence(ctx, ) + +Retrieves the cluster's licence information + +Retrieves the cluster's current licence information + +### Required Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Licence**](Licence.md) + +### Authorization + +[jwt](../README.md#jwt) + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + + ## GetNamespace > Namespace GetNamespace(ctx, id) @@ -1077,7 +1108,7 @@ Name | Type | Description | Notes ## RefreshJwt -> RefreshJwt(ctx, ) +> UserSession RefreshJwt(ctx, ) Refresh the JWT @@ -1089,7 +1120,7 @@ This endpoint does not need any parameter. ### Return type - (empty response body) +[**UserSession**](UserSession.md) ### Authorization @@ -1203,13 +1234,13 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## UpdateNamespace +## UpdateLicence -> Namespace UpdateNamespace(ctx, id, updateNamespaceData) +> Licence UpdateLicence(ctx, updateLicence) -Update a namespace +Update the licence global configuration settings -Update the namespace identified by id. +Update the cluster's licence. ### Required Parameters @@ -1217,12 +1248,11 @@ Update the namespace identified by id. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string**| ID of a namespace | -**updateNamespaceData** | [**UpdateNamespaceData**](UpdateNamespaceData.md)| | +**updateLicence** | [**UpdateLicence**](UpdateLicence.md)| | ### Return type -[**Namespace**](Namespace.md) +[**Licence**](Licence.md) ### Authorization @@ -1238,13 +1268,13 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## UpdateNode +## UpdateNamespace -> Node UpdateNode(ctx, id, updateNodeData) +> Namespace UpdateNamespace(ctx, id, updateNamespaceData) -Update a node +Update a namespace -Update the node identified by id. +Update the namespace identified by id. ### Required Parameters @@ -1252,12 +1282,12 @@ Update the node identified by id. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string**| ID of a node | -**updateNodeData** | [**UpdateNodeData**](UpdateNodeData.md)| | +**id** | **string**| ID of a namespace | +**updateNamespaceData** | [**UpdateNamespaceData**](UpdateNamespaceData.md)| | ### Return type -[**Node**](Node.md) +[**Namespace**](Namespace.md) ### Authorization @@ -1273,13 +1303,13 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## UpdatePolicyGroup +## UpdateNode -> PolicyGroup UpdatePolicyGroup(ctx, id, updatePolicyGroupData) +> Node UpdateNode(ctx, id, updateNodeData) -Update a policy group +Update a node -Update the policy group identified by id. +Update the node identified by id. ### Required Parameters @@ -1287,12 +1317,12 @@ Update the policy group identified by id. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string**| ID of a policy group | -**updatePolicyGroupData** | [**UpdatePolicyGroupData**](UpdatePolicyGroupData.md)| | +**id** | **string**| ID of a node | +**updateNodeData** | [**UpdateNodeData**](UpdateNodeData.md)| | ### Return type -[**PolicyGroup**](PolicyGroup.md) +[**Node**](Node.md) ### Authorization @@ -1308,13 +1338,13 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## UpdateUser +## UpdatePolicyGroup -> User UpdateUser(ctx, id, updateUserData) +> PolicyGroup UpdatePolicyGroup(ctx, id, updatePolicyGroupData) -Update a user +Update a policy group -Update the user identified by id. This request will not succeed if the target account is the currently authenticated account. Use the separate users/self endpoint for this purpose. +Update the policy group identified by id. ### Required Parameters @@ -1322,12 +1352,12 @@ Update the user identified by id. This request will not succeed if the target ac Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string**| ID of a user | -**updateUserData** | [**UpdateUserData**](UpdateUserData.md)| | +**id** | **string**| ID of a policy group | +**updatePolicyGroupData** | [**UpdatePolicyGroupData**](UpdatePolicyGroupData.md)| | ### Return type -[**User**](User.md) +[**PolicyGroup**](PolicyGroup.md) ### Authorization @@ -1343,13 +1373,13 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## UpdateVolume +## UpdateUser -> Volume UpdateVolume(ctx, namespaceID, id, updateVolumeData) +> User UpdateUser(ctx, id, updateUserData) -Update a volume +Update a user -Update the volume identified by id. +Update the user identified by id. This request will not succeed if the target account is the currently authenticated account. Use the separate users/self endpoint for this purpose. ### Required Parameters @@ -1357,13 +1387,12 @@ Update the volume identified by id. 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 | -**updateVolumeData** | [**UpdateVolumeData**](UpdateVolumeData.md)| | +**id** | **string**| ID of a user | +**updateUserData** | [**UpdateUserData**](UpdateUserData.md)| | ### Return type -[**Volume**](Volume.md) +[**User**](User.md) ### Authorization diff --git a/v2/docs/DeploymentInfo.md b/v2/docs/DeploymentInfo.md index 672ebdf..c6ceba3 100644 --- a/v2/docs/DeploymentInfo.md +++ b/v2/docs/DeploymentInfo.md @@ -6,9 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **string** | A unique identifier for a volume deployment. The format of this type is undefined and may change but the defined properties will not change. | [optional] **NodeID** | **string** | A unique identifier for a node. The format of this type is undefined and may change but the defined properties will not change. | [optional] [readonly] -**Inode** | **uint32** | | [optional] [readonly] -**Health** | [**Health**](Health.md) | | [optional] -**Syncing** | **bool** | indicates if a volume is undergoing data synchronization operations | [optional] +**Promotable** | **bool** | Indicates if the volume deployment is eligible for promotion | [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/Licence.md b/v2/docs/Licence.md index 6a597bf..027424d 100644 --- a/v2/docs/Licence.md +++ b/v2/docs/Licence.md @@ -7,8 +7,10 @@ Name | Type | Description | Notes **ClusterID** | **string** | A unique identifier for a cluster. The format of this type is undefined and may change but the defined properties will not change. | [optional] [readonly] **ExpiresAt** | [**time.Time**](time.Time.md) | The time after which a licence will no longer be valid This timestamp is set when the licence is created. String format is RFC3339. | [optional] [readonly] **ClusterCapacityBytes** | **uint64** | The allowed provisioning capacity in bytes This value if for the cluster, if provisioning a volume brings the cluster's total provisioned capacity above it the request will fail | [optional] +**UsedBytes** | **uint64** | Sum of the size of all volumes in the cluster | [optional] **Kind** | **string** | Denotes which category the licence belongs to | [optional] **CustomerName** | **string** | A user friendly reference to the customer | [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/MasterDeploymentInfo.md b/v2/docs/MasterDeploymentInfo.md new file mode 100644 index 0000000..4ba18ec --- /dev/null +++ b/v2/docs/MasterDeploymentInfo.md @@ -0,0 +1,14 @@ +# MasterDeploymentInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | A unique identifier for a volume deployment. The format of this type is undefined and may change but the defined properties will not change. | [optional] +**NodeID** | **string** | A unique identifier for a node. The format of this type is undefined and may change but the defined properties will not change. | [optional] [readonly] +**Promotable** | **bool** | Indicates if the volume deployment is eligible for promotion | [optional] +**Health** | [**MasterHealth**](MasterHealth.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/MasterDeploymentInfoAllOf.md b/v2/docs/MasterDeploymentInfoAllOf.md new file mode 100644 index 0000000..96adde3 --- /dev/null +++ b/v2/docs/MasterDeploymentInfoAllOf.md @@ -0,0 +1,11 @@ +# MasterDeploymentInfoAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Health** | [**MasterHealth**](MasterHealth.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/MasterHealth.md b/v2/docs/MasterHealth.md new file mode 100644 index 0000000..6c6b2ea --- /dev/null +++ b/v2/docs/MasterHealth.md @@ -0,0 +1,10 @@ +# MasterHealth + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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 e343a26..7641d9a 100644 --- a/v2/docs/Node.md +++ b/v2/docs/Node.md @@ -6,7 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **string** | A unique identifier for a node. The format of this type is undefined and may change but the defined properties will not change. | [optional] [readonly] **Name** | **string** | The hostname of the node. This value is set by the node each time it joins the StorageOS cluster. | [optional] [readonly] -**Health** | [**Health**](Health.md) | | [optional] +**Health** | [**NodeHealth**](NodeHealth.md) | | [optional] +**Capacity** | [**CapacityStats**](CapacityStats.md) | | [optional] **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] diff --git a/v2/docs/NodeHealth.md b/v2/docs/NodeHealth.md new file mode 100644 index 0000000..e4e17ef --- /dev/null +++ b/v2/docs/NodeHealth.md @@ -0,0 +1,10 @@ +# NodeHealth + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/PoliciesIdSpecs.md b/v2/docs/PoliciesIdSpecs.md new file mode 100644 index 0000000..81862cd --- /dev/null +++ b/v2/docs/PoliciesIdSpecs.md @@ -0,0 +1,13 @@ +# PoliciesIdSpecs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NamespaceID** | **string** | A unique identifier for a namespace. The format of this type is undefined and may change but the defined properties will not change.. | [optional] +**ResourceType** | **string** | The resource type this policy grants access to. | [optional] +**ReadOnly** | **bool** | If true, disallows requests that attempt to mutate the resource. | [optional] [default to false] + +[[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/PolicyGroup.md b/v2/docs/PolicyGroup.md index 68e669c..2da48ca 100644 --- a/v2/docs/PolicyGroup.md +++ b/v2/docs/PolicyGroup.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Id** | **string** | A unique identifier for a policy group. The format of this type is undefined and may change but the defined properties will not change.. | [optional] **Name** | **string** | | [optional] **Users** | [**[]PolicyGroupUsers**](PolicyGroup_users.md) | The list of user IDs which this policy group governs. | [optional] [readonly] -**Specs** | Pointer to [**[]PoliciesSpecs**](_policies_specs.md) | A set of authorisation policies to apply to the policy group. | [optional] [default to []] +**Specs** | Pointer to [**[]PoliciesIdSpecs**](_policies__id__specs.md) | A set of authorisation policies to apply to the policy group. | [optional] [default to []] **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] **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] diff --git a/v2/docs/ReplicaDeploymentInfo.md b/v2/docs/ReplicaDeploymentInfo.md new file mode 100644 index 0000000..986c4c9 --- /dev/null +++ b/v2/docs/ReplicaDeploymentInfo.md @@ -0,0 +1,15 @@ +# ReplicaDeploymentInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | A unique identifier for a volume deployment. The format of this type is undefined and may change but the defined properties will not change. | [optional] +**NodeID** | **string** | A unique identifier for a node. The format of this type is undefined and may change but the defined properties will not change. | [optional] [readonly] +**Promotable** | **bool** | Indicates if the volume deployment is eligible for promotion | [optional] +**Health** | [**ReplicaHealth**](ReplicaHealth.md) | | [optional] +**SyncProgress** | [**SyncProgress**](SyncProgress.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/ReplicaDeploymentInfoAllOf.md b/v2/docs/ReplicaDeploymentInfoAllOf.md new file mode 100644 index 0000000..63edf24 --- /dev/null +++ b/v2/docs/ReplicaDeploymentInfoAllOf.md @@ -0,0 +1,12 @@ +# ReplicaDeploymentInfoAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Health** | [**ReplicaHealth**](ReplicaHealth.md) | | [optional] +**SyncProgress** | [**SyncProgress**](SyncProgress.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/ReplicaHealth.md b/v2/docs/ReplicaHealth.md new file mode 100644 index 0000000..907eb0e --- /dev/null +++ b/v2/docs/ReplicaHealth.md @@ -0,0 +1,10 @@ +# ReplicaHealth + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/SyncProgress.md b/v2/docs/SyncProgress.md new file mode 100644 index 0000000..0359361 --- /dev/null +++ b/v2/docs/SyncProgress.md @@ -0,0 +1,13 @@ +# SyncProgress + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BytesRemaining** | **uint64** | Number of bytes left remaining to complete the sync. | [optional] +**ThroughputBytes** | **uint64** | The average throughput of the sync given as bytes per second. | [optional] +**EstimatedSecondsRemaining** | **uint64** | The estimated time left for the sync to complete, given in seconds. When this field has a value of 0 either the sync is complete or no duration estimate could be made. The values reported for bytesRemaining and throughputBytes provide the client with the information needed to choose what to display. | [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/UpdateClusterData.md b/v2/docs/UpdateClusterData.md index b101def..3ac4a15 100644 --- a/v2/docs/UpdateClusterData.md +++ b/v2/docs/UpdateClusterData.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**LicenceKey** | **string** | A StorageOS product licence key, used to register a cluster. The format of this type is opaque and may change. If this field is empty we assume that the called does not want to update the cluster's licence, and do not perform any operation. | [optional] **DisableTelemetry** | **bool** | Disables collection of telemetry data across the cluster. | [optional] [default to false] **DisableCrashReporting** | **bool** | Disables collection of reports for any fatal crashes across the cluster. | [optional] [default to false] **DisableVersionCheck** | **bool** | Disables the mechanism responsible for checking if there is an updated version of StorageOS available for installation. | [optional] [default to false] diff --git a/v2/docs/UpdateLicence.md b/v2/docs/UpdateLicence.md new file mode 100644 index 0000000..5ab1333 --- /dev/null +++ b/v2/docs/UpdateLicence.md @@ -0,0 +1,12 @@ +# UpdateLicence + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | A StorageOS product licence key, used to register a cluster. The format of this type is opaque and may change. | [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/UpdatePolicyGroupData.md b/v2/docs/UpdatePolicyGroupData.md index 64a6322..4b7c0e0 100644 --- a/v2/docs/UpdatePolicyGroupData.md +++ b/v2/docs/UpdatePolicyGroupData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Specs** | Pointer to [**[]PoliciesSpecs**](_policies_specs.md) | A set of authorisation policies to apply to the policy group. | [optional] [default to []] +**Specs** | Pointer to [**[]PoliciesIdSpecs**](_policies__id__specs.md) | A set of authorisation policies to apply to the policy group. | [optional] [default to []] **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/UserSession.md b/v2/docs/UserSession.md new file mode 100644 index 0000000..eb52fe7 --- /dev/null +++ b/v2/docs/UserSession.md @@ -0,0 +1,18 @@ +# UserSession + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | A unique identifier for a user. The format of this type is undefined and may change but the defined properties will not change.. | [optional] +**Username** | **string** | | [optional] +**IsAdmin** | **bool** | If true, this user is an administrator of the cluster. Administrators bypass the usual authentication checks and are granted access to all resources. Some actions (such as adding a new user) can only be performed by an administrator. | [optional] [default to false] +**Groups** | Pointer to **[]string** | Defines a set of policy group IDs this user is a member of. Policy groups can be used to logically group users and apply authorisation policies to all members. | [optional] [default to []] +**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] +**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] +**Session** | [**UserSessionAllOfSession**](UserSession_allOf_session.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/UserSessionAllOf.md b/v2/docs/UserSessionAllOf.md new file mode 100644 index 0000000..3fff6a5 --- /dev/null +++ b/v2/docs/UserSessionAllOf.md @@ -0,0 +1,11 @@ +# UserSessionAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Session** | [**UserSessionAllOfSession**](UserSession_allOf_session.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/UserSessionAllOfSession.md b/v2/docs/UserSessionAllOfSession.md new file mode 100644 index 0000000..589d7c8 --- /dev/null +++ b/v2/docs/UserSessionAllOfSession.md @@ -0,0 +1,12 @@ +# UserSessionAllOfSession + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ExpiresInSeconds** | **uint64** | The maximum duration which the auth session will remain valid for in seconds. | [optional] +**Token** | **string** | The JWT token for the auth session. | [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/Volume.md b/v2/docs/Volume.md index 05c7d68..c45cb9a 100644 --- a/v2/docs/Volume.md +++ b/v2/docs/Volume.md @@ -11,9 +11,8 @@ Name | Type | Description | Notes **NamespaceID** | **string** | | [optional] [readonly] **Labels** | **map[string]string** | A set of arbitrary key value labels to apply to the entity. | [optional] **FsType** | [**FsType**](FsType.md) | | [optional] -**Inode** | **uint32** | | [optional] [readonly] -**Master** | [**DeploymentInfo**](DeploymentInfo.md) | | [optional] [readonly] -**Replicas** | Pointer to [**[]DeploymentInfo**](DeploymentInfo.md) | | [optional] [readonly] [default to []] +**Master** | [**MasterDeploymentInfo**](MasterDeploymentInfo.md) | | [optional] [readonly] +**Replicas** | Pointer to [**[]ReplicaDeploymentInfo**](ReplicaDeploymentInfo.md) | | [optional] [readonly] [default to []] **SizeBytes** | **uint64** | A volume's size in bytes | [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/model__policies__id__specs.go b/v2/model__policies__id__specs.go new file mode 100644 index 0000000..c46561d --- /dev/null +++ b/v2/model__policies__id__specs.go @@ -0,0 +1,20 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// PoliciesIdSpecs struct for PoliciesIdSpecs +type PoliciesIdSpecs struct { + // A unique identifier for a namespace. The format of this type is undefined and may change but the defined properties will not change.. + NamespaceID string `json:"namespaceID,omitempty"` + // The resource type this policy grants access to. + ResourceType string `json:"resourceType,omitempty"` + // If true, disallows requests that attempt to mutate the resource. + ReadOnly bool `json:"readOnly,omitempty"` +} diff --git a/v2/model_capacity_stats.go b/v2/model_capacity_stats.go new file mode 100644 index 0000000..86e86eb --- /dev/null +++ b/v2/model_capacity_stats.go @@ -0,0 +1,20 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// CapacityStats struct for CapacityStats +type CapacityStats struct { + // Total bytes in the filesystem + Total uint64 `json:"total,omitempty"` + // Free bytes in the filesystem available to root user + Free uint64 `json:"free,omitempty"` + // Byte value available to an unprivileged user + Available uint64 `json:"available,omitempty"` +} diff --git a/v2/model_cluster.go b/v2/model_cluster.go index 623de5d..97487a0 100644 --- a/v2/model_cluster.go +++ b/v2/model_cluster.go @@ -16,7 +16,6 @@ import ( type Cluster struct { // A unique identifier for a cluster. The format of this type is undefined and may change but the defined properties will not change. Id string `json:"id,omitempty"` - Licence Licence `json:"licence,omitempty"` // Disables collection of telemetry data across the cluster. DisableTelemetry bool `json:"disableTelemetry,omitempty"` // Disables collection of reports for any fatal crashes across the cluster. diff --git a/v2/model_deployment_info.go b/v2/model_deployment_info.go index 3c72088..993adea 100644 --- a/v2/model_deployment_info.go +++ b/v2/model_deployment_info.go @@ -15,8 +15,6 @@ type DeploymentInfo struct { Id string `json:"id,omitempty"` // A unique identifier for a node. The format of this type is undefined and may change but the defined properties will not change. NodeID string `json:"nodeID,omitempty"` - Inode uint32 `json:"inode,omitempty"` - Health Health `json:"health,omitempty"` - // indicates if a volume is undergoing data synchronization operations - Syncing bool `json:"syncing,omitempty"` + // Indicates if the volume deployment is eligible for promotion + Promotable bool `json:"promotable,omitempty"` } diff --git a/v2/model_licence.go b/v2/model_licence.go index c1f6773..4901a4e 100644 --- a/v2/model_licence.go +++ b/v2/model_licence.go @@ -20,8 +20,12 @@ type Licence struct { ExpiresAt time.Time `json:"expiresAt,omitempty"` // The allowed provisioning capacity in bytes This value if for the cluster, if provisioning a volume brings the cluster's total provisioned capacity above it the request will fail ClusterCapacityBytes uint64 `json:"clusterCapacityBytes,omitempty"` + // Sum of the size of all volumes in the cluster + UsedBytes uint64 `json:"usedBytes,omitempty"` // Denotes which category the licence belongs to Kind string `json:"kind,omitempty"` // A user friendly reference to the customer CustomerName string `json:"customerName,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_master_deployment_info.go b/v2/model_master_deployment_info.go new file mode 100644 index 0000000..7778fa4 --- /dev/null +++ b/v2/model_master_deployment_info.go @@ -0,0 +1,21 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// MasterDeploymentInfo struct for MasterDeploymentInfo +type MasterDeploymentInfo struct { + // A unique identifier for a volume deployment. The format of this type is undefined and may change but the defined properties will not change. + Id string `json:"id,omitempty"` + // A unique identifier for a node. The format of this type is undefined and may change but the defined properties will not change. + NodeID string `json:"nodeID,omitempty"` + // Indicates if the volume deployment is eligible for promotion + Promotable bool `json:"promotable,omitempty"` + Health MasterHealth `json:"health,omitempty"` +} diff --git a/v2/model_master_deployment_info_all_of.go b/v2/model_master_deployment_info_all_of.go new file mode 100644 index 0000000..4e05a33 --- /dev/null +++ b/v2/model_master_deployment_info_all_of.go @@ -0,0 +1,15 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// MasterDeploymentInfoAllOf struct for MasterDeploymentInfoAllOf +type MasterDeploymentInfoAllOf struct { + Health MasterHealth `json:"health,omitempty"` +} diff --git a/v2/model_master_health.go b/v2/model_master_health.go new file mode 100644 index 0000000..b622731 --- /dev/null +++ b/v2/model_master_health.go @@ -0,0 +1,20 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// MasterHealth The operational health of a volume master deployment +type MasterHealth string + +// List of MasterHealth +const ( + MASTERHEALTH_ONLINE MasterHealth = "online" + MASTERHEALTH_OFFLINE MasterHealth = "offline" + MASTERHEALTH_UNKNOWN MasterHealth = "unknown" +) diff --git a/v2/model_node.go b/v2/model_node.go index 381c0ec..0ef41f4 100644 --- a/v2/model_node.go +++ b/v2/model_node.go @@ -18,7 +18,8 @@ type Node struct { Id string `json:"id,omitempty"` // The hostname of the node. This value is set by the node each time it joins the StorageOS cluster. Name string `json:"name,omitempty"` - Health Health `json:"health,omitempty"` + Health NodeHealth `json:"health,omitempty"` + Capacity CapacityStats `json:"capacity,omitempty"` // 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) IoEndpoint string `json:"ioEndpoint,omitempty"` // 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) diff --git a/v2/model_node_health.go b/v2/model_node_health.go new file mode 100644 index 0000000..9c48019 --- /dev/null +++ b/v2/model_node_health.go @@ -0,0 +1,20 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// NodeHealth The operational health of a node entity +type NodeHealth string + +// List of NodeHealth +const ( + NODEHEALTH_ONLINE NodeHealth = "online" + NODEHEALTH_OFFLINE NodeHealth = "offline" + NODEHEALTH_UNKNOWN NodeHealth = "unknown" +) diff --git a/v2/model_policy_group.go b/v2/model_policy_group.go index 107718f..325a117 100644 --- a/v2/model_policy_group.go +++ b/v2/model_policy_group.go @@ -20,7 +20,7 @@ type PolicyGroup struct { // The list of user IDs which this policy group governs. Users []PolicyGroupUsers `json:"users,omitempty"` // A set of authorisation policies to apply to the policy group. - Specs *[]PoliciesSpecs `json:"specs,omitempty"` + Specs *[]PoliciesIdSpecs `json:"specs,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. CreatedAt time.Time `json:"createdAt,omitempty"` // 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. diff --git a/v2/model_replica_deployment_info.go b/v2/model_replica_deployment_info.go new file mode 100644 index 0000000..f6fa3b4 --- /dev/null +++ b/v2/model_replica_deployment_info.go @@ -0,0 +1,22 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// ReplicaDeploymentInfo struct for ReplicaDeploymentInfo +type ReplicaDeploymentInfo struct { + // A unique identifier for a volume deployment. The format of this type is undefined and may change but the defined properties will not change. + Id string `json:"id,omitempty"` + // A unique identifier for a node. The format of this type is undefined and may change but the defined properties will not change. + NodeID string `json:"nodeID,omitempty"` + // Indicates if the volume deployment is eligible for promotion + Promotable bool `json:"promotable,omitempty"` + Health ReplicaHealth `json:"health,omitempty"` + SyncProgress SyncProgress `json:"syncProgress,omitempty"` +} diff --git a/v2/model_replica_deployment_info_all_of.go b/v2/model_replica_deployment_info_all_of.go new file mode 100644 index 0000000..87e6864 --- /dev/null +++ b/v2/model_replica_deployment_info_all_of.go @@ -0,0 +1,16 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// ReplicaDeploymentInfoAllOf struct for ReplicaDeploymentInfoAllOf +type ReplicaDeploymentInfoAllOf struct { + Health ReplicaHealth `json:"health,omitempty"` + SyncProgress SyncProgress `json:"syncProgress,omitempty"` +} diff --git a/v2/model_replica_health.go b/v2/model_replica_health.go new file mode 100644 index 0000000..271ffe5 --- /dev/null +++ b/v2/model_replica_health.go @@ -0,0 +1,25 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// ReplicaHealth The operational health of a volume replica deployment +type ReplicaHealth string + +// List of ReplicaHealth +const ( + REPLICAHEALTH_RECOVERING ReplicaHealth = "recovering" + REPLICAHEALTH_PROVISIONING ReplicaHealth = "provisioning" + REPLICAHEALTH_PROVISIONED ReplicaHealth = "provisioned" + REPLICAHEALTH_SYNCING ReplicaHealth = "syncing" + REPLICAHEALTH_READY ReplicaHealth = "ready" + REPLICAHEALTH_DELETED ReplicaHealth = "deleted" + REPLICAHEALTH_FAILED ReplicaHealth = "failed" + REPLICAHEALTH_UNKNOWN ReplicaHealth = "unknown" +) diff --git a/v2/model_sync_progress.go b/v2/model_sync_progress.go new file mode 100644 index 0000000..98eec9d --- /dev/null +++ b/v2/model_sync_progress.go @@ -0,0 +1,20 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// SyncProgress The progress report for an ongoing sync. +type SyncProgress struct { + // Number of bytes left remaining to complete the sync. + BytesRemaining uint64 `json:"bytesRemaining,omitempty"` + // The average throughput of the sync given as bytes per second. + ThroughputBytes uint64 `json:"throughputBytes,omitempty"` + // The estimated time left for the sync to complete, given in seconds. When this field has a value of 0 either the sync is complete or no duration estimate could be made. The values reported for bytesRemaining and throughputBytes provide the client with the information needed to choose what to display. + EstimatedSecondsRemaining uint64 `json:"estimatedSecondsRemaining,omitempty"` +} diff --git a/v2/model_update_cluster_data.go b/v2/model_update_cluster_data.go index fe5f3ab..ad882c7 100644 --- a/v2/model_update_cluster_data.go +++ b/v2/model_update_cluster_data.go @@ -11,8 +11,6 @@ package api // UpdateClusterData struct for UpdateClusterData type UpdateClusterData struct { - // A StorageOS product licence key, used to register a cluster. The format of this type is opaque and may change. If this field is empty we assume that the called does not want to update the cluster's licence, and do not perform any operation. - LicenceKey string `json:"licenceKey,omitempty"` // Disables collection of telemetry data across the cluster. DisableTelemetry bool `json:"disableTelemetry,omitempty"` // Disables collection of reports for any fatal crashes across the cluster. diff --git a/v2/model_update_licence.go b/v2/model_update_licence.go new file mode 100644 index 0000000..24a8094 --- /dev/null +++ b/v2/model_update_licence.go @@ -0,0 +1,18 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// UpdateLicence struct for UpdateLicence +type UpdateLicence struct { + // A StorageOS product licence key, used to register a cluster. The format of this type is opaque and may change. + Key string `json:"key,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_update_policy_group_data.go b/v2/model_update_policy_group_data.go index 6186101..1192628 100644 --- a/v2/model_update_policy_group_data.go +++ b/v2/model_update_policy_group_data.go @@ -12,7 +12,7 @@ package api // UpdatePolicyGroupData struct for UpdatePolicyGroupData type UpdatePolicyGroupData struct { // A set of authorisation policies to apply to the policy group. - Specs *[]PoliciesSpecs `json:"specs,omitempty"` + Specs *[]PoliciesIdSpecs `json:"specs,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_user_session.go b/v2/model_user_session.go new file mode 100644 index 0000000..30a0447 --- /dev/null +++ b/v2/model_user_session.go @@ -0,0 +1,31 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +import ( + "time" +) +// UserSession struct for UserSession +type UserSession struct { + // A unique identifier for a user. The format of this type is undefined and may change but the defined properties will not change.. + Id string `json:"id,omitempty"` + Username string `json:"username,omitempty"` + // If true, this user is an administrator of the cluster. Administrators bypass the usual authentication checks and are granted access to all resources. Some actions (such as adding a new user) can only be performed by an administrator. + IsAdmin bool `json:"isAdmin,omitempty"` + // Defines a set of policy group IDs this user is a member of. Policy groups can be used to logically group users and apply authorisation policies to all members. + Groups *[]string `json:"groups,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. + CreatedAt time.Time `json:"createdAt,omitempty"` + // 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. + UpdatedAt time.Time `json:"updatedAt,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"` + Session UserSessionAllOfSession `json:"session,omitempty"` +} diff --git a/v2/model_user_session_all_of.go b/v2/model_user_session_all_of.go new file mode 100644 index 0000000..9419a78 --- /dev/null +++ b/v2/model_user_session_all_of.go @@ -0,0 +1,15 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// UserSessionAllOf struct for UserSessionAllOf +type UserSessionAllOf struct { + Session UserSessionAllOfSession `json:"session,omitempty"` +} diff --git a/v2/model_user_session_all_of_session.go b/v2/model_user_session_all_of_session.go new file mode 100644 index 0000000..daef8e3 --- /dev/null +++ b/v2/model_user_session_all_of_session.go @@ -0,0 +1,18 @@ +/* + * StorageOS API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + * Contact: info@storageos.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package api +// UserSessionAllOfSession struct for UserSessionAllOfSession +type UserSessionAllOfSession struct { + // The maximum duration which the auth session will remain valid for in seconds. + ExpiresInSeconds uint64 `json:"expiresInSeconds,omitempty"` + // The JWT token for the auth session. + Token string `json:"token,omitempty"` +} diff --git a/v2/model_volume.go b/v2/model_volume.go index 36da72b..470c4f8 100644 --- a/v2/model_volume.go +++ b/v2/model_volume.go @@ -23,9 +23,8 @@ type Volume struct { // A set of arbitrary key value labels to apply to the entity. Labels map[string]string `json:"labels,omitempty"` FsType FsType `json:"fsType,omitempty"` - Inode uint32 `json:"inode,omitempty"` - Master DeploymentInfo `json:"master,omitempty"` - Replicas *[]DeploymentInfo `json:"replicas,omitempty"` + Master MasterDeploymentInfo `json:"master,omitempty"` + Replicas *[]ReplicaDeploymentInfo `json:"replicas,omitempty"` // A volume's size in bytes SizeBytes uint64 `json:"sizeBytes,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/openapi.yaml b/v2/openapi.yaml index 64695fd..ee84b88 100644 --- a/v2/openapi.yaml +++ b/v2/openapi.yaml @@ -49,7 +49,6 @@ components: Version: type: string maxLength: 30 - minLength: 1 description: > An opaque representation of an entity version at the time it was obtained from the API. @@ -71,7 +70,7 @@ components: ignore entity version constraints, thereby "forcing" the operation. example: true - + ExpiresAt: type: string format: date-time @@ -129,7 +128,7 @@ components: The file system type of a volume. "block" is a raw block device (no filesystem). example: "ext4" - Health: + NodeHealth: type: string readOnly: true enum: @@ -137,15 +136,93 @@ components: - "offline" - "unknown" description: > - The operational health of an entity + The operational health of a node entity example: "online" + MasterHealth: + type: string + readOnly: true + enum: + - "online" + - "offline" + - "unknown" + description: > + The operational health of a volume master deployment + example: + "online" + + ReplicaHealth: + type: string + readOnly: true + enum: + - "recovering" + - "provisioning" + - "provisioned" + - "syncing" + - "ready" + - "deleted" + - "failed" + - "unknown" + description: > + The operational health of a volume replica deployment + example: "ready" + + SyncProgress: + type: object + readOnly: true + properties: + bytesRemaining: + type: uint64 + description: > + Number of bytes left remaining to complete the sync. + example: 500000 + throughputBytes: + type: uint64 + description: > + The average throughput of the sync given as bytes per + second. + example: 100000 + estimatedSecondsRemaining: + type: uint64 + description: > + The estimated time left for the sync to complete, given + in seconds. When this field has a value of 0 either the + sync is complete or no duration estimate could be made. + The values reported for bytesRemaining and + throughputBytes provide the client with the information + needed to choose what to display. + example: 5 + description: > + The progress report for an ongoing sync. + + CapacityStats: + type: object + properties: + total: + type: uint64 + default: 0 + description: > + Total bytes in the filesystem + example: 42 + free: + type: uint64 + default: 0 + description: > + Free bytes in the filesystem available to root user + example: 42 + available: + type: uint64 + default: 0 + description: > + Byte value available to an unprivileged user + example: 42 + Labels: type: object description: > A set of arbitrary key value labels to apply to the entity. externalDocs: - url: https://docs.storageos.com/docs/reference/labels + url: https://docs.storageos.com/v2/openapi-help/labels additionalProperties: type: string example: @@ -261,8 +338,6 @@ components: properties: id: $ref: "#/components/schemas/ClusterID" - licence: - $ref: "#/components/schemas/Licence" disableTelemetry: type: boolean default: false @@ -292,7 +367,6 @@ components: $ref: "#/components/schemas/UpdatedAt" version: $ref: "#/components/schemas/Version" - User: type: object properties: @@ -333,6 +407,26 @@ components: $ref: "#/components/schemas/UpdatedAt" version: $ref: "#/components/schemas/Version" + + UserSession: + allOf: + - $ref: "#/components/schemas/User" + - type: object + properties: + session: + type: object + properties: + expiresInSeconds: + type: uint64 + description: > + The maximum duration which the auth session + will remain valid for in seconds. + minimum: 0 + example: 60 + token: + type: string + description: > + The JWT token for the auth session. Volume: type: object @@ -357,21 +451,17 @@ components: $ref: "#/components/schemas/Labels" fsType: $ref: "#/components/schemas/FsType" - inode: - readOnly: true - type: uint32 - example: 42 master: readOnly: true allOf: - - $ref: "#/components/schemas/DeploymentInfo" + - $ref: "#/components/schemas/MasterDeploymentInfo" replicas: type: array nullable: true readOnly: true default: [] items: - $ref: "#/components/schemas/DeploymentInfo" + $ref: "#/components/schemas/ReplicaDeploymentInfo" sizeBytes: type: uint64 description: > @@ -392,16 +482,28 @@ components: $ref: "#/components/schemas/DeploymentID" nodeID: $ref: "#/components/schemas/NodeID" - inode: - type: uint32 - readOnly: true - example: 1223 - health: - $ref: "#/components/schemas/Health" - syncing: + promotable: type: boolean description: > - indicates if a volume is undergoing data synchronization operations + Indicates if the volume deployment is eligible for promotion + + MasterDeploymentInfo: + allOf: + - $ref: '#/components/schemas/DeploymentInfo' + - type: object + properties: + health: + $ref: "#/components/schemas/MasterHealth" + + ReplicaDeploymentInfo: + allOf: + - $ref: '#/components/schemas/DeploymentInfo' + - type: object + properties: + health: + $ref: "#/components/schemas/ReplicaHealth" + syncProgress: + $ref: "#/components/schemas/SyncProgress" Node: type: object @@ -418,7 +520,9 @@ components: StorageOS cluster. example: db1.lcy.storageos.network health: - $ref: "#/components/schemas/Health" + $ref: "#/components/schemas/NodeHealth" + capacity: + $ref: "#/components/schemas/CapacityStats" ioEndpoint: type: string readOnly: true @@ -566,22 +670,30 @@ components: type: uint64 description: > The allowed provisioning capacity in bytes - + This value if for the cluster, if provisioning a volume brings the cluster's total provisioned capacity above it the request will fail minimum: 0 example: 1000000 + usedBytes: + type: uint64 + default: 0 + description: > + Sum of the size of all volumes in the cluster + example: 42 kind: type: string description: > Denotes which category the licence belongs to - example: "basic" + example: "unregistered" customerName: type: string description: > A user friendly reference to the customer example: "Desmond" + version: + $ref: "#/components/schemas/Version" description: > A representation of a cluster's licence properties @@ -738,7 +850,7 @@ components: $ref: "#/components/schemas/Error" example: error: authentication required - + Forbidden: description: > The authenticated user does not have permission to perform the @@ -760,6 +872,16 @@ components: example: error: not found + InsufficientStorage: + description: > + Available storage is not enough to handle the request. + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + example: + error: insufficient storage capacity available + StaleWrite: description: > The entity to be wrote has been concurrently updated by another @@ -853,10 +975,18 @@ paths: the server to perform an authenticated request. schema: type: string + Authorization-Expires-Seconds: + description: > + A formatted string representing the number of + seconds after which the login session will + expire. + schema: + type: uint64 + example: 60 content: application/json: schema: - $ref: "#/components/schemas/User" + $ref: "#/components/schemas/UserSession" "400": $ref: "#/components/responses/BadRequest" @@ -886,6 +1016,17 @@ paths: description: The new JWT token. schema: type: string + Authorization-Expires-In: + description: > + A formatted string representing the duration + after which the refreshed token will expire. + schema: + type: uint64 + example: 60 + content: + application/json: + schema: + $ref: "#/components/schemas/UserSession" "401": # The user has been removed from the system since acquiring # the token @@ -1763,8 +1904,12 @@ paths: type: string enum: - "*" - - "volume" + - "cluster" + - "namespace" + - "node" - "policy" + - "user" + - "volume" description: > The resource type this policy grants access to. example: "volume" @@ -2078,6 +2223,9 @@ paths: "503": $ref: "#/components/responses/StoreError" + "507": + $ref: "#/components/responses/InsufficientStorage" + get: summary: Fetch the list of volumes in the given namespace operationId: listVolumes @@ -2149,64 +2297,6 @@ paths: "503": $ref: "#/components/responses/StoreError" - put: - summary: Update a volume - operationId: updateVolume - description: Update the volume identified by id. - security: - - jwt: [] - requestBody: - description: update a volume to a desired state. - required: true - content: - application/json: - schema: - type: object - title: UpdateVolumeData - properties: - name: - type: string - description: > - desired new volume name - example: "new-volume-name" - labels: - $ref: "#/components/schemas/Labels" - description: - type: string - example: "This volume contains the data for my app" - version: - $ref: "#/components/schemas/Version" - responses: - "200": - description: The volume was successfully updated - content: - application/json: - schema: - $ref: "#/components/schemas/Volume" - "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" - - "451": - $ref: "#/components/responses/LicenceRestricted" - - "500": - $ref: "#/components/responses/ServerError" - - "503": - $ref: "#/components/responses/StoreError" - delete: summary: Delete a volume operationId: deleteVolume @@ -2390,17 +2480,6 @@ paths: type: object title: UpdateClusterData properties: - licenceKey: - type: string - description: > - A StorageOS product licence key, used to - register a cluster. The format of this - type is opaque and may change. - - If this field is empty we assume that - the called does not want to update the - cluster's licence, and do not perform - any operation. disableTelemetry: type: boolean default: false @@ -2454,6 +2533,87 @@ paths: "503": $ref: "#/components/responses/StoreError" + + /cluster/licence: + get: + summary: Retrieves the cluster's licence information + operationId: getLicence + description: > + Retrieves the cluster's current licence information + security: + - jwt: [] + responses: + "200": + description: The cluster's licence information. + content: + application/json: + schema: + $ref: "#/components/schemas/Licence" + + "401": + $ref: "#/components/responses/Unauthorised" + + "403": + $ref: "#/components/responses/Forbidden" + + "500": + $ref: "#/components/responses/ServerError" + + "503": + $ref: "#/components/responses/StoreError" + + put: + summary: Update the licence global configuration settings + operationId: updateLicence + description: Update the cluster's licence. + security: + - jwt: [] + requestBody: + description: > + A StorageOS product licence key, used to + register a cluster. The format of this + type is opaque and may change. + required: true + content: + application/json: + schema: + type: object + title: UpdateLicence + properties: + key: + type: string + description: > + A StorageOS product licence key, used to + register a cluster. The format of this + type is opaque and may change. + version: + $ref: "#/components/schemas/Version" + responses: + "200": + description: The provided licence was successfully applied. + content: + application/json: + schema: + $ref: "#/components/schemas/Licence" + + "400": + $ref: "#/components/responses/BadRequest" + + "401": + $ref: "#/components/responses/Unauthorised" + + "403": + $ref: "#/components/responses/Forbidden" + + "412": + $ref: "#/components/responses/StaleWrite" + + "500": + $ref: "#/components/responses/ServerError" + + "503": + $ref: "#/components/responses/StoreError" + /diagnostics: get: