Page MenuHomeVyOS Platform

[vyos_config] Remove statements not in config
Needs reporter action, NormalPublicFEATURE REQUEST

Description

SUMMARY
When providing config in brace style it's translated to only 'set' statements. It's then just merged with existing config, but statements not in provided config are not deleted.
It could be good to have option to load fresh full config and delete everything else. Just like Vyos 'load' command do.

Maybe something like 'state: merge [default] or replaced' as can be found in other modules?

ADDITIONAL INFORMATION
We build full config using templates, then send to device to replace old config with new one. Right now we just copy this config and issue 'load' command, but using proper module with diff and report what was really send to device would be definitely more proper way of doing this.

Details

Version
-
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Feature (new functionality)

Event Timeline

syncer triaged this task as Normal priority.Oct 27 2024, 2:36 PM

Checking this and PR190 that claims to address the issues. Preliminary comment on the PR190:

@sever-sever @gaige - I just tested this, and it looks to do what is described - basically, it wipes out the existing configuration and apply what is in the requested config (someone correct me if that is wrong)
I found that SSH & Paramiko Ansible set-up would tend to lose connectivity if ssh and ethernet setting happened not to be in the requested config, which might make the remote system unreachable.

So, if this is what is expected, then the PR can be OK'ed.
I would also suggest changing 'smart' to 'strict', 'rigid', 'explicit', 'enforced' just to give better idea of behavior.
evgmol changed the task status from Open to Needs testing.May 22 2025, 8:13 AM
evgmol changed the task status from Needs testing to Needs reporter action.Aug 24 2025, 8:11 PM