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

Update success code #345

Merged
merged 8 commits into from
Oct 25, 2024
Merged

Update success code #345

merged 8 commits into from
Oct 25, 2024

Conversation

congwang09
Copy link
Contributor

Relates to: #340

Update the success code. It seems that all the 4xx codes will be propagated from pce.

@YufengXin
Copy link
Collaborator

@congwang09 for successful place_connection, PCE still returns a '200', not '201'

@coveralls
Copy link

coveralls commented Oct 25, 2024

Pull Request Test Coverage Report for Build 11524874793

Details

  • 4 of 9 (44.44%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.04%) to 56.777%

Changes Missing Coverage Covered Lines Changed/Added Lines %
sdx_controller/controllers/l2vpn_controller.py 2 4 50.0%
sdx_controller/handlers/connection_handler.py 2 5 40.0%
Files with Coverage Reduction New Missed Lines %
sdx_controller/controllers/l2vpn_controller.py 1 66.67%
Totals Coverage Status
Change from base Build 11501191846: -0.04%
Covered Lines: 1110
Relevant Lines: 1955

💛 - Coveralls

@congwang09
Copy link
Contributor Author

@congwang09 for successful place_connection, PCE still returns a '200', not '201'

Sounds good. Updated to use generic checking, e.g., 200-299 are all success.

@YufengXin
Copy link
Collaborator

YufengXin commented Oct 25, 2024

@congwang09 Could you also produce 402, 409, 410 codes in connection_handler.py?

  1. When the the traffic_matrix returned from pce is Noe, return code 402.
  2. When the solution returned from the pce solver is none, it should return a 410
  3. pce.generate_connection_breakdown() now raises exceptions w/ error code (now 409), when you catch it, pls return it.

Now they all return 400.

400 is returned when the body is not proper json, returned by Swagger already.

@congwang09 congwang09 merged commit 8730520 into main Oct 25, 2024
11 checks passed
@congwang09 congwang09 deleted the update-code branch October 25, 2024 20:26
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