Example For Subscribing To Event Notifications - HP 5920 Configuration Manual

Table of Contents

Advertisement

The <severity> parameter represents the severity level of the event.
The <start-time> parameter represents the start time of the subscription.
The <stop-time> argument represents the end time of the subscription.
After receiving the subscription request from the client, the device returns a response in the following
format if the subscription is successful:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101" xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply >
If the subscription fails, the device returns an error message in the following format:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<rpc-error>
<error-type>error-type</error-type>
<error-tag>error-tag</error-tag>
<error-severity>error-severity</error-severity>
<error-message xml:lang="en">error-message</error-message>
</rpc-error>
</rpc-reply>
For more information about error messages, see RFC 4741.

Example for subscribing to event notifications

Network requirements
Configure a client to subscribe to all events with no time limitation. After the subscription is successful, all
events on the device are sent to the client before the session between the device and client is terminated.
Configuration procedure
# Enter XML view.
<Sysname> xml
# Exchange capabilities.
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>
</capability>
</capabilities>
</hello>
# Subscribe to all events with no time limitation.
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<create-subscription xmlns ="urn:ietf:params:xml:ns:netconf:notification:1.0">
<stream>NETCONF</stream>
</create-subscription>
</rpc>
urn:ietf:params:netconf:base:1.0
246

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

5900

Table of Contents