Skip to content
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

Update github.com/opiproject/opi-api digest to b10361a #61

Merged
merged 2 commits into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func doBackend(ctx context.Context, conn grpc.ClientConnInterface) {
if err != nil {
log.Fatalf("could not find SPDK IP address")
}
rr0, err := c4.NVMfRemoteControllerConnect(ctx, &pb.NVMfRemoteControllerConnectRequest{Ctrl: &pb.NVMfRemoteController{Id: 8, Traddr: addr[0].String(), Trsvcid: 4444, Subnqn: "nqn.2016-06.io.spdk:cnode1"}})
rr0, err := c4.NVMfRemoteControllerConnect(ctx, &pb.NVMfRemoteControllerConnectRequest{Ctrl: &pb.NVMfRemoteController{Id: 8, Traddr: addr[0].String(), Trsvcid: 4444, Subnqn: "nqn.2016-06.io.spdk:cnode1", Hostnqn: "nqn.2014-08.org.nvmexpress:uuid:feb98abe-d51f-40c8-b348-2753f3571d3c"}})
if err != nil {
log.Fatalf("could not connect to Remote NVMf controller: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion client/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module opi.storage.v1
go 1.19

require (
github.com/opiproject/opi-api v0.0.0-20221121200811-5d2289de810a
github.com/opiproject/opi-api v0.0.0-20221129180238-b10361a9c119
google.golang.org/grpc v1.51.0
)

Expand Down
2 changes: 2 additions & 0 deletions client/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
github.com/opiproject/opi-api v0.0.0-20221121200811-5d2289de810a h1:dFFDDQez4aCsKEkvEnQ+yFnMu5/yZ/VWBxbIRmAvgd4=
github.com/opiproject/opi-api v0.0.0-20221121200811-5d2289de810a/go.mod h1:92pv4ulvvPMuxCJ9ND3aYbmBfEMLx0VCjpkiR7ZTqPY=
github.com/opiproject/opi-api v0.0.0-20221129180238-b10361a9c119 h1:exwxNwGuwQtA9IRs2I/Eh22IWeeReAf3uzExgblLytY=
github.com/opiproject/opi-api v0.0.0-20221129180238-b10361a9c119/go.mod h1:92pv4ulvvPMuxCJ9ND3aYbmBfEMLx0VCjpkiR7ZTqPY=
golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
Expand Down
13 changes: 7 additions & 6 deletions server/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ import (
func (s *server) NVMfRemoteControllerConnect(ctx context.Context, in *pb.NVMfRemoteControllerConnectRequest) (*pb.NVMfRemoteControllerConnectResponse, error) {
log.Printf("NVMfRemoteControllerConnect: Received from client: %v", in)
params := BdevNvmeAttachControllerParams{
Name: fmt.Sprint("OpiNvme", in.GetCtrl().GetId()),
Type: "TCP",
Address: in.GetCtrl().GetTraddr(),
Family: "ipv4",
Port: fmt.Sprint(in.GetCtrl().GetTrsvcid()),
Subsystem: in.GetCtrl().GetSubnqn(),
Name: fmt.Sprint("OpiNvme", in.Ctrl.Id),
Trtype: "TCP",
Traddr: in.Ctrl.Traddr,
Adrfam: "ipv4",
Trsvcid: fmt.Sprint(in.Ctrl.Trsvcid),
Subnqn: in.Ctrl.Subnqn,
Hostnqn: in.Ctrl.Hostnqn,
}
var result []BdevNvmeAttachControllerResult
err := call("bdev_nvme_attach_controller", &params, &result)
Expand Down
2 changes: 1 addition & 1 deletion server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module opi.storage.v1
go 1.19

require (
github.com/opiproject/opi-api v0.0.0-20221121200811-5d2289de810a
github.com/opiproject/opi-api v0.0.0-20221129180238-b10361a9c119
github.com/ulule/deepcopier v0.0.0-20200430083143-45decc6639b6
google.golang.org/grpc v1.51.0
google.golang.org/protobuf v1.28.1
Expand Down
2 changes: 2 additions & 0 deletions server/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
github.com/opiproject/opi-api v0.0.0-20221121200811-5d2289de810a h1:dFFDDQez4aCsKEkvEnQ+yFnMu5/yZ/VWBxbIRmAvgd4=
github.com/opiproject/opi-api v0.0.0-20221121200811-5d2289de810a/go.mod h1:92pv4ulvvPMuxCJ9ND3aYbmBfEMLx0VCjpkiR7ZTqPY=
github.com/opiproject/opi-api v0.0.0-20221129180238-b10361a9c119 h1:exwxNwGuwQtA9IRs2I/Eh22IWeeReAf3uzExgblLytY=
github.com/opiproject/opi-api v0.0.0-20221129180238-b10361a9c119/go.mod h1:92pv4ulvvPMuxCJ9ND3aYbmBfEMLx0VCjpkiR7ZTqPY=
github.com/ulule/deepcopier v0.0.0-20200430083143-45decc6639b6 h1:TtyC78WMafNW8QFfv3TeP3yWNDG+uxNkk9vOrnDu6JA=
github.com/ulule/deepcopier v0.0.0-20200430083143-45decc6639b6/go.mod h1:h8272+G2omSmi30fBXiZDMkmHuOgonplfKIKjQWzlfs=
golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=
Expand Down
13 changes: 7 additions & 6 deletions server/spdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,13 @@ type BdevCryptoDeleteResult bool

// BdevNvmeAttachControllerParams is the parameters required to create a block device based on an NVMe device
type BdevNvmeAttachControllerParams struct {
Name string `json:"name"`
Type string `json:"trtype"`
Address string `json:"traddr"`
Family string `json:"adrfam"`
Port string `json:"trsvcid"`
Subsystem string `json:"subnqn"`
Name string `json:"name"`
Trtype string `json:"trtype"`
Traddr string `json:"traddr"`
Hostnqn string `json:"hostnqn"`
Adrfam string `json:"adrfam"`
Trsvcid string `json:"trsvcid"`
Subnqn string `json:"subnqn"`
}

// BdevNvmeAttachControllerResult is the result of creating a block device based on an NVMe device
Expand Down