-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[storage] [backend] Add Handle to BE object now #217
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,18 +10,23 @@ option java_outer_classname = "BackendNvmeTcpProto"; | |
|
||
option go_package = "github.com/opiproject/opi-api/storage/v1alpha1/gen/go"; | ||
|
||
import "google/protobuf/empty.proto"; | ||
import "object_key.proto"; | ||
|
||
// Back End (network-facing) APIs. NVMe/TCP and NVMe/RoCEv2 protocols are covered by this service. | ||
service NVMfRemoteControllerService { | ||
rpc NVMfRemoteControllerConnect (NVMfRemoteControllerConnectRequest) returns (NVMfRemoteControllerConnectResponse) {} | ||
rpc NVMfRemoteControllerDisconnect (NVMfRemoteControllerDisconnectRequest) returns (NVMfRemoteControllerDisconnectResponse) {} | ||
rpc NVMfRemoteControllerReset (NVMfRemoteControllerResetRequest) returns (NVMfRemoteControllerResetResponse) {} | ||
rpc NVMfRemoteControllerConnect (NVMfRemoteControllerConnectRequest) returns (NVMfRemoteController) {} | ||
rpc NVMfRemoteControllerDisconnect (NVMfRemoteControllerDisconnectRequest) returns (google.protobuf.Empty) {} | ||
rpc NVMfRemoteControllerReset (NVMfRemoteControllerResetRequest) returns (google.protobuf.Empty) {} | ||
rpc NVMfRemoteControllerList (NVMfRemoteControllerListRequest) returns (NVMfRemoteControllerListResponse) {} | ||
rpc NVMfRemoteControllerGet (NVMfRemoteControllerGetRequest) returns (NVMfRemoteControllerGetResponse) {} | ||
rpc NVMfRemoteControllerGet (NVMfRemoteControllerGetRequest) returns (NVMfRemoteController) {} | ||
rpc NVMfRemoteControllerStats (NVMfRemoteControllerStatsRequest) returns (NVMfRemoteControllerStatsResponse) {} | ||
} | ||
|
||
message NVMfRemoteController { | ||
int64 id = 1; | ||
// object's unique identifier | ||
common.v1.ObjectKey id = 1; | ||
|
||
NvmeTransportType trtype = 2; | ||
NvmeAddressFamily adrfam = 3; | ||
string traddr = 4; | ||
|
@@ -39,49 +44,37 @@ message NVMfRemoteControllerConnectRequest { | |
NVMfRemoteController ctrl = 1; | ||
} | ||
|
||
message NVMfRemoteControllerConnectResponse { | ||
// Intentionally empty. | ||
} | ||
|
||
message NVMfRemoteControllerDisconnectRequest { | ||
int64 id = 1; | ||
} | ||
|
||
message NVMfRemoteControllerDisconnectResponse { | ||
// Intentionally empty. | ||
// object's unique identifier | ||
common.v1.ObjectKey id = 1; | ||
} | ||
|
||
message NVMfRemoteControllerResetRequest { | ||
int64 id = 1; | ||
} | ||
|
||
message NVMfRemoteControllerResetResponse { | ||
// Intentionally empty. | ||
// object's unique identifier | ||
common.v1.ObjectKey id = 1; | ||
} | ||
|
||
message NVMfRemoteControllerListRequest { | ||
int64 id = 1; | ||
int32 page_size = 1; | ||
string page_token = 2; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how are these related to this pr ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could've split in 2 commits here, you are right. |
||
|
||
message NVMfRemoteControllerListResponse { | ||
repeated NVMfRemoteController ctrl = 1; | ||
} | ||
|
||
message NVMfRemoteControllerGetRequest { | ||
int64 id = 1; | ||
} | ||
|
||
message NVMfRemoteControllerGetResponse { | ||
NVMfRemoteController ctrl = 1; | ||
// object's unique identifier | ||
common.v1.ObjectKey id = 1; | ||
} | ||
|
||
message NVMfRemoteControllerStatsRequest { | ||
int64 id = 1; | ||
// object's unique identifier | ||
common.v1.ObjectKey id = 1; | ||
} | ||
|
||
message NVMfRemoteControllerStatsResponse { | ||
int64 id = 1; | ||
string stats = 2; | ||
string stats = 1; | ||
} | ||
|
||
enum NvmeTransportType { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not provide the objectKey here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good question. according to what we did in frontend, we put the ID inside the object, so I wanted to align those here as well. From https://google.aip.dev/133#user-specified-ids indeed IDs should be in the request message, not the object and named
string {resource}_id