@@ -1027,49 +1027,36 @@ message NodeGetVolumeStatsRequest {
1027
1027
// The ID of the volume. This field is REQUIRED.
1028
1028
string volume_id = 1 ;
1029
1029
1030
- // The path at which the volume was published. It MUST be an absolute
1031
- // path in the root filesystem of the process serving this request.
1030
+ // It can be any valid path where volume was previously published.
1031
+ // It MUST be an absolute path in the root filesystem of
1032
+ // the process serving this request.
1032
1033
// This is a REQUIRED field.
1033
- string target_path = 2 ;
1034
+ string volume_path = 2 ;
1034
1035
}
1035
1036
1036
1037
message NodeGetVolumeStatsResponse {
1037
- // The used capacity in bytes. This field is OPTIONAL.
1038
- // The value of this field MUST NOT be negative.
1039
- // For volumes that share a filesystem with the host (e.g hostpath)
1040
- // this is used space on the underlying storage by specified
1041
- // shared path or directory.
1042
- int64 used_capacity = 1 ;
1043
-
1044
- // The available capacity in bytes. This field is OPTIONAL.
1045
- // For volumes that share a filesystem with the host (e.g hostpath)
1046
- // this is available space on the underlying storage and is
1047
- // shared with the host processes and other volumes.
1048
- // The value of this field MUST NOT be negative.
1049
- int64 available_capacity = 2 ;
1038
+ repeated VolumeUsage usage = 1 ;
1039
+ }
1050
1040
1051
- // The total capacity in bytes. This field is REQUIRED.
1052
- // For volumes that share a file system with the host (e.g hostpath)
1053
- // this is the total size of underlying storage and it MAY
1054
- // not be equal to used_capacity + available_capacity because
1055
- // filesystem is shared.
1041
+ message VolumeUsage {
1042
+ enum Unit {
1043
+ BYTES = 0 ;
1044
+ INODES = 1 ;
1045
+ }
1046
+ // The available capacity in specified Unit. This field is OPTIONAL.
1056
1047
// The value of this field MUST NOT be negative.
1057
- int64 total_capacity = 3 ;
1048
+ int64 available = 1 ;
1058
1049
1059
- // The number of inodes used by the volume.
1060
- // This field is OPTIONAL.
1050
+ // The total capacity in specified Unit. This field is REQUIRED.
1061
1051
// The value of this field MUST NOT be negative.
1062
- int64 used_inodes = 4 ;
1052
+ int64 total = 2 ;
1063
1053
1064
- // The total number of inodes on the underlying filesystem.
1065
- // This field is OPTIONAL
1054
+ // The used capacity in specified Unit. This field is OPTIONAL.
1066
1055
// The value of this field MUST NOT be negative.
1067
- int64 total_inodes = 5 ;
1056
+ int64 used = 3 ;
1068
1057
1069
- // The total number of free inodes on the underlying filesystem.
1070
- // This field is OPTIONAL.
1071
- // The value of this field MUST NOT be negative.
1072
- int64 available_inodes = 6 ;
1058
+ // The units that represent this value
1059
+ Unit unit = 4 ;
1073
1060
}
1074
1061
message NodeGetIdRequest {
1075
1062
// Intentionally empty.
@@ -1097,6 +1084,10 @@ message NodeServiceCapability {
1097
1084
enum Type {
1098
1085
UNKNOWN = 0 ;
1099
1086
STAGE_UNSTAGE_VOLUME = 1 ;
1087
+ // If Plugin implements GET_VOLUME_STATS capability
1088
+ // then it MUST implement NodeGetVolumeStats RPC
1089
+ // call for fetching volume stats
1090
+ GET_VOLUME_STATS = 2 ;
1100
1091
}
1101
1092
1102
1093
Type type = 1 ;
0 commit comments