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

Added Get and List RPC #49

Merged
merged 1 commit into from
Nov 14, 2022
Merged

Conversation

harshitap26
Copy link
Contributor

@harshitap26 harshitap26 commented Nov 14, 2022

Added the below RPCs:

NVMfRemoteControllerGet
NVMfRemoteControllerList

@harshitap26 harshitap26 requested a review from a team as a code owner November 14, 2022 06:38
@codecov
Copy link

codecov bot commented Nov 14, 2022

Codecov Report

Merging #49 (c9eba76) into main (d7ae9c7) will increase coverage by 6.76%.
The diff coverage is 58.82%.

❗ Current head c9eba76 differs from pull request most recent head fa5bbec. Consider uploading reports for the commit fa5bbec to get more accurate results

@@            Coverage Diff             @@
##             main      #49      +/-   ##
==========================================
+ Coverage   24.81%   31.57%   +6.76%     
==========================================
  Files           1        1              
  Lines         137      171      +34     
==========================================
+ Hits           34       54      +20     
- Misses        100      112      +12     
- Partials        3        5       +2     
Impacted Files Coverage Δ
goopicsi.go 31.57% <58.82%> (+6.76%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

goopicsi.go Outdated
@@ -126,6 +126,50 @@ func NVMeControllerConnect(request *pb.NVMfRemoteController) (*pb.NVMfRemoteCont
return &pb.NVMfRemoteControllerConnectResponse{}, nil
}

// NVMeControllerList lists all the connections to the remote NVMf controller
func NVMeControllerList() (*pb.NVMfRemoteControllerListResponse, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this to some other struct instead of returning the proto messages

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

goopicsi.go Outdated
}

// NVMeControllerGet lists the connection to the remote NVMf controller corresponding to the given ID
func NVMeControllerGet(request *pb.NVMfRemoteControllerGetRequest) (*pb.NVMfRemoteControllerGetResponse, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here as well, Avoid using the proto messages directly on the request and response objects.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Added Get and List RPC

Signed-off-by: harshita Pandey <harshita_pandey@dell.com>

Removing proto messages

Signed-off-by: harshita Pandey <harshita_pandey@dell.com>
@glimchb glimchb merged commit 6f9332a into opiproject:main Nov 14, 2022
return err
}
log.Printf("Connection corresponding to the given ID: %v", response)
return nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should you return some data here ?

@harshitap26 harshitap26 deleted the feature/NVMf_rpc branch November 18, 2022 12:30
@harshitap26 harshitap26 restored the feature/NVMf_rpc branch November 18, 2022 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants