RUGGEDCOM NETCONF
Reference Guide
Chapter 3
NETCONF Sessions
Killing a Session
27
To kill a session, you need to know its
<session-id>
. To determine the
<session-id>
of another session,
attempt to
<lock>
a configuration. If the configuration is already locked by another session, the
<session-id>
for the session is reported in the
<rpc-error>
message received from the unsuccessful
<lock>
attempt.
To kill a session where you know the
<session-id>
, issue the following:
<rpc message-id="2030" mlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<kill-session>
<session-id>1968</session-id>
</kill-session>
</rpc>>>>]]>
The device responds with the following message and kills the session:
<rpc-reply message-id="2030" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>
To kill a session where you do not know the
<session-id>
, first attempt to
<lock>
a configuration. In this
example, we attempt to lock the already locked
<running>
configuration:
<rpc message-id="2040" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<lock>
<target>
<running/>
</target>
</lock>
</rpc>]]>]]>
The device responds with the following:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2040">
<rpc-error>
<error-type>protocol</error-type>
<error-tag>lock-denied</error-tag>
<error-severity>error</error-severity>
<error-info>
<session-id>1968</session-id>
</error-info>
</rpc-error>
</rpc-reply>]]>]]>
Incorporate the
<session-id>
into the
<kill-session>
command:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2041">
<kill-session>
<session-id>1968</session-id>
</kill-session>
</rpc>
The device responds with the following message and kills the specified session:
<rpc-reply message-id="2041" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>
Summary of Contents for RUGGEDCOM MX5000RE
Page 8: ...Table of Contents RUGGEDCOM NETCONF Reference Guide viii ...
Page 12: ...Preface RUGGEDCOM NETCONF Reference Guide xii Customer Support ...
Page 26: ...Chapter 1 Introduction RUGGEDCOM NETCONF Reference Guide 14 Sample Session Editing Data ...
Page 40: ...Chapter 3 NETCONF Sessions RUGGEDCOM NETCONF Reference Guide 28 Killing a Session ...
Page 64: ...Chapter 5 Changing Configuration Data RUGGEDCOM NETCONF Reference Guide 52 Committing Changes ...
Page 148: ...Chapter 8 NETCONF XML Elements RUGGEDCOM NETCONF Reference Guide 136 validate ...