As described in Mapping for Leaf Statements with Multiple Values, some JUNOS configuration objects are leaf statements that have multiple values. In the formatted ASCII CLI representation, the values are enclosed in square brackets following the name of the object:
-
object [value1 value2 value3 ...];
The JUNOS XML representation does not use a parent tag for the object, but instead uses a separate instance of the object tag element for each value. In the following, the identifier tag element is called <name>:
<parent-object>
<name>identifier</name>
<object>value1</object>
<object>value2</object>
<object>value3</object>
</parent-object>
To remove one or more values for such an object, a client application includes the basic tag elements or configuration statements for its parent levels, as described in Creating, Modifying, or Deleting Configuration Elements. If using JUNOS XML tag elements, the application includes the delete="delete" attribute in the opening tag for each value. It does not include tag elements that represent values to be retained. In the following, the identifier tag element for the parent object is called <name>:
<configuration>
<!- - opening tag for each parent of the parent object - ->
<parent-object>
<name>identifier</name>
<object delete="delete">value1</object>
<object delete="delete">value2</object>
</parent-object>
<!- - closing tag for each parent of the parent object - ->
</configuration>
If using formatted ASCII text, the application repeats the parent statement for each value and places the delete: statement above each paired statement and value:
<configuration-text>
/* statements for parent levels of the parent object */
parent-object identifier;
delete:
object value1;
delete:
object value2;
/* closing braces for parent levels of the parent object */
</configuration-text>
The following example shows how to remove two of the permissions granted to the user-accounts login class.
