type toggle

Mode: Configuration Mode


The toggle type acts as a binary choice type, accepting only 2 values: on and off. Use the toggle type to specify switches.

Since there are only 2 acceptable values, the attribute name is displayed in 'show configuration' when the attribute is set (on) and the attribute name is not displayed when the attribute is unset or deleted (off).

Special case: in JUNOS, there are incidients where a toggle-type attribute "disable" is configured under the main object. It is especially useful when "all" is an option and "disable" provides a way to make an exception to "all".


        object newbie {
            help "Newbie settings";

            attribute pto {
                help "Newbie on PTO?";
                type toggle;


        user@router# set example newbie pto?   
        Possible completions:
          pto                  Newbie on PTO?
        user@router# set example newbie pto ? 
        Possible completions:
          <[Enter]>            Execute this command
          |                    Pipe through a command
        user@router# commit
        commit complete

        user@router# show example
        newbie {


See also:

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