From 8a5b529847f8fe8e61cbc4550fe9d113dc92fda5 Mon Sep 17 00:00:00 2001 From: Achu <91447221+achu-1612@users.noreply.github.com> Date: Mon, 23 Sep 2024 20:14:29 +0530 Subject: [PATCH] DE24092: exposing volume export count (#132) * vol: exposing volume export count * [auto generated] Checking in generated offline HTML doc --------- Co-authored-by: achu-1612 --- v1/api/swagger/components/schemas/Volume.yaml | 7 +++++++ v1/html/index.html | 10 +++++----- v1/pkg/client/api/openapi.yaml | 7 +++++++ v1/pkg/client/docs/Volume.md | 1 + v1/pkg/client/docs/VolumeAllOf.md | 1 + v1/pkg/client/model_volume.go | 2 ++ v1/pkg/client/model_volume_all_of.go | 2 ++ 7 files changed, 25 insertions(+), 5 deletions(-) diff --git a/v1/api/swagger/components/schemas/Volume.yaml b/v1/api/swagger/components/schemas/Volume.yaml index e0adff2..1d93ae5 100644 --- a/v1/api/swagger/components/schemas/Volume.yaml +++ b/v1/api/swagger/components/schemas/Volume.yaml @@ -18,6 +18,7 @@ allOf: - UnmanagedVolume - ActiveSite - CreatedSite + - ExportCount properties: Description: @@ -92,3 +93,9 @@ allOf: format: uuid description: >- The site where the volume was originally created. + ExportCount: + type: integer + format: int32 + example: 150 + minimum: 0 + description: The number of active exports for this volume diff --git a/v1/html/index.html b/v1/html/index.html index 4f691a6..70864dc 100644 --- a/v1/html/index.html +++ b/v1/html/index.html @@ -2663,7 +2663,7 @@

Option 2: Getting the token directly from UI

Response samples

Content type
application/json
[
  • {
    }
]

Add a new volume

Adds a new volume to the project. Volumes may be created separately and then referenced in the create Host call; or volumes may be created directly within the create Host call. If GreenLake Platform IAM issued token is used for authentication, then it is required to pass 'X-Role' and 'X-Workspaceid' headers.

+
https://client.greenlake.hpe.com{basePath}/volumes

Response samples

Content type
application/json
[
  • {
    }
]

Add a new volume

Adds a new volume to the project. Volumes may be created separately and then referenced in the create Host call; or volumes may be created directly within the create Host call. If GreenLake Platform IAM issued token is used for authentication, then it is required to pass 'X-Role' and 'X-Workspaceid' headers.

Authorizations:
(BearerAuthProject) (BearerAuthMembership)
header Parameters
X-Role
string
Example: metal-infra-admin

GreenLake Platform role name

X-Workspaceid
string
Example: 1a2ba81600dd11efa47076a3447ec4eb

GreenLake Platform workspace ID

Request Body schema: application/json

Volume that is to be added to the project

@@ -2681,7 +2681,7 @@

Option 2: Getting the token directly from UI

Request samples

Content type
application/json
{
  • "Name": "NewVolumeName",
  • "Description": "Description of New Volume",
  • "FlavorID": "69d82b9f-19a6-47cd-bcb3-7f4b437e8e51",
  • "Capacity": 10,
  • "Shareable": true,
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "Labels": {
    },
  • "StoragePoolID": "4028a467-4960-41d8-94b5-7611e50c0642",
  • "VolumeCollectionID": "0bc8d647-85d3-4a49-8d49-8626da150790"
}

Response samples

Content type
application/json
{
  • "ID": "3892eb50-4697-4c72-aadc-32b766bce3c0",
  • "ETag": "a8a0a8d9-d35b-45c6-840f-2b3694efc394",
  • "Name": "My Object Name",
  • "Created": "2019-06-27T22:59:01.661Z",
  • "Modified": "2020-02-27T18:28:02.863Z",
  • "Description": "Description of New Volume",
  • "FlavorID": "69d82b9f-19a6-47cd-bcb3-7f4b437e8e51",
  • "StoragePoolID": "4028a467-4960-41d8-94b5-7611e50c0642",
  • "Capacity": 10485760,
  • "CapacityUsed": 10485760,
  • "Shareable": true,
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "VolumeCollectionID": "0bc8d647-85d3-4a49-8d49-8626da150790",
  • "State": "new",
  • "SubState": "idle",
  • "Status": "ok",
  • "Labels": {
    },
  • "WWN": "string",
  • "ReplicationEnabled": true,
  • "UnmanagedVolume": true,
  • "ActiveSite": "02787c18-fee9-4cd9-bbfc-d9e53da7fb0c",
  • "CreatedSite": "90b0f67e-6df2-4563-9928-ed119a84196e"
}

Retrieve volume by ID

Returns a single volume with matching imaged. If GreenLake Platform IAM issued token is used for authentication, then it is required to pass 'X-Role' and 'X-Workspaceid' headers.

+
https://client.greenlake.hpe.com{basePath}/volumes

Request samples

Content type
application/json
{
  • "Name": "NewVolumeName",
  • "Description": "Description of New Volume",
  • "FlavorID": "69d82b9f-19a6-47cd-bcb3-7f4b437e8e51",
  • "Capacity": 10,
  • "Shareable": true,
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "Labels": {
    },
  • "StoragePoolID": "4028a467-4960-41d8-94b5-7611e50c0642",
  • "VolumeCollectionID": "0bc8d647-85d3-4a49-8d49-8626da150790"
}

Response samples

Content type
application/json
{
  • "ID": "3892eb50-4697-4c72-aadc-32b766bce3c0",
  • "ETag": "a8a0a8d9-d35b-45c6-840f-2b3694efc394",
  • "Name": "My Object Name",
  • "Created": "2019-06-27T22:59:01.661Z",
  • "Modified": "2020-02-27T18:28:02.863Z",
  • "Description": "Description of New Volume",
  • "FlavorID": "69d82b9f-19a6-47cd-bcb3-7f4b437e8e51",
  • "StoragePoolID": "4028a467-4960-41d8-94b5-7611e50c0642",
  • "Capacity": 10485760,
  • "CapacityUsed": 10485760,
  • "Shareable": true,
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "VolumeCollectionID": "0bc8d647-85d3-4a49-8d49-8626da150790",
  • "State": "new",
  • "SubState": "idle",
  • "Status": "ok",
  • "Labels": {
    },
  • "WWN": "string",
  • "ReplicationEnabled": true,
  • "UnmanagedVolume": true,
  • "ActiveSite": "02787c18-fee9-4cd9-bbfc-d9e53da7fb0c",
  • "CreatedSite": "90b0f67e-6df2-4563-9928-ed119a84196e",
  • "ExportCount": 150
}

Retrieve volume by ID

Returns a single volume with matching imaged. If GreenLake Platform IAM issued token is used for authentication, then it is required to pass 'X-Role' and 'X-Workspaceid' headers.

Authorizations:
(BearerAuthProject) (BearerAuthMembership)
path Parameters
volumeId
required
string

ID of volume to return

header Parameters
X-Role
string
Example: metal-infra-admin

GreenLake Platform role name

X-Workspaceid
string
Example: 1a2ba81600dd11efa47076a3447ec4eb

GreenLake Platform workspace ID

@@ -2691,7 +2691,7 @@

Option 2: Getting the token directly from UI

Response samples

Content type
application/json
{
  • "ID": "3892eb50-4697-4c72-aadc-32b766bce3c0",
  • "ETag": "a8a0a8d9-d35b-45c6-840f-2b3694efc394",
  • "Name": "My Object Name",
  • "Created": "2019-06-27T22:59:01.661Z",
  • "Modified": "2020-02-27T18:28:02.863Z",
  • "Description": "Description of New Volume",
  • "FlavorID": "69d82b9f-19a6-47cd-bcb3-7f4b437e8e51",
  • "StoragePoolID": "4028a467-4960-41d8-94b5-7611e50c0642",
  • "Capacity": 10485760,
  • "CapacityUsed": 10485760,
  • "Shareable": true,
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "VolumeCollectionID": "0bc8d647-85d3-4a49-8d49-8626da150790",
  • "State": "new",
  • "SubState": "idle",
  • "Status": "ok",
  • "Labels": {
    },
  • "WWN": "string",
  • "ReplicationEnabled": true,
  • "UnmanagedVolume": true,
  • "ActiveSite": "02787c18-fee9-4cd9-bbfc-d9e53da7fb0c",
  • "CreatedSite": "90b0f67e-6df2-4563-9928-ed119a84196e"
}

Update an existing volume

Updates volume with matching ID. Update is permitted only when volume is in 'Allocated' or 'Visible' state. Only the Volume 'Capacity' can be updated with a value greater than the existing one to expand the volume. If GreenLake Platform IAM issued token is used for authentication, then it is required to pass 'X-Role' and 'X-Workspaceid' headers.

+
https://client.greenlake.hpe.com{basePath}/volumes/{volumeId}

Response samples

Content type
application/json
{
  • "ID": "3892eb50-4697-4c72-aadc-32b766bce3c0",
  • "ETag": "a8a0a8d9-d35b-45c6-840f-2b3694efc394",
  • "Name": "My Object Name",
  • "Created": "2019-06-27T22:59:01.661Z",
  • "Modified": "2020-02-27T18:28:02.863Z",
  • "Description": "Description of New Volume",
  • "FlavorID": "69d82b9f-19a6-47cd-bcb3-7f4b437e8e51",
  • "StoragePoolID": "4028a467-4960-41d8-94b5-7611e50c0642",
  • "Capacity": 10485760,
  • "CapacityUsed": 10485760,
  • "Shareable": true,
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "VolumeCollectionID": "0bc8d647-85d3-4a49-8d49-8626da150790",
  • "State": "new",
  • "SubState": "idle",
  • "Status": "ok",
  • "Labels": {
    },
  • "WWN": "string",
  • "ReplicationEnabled": true,
  • "UnmanagedVolume": true,
  • "ActiveSite": "02787c18-fee9-4cd9-bbfc-d9e53da7fb0c",
  • "CreatedSite": "90b0f67e-6df2-4563-9928-ed119a84196e",
  • "ExportCount": 150
}

Update an existing volume

Updates volume with matching ID. Update is permitted only when volume is in 'Allocated' or 'Visible' state. Only the Volume 'Capacity' can be updated with a value greater than the existing one to expand the volume. If GreenLake Platform IAM issued token is used for authentication, then it is required to pass 'X-Role' and 'X-Workspaceid' headers.

Authorizations:
(BearerAuthProject) (BearerAuthMembership)
path Parameters
volumeId
required
string

ID of volume to return

header Parameters
X-Role
string
Example: metal-infra-admin

GreenLake Platform role name

X-Workspaceid
string
Example: 1a2ba81600dd11efa47076a3447ec4eb

GreenLake Platform workspace ID

@@ -2711,7 +2711,7 @@

Option 2: Getting the token directly from UI

Request samples

Content type
application/json
{
  • "ID": "3892eb50-4697-4c72-aadc-32b766bce3c0",
  • "ETag": "a8a0a8d9-d35b-45c6-840f-2b3694efc394",
  • "Name": "My Object Name",
  • "Capacity": 10485760,
  • "VolumeCollectionID": "90be909e-4609-40f5-9630-f24910dc8591",
  • "Labels": {
    }
}

Response samples

Content type
application/json
{
  • "ID": "3892eb50-4697-4c72-aadc-32b766bce3c0",
  • "ETag": "a8a0a8d9-d35b-45c6-840f-2b3694efc394",
  • "Name": "My Object Name",
  • "Created": "2019-06-27T22:59:01.661Z",
  • "Modified": "2020-02-27T18:28:02.863Z",
  • "Description": "Description of New Volume",
  • "FlavorID": "69d82b9f-19a6-47cd-bcb3-7f4b437e8e51",
  • "StoragePoolID": "4028a467-4960-41d8-94b5-7611e50c0642",
  • "Capacity": 10485760,
  • "CapacityUsed": 10485760,
  • "Shareable": true,
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "VolumeCollectionID": "0bc8d647-85d3-4a49-8d49-8626da150790",
  • "State": "new",
  • "SubState": "idle",
  • "Status": "ok",
  • "Labels": {
    },
  • "WWN": "string",
  • "ReplicationEnabled": true,
  • "UnmanagedVolume": true,
  • "ActiveSite": "02787c18-fee9-4cd9-bbfc-d9e53da7fb0c",
  • "CreatedSite": "90b0f67e-6df2-4563-9928-ed119a84196e"
}

Delete a volume

Deletes the volume with the matching ID. If GreenLake Platform IAM issued token is used for authentication, then it is required to pass 'X-Role' and 'X-Workspaceid' headers.

+
https://client.greenlake.hpe.com{basePath}/volumes/{volumeId}

Request samples

Content type
application/json
{
  • "ID": "3892eb50-4697-4c72-aadc-32b766bce3c0",
  • "ETag": "a8a0a8d9-d35b-45c6-840f-2b3694efc394",
  • "Name": "My Object Name",
  • "Capacity": 10485760,
  • "VolumeCollectionID": "90be909e-4609-40f5-9630-f24910dc8591",
  • "Labels": {
    }
}

Response samples

Content type
application/json
{
  • "ID": "3892eb50-4697-4c72-aadc-32b766bce3c0",
  • "ETag": "a8a0a8d9-d35b-45c6-840f-2b3694efc394",
  • "Name": "My Object Name",
  • "Created": "2019-06-27T22:59:01.661Z",
  • "Modified": "2020-02-27T18:28:02.863Z",
  • "Description": "Description of New Volume",
  • "FlavorID": "69d82b9f-19a6-47cd-bcb3-7f4b437e8e51",
  • "StoragePoolID": "4028a467-4960-41d8-94b5-7611e50c0642",
  • "Capacity": 10485760,
  • "CapacityUsed": 10485760,
  • "Shareable": true,
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "VolumeCollectionID": "0bc8d647-85d3-4a49-8d49-8626da150790",
  • "State": "new",
  • "SubState": "idle",
  • "Status": "ok",
  • "Labels": {
    },
  • "WWN": "string",
  • "ReplicationEnabled": true,
  • "UnmanagedVolume": true,
  • "ActiveSite": "02787c18-fee9-4cd9-bbfc-d9e53da7fb0c",
  • "CreatedSite": "90b0f67e-6df2-4563-9928-ed119a84196e",
  • "ExportCount": 150
}

Delete a volume

Deletes the volume with the matching ID. If GreenLake Platform IAM issued token is used for authentication, then it is required to pass 'X-Role' and 'X-Workspaceid' headers.

Authorizations:
(BearerAuthProject) (BearerAuthMembership)
path Parameters
volumeId
required
string

ID of volume to delete

header Parameters
X-Role
string
Example: metal-infra-admin

GreenLake Platform role name

X-Workspaceid
string
Example: 1a2ba81600dd11efa47076a3447ec4eb

GreenLake Platform workspace ID

@@ -3047,7 +3047,7 @@

Option 2: Getting the token directly from UI

Response samples

Content type
application/json
{
  • "message": "string",
  • "details": "string"
}