flag allow-no

Mode: Configuration Mode

Description:

Flag allow-no is only used with conjuction with a toggle type attribute. The allow-no flag generates both the normal form and the negated form (no-) of the attribute.

Setting either toggle state of the attribute clears any previous settings of the attribute.

It is important to note that this flag is meaningless if the attribute name is in the negated form.

Example 1:

        object newbie {
            help "Newbie settings";

            /* default is that newbie is not rich */
            attribute no-money {
                help "Is newbie rich?";
                flag allow-no;
                type toggle;
            }

            /* default is that newbie is happy */
            attribute happy {
                help "Is newbie happy?";
                flag allow-no;
                type toggle;
            }
        }

Display:

        user@router# set example newbie ?
        Possible completions:
          <[Enter]>            Execute this command
        + apply-groups         Groups from which to inherit configuration data
        + apply-groups-except  Don't inherit configuration data from these groups
          happy                Is newbie happy?
          no-happy             Don't is newbie happy?
          no-money             Is newbie rich?
          |                    Pipe through a command
        [edit]
        user@router# set example newbie happy 

        [edit]
        user@router# commit 
        commit complete

        [edit]
        user@router# show example 
        newbie {
            happy;
        }

        [edit]
        user@router# set example newbie no-happy
        
        [edit]
        user@router# commit 
        commit complete

        [edit]
        user@router# show example 
        newbie {
            no-happy;
        }

        [edit]

Topics for further reading:

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:12 2010 for DDL Reference Guide by doxygen 1.4.5