146
NETCONF message format
NETCONF
All NETCONF messages are XML-based and comply with RFC 4741. Any incoming NETCONF
messages must pass XML Schema check before it can be processed. If a NETCONF message fails
XML Schema check, the device sends an error message to the client.
For information about the NETCONF operations supported by the device and the operable data, see
the NETCONF XML API reference for the device.
The following example shows a NETCONF message for getting all parameters of all interfaces on
the device:
<?xml version="1.0" encoding="utf-8"?>
<rpc message-id ="100" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-bulk>
<filter type="subtree">
<top xmlns="http://www.hp.com/netconf/data:1.0">
<Ifmgr>
<Interfaces>
<Interface/>
</Interfaces>
</Ifmgr>
</top>
</filter>
</get-bulk>
</rpc>
NETCONF over SOAP
All NETCONF over SOAP messages are XML-based and comply with RFC 4741. NETCONF
messages are contained in the <Body> element of SOAP messages. NETCONF over SOAP
messages also comply with the following rules:
•
SOAP messages must use the SOAP Envelope namespaces.
•
SOAP messages must use the SOAP Encoding namespaces.
•
SOAP messages cannot contain the following information:
DTD reference.
XML processing instructions.
The following example shows a NETCONF over SOAP message for getting all parameters of all
interfaces on the device:
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header>
<auth:Authentication env:mustUnderstand="1"
xmlns:auth="http://www.hp.com/netconf/base:1.0">
<auth:AuthInfo>800207F0120020C</auth:AuthInfo>
</auth:Authentication>
</env:Header>
<env:Body>
<rpc message-id ="100" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-bulk>
<filter type="subtree">
<top xmlns="http://www.hp.com/netconf/data:1.0">