[Contents] [Prev] [Next] [Index] [Report an Error]

Deleting Values from a Multivalue Option of a Configuration Object

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 operation="delete" attribute in the opening tag for each value. It does not include tag elements that represent values to be retained. The identifier tag element in the following is called <name>:

<configuration>
    <!- - opening tags for each parent of the parent object - ->
        <parent-object>
            <name>identifier</name>
            <object operation="delete">value1</object>
            <object operation="delete">value2</object>
        </parent-object>
    <!- - closing tags for each parent of the parent object - ->
</configuration>

We recommend that the application set the default mode to no-change by including the <default-operation> tag element with the value none, as described in Deleting Configuration Elements. For more information about leaf statements with multiple values, see Mapping for Leaf Statements with Multiple Values.

The following example shows how to remove two of the permissions granted to the user-accounts login class:

Image t2126.gif
[Contents] [Prev] [Next] [Index] [Report an Error]