Skip to content

Commit 8600e13

Browse files
New rpc service to attach/detach a controller to a namespace.
Added attach/detach controller to cater to use-case of an existing customer. Signed-off-by: Vaibhav Jain <vaibhavj@marvell.com> Signed-off-by: Michal Kalderon <mkalderon@marvell.com>
1 parent e4b3480 commit 8600e13

19 files changed

+5632
-479
lines changed

storage/v1alpha1/autogen.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
- [NVMfRemoteControllerService](#opi_api-storage-v1-NVMfRemoteControllerService)
5151

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

814815

815816

817+
<a name="opi_api-storage-v1-ControllerNVMeNamespaceRequest"></a>
818+
819+
### ControllerNVMeNamespaceRequest
820+
821+
822+
823+
| Field | Type | Label | Description |
824+
| ----- | ---- | ----- | ----------- |
825+
| subsystem | [string](#string) | | |
826+
| controller | [string](#string) | | |
827+
| nv_me_namespace_id | [string](#string) | | |
828+
829+
830+
831+
832+
833+
816834
<a name="opi_api-storage-v1-CreateNVMeControllerRequest"></a>
817835

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

14131433

14141434

storage/v1alpha1/frontend_nvme_pcie.proto

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,20 @@ service FrontendNvmeService {
124124
option (google.api.method_signature) = "name";
125125
}
126126
rpc NVMeNamespaceStats (NVMeNamespaceStatsRequest) returns (NVMeNamespaceStatsResponse) {}
127+
128+
rpc AttachControllerNVMeNamespace (ControllerNVMeNamespaceRequest) returns (google.protobuf.Empty) {
129+
option (google.api.http) = {
130+
post: "/v1/{subsystem=subsystemId/*/controller=nvmeControllerId/*}:attachControllerNvMeNamespace"
131+
body: "*"
132+
};
133+
}
134+
135+
rpc DetachControllerNVMeNamespace (ControllerNVMeNamespaceRequest) returns (google.protobuf.Empty) {
136+
option (google.api.http) = {
137+
post: "/v1/{subsystem=subsystemId/*/controller=nvmeControllerId/*}:detachControllerNvMeNamespace"
138+
body: "*"
139+
};
140+
}
127141
}
128142

129143
message NVMeSubsystem {
@@ -398,6 +412,13 @@ message NVMeNamespaceStatsResponse {
398412
VolumeStats stats = 2;
399413
}
400414

415+
message ControllerNVMeNamespaceRequest {
416+
string subsystem = 1 [
417+
(google.api.field_behavior) = REQUIRED
418+
];
419+
string controller = 2 [(google.api.field_behavior) = REQUIRED];
420+
string nv_me_namespace_id = 3 [(google.api.field_behavior) = REQUIRED];
421+
}
401422
// Namespace Administrative States
402423
enum NVMeNamespacePciState {
403424
// unspecified

storage/v1alpha1/gen/cpp/frontend_nvme_pcie.grpc.pb.cc

Lines changed: 84 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)