Skip to content
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

information output #502

Open
khromenokroman opened this issue Mar 14, 2024 · 1 comment
Open

information output #502

khromenokroman opened this issue Mar 14, 2024 · 1 comment
Labels

Comments

@khromenokroman
Copy link

khromenokroman commented Mar 14, 2024

Good afternoon

now it looks like this

set system conf-order 0
set system conf-order 0 script interfaces
set system conf-order 1
set system conf-order 1 script arp_table
set system conf-order 2
set system conf-order 2 script arp_aging
set system conf-order 3
set system conf-order 3 script static_routes
set system conf-order 4
set system conf-order 4 script static_routes

is it possible to remove the first lines with numbers using the compress function

@olofhagsand
Copy link
Member

Are you referring to "the compress function" with the compress rules as described here: https://clixon-docs.readthedocs.io/en/latest/cli.html#compress-rules?
Also, I guess what you want to achieve is replacing eg:

  set system conf-order 0
  set system conf-order 0 script interfaces

with simply:

set system conf-order 0 script interfaces

If so, I would say no, since the compress rules are an effort to remove intermediate syntax.
For example, if you wanted to remove the "script" keyword in the output syntax, you could create such a compress rule.

The reason why the extra line is there has to do with how the xml2cli output function is written:

cli2file(clixon_handle h,

with some extra complexity one could skip that extra printed line.
Again I am not sure this was actually your question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants