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

"show compare" and "show compare | display cli" differs #23

Closed
krihal opened this issue Aug 11, 2023 · 3 comments
Closed

"show compare" and "show compare | display cli" differs #23

krihal opened this issue Aug 11, 2023 · 3 comments
Assignees
Labels
bug Something isn't working fixed: plz verify Bug/feature is fixed by developer, need verification

Comments

@krihal
Copy link
Collaborator

krihal commented Aug 11, 2023

debian@khn-dev> show compare
debian@khn-dev>

And:

debian@khn-dev> show compare | display cli
set devices device crpd1
set devices device crpd1 enabled true
set devices device crpd1 conn-type NETCONF_SSH
set devices device crpd1 user admin
set devices device crpd1 addr 172.40.0.2
set devices device crpd1 config
set devices device crpd1
set devices device crpd1 enabled true
set devices device crpd1 conn-type NETCONF_SSH
set devices device crpd1 user admin
set devices device crpd1 addr 172.40.0.2
set devices device crpd1 config
@krihal krihal added the bug Something isn't working label Aug 11, 2023
@olofhagsand
Copy link
Member

The reason is that compare_dbs uses fork/exec as well, and then the output pipes do not work.
compare_dbs() can be rewritten using xml_tree_diff_print()

olofhagsand added a commit to clicon/clixon that referenced this issue Sep 22, 2023
Improved diff algorithm for XML and TEXT/curly, replaced UNIX diff with structural in-mem algorithm
Fixed: ["show compare" and "show compare | display cli" differs #23](clicon/clixon-controller#23)
Changed parameters of example clispec function `compare_dbs()`
Added show2cbuf functions for TEXT/CLI
Renamed clixon_txt2file to clixon_text2file
@olofhagsand olofhagsand added the fixed: plz verify Bug/feature is fixed by developer, need verification label Sep 22, 2023
@olofhagsand olofhagsand assigned krihal and unassigned olofhagsand Sep 22, 2023
@olofhagsand
Copy link
Member

Reworked the show compare for xml and text (well beyond the aim of the issue req)

@krihal
Copy link
Collaborator Author

krihal commented Sep 23, 2023

Verified.

@krihal krihal closed this as completed Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed: plz verify Bug/feature is fixed by developer, need verification
Projects
None yet
Development

No branches or pull requests

2 participants