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

Mapping for Leaf Statements with Multiple Values

Some leaf statements accept multiple values, which can be either user-defined or drawn from a set of predefined values. CLI notation uses square brackets to enclose all values in a single statement, as in the following:

statement [ value1 value2 value3 ... ];

The SRC XML API instead encloses each value in its own tag element. The following example shows the XML tag elements for a CLI statement with multiple user-defined values. The domain-search statement specifies two domains defined elsewhere in the configuration. For complete information about changing C-series Controller configurations, see Changing Configuration Information.

CLI Configuration Statements

SRC XML Tags

 

system {
  domain-search [ jnpr.net juniper.net ];
}

<configuration>
  <system>
    <domain-search>jnpr.net</domain-search>
    <domain-search>juniper.net</domain-search>
  </system>
</configuration>

The following example shows the XML tag elements for a CLI statement with multiple predefined values. The permissions statement grants three predefined permissions to members of the user-accounts login class.

CLI Configuration Statements

SRC XML Tags

 

system login class user-accounts {
  permissions [configure admin control];
}

<configuration>
  <system>
    <login>
      <class>
        <name>user-accounts</name>
        <permissions>configure</permissions>
        <permissions>admin</permissions>
        <permissions>control</permissions>
      </class>
    </login>
  </system>
</configuration>


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