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.
get
, edit-config
and similar RPCs. So, you must enclose them within the generic NETCONF <rpc>
tag in the same way.<ping>
RPC.<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>
]]>]]>
<?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>
]]>]]>