Subscription procedure – H3C Technologies H3C MSR 5600 User Manual

Page 147

Advertising
background image

134

Subscription procedure

# Copy the following message to the client to complete the subscription:

<?xml version="1.0" encoding="UTF-8"?>

<rpc message-id="101" xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0">

<create-subscription xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">

<stream>NETCONF</stream>

<filter>

<event xmlns="http://www.h3c.com/netconf/event:1.0">

<Code>code</Code>

<Group>group</Group>

<Severity>severity</Severity>

</event>

</filter>

<startTime>start-time</startTime>

<stopTime>stop-time</stopTime>

</create-subscription>

</rpc>

Where:

The <stream> parameter represents the event stream type supported by the device. Only
NETCONF is supported.

The <event> parameter represents an event that you have subscribed to. For more information
about events you can subscribe to and the XML representation of the event variables, see the XSD
document that H3C provides. If events do not comply with the XSD document, the device reports

errors to the client. For more information about the error type, tag, severity, and description, see RFC

4741 and RFC 5277.

The <code> parameter represents a mnemonic symbol.

The <group> parameter represents the module name.

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 xmlns=

"urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101"><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>

Advertising
This manual is related to the following products: