Skip to content

Commit

Permalink
fixed merge conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Harish P <[email protected]>
  • Loading branch information
harishp8889 committed Nov 14, 2022
1 parent 38f0226 commit 99a36b8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 58 deletions.
44 changes: 0 additions & 44 deletions goopicsi.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,50 +176,6 @@ func NVMeControllerGet(id int64) error {
return nil
}

// NVMeControllerList lists all the connections to the remote NVMf controller
func NVMeControllerList() error {
if conn == nil {
err := dialConnection()
if err != nil {
return err
}
}

client := pb.NewNVMfRemoteControllerServiceClient(conn)
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()

response, err := client.NVMfRemoteControllerList(ctx, &pb.NVMfRemoteControllerListRequest{})
if err != nil {
log.Printf("could not list the connections to Remote NVMf controller: %v", err)
return err
}
log.Printf("Connections: %v", response)
return nil
}

// NVMeControllerGet lists the connection to the remote NVMf controller corresponding to the given ID
func NVMeControllerGet(id int64) error {
if conn == nil {
err := dialConnection()
if err != nil {
return err
}
}

client := pb.NewNVMfRemoteControllerServiceClient(conn)
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()

response, err := client.NVMfRemoteControllerGet(ctx, &pb.NVMfRemoteControllerGetRequest{Id: id})
if err != nil {
log.Printf("could not list the connection to Remote NVMf controller corresponding to the given ID: %v", err)
return err
}
log.Printf("Connection corresponding to the given ID: %v", response)
return nil
}

// NVMeControllerDisconnect disconnects remote NVMf controller connection
func NVMeControllerDisconnect(id int64) error {
if conn == nil {
Expand Down
14 changes: 0 additions & 14 deletions goopicsi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,6 @@ func TestNVMeControllerGet(t *testing.T) {
}
}

func TestNVMeControllerList(t *testing.T) {
err := NVMeControllerList()
if err != nil {
log.Println(err)
}
}

func TestNVMeControllerGet(t *testing.T) {
err := NVMeControllerGet(12)
if err != nil {
log.Println(err)
}
}

func TestNVMeControllerDisconnect(t *testing.T) {
err := NVMeControllerDisconnect(12)
if err != nil {
Expand Down

0 comments on commit 99a36b8

Please sign in to comment.