Skip to content

Commit

Permalink
feat(storage/backend): opi-api added TcpController and FabricsPath
Browse files Browse the repository at this point in the history
Signed-off-by: Artsiom Koltun <artsiom.koltun@intel.com>
  • Loading branch information
artek-koltun authored and glimchb committed Sep 19, 2023
1 parent dadc4af commit 0bb4cb1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 17 deletions.
34 changes: 21 additions & 13 deletions storage/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ func executeNvmeRemoteController(ctx context.Context, c4 pb.NvmeRemoteController
NvmeRemoteControllerId: resourceID,
NvmeRemoteController: &pb.NvmeRemoteController{
Multipath: pb.NvmeMultipath_NVME_MULTIPATH_MULTIPATH,
Hdgst: false,
Ddgst: false,
Tcp: &pb.TcpController{
Hdgst: false,
Ddgst: false,
},
}})
if err != nil {
return err
Expand Down Expand Up @@ -131,9 +133,11 @@ func executeNvmePath(ctx context.Context, c5 pb.NvmeRemoteControllerServiceClien
NvmeRemoteControllerId: ctrlrResourceID,
NvmeRemoteController: &pb.NvmeRemoteController{
Multipath: pb.NvmeMultipath_NVME_MULTIPATH_MULTIPATH,
Hdgst: false,
Ddgst: false,
Psk: psk,
Tcp: &pb.TcpController{
Hdgst: false,
Ddgst: false,
Psk: psk,
},
}})
if err != nil {
return err
Expand All @@ -145,12 +149,14 @@ func executeNvmePath(ctx context.Context, c5 pb.NvmeRemoteControllerServiceClien
NvmePathId: resourceID,
NvmePath: &pb.NvmePath{
Trtype: pb.NvmeTransportType_NVME_TRANSPORT_TCP,
Adrfam: pb.NvmeAddressFamily_NVME_ADRFAM_IPV4,
Traddr: addr[0].String(),
Trsvcid: int64(port),
Subnqn: "nqn.2016-06.io.spdk:cnode1",
Hostnqn: "nqn.2014-08.org.nvmexpress:uuid:feb98abe-d51f-40c8-b348-2753f3571d3c",
ControllerNameRef: rr0.Name,
Fabrics: &pb.FabricsPath{
Adrfam: pb.NvmeAddressFamily_NVME_ADRFAM_IPV4,
Trsvcid: int64(port),
Subnqn: "nqn.2016-06.io.spdk:cnode1",
Hostnqn: "nqn.2014-08.org.nvmexpress:uuid:feb98abe-d51f-40c8-b348-2753f3571d3c",
},
}})
if err != nil {
return err
Expand All @@ -175,12 +181,14 @@ func executeNvmePath(ctx context.Context, c5 pb.NvmeRemoteControllerServiceClien
NvmePath: &pb.NvmePath{
Name: np0.Name,
Trtype: pb.NvmeTransportType_NVME_TRANSPORT_TCP,
Adrfam: pb.NvmeAddressFamily_NVME_ADRFAM_IPV4,
Traddr: addr[0].String(),
Trsvcid: int64(port),
Subnqn: "nqn.2016-06.io.spdk:cnode1",
Hostnqn: "nqn.2014-08.org.nvmexpress:uuid:feb98abe-d51f-40c8-b348-2753f3571d3c",
ControllerNameRef: rr0.Name,
Fabrics: &pb.FabricsPath{
Adrfam: pb.NvmeAddressFamily_NVME_ADRFAM_IPV4,
Trsvcid: int64(port),
Subnqn: "nqn.2016-06.io.spdk:cnode1",
Hostnqn: "nqn.2014-08.org.nvmexpress:uuid:feb98abe-d51f-40c8-b348-2753f3571d3c",
},
}})
if err != nil {
return err
Expand Down
10 changes: 6 additions & 4 deletions storage/goopicsi.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ func NvmeControllerConnect(id string, trAddr string, subnqn string, trSvcID int6
NvmePath: &pb.NvmePath{
ControllerNameRef: response.Name,
Traddr: trAddr,
Subnqn: subnqn,
Trsvcid: trSvcID,
Hostnqn: hostnqn,
Trtype: pb.NvmeTransportType_NVME_TRANSPORT_TCP,
Adrfam: pb.NvmeAddressFamily_NVME_ADRFAM_IPV4,
Fabrics: &pb.FabricsPath{
Subnqn: subnqn,
Trsvcid: trSvcID,
Hostnqn: hostnqn,
Adrfam: pb.NvmeAddressFamily_NVME_ADRFAM_IPV4,
},
},
})
if err != nil {
Expand Down

0 comments on commit 0bb4cb1

Please sign in to comment.