clicon / clixon

YANG-based toolchain including NETCONF and RESTCONF interfaces and an interactive CLI
http://www.clicon.org/
Other
205 stars 69 forks source link

clixon_netconf_ssh_callhome.c #523

Open khromenokroman opened 1 month ago

khromenokroman commented 1 month ago

Hello, in version 5.9.0 it was in test/util clixon_netconf_ssh_call home.c and in 7.0.1 this is not in the documentation https://clixon-docs.readthedocs.io/en/latest/netconf.html it says what should be used

The call home and callhome-client referred to above are implemented by the utility functions: util/clixon_netconf_ssh_callhome and util/clixon_netconf_ssh_callhome_client.

I also looked at the tests test_netconf_ssh_callhome.sh , it is also used in tests there -o ProxyCommand=\"clixon_netconf_ssh_callhome_client

But I don't have it.

can you tell me how I should do it in the end? Need help :))

khromenokroman commented 1 month ago

image I took the latest one available, but when connecting from sending, the request itself is not sent, hello comes and the body itself is not there :((

khromenokroman commented 1 month ago

client

ssh -s -v -l sysadmin -o ProxyUseFdpass=yes -o ProxyCommand="clixon_netconf_ssh_callhome_client -a 10.0.5.7" . netconf < msg
<?xml version="1.0" encoding="UTF-8"?><hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><capabilities><capability>urn:ietf:params:netconf:base:1.1</capability></capabilities></hello>]]>]]><rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><get-config><source><candidate/></source></get-config></rpc>]]>]]>

servet

clixon_netconf_ssh_callhome -c /usr/share/test/clixon/clixon-test.xml -a 10.0.5.7

I do it according to the documentation https://clixon-docs.readthedocs.io/en/latest/netconf.html 10.5 example

olofhagsand commented 1 month ago

the utility functions have moved to https://github.com/clicon/clixon-util

olofhagsand commented 1 month ago

I updated the docs to point to that location.

olofhagsand commented 1 month ago

There is also a regression test here: https://github.com/clicon/clixon/blob/master/test/test_netconf_ssh_callhome.sh You should be able to make it work via that. If you see other problems with the docs, please tell.