Skip to content

Commit

Permalink
Chnage the Id to string
Browse files Browse the repository at this point in the history
Signed-off-by: Harshita Pandey <[email protected]>
  • Loading branch information
harshitap26 committed Dec 8, 2022
1 parent 0846aa3 commit 0f22db5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions goopicsi.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func ConnectToRemoteAndExpose(addr string) error {
}

// NVMeControllerConnect Connects to remote NVMf controller
func NVMeControllerConnect(id int64, trAddr string, subnqn string, trSvcID int64, hostnqn string) error {
func NVMeControllerConnect(id string, trAddr string, subnqn string, trSvcID int64, hostnqn string) error {
if conn == nil {
err := dialConnection()
if err != nil {
Expand Down Expand Up @@ -178,7 +178,7 @@ func NVMeControllerList() ([]NVMeConnection, error) {
}

// NVMeControllerGet lists the connection to the remote NVMf controller corresponding to the given ID
func NVMeControllerGet(id int64) (string, error) {
func NVMeControllerGet(id string) (string, error) {
if conn == nil {
err := dialConnection()
if err != nil {
Expand All @@ -200,7 +200,7 @@ func NVMeControllerGet(id int64) (string, error) {
}

// NVMeControllerDisconnect disconnects remote NVMf controller connection
func NVMeControllerDisconnect(id int64) error {
func NVMeControllerDisconnect(id string) error {
if conn == nil {
err := dialConnection()
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions goopicsi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func TestNVMeControllerConnect(t *testing.T) {
err := NVMeControllerConnect(12, "", "", 44565, "")
err := NVMeControllerConnect("12", "", "", 44565, "")
if err != nil {
log.Println(err)
}
Expand All @@ -27,15 +27,15 @@ func TestNVMeControllerList(t *testing.T) {
}

func TestNVMeControllerGet(t *testing.T) {
resp, err := NVMeControllerGet(12)
resp, err := NVMeControllerGet("12")
if err != nil {
log.Println(err)
}
log.Printf("NVMf remote connection corresponding to the ID: %v", resp)
}

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

0 comments on commit 0f22db5

Please sign in to comment.