-
Notifications
You must be signed in to change notification settings - Fork 1
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
CASMCMS-9225: Move PCS client to new paradigm #400
Open
mharding-hpe
wants to merge
3
commits into
casmcms-9225-04-operator-api-client
Choose a base branch
from
casmcms-9225-05-pcs-client
base: casmcms-9225-04-operator-api-client
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
CASMCMS-9225: Move PCS client to new paradigm #400
mharding-hpe
wants to merge
3
commits into
casmcms-9225-04-operator-api-client
from
casmcms-9225-05-pcs-client
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mharding-hpe
requested review from
jsl-hpe,
jsollom-hpe,
rbak-hpe and
kumarrahul04
December 17, 2024 18:15
mharding-hpe
force-pushed
the
casmcms-9225-04-operator-api-client
branch
from
December 17, 2024 18:43
5a78d91
to
3feee62
Compare
mharding-hpe
force-pushed
the
casmcms-9225-05-pcs-client
branch
from
December 17, 2024 18:43
5351949
to
aeb4dd8
Compare
kumarrahul04
approved these changes
Dec 17, 2024
mharding-hpe
force-pushed
the
casmcms-9225-04-operator-api-client
branch
from
December 17, 2024 19:14
3feee62
to
c5e73d6
Compare
mharding-hpe
force-pushed
the
casmcms-9225-05-pcs-client
branch
from
December 17, 2024 19:14
aeb4dd8
to
5d71e51
Compare
This was referenced Dec 17, 2024
mharding-hpe
force-pushed
the
casmcms-9225-04-operator-api-client
branch
from
December 17, 2024 21:18
c5e73d6
to
cca42de
Compare
mharding-hpe
force-pushed
the
casmcms-9225-05-pcs-client
branch
from
December 17, 2024 21:18
e27ac01
to
4b47029
Compare
mharding-hpe
force-pushed
the
casmcms-9225-04-operator-api-client
branch
from
December 17, 2024 23:26
cca42de
to
76cf404
Compare
mharding-hpe
force-pushed
the
casmcms-9225-05-pcs-client
branch
from
December 17, 2024 23:27
4b47029
to
b9df182
Compare
This was referenced Dec 18, 2024
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
BasePcsEndpoint
class is the base class for all PCS endpoints. Because it is a subclass ofBaseEndpoint
, it means that it will return the JSON bodies from the request responses. We create a custom error handler class (PcsRequestErrorHandler
) to make this new version of the PCS client match the existing PCS client behavior. Namely, it re-raises exceptions asPowerControlException
s.There are two PCS endpoints --
PowerStatusEndpoint
andTransitionsEndpoint
. The functions defined for the previous PCS client have been moved into one of these endpoints. They function the same way they did before, except that they use the endpoint class methods for the API calls they make, and they no longer need to worry about any of the exception handling. When reviewing these functions, I will likely defer changes based on issues that already existed in the functions in the original PCS client, unless they are serious or have become more serious as a consequence of this changeover.The
PCSClient
class wraps up the two PCS endpoints as a client. The base BOS operator code is updated so that this client is included in itsApiClients
class. The BOS operators which use the PCS client are updated to now use it via theApiClients
class.