start a local netconf session
just type at the prompt: {master:0} | netconf Netbox@QFX5100-1-RL102> netconf <!-- No zombies were killed during the creation of this user interface --> <!-- user Netbox, class j-super-user --> <hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <capabilities> <capability>urn:ietf:params:netconf:base:1.0</capability> <capability>urn:ietf:params:netconf:capability:candidate:1.0</capability> <capability>urn:ietf:params:netconf:capability:confirmed-commit:1.0</capability> <capability>urn:ietf:params:netconf:capability:validate:1.0</capability> <capability>urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file</capability> <capability>urn:ietf:params:xml:ns:netconf:base:1.0</capability> <capability>urn:ietf:params:xml:ns:netconf:capability:candidate:1.0</capability> <capability>urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0</capability> <capability>urn:ietf:params:xml:ns:netconf:capability:validate:1.0</capability> <capability>urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file</capability> <capability>urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring</capability> <capability>http://xml.juniper.net/netconf/junos/1.0</capability> <capability>http://xml.juniper.net/dmi/system/1.0</capability> </capabilities> <session-id>5523</session-id> </hello> ]]>]]> |
discover the command | root @SRX300 - 1 -RL102> show chassis hardware detail | display xml rpc <rpc> <get-chassis-inventory> <detail/> </get-chassis-inventory> </rpc> <cli> <banner></banner> </cli> </rpc-reply> |
enter an RPC command, | just paste: <rpc> <get-chassis-inventory> <detail/>< /get-chassis-inventory> </rpc> or rpc command <rpc> <get-chassis-inventory> <detail/> </get-chassis-inventory> </rpc> |
close the session | <close-session/> close session ]]>]]> <close-session/> <!-- netconf error: syntax error, expecting <rpc> --> <!-- session end at 2020-06-24 14:26:07 UTC --> Connection to 172.30.95.177 closed. labuser@saltsackmaster:~/project/ansible/gethw$ |