Skip to content

Commit

Permalink
New rpc service to attach/detach a controller to a namespace.
Browse files Browse the repository at this point in the history
Added attach/detach controller to cater to use-case of an existing customer.

Signed-off-by: Vaibhav Jain <[email protected]>
Signed-off-by: Michal Kalderon <[email protected]>
  • Loading branch information
VaibhavJMarvell committed Jan 25, 2023
1 parent e4b3480 commit 8600e13
Show file tree
Hide file tree
Showing 19 changed files with 5,632 additions and 479 deletions.
20 changes: 20 additions & 0 deletions storage/v1alpha1/autogen.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
- [NVMfRemoteControllerService](#opi_api-storage-v1-NVMfRemoteControllerService)

- [frontend_nvme_pcie.proto](#frontend_nvme_pcie-proto)
- [ControllerNVMeNamespaceRequest](#opi_api-storage-v1-ControllerNVMeNamespaceRequest)
- [CreateNVMeControllerRequest](#opi_api-storage-v1-CreateNVMeControllerRequest)
- [CreateNVMeNamespaceRequest](#opi_api-storage-v1-CreateNVMeNamespaceRequest)
- [CreateNVMeSubsystemRequest](#opi_api-storage-v1-CreateNVMeSubsystemRequest)
Expand Down Expand Up @@ -813,6 +814,23 @@ Back End (network-facing) APIs. NVMe/TCP and NVMe/RoCEv2 protocols are covered b



<a name="opi_api-storage-v1-ControllerNVMeNamespaceRequest"></a>

### ControllerNVMeNamespaceRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| subsystem | [string](#string) | | |
| controller | [string](#string) | | |
| nv_me_namespace_id | [string](#string) | | |






<a name="opi_api-storage-v1-CreateNVMeControllerRequest"></a>

### CreateNVMeControllerRequest
Expand Down Expand Up @@ -1409,6 +1427,8 @@ Front End (host-facing) APIs. Mostly used for NVMe/PCIe emulation and host prese
| ListNVMeNamespaces | [ListNVMeNamespacesRequest](#opi_api-storage-v1-ListNVMeNamespacesRequest) | [ListNVMeNamespacesResponse](#opi_api-storage-v1-ListNVMeNamespacesResponse) | |
| GetNVMeNamespace | [GetNVMeNamespaceRequest](#opi_api-storage-v1-GetNVMeNamespaceRequest) | [NVMeNamespace](#opi_api-storage-v1-NVMeNamespace) | |
| NVMeNamespaceStats | [NVMeNamespaceStatsRequest](#opi_api-storage-v1-NVMeNamespaceStatsRequest) | [NVMeNamespaceStatsResponse](#opi_api-storage-v1-NVMeNamespaceStatsResponse) | |
| AttachControllerNVMeNamespace | [ControllerNVMeNamespaceRequest](#opi_api-storage-v1-ControllerNVMeNamespaceRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
| DetachControllerNVMeNamespace | [ControllerNVMeNamespaceRequest](#opi_api-storage-v1-ControllerNVMeNamespaceRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |



Expand Down
21 changes: 21 additions & 0 deletions storage/v1alpha1/frontend_nvme_pcie.proto
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,20 @@ service FrontendNvmeService {
option (google.api.method_signature) = "name";
}
rpc NVMeNamespaceStats (NVMeNamespaceStatsRequest) returns (NVMeNamespaceStatsResponse) {}

rpc AttachControllerNVMeNamespace (ControllerNVMeNamespaceRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v1/{subsystem=subsystemId/*/controller=nvmeControllerId/*}:attachControllerNvMeNamespace"
body: "*"
};
}

rpc DetachControllerNVMeNamespace (ControllerNVMeNamespaceRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v1/{subsystem=subsystemId/*/controller=nvmeControllerId/*}:detachControllerNvMeNamespace"
body: "*"
};
}
}

message NVMeSubsystem {
Expand Down Expand Up @@ -398,6 +412,13 @@ message NVMeNamespaceStatsResponse {
VolumeStats stats = 2;
}

message ControllerNVMeNamespaceRequest {
string subsystem = 1 [
(google.api.field_behavior) = REQUIRED
];
string controller = 2 [(google.api.field_behavior) = REQUIRED];
string nv_me_namespace_id = 3 [(google.api.field_behavior) = REQUIRED];
}
// Namespace Administrative States
enum NVMeNamespacePciState {
// unspecified
Expand Down
84 changes: 84 additions & 0 deletions storage/v1alpha1/gen/cpp/frontend_nvme_pcie.grpc.pb.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8600e13

Please sign in to comment.