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
refactor(orc8r): move GetControlProxy to tenants #12827
refactor(orc8r): move GetControlProxy to tenants #12827
Conversation
Thanks for opening a PR! 💯
Howto
More infoPlease take a moment to read through the Magma project's
If this is your first Magma PR, also consider reading
|
d2e5105
to
dd75928
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, just some nitpicking.
orc8r/cloud/go/services/bootstrapper/servicers/registration/registration.go
Show resolved
Hide resolved
orc8r/cloud/go/services/tenants/servicers/protected/servicer_test.go
Outdated
Show resolved
Hide resolved
orc8r/cloud/go/services/tenants/servicers/protected/servicer_test.go
Outdated
Show resolved
Hide resolved
orc8r/cloud/go/services/tenants/servicers/protected/servicer_test.go
Outdated
Show resolved
Hide resolved
orc8r/cloud/go/services/tenants/servicers/protected/servicer_test.go
Outdated
Show resolved
Hide resolved
dd75928
to
1c81c47
Compare
f46066b
to
5e29472
Compare
e0b0aa4
to
0efaad6
Compare
if n == request.GetNetworkID() { | ||
tenantID = t.Id | ||
isTenantFound = true | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am never sure how a break
that is in two nested loops behaves. Can you make that clearer here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the loops into a separate function to resolve this issue.
0efaad6
to
418ece8
Compare
418ece8
to
75b5ea1
Compare
Create a function `GetControlProxyFromNetworkID` in tenants to take over the functionality of `GetControlProxy` in registration. Create the corresponding tests in tenants and adjust the tests in registration to use the proper service calls. Signed-off-by: Sebastian Wolf <sebastian.wolf@tngtech.com>
75b5ea1
to
6323fa6
Compare
Create a function `GetControlProxyFromNetworkID` in tenants to take over the functionality of `GetControlProxy` in registration. Create the corresponding tests in tenants and adjust the tests in registration to use the proper service calls. Signed-off-by: Sebastian Wolf <sebastian.wolf@tngtech.com>
Signed-off-by: Sebastian Wolf sebastian.wolf@tngtech.com
Summary
Create a function
GetControlProxyFromNetworkID
in tenants to take overthe functionality of
GetControlProxy
in registration. Create the correspondingtests in tenants and adjust the tests in registration to use the proper service calls.
Test Plan
Perform unit tests.
Additional Information
Created in pairing with @MoritzThomasHuebner and @sebathomas