11-07-2019 02:29 AM
Hi,
we are trying to use Rpc request-shell-execute in ned juniper-junos 4.2.1.
This Rpc emulates the execution of a cli command in juniper shell.
For example
cli show configuration vlans VLAN-755
returns
description PROVA_INTERNAL;
vlan-id 755;
My question is about concatenation of commands through "|"
for example
cli show configuration | display set |match VLAN-755
returns
display: Command not found.
match: Command not found.
cli: remote side unexpectedly closed connection
Is there a way to fire concatenated commands though this RPC?
Thanks in advance,
Giuseppe
Solved! Go to Solution.
03-17-2021 10:29 AM
Please issue a TAC ticket and the NED developer will add the missing commands. This is typical work on NEDs. In particular, remember that Juniper original API was based on NETCONF but not YANG. So, we need to semi-automatically translate from the Juniper proprietary XSD to YANG and that is done by the NED team.
05-28-2020 07:14 AM
Escape character '\' needs to be added to any special character in the command like below:
cli show configuration \| display set \|match VLAN-755
06-03-2020 03:22 PM
There is an example in the NED README file:
admin@ncs# devices device mx960-1 rpc rpc-request-shell-execute request-shell-execute command "cli request unified-edge sgw call-trace show brief \| display json"
In your case, that woudl translate to:
admin@ncs# devices device mx960-1 rpc rpc-request-shell-execute request-shell-execute command "cli show configuration \| display set \| match VLAN-755"
03-04-2021 03:55 PM
Hi Roque
I'm read your post and i've similar question
I want configure this command on Junos Device
set interface xe-5/0/1 unit 4017 family pppoe dynamic-profile FTTH-profile
At this time, my NED version not supported this command; as you can see, after family section there isn't a pppoe section
nso@ncs(config)# devices device OPM-RGJIT001 config junos:configuration interfaces interface xe-1/2/0 unit 4017 family ? Possible completions: any Parameters for 'any' family apply-groups apply-groups-except apply-macro bridge Layer-2 bridging parameters ccc Circuit cross-connect parameters ethernet-switching Ethernet switching parameters fibre-channel Fibre channel switching parameters inet IPv4 parameters inet6 IPv6 protocol parameters iso OSI ISO protocol parameters mlfr-end-to-end Multilink Frame Relay end-to-end protocol parameters mlfr-uni-nni Multilink Frame Relay UNI NNI protocol parameters mlppp Multilink PPP protocol parameters mpls MPLS protocol parameters tcc Translational cross-connect parameters vpls Virtual private LAN service parameters
So, I try to use rpc request-shell command
devices device OPM-RGJIT001 rpc rpc-request-shell-execute request-shell-execute command "cli edit private\nset interfaces xe-1/2/0 unit 4017 family pppoe dynamic-profile FTTH-profile \ncommit and-quit" nso@ncs# devices device OPM-RGJIT001 rpc rpc-request-shell-execute request-shell-execute command "cli edit private\nset interfaces xe-1/2/0 unit 4018 family pppoe dynamic-profile RESIDENTIAL-NGN2-FTTH\n commit and-quit" output Entering configuration mode set: Variable name must contain alphanumeric characters. commit: Command not found.
I try to use "\" first minus simbol or number without success.
Do you have any idea to solve this issue?
thanks for you support
Bye
Maurizio
03-17-2021 10:29 AM
Please issue a TAC ticket and the NED developer will add the missing commands. This is typical work on NEDs. In particular, remember that Juniper original API was based on NETCONF but not YANG. So, we need to semi-automatically translate from the Juniper proprietary XSD to YANG and that is done by the NED team.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide