@@ -5,128 +5,130 @@ package v1beta3;
5
5
option go_package = "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta3" ;
6
6
7
7
service Volume {
8
- // ListVolumesOnDisk returns the volume IDs (in \\.\Volume{GUID} format) for
9
- // all volumes on a Disk device
8
+ // ListVolumesOnDisk returns the volume IDs (in \\.\Volume{GUID} format) for all volumes from a
9
+ // given disk number and partition number (optional)
10
10
rpc ListVolumesOnDisk (ListVolumesOnDiskRequest ) returns (ListVolumesOnDiskResponse ) {}
11
- // MountVolume mounts the volume at the requested global staging path
11
+ // MountVolume mounts the volume at the requested global staging path.
12
12
rpc MountVolume (MountVolumeRequest ) returns (MountVolumeResponse ) {}
13
- // DismountVolume gracefully dismounts a volume
14
- rpc DismountVolume ( DismountVolumeRequest ) returns (DismountVolumeResponse ) {}
15
- // IsVolumeFormatted checks if a volume is formatted with NTFS
13
+ // UnmountVolume flushes data cache to disk and removes the global staging path.
14
+ rpc UnmountVolume ( UnmountVolumeRequest ) returns (UnmountVolumeResponse ) {}
15
+ // IsVolumeFormatted checks if a volume is formatted.
16
16
rpc IsVolumeFormatted (IsVolumeFormattedRequest ) returns (IsVolumeFormattedResponse ) {}
17
- // FormatVolume formats a volume with the provided file system
17
+ // FormatVolume formats a volume with NTFS.
18
18
rpc FormatVolume (FormatVolumeRequest ) returns (FormatVolumeResponse ) {}
19
- // ResizeVolume performs resizing of the partition and file system for a block based volume
19
+ // ResizeVolume performs resizing of the partition and file system for a block based volume.
20
20
rpc ResizeVolume (ResizeVolumeRequest ) returns (ResizeVolumeResponse ) {}
21
- // VolumeStats gathers DiskSize, VolumeSize and VolumeUsedSize for a volume
22
- rpc VolumeStats ( VolumeStatsRequest ) returns (VolumeStatsResponse ) {}
23
- // GetVolumeDiskNumber gets the disk number of the disk where the volume is located
24
- rpc GetVolumeDiskNumber ( VolumeDiskNumberRequest ) returns (VolumeDiskNumberResponse ) {}
25
- // GetVolumeIDFromMount gets the volume id for a given mount
26
- rpc GetVolumeIDFromMount ( VolumeIDFromMountRequest ) returns (VolumeIDFromMountResponse ) {}
27
- // WriteVolumeCache write volume cache to disk
21
+ // GetVolumeStats gathers total bytes and used bytes for a volume.
22
+ rpc GetVolumeStats ( GetVolumeStatsRequest ) returns (GetVolumeStatsResponse ) {}
23
+ // GetDiskNumberFromVolumeID gets the disk number of the disk where the volume is located.
24
+ rpc GetDiskNumberFromVolumeID ( GetDiskNumberFromVolumeIDRequest ) returns (GetDiskNumberFromVolumeIDResponse ) {}
25
+ // GetVolumeIDFromTargetPath gets the volume id for a given target path.
26
+ rpc GetVolumeIDFromTargetPath ( GetVolumeIDFromTargetPathRequest ) returns (GetVolumeIDFromTargetPathResponse ) {}
27
+ // WriteVolumeCache write volume cache to disk.
28
28
rpc WriteVolumeCache (WriteVolumeCacheRequest ) returns (WriteVolumeCacheResponse ) {}
29
29
}
30
30
31
31
message ListVolumesOnDiskRequest {
32
- // Disk device ID of the disk to query for volumes
33
- string disk_id = 1 ;
32
+ // Disk device number of the disk to query for volumes.
33
+ uint32 disk_number = 1 ;
34
+ // The partition number (optional), by default it uses the first partition of the disk.
35
+ uint32 partition_number = 2 ;
34
36
}
35
37
36
38
message ListVolumesOnDiskResponse {
37
- // Volume device IDs of volumes on the specified disk
39
+ // Volume device IDs of volumes on the specified disk.
38
40
repeated string volume_ids = 1 ;
39
41
}
40
42
41
43
message MountVolumeRequest {
42
- // Volume device ID of the volume to mount
44
+ // Volume device ID of the volume to mount.
43
45
string volume_id = 1 ;
44
- // Path in the host's file system where the volume needs to be mounted
45
- string path = 2 ;
46
+ // Path in the host's file system where the volume needs to be mounted.
47
+ string target_path = 2 ;
46
48
}
47
49
48
50
message MountVolumeResponse {
49
- // Intentionally empty
51
+ // Intentionally empty.
50
52
}
51
53
52
- message DismountVolumeRequest {
53
- // Volume device ID of the volume to dismount
54
+ message UnmountVolumeRequest {
55
+ // Volume device ID of the volume to dismount.
54
56
string volume_id = 1 ;
55
57
// Path where the volume has been mounted.
56
- string path = 2 ;
58
+ string target_path = 2 ;
57
59
}
58
60
59
- message DismountVolumeResponse {
60
- // Intentionally empty
61
+ message UnmountVolumeResponse {
62
+ // Intentionally empty.
61
63
}
62
64
63
65
message IsVolumeFormattedRequest {
64
- // Volume device ID of the volume to check
66
+ // Volume device ID of the volume to check.
65
67
string volume_id = 1 ;
66
68
}
67
69
68
70
message IsVolumeFormattedResponse {
69
- // Is the volume formatted with NTFS
71
+ // Is the volume formatted with NTFS.
70
72
bool formatted = 1 ;
71
73
}
72
74
73
75
message FormatVolumeRequest {
74
- // Volume device ID of the volume to format
76
+ // Volume device ID of the volume to format.
75
77
string volume_id = 1 ;
76
78
}
77
79
78
80
message FormatVolumeResponse {
79
- // Intentionally empty
81
+ // Intentionally empty.
80
82
}
81
83
82
84
message ResizeVolumeRequest {
83
- // Volume device ID of the volume to dismount
85
+ // Volume device ID of the volume to resize.
84
86
string volume_id = 1 ;
85
- // New size of the volume
86
- int64 size = 2 ;
87
+ // New size in bytes of the volume.
88
+ int64 size_bytes = 2 ;
87
89
}
88
90
89
91
message ResizeVolumeResponse {
90
- // Intentionally empty
92
+ // Intentionally empty.
91
93
}
92
94
93
- message VolumeStatsRequest {
94
- // Volume device Id of the volume to get the stats for
95
+ message GetVolumeStatsRequest {
96
+ // Volume device Id of the volume to get the stats for.
95
97
string volume_id = 1 ;
96
98
}
97
99
98
- message VolumeStatsResponse {
99
- // Capacity of the volume
100
- int64 volumeSize = 1 ;
100
+ message GetVolumeStatsResponse {
101
+ // Total bytes
102
+ int64 total_bytes = 1 ;
101
103
// Used bytes
102
- int64 volumeUsedSize = 2 ;
104
+ int64 used_bytes = 2 ;
103
105
}
104
106
105
- message VolumeDiskNumberRequest {
106
- // Volume device Id of the volume to get the disk number for
107
+ message GetDiskNumberFromVolumeIDRequest {
108
+ // Volume device ID of the volume to get the disk number for.
107
109
string volume_id = 1 ;
108
110
}
109
111
110
- message VolumeDiskNumberResponse {
111
- // Corresponding disk number
112
- int64 diskNumber = 1 ;
112
+ message GetDiskNumberFromVolumeIDResponse {
113
+ // Corresponding disk number.
114
+ uint32 disk_number = 1 ;
113
115
}
114
116
115
- message VolumeIDFromMountRequest {
116
- // Mount
117
- string mount = 1 ;
117
+ message GetVolumeIDFromTargetPathRequest {
118
+ // The target path.
119
+ string target_path = 1 ;
118
120
}
119
121
120
- message VolumeIDFromMountResponse {
121
- // Mount
122
+ message GetVolumeIDFromTargetPathResponse {
123
+ // The volume device ID.
122
124
string volume_id = 1 ;
123
125
}
124
126
125
127
message WriteVolumeCacheRequest {
126
- // Volume device ID of the volume to flush the cache
128
+ // Volume device ID of the volume to flush the cache.
127
129
string volume_id = 1 ;
128
130
}
129
131
130
132
message WriteVolumeCacheResponse {
131
- // Intentionally empty
133
+ // Intentionally empty.
132
134
}
0 commit comments