cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
601
Views
0
Helpful
2
Replies
previousqna
Contributor

live-status show command execution on Junos

Hi all,

I’m looking for a way to be able to run CLI show commands on JunOs devices, the same way it is supported for cisco-ios (live-status show args…).

Has anyone implemented such a package / NED extension?

1 ACCEPTED SOLUTION

Accepted Solutions
previousqna
Contributor

I’m looking for a way to be able to run CLI show commands on JunOs devices, the same way it is supported for cisco-ios (live-status show args…).

Has anyone implemented such a package / NED extension?

Juniper devices (unfortunately) don't support any live-status branch in their YANG models. Instead they have rpc actions. Check the junos-rpc.yang model for details. These actions may be invoked from the NCS CLI or programmatically. The response is properly populated according to the YANG description. Find the current list of rpc names below.

module junos-rpc {
   namespace "urn:juniper-rpc";
   prefix jrpc;
   rpc clear-bgp-neighbor {
   rpc clear-log {
   rpc file-archive {
   rpc file-compare {
   rpc file-copy {
   rpc file-delete {
   rpc file-get {
   rpc file-list {
   rpc file-put {
   rpc file-rename {
   rpc file-show {
   rpc get-bgp-neighbor-information {
   rpc get-bgp-summary-information {
   rpc get-bridge-instance-information {
   rpc get-bridge-mac-table {
   rpc get-bridge-interface-mac-table {
   rpc get-alarm-information {
   rpc get-chassis-inventory {
   rpc get-environment-information {
   rpc get-environment-re-information {
   rpc get-fpc-information {
   rpc get-pic-detail {
   rpc get-pic-information {
   rpc get-power-usage-information {
   rpc get-interface-information {
   rpc get-l2vpn-connection-information {
   rpc get-route-information {
   rpc get-instance-information {
   rpc get-service-nat-pool-information {
   rpc get-routing-task-replication-state {
   rpc get-snapshot-information {
   rpc get-software-information {
   rpc get-support-information {
   rpc get-system-alarm-information {
   rpc get-system-storage {
   rpc get-system-uptime-information {
   rpc get-system-users-information {
   rpc op-script {
   rpc ping {
   rpc request-package-add {
   rpc request-reboot {
   rpc request-system-storage-cleanup {
   rpc request-snapshot {
   rpc traceroute {

View solution in original post

2 REPLIES 2
previousqna
Contributor

I’m looking for a way to be able to run CLI show commands on JunOs devices, the same way it is supported for cisco-ios (live-status show args…).

Has anyone implemented such a package / NED extension?

Juniper devices (unfortunately) don't support any live-status branch in their YANG models. Instead they have rpc actions. Check the junos-rpc.yang model for details. These actions may be invoked from the NCS CLI or programmatically. The response is properly populated according to the YANG description. Find the current list of rpc names below.

module junos-rpc {
   namespace "urn:juniper-rpc";
   prefix jrpc;
   rpc clear-bgp-neighbor {
   rpc clear-log {
   rpc file-archive {
   rpc file-compare {
   rpc file-copy {
   rpc file-delete {
   rpc file-get {
   rpc file-list {
   rpc file-put {
   rpc file-rename {
   rpc file-show {
   rpc get-bgp-neighbor-information {
   rpc get-bgp-summary-information {
   rpc get-bridge-instance-information {
   rpc get-bridge-mac-table {
   rpc get-bridge-interface-mac-table {
   rpc get-alarm-information {
   rpc get-chassis-inventory {
   rpc get-environment-information {
   rpc get-environment-re-information {
   rpc get-fpc-information {
   rpc get-pic-detail {
   rpc get-pic-information {
   rpc get-power-usage-information {
   rpc get-interface-information {
   rpc get-l2vpn-connection-information {
   rpc get-route-information {
   rpc get-instance-information {
   rpc get-service-nat-pool-information {
   rpc get-routing-task-replication-state {
   rpc get-snapshot-information {
   rpc get-software-information {
   rpc get-support-information {
   rpc get-system-alarm-information {
   rpc get-system-storage {
   rpc get-system-uptime-information {
   rpc get-system-users-information {
   rpc op-script {
   rpc ping {
   rpc request-package-add {
   rpc request-reboot {
   rpc request-system-storage-cleanup {
   rpc request-snapshot {
   rpc traceroute {

View solution in original post

how do we invoke an rpc-call from the CLI or REST with a payload to clear the log?

URI should be: http://{{server}}/api/running/devices/device/mx01/rpc/jrpc:rpc-clear-log/_operations/clear-log

but what's the format of the <filename> in the body to send in the POST.