-
Notifications
You must be signed in to change notification settings - Fork 473
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 plugin support for goss #578
Comments
Adding plugin support would be really beneficial to goss. So when you say it's passed in through
And the yaml (using your script for example): plugin:
ethtool-plugin:
eth0:
is-virtual: true
is-bond: true |
Yes. What you describe is better. |
Ok, so here's some thoughts I have on this.
This doesn't match the pattern of the other tests and would need to change to be consistent (for merging and other reasons). plugin:
ethtool-plugin:
eth0:
is-virtual: true To: plugin:
eth0:
plugin_type: ethtool-plugin
is-virtual: true
With those two features it will be possible to do the following: command:
eth0:
# using echo as an example, this would need to be a script that dumps info in json format:
# ex: ./ethotool_plugin.sh json-dump eth0
exec: |
echo '{"is-bound": true, "is-virtual": false, "info": {"mac": "xxx"}}'
exit-status: 0
stdout:
and:
- jmespath: is-bound
matches: true
- jmespath: is-virtual
matches: true
- jmespath: info.mac
matches: xxx
timeout: 10000 I would love to get the community feedback on 1 and 2.. Some high level differences I can think of:
Cons:
Pros/cons of 2:
Cons:
Would love your thoughts on this. Same with @pedroMMM, @donmstewart and anyone else interested in plugin support |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
#576 adds a |
Describe the feature:
Sometimes, we want to use some 3rd tools (like ethotool and demicode) to do some test. On current stage we can use Command to test. But I think it's better to implement plugins so that user can define their own test method.
Describe the solution you'd like
./plugin name
will output plugin's name./plugin options
will output a list with plugin's options for goss to call. Like a ethtool plugin should outputspeed, is-bond, is-virtual
etc./plugin test-method test-target
will output the test result. E.g: ethtool plugin,./ethotool_plugin.sh is-virtual etho0
will output true./plugin name
and./plugin options
output.Describe alternatives you've considered
For the implement of plugins, I have an idea. I use python to explain the code logic. We can talk about the implement and then I can create a new PR for this.
The text was updated successfully, but these errors were encountered: