CSI Proxy Disk v1 API

July 20, 2021 ยท View on GitHub

Table of Contents

v1 Disk RPCs

Method NameRequest TypeResponse TypeDescription
ListDiskLocationsListDiskLocationsRequestListDiskLocationsResponseListDiskLocations returns locations <Adapter, Bus, Target, LUN ID> of all disk devices enumerated by the host.
PartitionDiskPartitionDiskRequestPartitionDiskResponsePartitionDisk initializes and partitions a disk device with the GPT partition style (if the disk has not been partitioned already) and returns the resulting volume device ID.
RescanRescanRequestRescanResponseRescan refreshes the host's storage cache.
ListDiskIDsListDiskIDsRequestListDiskIDsResponseListDiskIDs returns a map of DiskID objects where the key is the disk number.
GetDiskStatsGetDiskStatsRequestGetDiskStatsResponseGetDiskStats returns the stats of a disk (currently it returns the disk size).
SetDiskStateSetDiskStateRequestSetDiskStateResponseSetDiskState sets the offline/online state of a disk.
GetDiskStateGetDiskStateRequestGetDiskStateResponseGetDiskState gets the offline/online state of a disk.

Top

v1 Disk Messages

DiskIDs

FieldTypeLabelDescription
page83stringThe disk page83 id.
serial_numberstringThe disk serial number.

DiskLocation

FieldTypeLabelDescription
Adapterstring
Busstring
Targetstring
LUNIDstring

GetDiskStateRequest

FieldTypeLabelDescription
disk_numberuint32Disk device number of the disk.

GetDiskStateResponse

FieldTypeLabelDescription
is_onlineboolOnline state of the disk. true for online, false for offline.

GetDiskStatsRequest

FieldTypeLabelDescription
disk_numberuint32Disk device number of the disk to get the stats from.

GetDiskStatsResponse

FieldTypeLabelDescription
total_bytesint64Total size of the volume.

ListDiskIDsRequest

Intentionally empty.

ListDiskIDsResponse

FieldTypeLabelDescription
diskIDsListDiskIDsResponse.DiskIDsEntryrepeatedMap of disk numbers and disk identifiers associated with each disk device.

the case is intentional for protoc to generate the field as DiskIDs |

ListDiskIDsResponse.DiskIDsEntry

FieldTypeLabelDescription
keyuint32
valueDiskIDs

ListDiskLocationsRequest

Intentionally empty.

ListDiskLocationsResponse

FieldTypeLabelDescription
disk_locationsListDiskLocationsResponse.DiskLocationsEntryrepeatedMap of disk number and <adapter, bus, target, lun ID> associated with each disk device.

ListDiskLocationsResponse.DiskLocationsEntry

FieldTypeLabelDescription
keyuint32
valueDiskLocation

PartitionDiskRequest

FieldTypeLabelDescription
disk_numberuint32Disk device number of the disk to partition.

PartitionDiskResponse

Intentionally empty.

RescanRequest

Intentionally empty.

RescanResponse

Intentionally empty.

SetDiskStateRequest

FieldTypeLabelDescription
disk_numberuint32Disk device number of the disk.
is_onlineboolOnline state to set for the disk. true for online, false for offline.

SetDiskStateResponse

Intentionally empty.