
RUGGEDCOM NETCONF
Reference Guide
Chapter 5
Changing Configuration Data
Locking Data Stores
43
This section describes how to lock the datastores, edit and delete data, validate the configuration, commit the
changes, and lock the datastores.
For instructions on how to initiate a NETCONF session, refer to
Section 3.2, “Connecting to the NETCONF Service”
For instructions on how to close a NETCONF session, refer to
Section 3.4, “Closing the Session”
.
CONTENTS
•
Section 5.2.1, “Locking Data Stores”
•
•
Section 5.2.3, “Replacing Data”
•
Section 5.2.4, “Deleting Data”
•
Section 5.2.5, “Validating Changes”
•
Section 5.2.6, “Committing Changes”
Section 5.2.1
Locking Data Stores
To lock the candidate and running datastores, do the following:
1. Issue an
<rpc>
request to lock the running configuration:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1010">
<lock>
<target>
<running/>
</target>
</lock>
</rpc>
]]>]]>
• All commands must be enclosed within
<rpc>
tags. The
message-id
attribute is not required but is
recommended. The
message-id
attribute is returned in the device response, allowing you to match
responses with requests.
• The
<lock>
element indicates that this request is to lock a configuration.
• The
<target>
element specifies the configuration to lock. In this
<rpc>
, the lock target is the
<running>
configuration.
• The
]]>]]>
string indicates the end of the NETCONF message. Each NETCONF message must end with
]]>]]>
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="1010">
<ok/>
</rpc-reply>]]>]]>
The running configuration is now locked
2. Issue an
<rpc>
request to lock the candidate configuration:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1011">
<lock>
<target>
<candidate/>
Содержание RUGGEDCOM MX5000RE
Страница 8: ...Table of Contents RUGGEDCOM NETCONF Reference Guide viii ...
Страница 12: ...Preface RUGGEDCOM NETCONF Reference Guide xii Customer Support ...
Страница 26: ...Chapter 1 Introduction RUGGEDCOM NETCONF Reference Guide 14 Sample Session Editing Data ...
Страница 40: ...Chapter 3 NETCONF Sessions RUGGEDCOM NETCONF Reference Guide 28 Killing a Session ...
Страница 64: ...Chapter 5 Changing Configuration Data RUGGEDCOM NETCONF Reference Guide 52 Committing Changes ...
Страница 148: ...Chapter 8 NETCONF XML Elements RUGGEDCOM NETCONF Reference Guide 136 validate ...