Editing the configuration

All configuration editing is done using the merge or delete operations of the <edit-config> RPC. The create and replace operations are not supported.

Refer to RFC 4741, The NETCONF Protocol, for details about these operations.

Note

Note

Every NETCONF <edit-config> request should have a one-to-one mapping with a Extreme SLX-OS CLI command. You cannot combine two CLI operations into one NETCONF request.

The following example of the default merge operation adds a static address to the MAC address table. The operation is performed on the running configuration and configures the <mac-address-table> node in the urn:brocade.com:mgmt:brocade-mac-address-table namespace.

<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="210" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
	<edit-config>	
		<target>
			<running/>
		</target>
		<config>
			<mac-address-table xmlns="urn:brocade.com:mgmt:brocade-mac-address-table">
				<static>
					<mac-address>0011.2222.3333</mac-address>
					<forward>forward</forward>
					<interface-type>ethernet</interface-type>
					<interface-name>2/5</interface-name>
					<vlan>vlan</vlan>
					<vlanid>100</vlanid>
				</static>
			</mac-address-table>
		</config>
	</edit-config>
</rpc>

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

The delete operation is used to remove or disable part of the configuration. The following example disables MSTP on the managed device.

<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="211" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
	<edit-config>
		<target>
			<running/>
		</target>
		<config>
			<protocol xmlns="urn:brocade.com:mgmt:brocade-interface">
				<spanning-tree xmlns="urn:brocade.com:mgmt:brocade-xstp">
					<mstp xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" Operation="delete"/>
				</spanning-tree>
			</protocol>
		</config>
	</edit-config>
</rpc>

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