Terminating another netconf session – H3C Technologies H3C MSR 5600 User Manual

Page 169

Advertising
background image

156

<SessionID>Configuration session ID </SessionID>

<Line>line information</Line>

<UserName>Name of the use creating the session</UserName>

<Since>Time when the session was created</Since>

<LockHeld>Whether the session holds a lock</LockHeld>

</Session>

</get-sessions>

</rpc-reply>

For example, to get NETCONF session information:
# Enter XML view.

<Sysname> xml

# Copy the following message to the client to exchange capabilities with the device.

<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

<capabilities>

<capability>

urn:ietf:params:netconf:base:1.0

</capability>

</capabilities>

</hello>

# Copy the following message to the client to get the current NETCONF session information on the
device.

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

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

<get-sessions/>

</rpc>

If the client receives a message as follows, the operation is successful:

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

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

<get-sessions>

<Session>

<SessionID>1</SessionID>

<Line>vty0</Line>

<UserName></UserName>

<Since>2011-01-05T00:24:57</Since>

<LockHeld>false</LockHeld>

</Session>

</get-sessions>

</rpc-reply>

The output shows an existing NETCONF session with session ID as 1. The login user type is vty0, the login
time is 2011-01-05T00:24:57, and the user does not hold the lock of the configuration.

Terminating another NETCONF session

NETCONF allows one client to terminate the NETCONF session of another client. The client whose

session is terminated returns to user view.

Advertising
This manual is related to the following products: