In the current http middle layer, authed and unauthed adapters are not
returning the same type of result. This causes the CLI having a hard
time to unified the display.
This change added data layer to provide identical response for
both authed and unauthed http adapters.
Also removed the code in unauth adapter that tries raise http exception,
align with authed adapter.
Fixed incorrect logic in check_rc function.
TCs:
authed and unauthed GET, POST and DELETE requests return identical
response.
Closes-Bug: 2064178
Change-Id: Ie8ba810bddeaa91c0b271fbf238ce59853f1169e
Signed-off-by: Bin Qian <email address hidden>
Reviewed: https:/ /review. opendev. org/c/starlingx /update/ +/918057 /opendev. org/starlingx/ update/ commit/ 3398b1a9c0d32f1 e6053c4f90b9ff8 5e4c39926d
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 3398b1a9c0d32f1 e6053c4f90b9ff8 5e4c39926d
Author: Bin Qian <email address hidden>
Date: Mon Apr 29 21:37:12 2024 +0000
Fix non-auth request shows incorrect message
In the current http middle layer, authed and unauthed adapters are not
returning the same type of result. This causes the CLI having a hard
time to unified the display.
This change added data layer to provide identical response for
both authed and unauthed http adapters.
Also removed the code in unauth adapter that tries raise http exception,
align with authed adapter.
Fixed incorrect logic in check_rc function.
TCs:
authed and unauthed GET, POST and DELETE requests return identical
response.
Closes-Bug: 2064178
Change-Id: Ie8ba810bddeaa9 1c0b271fbf238ce 59853f1169e
Signed-off-by: Bin Qian <email address hidden>