179
<get>
<filter type='subtree'>
<netconf-state xmlns='urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring'>
<
getType
/>
</netconf-state>
</filter>
</get>
</rpc>
The value for the <
getType
> parameter can be one of the following operations:
•
capabilities
—Retrieves device capabilities.
•
datastores
—Retrieves databases from the device.
•
schemas
—Retrieves the list of the YANG file names from the device.
•
sessions
—Retrieves session information from the device.
•
statistics
—Retrieves NETCONF statistics.
If you do not specify a value for the <
getType
> parameter, the retrieval operation retrieves all
NETCONF information.
The retrieval operation does not support data filtering.
After receiving the NETCONF information retrieval request, the device returns a response in the
following format if the operation is successful:
<?xml version="1.0"?>
<rpc-reply message-id="100"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data>
ALL NETCONF information
</data>
</rpc-reply>
Retrieving YANG file content
YANG files save the NETCONF operations supported by the device. A user can know the supported
operations by retrieving and analyzing the content of YANG files.
YANG files are integrated in the device software and are named in the format of
yang_identifier@yang_version.yang
. You cannot view the YANG file names by executing the
dir
command. For information about how to retrieve the YANG file names, see "
# Copy the following text to the client
to retrieve the YANG file named
:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-schema xmlns='urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring'>
<identifier>syslog-data</identifier>
<version>2015-05-07</version>
<format>yang</format>
</get-schema>
</rpc>
# After receiving the YANG file retrieve request, the device returns a response in the following format
if the operation is successful:
<?xml version="1.0"?>