Vyatta Network OS Documentation

Learn how to install, configure and operate the Vyatta NOS, which helps drive our virtual networking & physical platforms portfolio.

Run a YANG RPC

An example of how to use custom RPCs defined in the Vyatta NOS YANG modules. These typically execute a procedure on Vyatta NOS, with optional return of output.

You can use these in exactly the same way as in standard NETCONF operations like get and edit-config, for example.

Note: These custom RPCs are at the same level in a NETCONF message as get, edit-config and similar RPCs. So, you must enclose them within the generic NETCONF <rpc> tag in the same way.
In this example we use the <ping> RPC.
Use the <ping> RPC.
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <ping xmlns="urn:vyatta.com:mgmt:vyatta-op:1">
    <host>1.1.1.1</host>
    <count>4</count>
  </ping>
</rpc>
]]>]]>
A typical reply:
<?xml version="1.0"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <tx-packet-count xmlns="urn:vyatta.com:mgmt:vyatta-op:1">4</tx-packet-count>
  <min-delay xmlns="urn:vyatta.com:mgmt:vyatta-op:1">22</min-delay>
  <max-delay xmlns="urn:vyatta.com:mgmt:vyatta-op:1">24</max-delay>
  <rx-packet-count xmlns="urn:vyatta.com:mgmt:vyatta-op:1">4</rx-packet-count>
  <average-delay xmlns="urn:vyatta.com:mgmt:vyatta-op:1">23</average-delay>
</rpc-reply>
]]>]]>