type setof

Mode: Configuration Mode

Description:

Type setof is the same as flag setof.

setof provides the capability to specify multiple entries of the same object or attribute.

In configuration, when more than 1 entry is being specified, the different entries appear within a bracket. Multiple entries can be entered individually or in the bracket format. No overwriting occurs when the different entries are specified separately. And the entries are shown in the order they are entered.

Example:

        object newbie {
            help "Newbie section";

            attribute hosts {
                help "Newbie hosts (maximum 3)";
                type setof ipaddr;
                max-elements MAX_NUM_IP;
            }
        }

Display:

        user@router# set newbie hosts 1.1.1.1

        [edit]
        user@router# set newbie hosts [ 2.2.2.2 3.3.3.3 ]

        [edit]
        user@router# show
        version "8.1I0 [user]";
        newbie {
            hosts [ 1.1.1.1 2.2.2.2 3.3.3.3 ];
        }

        [edit]
        user@router# delete newbie hosts 2.2.2.2 

        [edit]
        user@router# set newbie hosts [ 2.2.2.2 5.5.5.5 ] 

        [edit]
        user@router# show 
        version "8.1I0 [user]";
        newbie {
            ##
            ## Warning: number of elements exceeds limit of 3
            ##
            hosts [ 1.1.1.1 3.3.3.3 2.2.2.2 5.5.5.5 ];
        }

        [edit]

See also:
flag_setof

Reference (to programmers guide/style guide):


2007-2008 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are trademarks of Juniper Networks, Inc.
Generated on Sun May 30 20:23:13 2010 for DDL Reference Guide by doxygen 1.4.5