vpp-agent
vpp-agent copied to clipboard
Support for 3rd party configuration models in Agentctl
This issue is basically a more general and scope-wider version of issue #1740.
Problem
For some agentctl commands to work properly, all the configuration models that the VPP-Agent is using must be known to agentctl. This is not the case for some agentctl commands. They depend on the configurator.Config
that holds only the configuration models defined in the VPP-Agent repository. This is not a problem when no additional configuration models are needed, but it might be a problem when VPP-Agent is used as a base code (a framework to build custom agents) in other projects that extend the configuration with additional models (properly registered to models package). These '3rd party' configuration models are missed out from consideration when some agentctl commands are executed.
Here is the list of agentctl commands that use configurator.Config
at the moment:
-
agentctl config delete
-
agentctl config retrieve
-
agentctl config watch
-
agentctl report
- list of affected report files inside report zip file:-
agent-NB-config.yaml
-
vpp-running-config(vpp-agent-SB-dump).yaml
-
These command currently not provide support for 3rd party models.
Solution (WIP)
The support for 3rd party models has been already added for commands:
- [x]
agentctl config get
- #1754 - [x]
agentctl config update
- #1754
And similar approach could also be used for commands:
- [ ]
agentctl config delete
- this could reuse the implementation done for update, since the delete inconfigurator.Config
is basically same as for update - [ ]
agentctl report
'sagent-NB-config.yaml
- this is justagentctl config get
functionality
The proper solution for other agentctl commands is currently not certain and open for discussion.
- [ ]
agentctl config retrieve
- TBD... ❔ - [ ]
agentctl config watch
- TBD... ❔
Any anticipated changes to agentctl front-end? Or no change, performed under the covers?
Any anticipated changes to agentctl front-end? Or no change, performed under the covers?
@chrismetz09 in PR https://github.com/ligato/vpp-agent/pull/1754 i wanted to do the changes under the cover. I didn't want to break anything for existing agentctl users. However, by changing the inner components i get to state when some agentctl command arguments just changed (newly used inner component just didn't support it). I expect that also the other not-yet implemented agentctl changes should be under the cover (if it is possible).
@fgschwan, sounds good. Agentctl docs up-to-date. Let's add example of 3rd party yaml to include in agentctl doc enhancements