type string

Mode: Configuration Mode

Description:

The most basic character string type.

To limit the acceptable string pattern, the match statement can be used. To limit the length of the string, the range keyword can be used.

Example 1:

        object newbie {
            help "Newbie settings";

            attribute workstation-name {
                help "Workstation hostname";
                type string;
            }
        }

Display 1:

        user@router# set example newbie workstation-name ?
        Possible completions:
          <workstation-name>   Workstation hostname
        [edit]
        user@router# set example newbie workstation-name .

        [edit]
        user@router# show example
        newbie {
            workstation-name .;
        }
        [edit]
        user@router# set example newbie workstation-name newbie-bsd

        [edit]
        user@router# show example
        newbie {
            workstation-name newbie-bsd;
        }

        [edit]

Example 2:

        object newbie {
            help "Newbie settings";

            attribute workstation-name {
                help "Workstation hostname";
                type ranged string 1..10;
            }
        }

Display 2:

        user@router# set example newbie workstation-name ?
        Possible completions:
          <workstation-name>   Workstation hostname
        [edit]
        user@router# set example newbie workstation-name 1234567890

        [edit]
        user@router# show example
        newbie {
            workstation-name 1234567890;
        }

        [edit]
        user@router# set example newbie workstation-name 12345678901
                                                         ^
        length 11 is not within range (1..10) at '12345678901'

        [edit]

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