[Contents] [Prev] [Next] [Index] [Report an Error]

Example: Declaring Arguments

Declare two arguments named interface and protocol. Execute the script, specifying the ge-0/2/0.0 interface and the inet protocol as values for the arguments. For either method, you must declare corresponding script parameters:

<xsl:param name="interface"/>
<xsl:param name="protocol"/>

Method 1:
In the script1 Op Script

<xsl:variable name="arguments">
    <argument>
        <name>interface</name>
        <description>Name of interface to display</description>
    </argument>
    <argument>
        <name>protocol</name>
        <description>Protocol to display (inet, inet6)</description>
    </argument>
</xsl:variable>

Method 2:
In the Configuration

system { 
    scripts op {
        file script1 {
            arguments {
                interface {
                    description "Name of interface to display";
                }
                protocol {
                    description "Protocol to display (inet, inet6)";
                }
            }
        }
    }
}

Executing the Script

user@host> op script1 interface ge-0/2/0.0 protocol inet

[Contents] [Prev] [Next] [Index] [Report an Error]