-
Notifications
You must be signed in to change notification settings - Fork 41
/
backend_nvme_tcp.proto
executable file
·392 lines (340 loc) · 13 KB
/
backend_nvme_tcp.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2022 Dell Inc, or its subsidiaries.
syntax = "proto3";
package opi_api.storage.v1;
option java_package = "opi_api.storage.v1";
option java_multiple_files = true;
option java_outer_classname = "BackendNvmeTcpProto";
option go_package = "github.com/opiproject/opi-api/storage/v1alpha1/gen/go";
import "google/api/client.proto";
import "google/api/resource.proto";
import "google/protobuf/empty.proto";
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/field_mask.proto";
import "opicommon.proto";
import "uuid.proto";
// Back End (network-facing) APIs. NVMe/TCP and NVMe/RoCEv2 protocols are covered by this service.
service NvmeRemoteControllerService {
rpc CreateNvmeRemoteController (CreateNvmeRemoteControllerRequest) returns (NvmeRemoteController) {
option (google.api.http) = {
post: "/v1/volumes"
body: "nvme_remote_controller"
};
option (google.api.method_signature) = "nvme_remote_controller,nvme_remote_controller_id";
}
rpc DeleteNvmeRemoteController (DeleteNvmeRemoteControllerRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=NvmeRemoteControllers/*}"
};
option (google.api.method_signature) = "name";
}
rpc UpdateNvmeRemoteController (UpdateNvmeRemoteControllerRequest) returns (NvmeRemoteController) {
option (google.api.http) = {
patch: "/v1/{nvme_remote_controller.name=subsystems}"
body: "nvme_remote_controller"
};
option (google.api.method_signature) = "nvme_remote_controller,update_mask";
}
rpc ListNvmeRemoteControllers (ListNvmeRemoteControllersRequest) returns (ListNvmeRemoteControllersResponse) {
option (google.api.http) = {
get: "/v1/{parent=subsystems}"
};
option (google.api.method_signature) = "parent";
}
rpc GetNvmeRemoteController (GetNvmeRemoteControllerRequest) returns (NvmeRemoteController) {
option (google.api.http) = {
get: "/v1/{name=NvmeRemoteControllers/*}"
};
option (google.api.method_signature) = "name";
}
rpc ResetNvmeRemoteController (ResetNvmeRemoteControllerRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v1/{name=NvmeRemoteControllers/*}:reset"
body: "*"
};
option (google.api.method_signature) = "name";
}
rpc StatsNvmeRemoteController (StatsNvmeRemoteControllerRequest) returns (StatsNvmeRemoteControllerResponse) {
option (google.api.http) = {
get: "/v1/{name=NvmeRemoteControllers/*}:stats"
};
option (google.api.method_signature) = "name";
}
rpc ListNvmeRemoteNamespaces (ListNvmeRemoteNamespacesRequest) returns (ListNvmeRemoteNamespacesResponse) {
option (google.api.http) = {
get: "/v1/{parent=subsystems}"
};
option (google.api.method_signature) = "parent";
}
rpc CreateNvmePath (CreateNvmePathRequest) returns (NvmePath) {
option (google.api.http) = {
post: "/v1/volumes"
body: "nvme_path"
};
option (google.api.method_signature) = "nvme_path,nvme_path_id";
}
rpc DeleteNvmePath (DeleteNvmePathRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=NvmePaths/*}"
};
option (google.api.method_signature) = "name";
}
rpc UpdateNvmePath (UpdateNvmePathRequest) returns (NvmePath) {
option (google.api.http) = {
patch: "/v1/{nvme_path.name=subsystems}"
body: "nvme_path"
};
option (google.api.method_signature) = "nvme_path,update_mask";
}
rpc ListNvmePaths (ListNvmePathsRequest) returns (ListNvmePathsResponse) {
option (google.api.http) = {
get: "/v1/{parent=subsystems}"
};
option (google.api.method_signature) = "parent";
}
rpc GetNvmePath (GetNvmePathRequest) returns (NvmePath) {
option (google.api.http) = {
get: "/v1/{name=NvmePaths/*}"
};
option (google.api.method_signature) = "name";
}
rpc StatsNvmePath (StatsNvmePathRequest) returns (StatsNvmePathResponse) {
option (google.api.http) = {
get: "/v1/{name=NvmePaths/*}:stats"
};
option (google.api.method_signature) = "name";
}
}
message NvmeRemoteController {
option (google.api.resource) = {
type: "storage.opiproject.org/NvmeRemoteController"
pattern: "volumes/{volume}"
};
// name is an opaque object handle that is not user settable.
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmeRemoteController"
];
bool hdgst = 2;
bool ddgst = 3;
NvmeMultipath multipath = 4;
int64 io_queues_count = 5;
int64 queue_size = 6;
// Nvme/TCP published secure channel specification (TP 8011) based on TLS 1.3 and PSK.
// Use PSK interchange format with base64 encoding as input.
// Also use information about hash function in interchange
// format for retained PSK generation. If no hash is selected,
// use configured PSK as retained PSK.
// Check the size of interchange PSK to determine cipher suite.
// Calculate CRC-32 bytes to ensure validity of PSK.
// Example: "NVMeTLSkey-1:01:VRLbtnN9AQb2WXW3c9+wEf/DRLz0QuLdbYvEhwtdWwNf9LrZ:"
// if PSK field is empty, then unsecure connection Nvme/TCP without TLS will be made
bytes psk = 7;
}
message NvmePath {
option (google.api.resource) = {
type: "storage.opiproject.org/NvmePath"
pattern: "volumes/{volume}"
};
// name is an opaque object handle that is not user settable.
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmePath"
];
string controller_name_ref = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmeRemoteController"
];
NvmeTransportType trtype = 3;
NvmeAddressFamily adrfam = 4;
// Destination address (e.g. IP address)
string traddr = 5;
// Destination service id (e.g. Port)
int64 trsvcid = 6;
// Subsystem NQN
string subnqn = 7;
// Source address (e.g. IP of local NIC)
string source_traddr = 8;
// Source port (e.g. Port of local NIC)
int64 source_trsvcid = 9;
// Host NQN
string hostnqn = 10;
}
message NvmeRemoteNamespace {
// namespace's unique key. Assign to middle/front-end objects.
option (google.api.resource) = {
type: "storage.opiproject.org/NvmeRemoteNamespace"
pattern: "volumes/{volume}"
};
// name is an opaque object handle that is not user settable.
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmeRemoteNamespace"
];
// controller through which the namespace is visible
string controller_name_ref = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmeRemoteController"
];
// NSID
int32 nsid = 3;
// Globally unique identifier for the namespace
string nguid = 4;
// 64bit Extended unique identifier for the namespace
// mandatory if guid is not specified
int64 eui64 = 5;
// Globally unique identifier for the namespace
common.v1.Uuid uuid = 6;
// ANA state and such?
}
message CreateNvmeRemoteControllerRequest {
NvmeRemoteController nvme_remote_controller = 1 [(google.api.field_behavior) = REQUIRED];
string nvme_remote_controller_id = 2;
}
message DeleteNvmeRemoteControllerRequest {
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmeRemoteController"
];
// If set to true, and the resource is not found, the request will succeed
// but no action will be taken on the server
bool allow_missing = 2;
}
message UpdateNvmeRemoteControllerRequest {
// The object's `name` field is used to identify the object to be updated.
NvmeRemoteController nvme_remote_controller = 1;
// The list of fields to update.
google.protobuf.FieldMask update_mask = 2;
// If set to true, and the object is not found, a new object will be created.
// In this situation, `update_mask` is ignored.
bool allow_missing = 3;
}
message ListNvmeRemoteControllersRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmeRemoteController"
];
int32 page_size = 2;
string page_token = 3;
}
message ListNvmeRemoteControllersResponse {
repeated NvmeRemoteController nvme_remote_controllers = 1;
string next_page_token = 2;
}
message GetNvmeRemoteControllerRequest {
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmeRemoteController"
];
}
message ResetNvmeRemoteControllerRequest {
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmeRemoteController"
];
}
message StatsNvmeRemoteControllerRequest {
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmeRemoteController"
];
}
message StatsNvmeRemoteControllerResponse {
VolumeStats stats = 1;
}
message ListNvmeRemoteNamespacesRequest {
// The controller's unique object identifier. This lists
// namespaces for a particular controller.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmeRemoteNamespace"
];
int32 page_size = 2;
string page_token = 3;
}
message ListNvmeRemoteNamespacesResponse {
repeated NvmeRemoteNamespace nvme_remote_namespaces = 1;
string next_page_token = 2;
}
message CreateNvmePathRequest {
NvmePath nvme_path = 1 [(google.api.field_behavior) = REQUIRED];
string nvme_path_id = 2;
}
message DeleteNvmePathRequest {
// object's unique identifier
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmePath"
];
// If set to true, and the resource is not found, the request will succeed
// but no action will be taken on the server
bool allow_missing = 2;
}
message UpdateNvmePathRequest {
// The object's `name` field is used to identify the object to be updated.
NvmePath nvme_path = 1;
// The list of fields to update.
google.protobuf.FieldMask update_mask = 2;
// If set to true, and the object is not found, a new object will be created.
// In this situation, `update_mask` is ignored.
bool allow_missing = 3;
}
message ListNvmePathsRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmePath"
];
int32 page_size = 2;
string page_token = 3;
}
message ListNvmePathsResponse {
repeated NvmePath nvme_paths = 1;
string next_page_token = 2;
}
message GetNvmePathRequest {
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmePath"
];
}
message StatsNvmePathRequest {
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmePath"
];
}
message StatsNvmePathResponse {
VolumeStats stats = 1;
}
enum NvmeTransportType {
NVME_TRANSPORT_TYPE_UNSPECIFIED = 0;
NVME_TRANSPORT_FC = 1;
NVME_TRANSPORT_PCIE = 2;
NVME_TRANSPORT_RDMA = 3;
NVME_TRANSPORT_TCP = 4;
NVME_TRANSPORT_CUSTOM = 5;
}
enum NvmeAddressFamily {
NVME_ADDRESS_FAMILY_UNSPECIFIED = 0;
NVME_ADRFAM_IPV4 = 1;
NVME_ADRFAM_IPV6 = 2;
NVME_ADRFAM_IB = 3;
NVME_ADRFAM_FC = 4;
NVME_ADRFAM_INTRA_HOST = 5;
}
enum NvmeMultipath {
NVME_MULTIPATH_UNSPECIFIED = 0;
NVME_MULTIPATH_DISABLE = 1;
NVME_MULTIPATH_FAILOVER = 2;
NVME_MULTIPATH_MULTIPATH = 3;
}