
<!--

README:  SAOS Command File

This is a sample command file.
This file will activate package saos-06-07-01-1161 on your device(s).
You can modify this file, rename it, and copy it as you wish.

Command files are used to install new software and/or load new configuration
files to one or many devices.  Definitions in the command file are organized
by platform-class.  You may define as many platform classes as you like
in a single command file.

The following example defines two platform classes and uses all possible attributes:

<XmlWwpCommandFile>
    <XmlCmdPlatformClass name="CN3911"
        version="saos-06-07-01-1161"
        operation="upgrade"
        serviceAffecting="yes">
    </XmlCmdPlatformClass>
    <XmlCmdPlatformClass name="brego"
        configFilePath="myFolder/my-config-file.txt"
        configFileRule="activate"
        welcomeBanner="myBannerFile.txt"
        licenseFile="myLicenseFile.txt"
        <SshKeyFile name="user1.pk2"></SshKeyFile>
        <SshKeyFile name="user2.pk2"></SshKeyFile>
        <SshKeyFile name="user3.pk2"></SshKeyFile>
        version="saos-06-07-01-1161"
        packagePath="folder1/folder2/folder3"
        operation="install"
        serviceAffecting="no" >
    </XmlCmdPlatformClass>
</XmlWwpCommandFile>

The following attributes are MANDATORY:
    platformClass
	in order of preference, the most specific match (eg, CN3911), then the class
	match (eg, artamir for CN3911 and CN3920, brego for CN3940 and 5140 etc)
	The class "le-lnx" must be there if upgrade from 6.3.1 or earlier (for
	CN3911 and CN3920 only)

Possible values for platformClass:
   le-lnx, CN3911, CN3920, CN3940, CN5140, CN3960, artamir, brego.

The following attributes are OPTIONAL:
    configFilePath          (path and filename, path is relative to tftproot)
    configFileRule          (see note #1 below)
    welcomeBanner           (path and filename, path is relative to tftproot)
    licenseFile             (path and filename, path is relative to tftproot)
    SshKeyFile              (path and filename, path is relative to tftproot)
    version                 (leos-xx-yy-zz-abcd)
    packagePath             (complete path to the package directory relative to the tftp-root directory)
    operation               (upgrade or xgradei or install)
    serviceAffecting        (yes or no)
    ftpConfigFile           (path and filename, path is relatve to ftp/sftp/tftp root, see note #3 below)

Possible values for the attribute: configFileRule
    install
        - Download the config file from the server.
        - Store the file in the directory '/flash0/config'
        - Store the new filename as 'default-load-file'
        - Store the new filename as 'last-config-file'
        - This file will be loaded when the device is rebooted.
    activate
        - Same behavior as install.
        - In addition, the file is activated (loaded) immediately.
        - This may require a reboot.
        - Reboot will not occur unless "serviceAffecting" is specified.
    augment
        - Download the config file.
        - Augment the current system configuration with the commands in this file.
    augmentAndSave
        - Download the config file.
        - Augment the current system configuration with the commands in this file.
        - Save the resulting configuration to the file default-save-filename.

Possible values for the attribute: operation
    upgrade
        - Download & install image files if necessary.
        - Activate the new image files.
        - This operation may require a reboot.
        - Reboot will not occur unless serviceAffecting="yes"
    install
        - Download & install image files if necessary
        - Do not activate the new image files
        - This option is not available for CN3911 and CN3920
    x-grade
        - Exact same behavior as 'upgrade'
        - It is supported for backwards compatibility with previous release.
    download
        - Download image files if necessary
        - Do not install the new image files
		  - Image files will be installed after next reboot command.
        - This option is only available for CN3911 and CN3920
    delete
        - Delete all files that were downloaded for a 2 stage upgrade
        - Cancel 2 stage upgrade and restore device to the default state
        - This option is only avaiable for the CN 3911 and Cn 3920


Possible values for the attribute: serviceAffecting
    yes         (The device is allowed to reboot if necessary)
    no          (The device is NOT allowed to reboot)

NOTE #1
    DHCP can be used to run a command file.  If a command file request
    comes in from DHCP, the device will only run the command file once.
    If another request comes in with the same command file name, the
    device will ignore the request from DHCP.  The name of the command
    file is saved (last-command-file) and it may be reset by the user
    via the shell or SNMP.  The same is true for the configuration file.

NOTE #2
    The License file format is shown here.  Lines may appear in any order.
    Any text following ! will be considered a comment.
    Whitespace is ignored.

    ! This is my example license file
    install <license key>
    uninstall <feature name>
    install <license key>

NOTE #3
    The ftpConfig file format is shown here. Lines may appear in any order.
    Any text following ! will be considered a commment
    !
    ! Contains FTP configuration parameters
    !
    ! Valid configurable parameters are: xFtpTransferMode, server, userid
    !                                    passwd, retries, retryinterval
    !                                    connectiontimeout
    ! Format: e.g.
    !         xFtpTransferMode:0  0=TFTP, 1=FTP 2=SFTP                             |
    !         server:<IP address or host name>
    !         userid:<user name>
    !
    xFtpTransferMode:1
    server:10.1.28.62
    userid:gss
    passwd:pureethernet
    retries:2
    retryinterval:15
    connectiontimeout:65

-->

<XmlWwpCommandFile>
    <XmlCmdPlatformClass name="le-lnx"
        version="saos-06-07-01-1161"
        ftpConfigFile="ciena/defaultFtpConfig"
        packagePath="ciena/packages/saos-06-07-01-1161"
        operation="upgrade"
        serviceAffecting="yes"
    ></XmlCmdPlatformClass>
    <XmlCmdPlatformClass name="artamir"
        version="saos-06-07-01-1161"
        ftpConfigFile="ciena/defaultFtpConfig"
        packagePath="ciena/packages/saos-06-07-01-1161"
        operation="upgrade"
        serviceAffecting="yes"
    ></XmlCmdPlatformClass>
    <XmlCmdPlatformClass name="brego"
        version="saos-06-07-01-1161"
        ftpConfigFile="ciena/defaultFtpConfig"
        packagePath="ciena/packages/saos-06-07-01-1161"
        operation="upgrade"
        serviceAffecting="yes"
    ></XmlCmdPlatformClass>
    <XmlCmdPlatformClass name="caliondo"
        version="saos-06-07-01-1161"
        ftpConfigFile="ciena/defaultFtpConfig"
        packagePath="ciena/packages/saos-06-07-01-1161"
        operation="upgrade"
        serviceAffecting="yes"
    ></XmlCmdPlatformClass>
</XmlWwpCommandFile>


