RUGGEDCOM NETCONF
Reference Guide
Chapter 5
Changing Configuration Data
Replacing Data
47
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="232">
<discard-changes/>
</rpc>]]>]]>
5. Issue an
<rpc>
request with the replace operation:
<rpc message-id="233" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<candidate/>
</target>
<config>
<
{root element}
xmlns="
{namespace URL}
"
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
>
{configuration data with nc:operation="replace" attribute}
</
{root element}
>
</config>
</edit-config>
</rpc>]]>]]>
•
{root element}
The top level element in the data model under which the data is located. Note that you need to declare the
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
namespace at this point.
•
{namespace}
The URL to the RUGGEDCOM namespace for the top level element.
•
{configuration data with nc:operation="replace" attribute}
The path to the data to be replaced, with the
nc:operation="replace"
attribute on the element
containing the data to be replaced.
For example, to replace an existing IP address with a new address, issue the following request.
<rpc message-id="233" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<candidate/>
</target>
<config>
<ip xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns="http://ruggedcom.com/ns/rmf_ip">
<ifname>fe-cm-1</ifname>
<ipv4 nc:operation="replace">
<address>
<ipaddress>192.168.1.42/24</ipaddress>
</address>
</ipv4>
</ip>
</config>
</edit-config>
</rpc>]]>]]>
6. Commit the change:
<rpc message-id="234" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<commit/>
</rpc>]]>]]>
7. Unlock the candidate configuration:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="235">
<unlock>
Содержание 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 ...