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

refactor(orc8r): move GetControlProxy to tenants #12827

Conversation

wolfseb
Copy link
Contributor

@wolfseb wolfseb commented May 24, 2022

Signed-off-by: Sebastian Wolf sebastian.wolf@tngtech.com

Summary

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.

Test Plan

Perform unit tests.

Additional Information

Created in pairing with @MoritzThomasHuebner and @sebathomas

  • This change is backwards-breaking

@pull-request-size pull-request-size bot added the size/L Denotes a Pull Request that changes 100-499 lines. label May 24, 2022
@github-actions
Copy link
Contributor

Thanks for opening a PR! 💯

A couple initial guidelines

Howto

  • Reviews. The "Reviewers" listed for this PR are the Magma maintainers who will shepherd it.
  • Checks. All required CI checks must pass before merge.
  • Merge. Once approved and passing CI checks, use the ready2merge label to indicate the maintainers can merge your PR.

More info

Please take a moment to read through the Magma project's

If this is your first Magma PR, also consider reading

@github-actions github-actions bot added the component: orc8r Orchestrator-related issue label May 24, 2022
@github-actions
Copy link
Contributor

github-actions bot commented May 24, 2022

feg-workflow

    2 files  202 suites   38s ⏱️
371 tests 371 ✔️ 0 💤 0
385 runs  385 ✔️ 0 💤 0

Results for commit 6323fa6.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented May 24, 2022

dp-workflow

18 tests   18 ✔️  4m 17s ⏱️
  2 suites    0 💤
  2 files      0

Results for commit 6323fa6.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented May 24, 2022

cloud-workflow

979 tests   979 ✔️  2m 17s ⏱️
355 suites      0 💤
    7 files        0

Results for commit 6323fa6.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented May 24, 2022

agw-workflow

     77 files     122 suites   7m 8s ⏱️
1 151 tests 1 147 ✔️ 4 💤 0
1 152 runs  1 148 ✔️ 4 💤 0

Results for commit 6323fa6.

♻️ This comment has been updated with latest results.

@wolfseb wolfseb force-pushed the move_control_proxy_from_networkid_to_tenants branch 8 times, most recently from d2e5105 to dd75928 Compare May 25, 2022 06:56
Copy link
Contributor

@sebathomas sebathomas left a 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.

@wolfseb wolfseb force-pushed the move_control_proxy_from_networkid_to_tenants branch from dd75928 to 1c81c47 Compare May 25, 2022 08:01
@wolfseb wolfseb marked this pull request as ready for review May 25, 2022 09:02
@wolfseb wolfseb requested review from a team and emakeev May 25, 2022 09:02
@wolfseb wolfseb force-pushed the move_control_proxy_from_networkid_to_tenants branch 3 times, most recently from f46066b to 5e29472 Compare May 29, 2022 23:26
@wolfseb wolfseb force-pushed the move_control_proxy_from_networkid_to_tenants branch 4 times, most recently from e0b0aa4 to 0efaad6 Compare June 7, 2022 02:35
if n == request.GetNetworkID() {
tenantID = t.Id
isTenantFound = true
break
Copy link
Member

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?

Copy link
Contributor Author

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.

@wolfseb wolfseb force-pushed the move_control_proxy_from_networkid_to_tenants branch from 0efaad6 to 418ece8 Compare June 7, 2022 05:42
@wolfseb wolfseb force-pushed the move_control_proxy_from_networkid_to_tenants branch from 418ece8 to 75b5ea1 Compare June 7, 2022 06:38
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>
@wolfseb wolfseb force-pushed the move_control_proxy_from_networkid_to_tenants branch from 75b5ea1 to 6323fa6 Compare June 9, 2022 00:58
@sebathomas sebathomas merged commit e86a603 into magma:master Jun 9, 2022
emakeev pushed a commit to emakeev/magma that referenced this pull request Aug 5, 2022
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: orc8r Orchestrator-related issue size/L Denotes a Pull Request that changes 100-499 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants