-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add parameter mapping feature #820
Labels
core-only
This issue is reserved for the IF core team only
Milestone
Comments
@manushak @narekhovhannisyan please review ac to confirm you're ok with it |
Merged
9 tasks
caution, this contains breaking changes. review needed from @narekhovhannisyan and @jmcook1186 |
need to update unit tests for plugins |
the current solution causes breaking changes for plugin, so we are changing the function to be backwards compatible (work also without mappings) |
@narekhovhannisyan @jmcook1186 please review 🙏 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why: Sub of #761 - so that we can automatically add the return values of one plugin to the inputs array under the name required by another plugin
What: Build a feature in IF that maps a parameter that is present in the
input
data to a new name that is expected by a particular plugin. For example, let's say a hypothetical plugin,myPlugin
expects to seecpu/util
in theinputs
array. That p[recise parametr is not available in the array, but the precise same information is available with thecpu-utilization
name. In this case, we want to use themapping
feature to pass the value ofcpu-utilization
tomyPlugin
ascpu/util
.The configuration for this should be done in the manifest, in the initialization bock for each plugin, for example:
In this case,
my-plugin
, which expects to seecpu/util
will understand that it should use thecpu-utilization
values rather than throwing an error becausecpu/util
is not available.Scope of work:
Acceptance criteria
mapping
feature allows re-keying data in theinputs
array for the purpose of executing an individual pluginGIVEN the feature is implemented
WHEN I run the following manifest:
THEN IF should map the available
energy-from-cpu
andenergy-from-network
values to the expectedcpu/energy
andnetwork/energy
values and correctly execute thesum
plugin, yielding the following manifest:This behaviour should generalize to any plugin.
The text was updated successfully, but these errors were encountered: