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

Testing ex-if-params.xsl

To test the example in this section, perform the following steps:

  1. From Creating a Complex Configuration Based on a Simple Interface Configuration, copy the Extensible Stylesheet Language Transformations (XSLT) or SLAX script into a text file, and name the file ex-if-params.xsl. Copy the ex-if-params.xsl file to the /var/db/scripts/commit directory on your routing platform.
  2. Select the following configuration, and press Ctrl+c to copy it to the clipboard. If you are using the SLAX version of the script, change the filename to filename.slax.
    system {
        scripts {
            commit {
                allow-transients;
                file ex-if-params.xsl;
            }
        }
    }
    groups {
        interface-details {
            interfaces {
                <so-*/*/*> {
                    clocking internal;
                }
            }
        }
    }
    interfaces {
        so-1/2/3 {
            apply-macro params {
                description "Link to Hoverville";
                encapsulation ppp;
                inet-address 10.1.2.3/28;
                isis-level-1 enable;
                isis-level-1-metric 50;
                isis-level-2-metric 85;
            }
        }
    }
  3. Merge the configuration into your routing platform configuration by issuing the load merge terminal configuration mode command:
    [edit]
    user@host# load merge terminal
    [Type ^D at a new line to end input]
    > Paste the contents of the clipboard here<
    1. At the prompt, paste the contents of the clipboard using the mouse and the paste icon.
    2. Press Enter.
    3. Press Ctrl+d.
  4. Issue the commit command:
    [edit]
    user@host# commit

When you issue the show interfaces | display commit-scripts | display inheritance configuration mode command, the following output appears:

[edit]
user@host# show interfaces | display commit-scripts | display inheritance
so-1/2/3 {
    apply-macro params {
        clocking internal;
        description "Link to Hoverville";
        encapsulation ppp;
        inet-address 10.1.2.3/28;
        isis-level-1 enable;
        isis-level-1-metric 50;
        isis-level-2-metric 85;
    }
    description "Link to Hoverville";
    ##
    ## 'internal' was inherited from group 'interface-details'
    ##
    clocking internal;
    encapsulation ppp;
    unit 0 {
        family inet {
            address 10.1.2.3/28;
        }
    }
}

When you issue the show protocols | display commit-scripts configuration mode command, the following output appears:

[edit]
user@host# show protocols | display commit-scripts
rsvp {
    interface so-1/2/3.0;
}
isis {
    interface so-1/2/3.0 {
        level 1 {
            enable;
            metric 50;
        }
        level 2 metric 85;
    }
}
ldp {
    interface so-1/2/3.0;
}

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