Get the configuration — <get-config>
An example of how to use the <get-config>
RPC to get the configuration information. To get a subset of this information, specify a filter.
You can query the candidate or the running datastore.
In this example, we get the running configuration for the loopback interface named lo
.
<get-config>
RPC.<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
<get-config>
<source>
<running/>
</source>
<filter type="subtree">
<interfaces xmlns="urn:vyatta.com:mgmt:vyatta-interfaces:1">
<loopback xmlns="urn:vyatta.com:mgmt:vyatta-interfaces-loopback:1">
<tagnode>lo</tagnode>
</loopback>
</interfaces>
</filter>
</get-config>
</rpc>
]]>]]>
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
<data>
<interfaces xmlns="urn:vyatta.com:mgmt:vyatta-interfaces:1">
<loopback xmlns="urn:vyatta.com:mgmt:vyatta-interfaces-loopback:1">
<tagnode>lo</tagnode>
<description>Set from NETCONF</description>
</loopback>
</interfaces>
</data>
</rpc-reply>
]]>]]>