RUGGEDCOM NETCONF
Reference Guide
Chapter 5
Changing Configuration Data
Copying Data
45
</source>
</copy-config>
</rpc>]]>]]>
The file is saved to the /var/lib/config directory on the device.
To overwrite a configuration with a configuration file, do the following:
1. Upload an XML configuration file to the device. For instructions on how to upload a configuration file, refer
to the
RUGGEDCOM NETCONF v Web Interface User Guide
or
RUGGEDCOM NETCONF v CLI User Guide
for the
device.
2. Connect to and log in to the device.
3. Lock the running configuration:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="230">
<lock>
<target>
<running/>
</target>
</lock>
</rpc>]]>]]>
4. Lock the target configuration:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="231">
<lock>
<target>
<candidate/>
</target>
</lock>
</rpc>]]>]]>
5. Discard any configuration changes:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="232">
<discard-changes/>
</rpc>]]>]]>
6. Use copy-config to copy the file to a specified configuration:
<rpc message-id="233" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<copy-config>
<target>
<{configuration}/>
</target>
<source>
<url>file:///{filename}</url>
</source>
</copy-config>
</rpc>]]>]]>
•
{configuration}
The target configuration: can be candidate or running.
•
{filename}
The name of the configuration file uploaded to /var/lib/config
For example, this command loads the configuration file
standard_config.xml
to the running
configuration:
<rpc message-id="233" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<copy-config>
<target>
Содержание 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 ...