option

Mode: Operational Mode

Description:

The option statement is used only with operational commands that also have action execute statement. The option statement is typically used to specify the mapping to command-line options that belong to freebsd shell commands being emulated in the CLI.

The option statement must be used on each argument or attribute that corresponds to a command-line argument.

Example:

                command ping {
                    help "Ping remote target";
                    require network;
                    action execute mgd mgd_lr_cli_js_command;
                    option PATH_PING;
                    xml-name ping;

                    ....

                    argument rapid {
                        type toggle;
                        option "-C";
                        help "Send requests rapidly (default count of 5)";
                    }
                    argument flood {
                        type toggle;
                        option "-f";
                        help "Flood ping. Outputs packets as fast as they come back";
                    }
                    argument host {
                        flag nokeyword mandatory;
                        type string;        /* hostname; */
                        help "Hostname or IP address of remote host";
                    }

                }

Display:

                user@router> ping ra?
                Possible completions:
                  <host>               Hostname or IP address of remote host
                  rapid                Send requests rapidly (default count of 5)
                user@router> ping flo?    
                Possible completions:
                  <host>               Hostname or IP address of remote host
                  flood                Flood ping. Outputs packets as fast as they come back

                user@router> show version
                Hostname: router.juniper.net
                Model: m10i

                user@router> ping www flood    
                ping: -f flag: Operation not permitted

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