diff --git a/v1/api/swagger/components/schemas/AddVolume.yaml b/v1/api/swagger/components/schemas/AddVolume.yaml index a4e4784f..c5dd611d 100644 --- a/v1/api/swagger/components/schemas/AddVolume.yaml +++ b/v1/api/swagger/components/schemas/AddVolume.yaml @@ -29,3 +29,9 @@ properties: The storage pool is one of those listed by the StoragePools array returned as part of the get /available-resources call that are available to create volumes of the specified flavor and location. + VolumeCollectionID: + type: string + format: uuid + description: >- + The optional volume collection is one of those listed by the VolumeCollections + array returned as part of the get /available-resources call diff --git a/v1/api/swagger/components/schemas/AvailableResources.yaml b/v1/api/swagger/components/schemas/AvailableResources.yaml index b2465a64..8e3335e0 100644 --- a/v1/api/swagger/components/schemas/AvailableResources.yaml +++ b/v1/api/swagger/components/schemas/AvailableResources.yaml @@ -10,6 +10,7 @@ required: - StorageInventory - SSHKeys - StoragePools + - VolumeCollections properties: Images: type: array @@ -67,3 +68,8 @@ properties: description: Array listing the available storage pools items: $ref: ./StoragePool.yaml + VolumeCollections: + type: array + description: Array listing the available volume collections + items: + $ref: ./VolumeCollection.yaml diff --git a/v1/api/swagger/components/schemas/NewVolume.yaml b/v1/api/swagger/components/schemas/NewVolume.yaml index 64328eb7..2e98a252 100644 --- a/v1/api/swagger/components/schemas/NewVolume.yaml +++ b/v1/api/swagger/components/schemas/NewVolume.yaml @@ -53,3 +53,9 @@ properties: The storage pool is one of those listed by the StoragePools array returned as part of the get /available-resources call that are available to create volumes of the specified flavor and location. + VolumeCollectionID: + type: string + format: uuid + description: >- + The optional volume collection is one of those listed by the VolumeCollections + array returned as part of the get /available-resources call diff --git a/v1/api/swagger/components/schemas/UpdateVolume.yaml b/v1/api/swagger/components/schemas/UpdateVolume.yaml index baf2ab8d..b62f83b4 100644 --- a/v1/api/swagger/components/schemas/UpdateVolume.yaml +++ b/v1/api/swagger/components/schemas/UpdateVolume.yaml @@ -11,6 +11,11 @@ allOf: example: 10485760 minimum: 0 description: The size of the volume in KiB + VolumeCollectionID: + type: string + format: uuid + example: 90be909e-4609-40f5-9630-f24910dc8591 + description: The volume collection the volume is a part of Labels: type: object additionalProperties: diff --git a/v1/api/swagger/components/schemas/Volume.yaml b/v1/api/swagger/components/schemas/Volume.yaml index feee9b1f..f831610d 100644 --- a/v1/api/swagger/components/schemas/Volume.yaml +++ b/v1/api/swagger/components/schemas/Volume.yaml @@ -46,6 +46,12 @@ allOf: of those listed by the LocationInfo array returned as part of the get /available-resources call. Any volumes must be in the same location as their attached Host. + VolumeCollectionID: + type: string + format: uuid + description: >- + The optional volume collection ID matching an entry in the VolumeCollections array + returned as part of the get /available-resources call State: $ref: ./VolumeState.yaml SubState: diff --git a/v1/api/swagger/components/schemas/VolumeCollection.yaml b/v1/api/swagger/components/schemas/VolumeCollection.yaml new file mode 100644 index 00000000..a3916a30 --- /dev/null +++ b/v1/api/swagger/components/schemas/VolumeCollection.yaml @@ -0,0 +1,19 @@ +--- +type: object +description: Volume collection within a data center location +required: + - ID + - Name + - Description +properties: + ID: + type: string + format: uuid + description: The ID of the volume collection resource that can be used while + creating a volume + Name: + type: string + description: The name of the volume collection resource + Description: + type: string + description: The description of the volume collection resource diff --git a/v1/api/swagger/components/schemas/VolumeInfo.yaml b/v1/api/swagger/components/schemas/VolumeInfo.yaml index f9668d42..2b70b782 100644 --- a/v1/api/swagger/components/schemas/VolumeInfo.yaml +++ b/v1/api/swagger/components/schemas/VolumeInfo.yaml @@ -9,6 +9,7 @@ required: - Capacity - Shareable - LocationID + - VolumeCollectionID - DiscoveryIP - TargetIQN - State @@ -47,6 +48,10 @@ properties: type: string format: uuid description: The location ID of the data center where the volume exists + VolumeCollectionID: + type: string + format: uuid + description: The ID of volume collection of which this volume is a member DiscoveryIP: type: string description: The discovery IP for the iSCSI volume diff --git a/v1/html/index.html b/v1/html/index.html index f0684579..19f63af1 100644 --- a/v1/html/index.html +++ b/v1/html/index.html @@ -2500,7 +2500,7 @@

Option 2: Getting the token directly from UI

Request samples

Content type
application/json
{
  • "Name": "NewHostName",
  • "Description": "Description of new Host",
  • "ServiceID": "20dd558b-b106-40bc-a8e7-d364ec5db710",
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "MachineSizeID": "6e87f64f-b099-4286-9101-bee60a1afa2e",
  • "MachineID": "d96dbf89-2a07-42f9-817d-2d6c42351827",
  • "SSHKeyIDs": [
    ],
  • "NetworkIDs": [
    ],
  • "PreAllocatedIPs": [
    ],
  • "NetworkForDefaultRoute": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  • "NetworkUntagged": "046b6c7f-0b8a-43b9-b35d-6489e6daee92",
  • "VolumeIDs": [
    ],
  • "ServiceNetsProviderMAC": {
    },
  • "NewVolumes": [
    ],
  • "UserData": "string",
  • "NodeID": "Node21",
  • "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 Host",
  • "ServiceID": "20dd558b-b106-40bc-a8e7-d364ec5db710",
  • "ServiceFlavor": "ubuntu",
  • "ServiceVersion": "18.04-20190807",
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "MachineSizeName": "HPE Large",
  • "MachineSizeID": "6e87f64f-b099-4286-9101-bee60a1afa2e",
  • "MachineID": "d96dbf89-2a07-42f9-817d-2d6c42351827",
  • "SSHKeyIDs": [
    ],
  • "SSHAuthorizedKeys": [
    ],
  • "NetworkIDs": [
    ],
  • "NetworkForDefaultRoute": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  • "NetworkUntagged": "046b6c7f-0b8a-43b9-b35d-6489e6daee92",
  • "PreAllocatedIPs": [
    ],
  • "ServiceNetsProviderMAC": {
    },
  • "UserData": "string",
  • "NodeID": "Node21",
  • "ISCSIConfig": {
    },
  • "Connections": [
    ],
  • "Deleted": true,
  • "PortalCommOkay": true,
  • "PowerStatus": "ON",
  • "State": "Ready",
  • "Substate": "Complete",
  • "StateTime": "2019-08-24T14:15:22Z",
  • "SubstateTime": "2019-08-24T14:15:22Z",
  • "Progress": 100,
  • "Alert": true,
  • "AlertInfo": [
    ],
  • "Workflow": "string",
  • "SummaryStatus": "OK",
  • "Labels": {
    }
}

Retrieve Host by ID

Returns a single Host with matching ID

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

Request samples

Content type
application/json
{
  • "Name": "NewHostName",
  • "Description": "Description of new Host",
  • "ServiceID": "20dd558b-b106-40bc-a8e7-d364ec5db710",
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "MachineSizeID": "6e87f64f-b099-4286-9101-bee60a1afa2e",
  • "MachineID": "d96dbf89-2a07-42f9-817d-2d6c42351827",
  • "SSHKeyIDs": [
    ],
  • "NetworkIDs": [
    ],
  • "PreAllocatedIPs": [
    ],
  • "NetworkForDefaultRoute": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  • "NetworkUntagged": "046b6c7f-0b8a-43b9-b35d-6489e6daee92",
  • "VolumeIDs": [
    ],
  • "ServiceNetsProviderMAC": {
    },
  • "NewVolumes": [
    ],
  • "UserData": "string",
  • "NodeID": "Node21",
  • "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 Host",
  • "ServiceID": "20dd558b-b106-40bc-a8e7-d364ec5db710",
  • "ServiceFlavor": "ubuntu",
  • "ServiceVersion": "18.04-20190807",
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "MachineSizeName": "HPE Large",
  • "MachineSizeID": "6e87f64f-b099-4286-9101-bee60a1afa2e",
  • "MachineID": "d96dbf89-2a07-42f9-817d-2d6c42351827",
  • "SSHKeyIDs": [
    ],
  • "SSHAuthorizedKeys": [
    ],
  • "NetworkIDs": [
    ],
  • "NetworkForDefaultRoute": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  • "NetworkUntagged": "046b6c7f-0b8a-43b9-b35d-6489e6daee92",
  • "PreAllocatedIPs": [
    ],
  • "ServiceNetsProviderMAC": {
    },
  • "UserData": "string",
  • "NodeID": "Node21",
  • "ISCSIConfig": {
    },
  • "Connections": [
    ],
  • "Deleted": true,
  • "PortalCommOkay": true,
  • "PowerStatus": "ON",
  • "State": "Ready",
  • "Substate": "Complete",
  • "StateTime": "2019-08-24T14:15:22Z",
  • "SubstateTime": "2019-08-24T14:15:22Z",
  • "Progress": 100,
  • "Alert": true,
  • "AlertInfo": [
    ],
  • "Workflow": "string",
  • "SummaryStatus": "OK",
  • "Labels": {
    }
}

Retrieve Host by ID

Returns a single Host with matching ID

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

ID of Host to return

Responses

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.

+
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.

Authorizations:
(BearerAuthProject) (BearerAuthMembership)
Request Body schema: application/json

Volume that is to be added to the project

Name
required
string
Description
string
FlavorID
required
string <uuid>

Adds a new volume to the project. This object requires the LocationID and is used when a new volume is created independently from the host creation therefore requiring a specified location.

Capacity
required
integer <int64> >= 0

The size of the volume in GiB

@@ -2616,14 +2616,15 @@

Option 2: Getting the token directly from UI

LocationID
required
string <uuid>

The location of the volume (and the storage array) LocationID is one of those listed by the LocationInfo array returned as part of the get /available-resources call. Any volumes must be in the same location as their attached Host.

object

The map of service/user specified label name to label value for this volume. Setting service labels is restricted by role.

-
StoragePoolID
string <uuid>

The storage pool is one of those listed by the StoragePools array returned as part of the get /available-resources call that are available to create volumes of the specified flavor and location.

+
StoragePoolID
string <uuid>

The storage pool is one of those listed by the StoragePools array returned as part of the get /available-resources call that are available to create volumes of the specified flavor and location.

+
VolumeCollectionID
string <uuid>

The optional volume collection is one of those listed by the VolumeCollections array returned as part of the get /available-resources call

Responses

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"
}

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,
  • "Shareable": true,
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "State": "new",
  • "SubState": "idle",
  • "Status": "ok",
  • "Labels": {
    },
  • "WWN": "string"
}

Retrieve volume by ID

Returns a single volume with matching ID

+
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,
  • "Shareable": true,
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "VolumeCollectionID": "0bc8d647-85d3-4a49-8d49-8626da150790",
  • "State": "new",
  • "SubState": "idle",
  • "Status": "ok",
  • "Labels": {
    },
  • "WWN": "string"
}

Retrieve volume by ID

Returns a single volume with matching ID

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

ID of volume to return

Responses

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,
  • "Shareable": true,
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "State": "new",
  • "SubState": "idle",
  • "Status": "ok",
  • "Labels": {
    },
  • "WWN": "string"
}

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.

+
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,
  • "Shareable": true,
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "VolumeCollectionID": "0bc8d647-85d3-4a49-8d49-8626da150790",
  • "State": "new",
  • "SubState": "idle",
  • "Status": "ok",
  • "Labels": {
    },
  • "WWN": "string"
}

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.

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

ID of volume to return

Request Body schema: application/json

Volume object with its ID and Capacity in GiB indicating the expanded size to be specified.

ID
required
string <uuid>

Unique ID for the resource instance as generated by the Metal service

ETag
required
string <uuid>

Used to determine whether the DB entry has changed since it was last read. This value is updated each time the resource is updated. Client must send this value unchanged for any update operation.

Name
required
string

Common name for the resource instance. Must be 128 or fewer printable characters

Capacity
required
integer <int64> >= 0

The size of the volume in KiB

+
VolumeCollectionID
string <uuid>

The volume collection the volume is a part of

required
object

The map of service/user specified label name to label value for this volume. Setting service labels is restricted by role. At minimum, this field should be set to the values specified during create.

@@ -2648,7 +2650,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,
  • "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,
  • "Shareable": true,
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "State": "new",
  • "SubState": "idle",
  • "Status": "ok",
  • "Labels": {
    },
  • "WWN": "string"
}

Delete a volume

Deletes the volume with the matching ID

+
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,
  • "Shareable": true,
  • "LocationID": "58e992d9-6663-492c-8c5b-ecf0b1b3bfe1",
  • "VolumeCollectionID": "0bc8d647-85d3-4a49-8d49-8626da150790",
  • "State": "new",
  • "SubState": "idle",
  • "Status": "ok",
  • "Labels": {
    },
  • "WWN": "string"
}

Delete a volume

Deletes the volume with the matching ID

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

ID of volume to delete

Responses

Response samples

Content type
application/json
{
  • "Images": [
    ],
  • "Locations": [
    ],
  • "Networks": [
    ],
  • "MachineSizes": [
    ],
  • "VolumeFlavors": [
    ],
  • "Volumes": [
    ],
  • "MachineInventory": [
    ],
  • "StorageInventory": [
    ],
  • "SSHKeys": [
    ],
  • "StoragePools": [
    ]
}

usage-reports

Operations related to retrieving information about resource usage within the project.

+
https://client.greenlake.hpe.com{basePath}/available-resources

Response samples

Content type
application/json
{
  • "Images": [
    ],
  • "Locations": [
    ],
  • "Networks": [
    ],
  • "MachineSizes": [
    ],
  • "VolumeFlavors": [
    ],
  • "Volumes": [
    ],
  • "MachineInventory": [
    ],
  • "StorageInventory": [
    ],
  • "SSHKeys": [
    ],
  • "StoragePools": [
    ],
  • "VolumeCollections": [
    ]
}

usage-reports

Operations related to retrieving information about resource usage within the project.

Get a usage report

Creates and returns a usage report based on the parameters passed in the request body

Authorizations:
(BearerAuthProject) (BearerAuthMembership)
query Parameters
start
required
string

Start of the billing period

end
string

End of the billing period, default to now if omitted

@@ -2932,7 +2934,7 @@

Option 2: Getting the token directly from UI

Response samples

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