Renaming a Configuration Object
To change the name of one or more of a configuration object’s identifiers, a client application includes the tag elements described in Creating, Modifying, or Deleting Configuration Elements. In the object’s opening tag, it includes the rename="rename" attribute and an attribute named after the identifier keyword. The value of the attribute is the new identifier value. The application includes the identifier tag element to specify the current name. In the following, the identifier tag element is called <name>:
<configuration>
<!-- opening tag for each parent of the object -->
<object rename="rename" name="new-name">
<name>current-name</name>
</object>
<!-- closing tag for each parent of the object -->
</configuration>
If the object has multiple identifiers, for each one the application includes both an attribute in the opening tag and an identifier tag element. If one or more of the identifiers is not changing, the attribute value for it is set to its current name. The opening tag appears on two lines for legibility only:
<configuration>
<!-- opening tag for each parent of the object -->
<object rename="rename" changing-identifier="new-name" \
unchanging-identifier="current-name">
<changing-identifier>current-name</changing-identifier>
<unchanging-identifier>current-name</unchanging-identifier>
</object>
<!-- closing tag for each parent of the object -->
</configuration>
The renaming operation is not available when formatted ASCII text is used to represent the configuration data.
The rename attribute can be combined with the inactive or active attribute to deactivate or reactivate the configuration element as it is renamed. For more information, see Changing a Configuration Element’s Activation State Simultaneously with Other Changes.
The following example shows how to change the name of a firewall filter from access-control to new-access-control. This operation is equivalent to the following configuration mode command:

The following example shows how to change the identifiers for an OSPF virtual link (defined at the [edit protocols ospf area area] hierarchy level) from neighbor-id 192.168.0.3 and transit-area 1.1.1.1 to neighbor-id 192.168.0.7 and transit-area 1.1.1.5. This operation is equivalent to the following configuration mode command (which appears on two lines for legibility only):
[edit protocols ospf area area]
user@host# rename filter virtual-link neighbor-id 192.168.0.3 transit-area \
1.1.1.1 to virtual-link neighbor-id 192.168.0.7 transit-area 1.1.1.5

Hide Navigation Pane
Show Navigation Pane
Download
SHA1