|
| 1 | +# CSI Proxy Disk v1 API |
| 2 | +<a name="top"></a> |
| 3 | + |
| 4 | +## Table of Contents |
| 5 | + |
| 6 | +- [Disk RPCs](#v1.DiskRPCs) |
| 7 | + |
| 8 | +- [Disk Messages](#v1.DiskMessages) |
| 9 | + |
| 10 | + |
| 11 | +<a name="v1.DiskRPCs"></a> |
| 12 | +## v1 Disk RPCs |
| 13 | + |
| 14 | +| Method Name | Request Type | Response Type | Description | |
| 15 | +| ----------- | ------------ | ------------- | ------------| |
| 16 | +| ListDiskLocations | [ListDiskLocationsRequest](#v1.ListDiskLocationsRequest) | [ListDiskLocationsResponse](#v1.ListDiskLocationsResponse) | ListDiskLocations returns locations <Adapter, Bus, Target, LUN ID> of all disk devices enumerated by the host. | |
| 17 | +| PartitionDisk | [PartitionDiskRequest](#v1.PartitionDiskRequest) | [PartitionDiskResponse](#v1.PartitionDiskResponse) | PartitionDisk 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. | |
| 18 | +| Rescan | [RescanRequest](#v1.RescanRequest) | [RescanResponse](#v1.RescanResponse) | Rescan refreshes the host's storage cache. | |
| 19 | +| ListDiskIDs | [ListDiskIDsRequest](#v1.ListDiskIDsRequest) | [ListDiskIDsResponse](#v1.ListDiskIDsResponse) | ListDiskIDs returns a map of DiskID objects where the key is the disk number. | |
| 20 | +| GetDiskStats | [GetDiskStatsRequest](#v1.GetDiskStatsRequest) | [GetDiskStatsResponse](#v1.GetDiskStatsResponse) | GetDiskStats returns the stats of a disk (currently it returns the disk size). | |
| 21 | +| SetDiskState | [SetDiskStateRequest](#v1.SetDiskStateRequest) | [SetDiskStateResponse](#v1.SetDiskStateResponse) | SetDiskState sets the offline/online state of a disk. | |
| 22 | +| GetDiskState | [GetDiskStateRequest](#v1.GetDiskStateRequest) | [GetDiskStateResponse](#v1.GetDiskStateResponse) | GetDiskState gets the offline/online state of a disk. | |
| 23 | + |
| 24 | + |
| 25 | +<a name="v1.DiskMessages"></a> |
| 26 | +<p align="right"><a href="#top">Top</a></p> |
| 27 | + |
| 28 | +## v1 Disk Messages |
| 29 | + |
| 30 | +<a name="v1.DiskIDs"></a> |
| 31 | +### DiskIDs |
| 32 | + |
| 33 | +| Field | Type | Label | Description | |
| 34 | +| ----- | ---- | ----- | ----------- | |
| 35 | +| page83 | string | | The disk page83 id. | |
| 36 | +| serial_number | string | | The disk serial number. | |
| 37 | + |
| 38 | +<a name="v1.DiskLocation"></a> |
| 39 | +### DiskLocation |
| 40 | + |
| 41 | +| Field | Type | Label | Description | |
| 42 | +| ----- | ---- | ----- | ----------- | |
| 43 | +| Adapter | string | | | |
| 44 | +| Bus | string | | | |
| 45 | +| Target | string | | | |
| 46 | +| LUNID | string | | | |
| 47 | + |
| 48 | +<a name="v1.GetDiskStateRequest"></a> |
| 49 | +### GetDiskStateRequest |
| 50 | + |
| 51 | +| Field | Type | Label | Description | |
| 52 | +| ----- | ---- | ----- | ----------- | |
| 53 | +| disk_number | uint32 | | Disk device number of the disk. | |
| 54 | + |
| 55 | +<a name="v1.GetDiskStateResponse"></a> |
| 56 | +### GetDiskStateResponse |
| 57 | + |
| 58 | +| Field | Type | Label | Description | |
| 59 | +| ----- | ---- | ----- | ----------- | |
| 60 | +| is_online | bool | | Online state of the disk. true for online, false for offline. | |
| 61 | + |
| 62 | +<a name="v1.GetDiskStatsRequest"></a> |
| 63 | +### GetDiskStatsRequest |
| 64 | + |
| 65 | +| Field | Type | Label | Description | |
| 66 | +| ----- | ---- | ----- | ----------- | |
| 67 | +| disk_number | uint32 | | Disk device number of the disk to get the stats from. | |
| 68 | + |
| 69 | +<a name="v1.GetDiskStatsResponse"></a> |
| 70 | +### GetDiskStatsResponse |
| 71 | + |
| 72 | +| Field | Type | Label | Description | |
| 73 | +| ----- | ---- | ----- | ----------- | |
| 74 | +| total_bytes | int64 | | Total size of the volume. | |
| 75 | + |
| 76 | +<a name="v1.ListDiskIDsRequest"></a> |
| 77 | + |
| 78 | +### ListDiskIDsRequest |
| 79 | +Intentionally empty. |
| 80 | + |
| 81 | +<a name="v1.ListDiskIDsResponse"></a> |
| 82 | +### ListDiskIDsResponse |
| 83 | + |
| 84 | +| Field | Type | Label | Description | |
| 85 | +| ----- | ---- | ----- | ----------- | |
| 86 | +| diskIDs | [ListDiskIDsResponse.DiskIDsEntry](#v1.ListDiskIDsResponse.DiskIDsEntry) | repeated | Map of disk numbers and disk identifiers associated with each disk device. |
| 87 | + |
| 88 | +the case is intentional for protoc to generate the field as DiskIDs | |
| 89 | + |
| 90 | +<a name="v1.ListDiskIDsResponse.DiskIDsEntry"></a> |
| 91 | +### ListDiskIDsResponse.DiskIDsEntry |
| 92 | + |
| 93 | +| Field | Type | Label | Description | |
| 94 | +| ----- | ---- | ----- | ----------- | |
| 95 | +| key | uint32 | | | |
| 96 | +| value | [DiskIDs](#v1.DiskIDs) | | | |
| 97 | + |
| 98 | +<a name="v1.ListDiskLocationsRequest"></a> |
| 99 | + |
| 100 | +### ListDiskLocationsRequest |
| 101 | +Intentionally empty. |
| 102 | + |
| 103 | +<a name="v1.ListDiskLocationsResponse"></a> |
| 104 | +### ListDiskLocationsResponse |
| 105 | + |
| 106 | +| Field | Type | Label | Description | |
| 107 | +| ----- | ---- | ----- | ----------- | |
| 108 | +| disk_locations | [ListDiskLocationsResponse.DiskLocationsEntry](#v1.ListDiskLocationsResponse.DiskLocationsEntry) | repeated | Map of disk number and <adapter, bus, target, lun ID> associated with each disk device. | |
| 109 | + |
| 110 | +<a name="v1.ListDiskLocationsResponse.DiskLocationsEntry"></a> |
| 111 | +### ListDiskLocationsResponse.DiskLocationsEntry |
| 112 | + |
| 113 | +| Field | Type | Label | Description | |
| 114 | +| ----- | ---- | ----- | ----------- | |
| 115 | +| key | uint32 | | | |
| 116 | +| value | [DiskLocation](#v1.DiskLocation) | | | |
| 117 | + |
| 118 | +<a name="v1.PartitionDiskRequest"></a> |
| 119 | +### PartitionDiskRequest |
| 120 | + |
| 121 | +| Field | Type | Label | Description | |
| 122 | +| ----- | ---- | ----- | ----------- | |
| 123 | +| disk_number | uint32 | | Disk device number of the disk to partition. | |
| 124 | + |
| 125 | +<a name="v1.PartitionDiskResponse"></a> |
| 126 | +### PartitionDiskResponse |
| 127 | +Intentionally empty. |
| 128 | + |
| 129 | +<a name="v1.RescanRequest"></a> |
| 130 | +### RescanRequest |
| 131 | +Intentionally empty. |
| 132 | + |
| 133 | +<a name="v1.RescanResponse"></a> |
| 134 | + |
| 135 | +### RescanResponse |
| 136 | +Intentionally empty. |
| 137 | + |
| 138 | +<a name="v1.SetDiskStateRequest"></a> |
| 139 | +### SetDiskStateRequest |
| 140 | + |
| 141 | +| Field | Type | Label | Description | |
| 142 | +| ----- | ---- | ----- | ----------- | |
| 143 | +| disk_number | uint32 | | Disk device number of the disk. | |
| 144 | +| is_online | bool | | Online state to set for the disk. true for online, false for offline. | |
| 145 | + |
| 146 | +<a name="v1.SetDiskStateResponse"></a> |
| 147 | +### SetDiskStateResponse |
| 148 | +Intentionally empty. |
0 commit comments