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.
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
feat(client_cli): Integrating CLI API to set and retrieve parameters. #4961
base: main
Are you sure you want to change the base?
feat(client_cli): Integrating CLI API to set and retrieve parameters. #4961
Changes from all commits
4b9c479
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
So the first thing is here, I tried to replicate this from another commit, but I'm stuck on how to get the specific parameters that are in
ParamCmd
. I'd like some suggestion on that.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.
client::parameter::all()
returnsParameters
, which has all the parameters as fields. No need to filter here. You need to mapParamCmd
to the correct field inParameters
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.
You will also need to make a version of
ParamCmd
and its nested types without thevalue
field for this.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.
@nxsaken I would need to duplicate it again? That seems weird. Maybe
ParamCmd
could be refactored for the better?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.
And similarly, how do we exactly take the parameters from the hierarchy we have and actually set them? I believe we need to use
SetParameter
fromdata_model::parameter
, but don't know how to go further on it.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.
SetParameter
is anInstruction
, which can be submitted to an IrohaClient
. You need to turnself
into aSetParameter
here, and then callsubmit
(defined in this file).