Skip to content

Conversation

@jestabro
Copy link
Contributor

@jestabro jestabro commented Nov 21, 2025

Change summary

NOTE: this requires the following PRs and an update to libvyosconfig/Makefile commit hashes before merge; until then, integration test will fail with missing executable.
vyos/vyos1x-config#57
vyos/vyconf#36
vyos/vyatta-cfg#114

Add the executable vyconf_cli_compat for replacement of cli-shell-api calls in bash completion and shell functions. The related PRs implement the edit-level operations. An example is given below. Although a simple extension on the face of it, this will allow for the remaining integration of vyconf with the CLI.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe): vyconf integration with CLI

Related Task(s)

Related PR(s)

vyos/vyos1x-config#57
vyos/vyconf#36
vyos/vyatta-cfg#114

How to test / Smoketest result

Note that the options validateTmplPath/getCompletionEnv will be implemented in a separate PR, hence completion at edit level is not yet available under the vyconf backend. Otherwise, behavior is reproduced under vyconf:

Current behavior:

vyos@vyos:~$ config
[edit]
vyos@vyos# edit interfaces ethernet
The "edit" command cannot be issued at the specified level
[edit]
vyos@vyos# edit interfaces ethernet eth3
[edit interfaces ethernet eth3]
vyos@vyos# set description 'baz'
[edit interfaces ethernet eth3]
vyos@vyos# show
+description baz
 hw-id 52:54:00:fc:e5:4c
 offload {
     gro
     gso
     sg
     tso
 }
[edit interfaces ethernet eth3]
vyos@vyos# exit
[edit]
vyos@vyos# exit
Cannot exit: configuration modified.
Use 'exit discard' to discard the changes and exit.
[edit]
vyos@vyos# exit discard
exit
vyos@vyos:~$

Under vyconf backend:

vyos@vyos:~$ sudo /usr/libexec/vyos/set_vyconf_backend.py
This will enable the vyconf backend for testing. Proceed? [y/N] y
vyos@vyos:~$ config
[edit]
vyos@vyos# edit interfaces ethernet
the "edit" command cannot be issued at the level of tag node
[edit]
vyos@vyos# edit interfaces ethernet eth3
[edit interfaces ethernet eth3]
vyos@vyos# set description 'baz'
[edit interfaces ethernet eth3]
vyos@vyos# show
+description "baz"
 hw-id "52:54:00:fc:e5:4c"
 offload {
     gro
     gso
     sg
     tso
 }

[edit interfaces ethernet eth3]
vyos@vyos# exit
[edit]
vyos@vyos# exit
Cannot exit: configuration modified.
Use 'exit discard' to discard the changes and exit.
[edit]
vyos@vyos# exit discard
exit
vyos@vyos:~$

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

For integration with CLI completion and shell internal functions, use
vyconf_cli_compat for replacing needed calls of cli-shell-api.
@jestabro jestabro self-assigned this Nov 21, 2025
@github-actions
Copy link

github-actions bot commented Nov 21, 2025

👍
No issues in PR Title / Commit Title

@github-actions
Copy link

CI integration ❌ failed!

Details

CI logs

  • CLI Smoketests (no interfaces) ❌ failed
  • CLI Smoketests VPP ❌ failed
  • CLI Smoketests (interfaces only) ❌ failed
  • Config tests ❌ failed
  • Config tests VPP ❌ failed
  • RAID1 tests ❌ failed
  • TPM tests ❌ failed

Copy link
Member

@c-po c-po left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary changes to vyconf for moving forward. Code untested - I trust @jestabro judgement and manual tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants