-
Notifications
You must be signed in to change notification settings - Fork 40
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 all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,16 +11,39 @@ option java_outer_classname = "BackendNullProto"; | |
option go_package = "github.com/opiproject/opi-api/storage/v1alpha1/gen/go"; | ||
|
||
import "google/protobuf/empty.proto"; | ||
import "google/api/annotations.proto"; | ||
import "object_key.proto"; | ||
import "uuid.proto"; | ||
|
||
// Back End (network-facing) APIs. This is debug interface for null block devices. | ||
service NullDebugService { | ||
rpc NullDebugCreate (NullDebugCreateRequest) returns (NullDebug) {} | ||
rpc NullDebugDelete (NullDebugDeleteRequest) returns (google.protobuf.Empty) {} | ||
rpc NullDebugUpdate (NullDebugUpdateRequest) returns (NullDebug) {} | ||
rpc NullDebugList (NullDebugListRequest) returns (NullDebugListResponse) {} | ||
rpc NullDebugGet (NullDebugGetRequest) returns (NullDebug) {} | ||
rpc CreateNullDebug (CreateNullDebugRequest) returns (NullDebug) { | ||
option (google.api.http) = { | ||
post: "/v1/subsystems" | ||
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. URLs will be fixed #188 |
||
body: "subsystem" | ||
}; | ||
} | ||
rpc DeleteNullDebug (DeleteNullDebugRequest) returns (google.protobuf.Empty) { | ||
option (google.api.http) = { | ||
delete: "/v1/subsystems/{subsystem}" | ||
}; | ||
} | ||
rpc UpdateNullDebug (UpdateNullDebugRequest) returns (NullDebug) { | ||
option (google.api.http) = { | ||
patch: "/v1/subsystems" | ||
body: "subsystem" | ||
}; | ||
} | ||
rpc ListNullDebug (ListNullDebugRequest) returns (ListNullDebugResponse) { | ||
option (google.api.http) = { | ||
get: "/v1/subsystems" | ||
}; | ||
} | ||
rpc GetNullDebug (GetNullDebugRequest) returns (NullDebug) { | ||
option (google.api.http) = { | ||
get: "/v1/subsystems/{subsystem}" | ||
}; | ||
} | ||
rpc NullDebugStats (NullDebugStatsRequest) returns (NullDebugStatsResponse) {} | ||
} | ||
|
||
|
@@ -31,28 +54,30 @@ message NullDebug { | |
common.v1.Uuid uuid = 4; | ||
} | ||
|
||
message NullDebugCreateRequest { | ||
message CreateNullDebugRequest { | ||
NullDebug device = 1; | ||
} | ||
|
||
message NullDebugDeleteRequest { | ||
message DeleteNullDebugRequest { | ||
common.v1.ObjectKey handle = 1; | ||
|
||
} | ||
|
||
message NullDebugUpdateRequest { | ||
message UpdateNullDebugRequest { | ||
NullDebug device = 1; | ||
} | ||
|
||
message NullDebugListRequest { | ||
// Intentionally empty. | ||
message ListNullDebugRequest { | ||
int32 page_size = 1; | ||
string page_token = 2; | ||
} | ||
|
||
message NullDebugListResponse { | ||
repeated NullDebug device = 1; | ||
message ListNullDebugResponse { | ||
repeated NullDebug devices = 1; | ||
string next_page_token = 2; | ||
} | ||
|
||
message NullDebugGetRequest { | ||
message GetNullDebugRequest { | ||
common.v1.ObjectKey handle = 1; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,18 +10,47 @@ option java_outer_classname = "BackendNvmeTcpProto"; | |
|
||
option go_package = "github.com/opiproject/opi-api/storage/v1alpha1/gen/go"; | ||
|
||
import "google/protobuf/empty.proto"; | ||
import "google/api/annotations.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 NVMfRemoteControllerList (NVMfRemoteControllerListRequest) returns (NVMfRemoteControllerListResponse) {} | ||
rpc NVMfRemoteControllerGet (NVMfRemoteControllerGetRequest) returns (NVMfRemoteControllerGetResponse) {} | ||
rpc CreateNVMfRemoteController (CreateNVMfRemoteControllerRequest) returns (NVMfRemoteController) { | ||
option (google.api.http) = { | ||
post: "/v1/subsystems" | ||
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. URLs will be fixed #188 |
||
body: "subsystem" | ||
}; | ||
} | ||
rpc DeleteNVMfRemoteController (DeleteNVMfRemoteControllerRequest) returns (google.protobuf.Empty) { | ||
option (google.api.http) = { | ||
delete: "/v1/subsystems/{subsystem}" | ||
}; | ||
} | ||
rpc UpdateNVMfRemoteController (UpdateNVMfRemoteControllerRequest) returns (NVMfRemoteController) { | ||
option (google.api.http) = { | ||
patch: "/v1/subsystems" | ||
body: "subsystem" | ||
}; | ||
} | ||
rpc ListNVMfRemoteController (ListNVMfRemoteControllerRequest) returns (ListNVMfRemoteControllerResponse) { | ||
option (google.api.http) = { | ||
get: "/v1/subsystems" | ||
}; | ||
} | ||
rpc GetNVMfRemoteController (GetNVMfRemoteControllerRequest) returns (NVMfRemoteController) { | ||
option (google.api.http) = { | ||
get: "/v1/subsystems/{subsystem}" | ||
}; | ||
} | ||
rpc NVMfRemoteControllerReset (NVMfRemoteControllerResetRequest) returns (google.protobuf.Empty) {} | ||
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; | ||
|
@@ -35,53 +64,46 @@ message NVMfRemoteController { | |
string hostnqn = 12; | ||
} | ||
|
||
message NVMfRemoteControllerConnectRequest { | ||
message CreateNVMfRemoteControllerRequest { | ||
NVMfRemoteController ctrl = 1; | ||
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. why not provide the objectKey here ? 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. 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 |
||
} | ||
|
||
message NVMfRemoteControllerConnectResponse { | ||
// Intentionally empty. | ||
} | ||
|
||
message NVMfRemoteControllerDisconnectRequest { | ||
int64 id = 1; | ||
} | ||
|
||
message NVMfRemoteControllerDisconnectResponse { | ||
// Intentionally empty. | ||
message DeleteNVMfRemoteControllerRequest { | ||
// object's unique identifier | ||
common.v1.ObjectKey id = 1; | ||
} | ||
|
||
message NVMfRemoteControllerResetRequest { | ||
int64 id = 1; | ||
} | ||
|
||
message NVMfRemoteControllerResetResponse { | ||
// Intentionally empty. | ||
message UpdateNVMfRemoteControllerRequest { | ||
NVMfRemoteController ctrl = 1; | ||
} | ||
|
||
message NVMfRemoteControllerListRequest { | ||
int64 id = 1; | ||
message ListNVMfRemoteControllerRequest { | ||
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 ListNVMfRemoteControllerResponse { | ||
repeated NVMfRemoteController ctrls = 1; | ||
string next_page_token = 2; | ||
} | ||
|
||
message NVMfRemoteControllerGetRequest { | ||
int64 id = 1; | ||
message GetNVMfRemoteControllerRequest { | ||
// object's unique identifier | ||
common.v1.ObjectKey id = 1; | ||
} | ||
|
||
message NVMfRemoteControllerGetResponse { | ||
NVMfRemoteController ctrl = 1; | ||
message NVMfRemoteControllerResetRequest { | ||
// 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.
URLs will be fixed #188