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

Testing ex-lsp-admin.xsl

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

  1. From Configuring Administrative Groups for LSPs, copy the Extensible Stylesheet Language Transformations (XSLT) or SLAX script into a text file, and name the file ex-lsp-admin.xsl. Copy the ex-lsp-admin.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-lsp-admin.xsl;
            }
        }
    }
    protocols {
        mpls {
            apply-macro blue-type-lsp {
                10.1.1.1;
                10.2.2.2;
                10.3.3.3;
                10.4.4.4;
                color blue;
                group-value 0;
            }
        }
    }
  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

With Script-Generated Changes

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

[edit]
user@host# show protocols mpls | display commit-scripts
apply-macro blue-type-lsp {
    10.1.1.1;
    10.2.2.2;
    10.3.3.3;
    10.4.4.4;
    color blue;
    group-value 0;
}
admin-groups {
    blue 0;
}
label-switched-path blue-lsp-10.1.1.1 {
    to 10.1.1.1;
    admin-group include-any blue;
}
label-switched-path blue-lsp-10.2.2.2 {
    to 10.2.2.2;
    admin-group include-any blue;
}
label-switched-path blue-lsp-10.3.3.3 {
    to 10.3.3.3;
    admin-group include-any blue;
}
label-switched-path blue-lsp-10.4.4.4 {
    to 10.4.4.4;
    admin-group include-any blue;
}

Without Script-Generated Changes

The output of the show protocols mpls | display commit-scripts no-transients configuration mode command excludes the label-switched-path statements:

[edit]
user@host# show protocols mpls | display commit-scripts no-transients
apply-macro blue-type-lsp {
    10.1.1.1;
    10.2.2.2;
    10.3.3.3;
    10.4.4.4;
    color blue;
    group-value 0;
}

When you issue the show protocols mpls command without the piped display commit-scripts no-transients command, you see the same output because this script does not generate any persistent changes:

[edit]
user@host# show protocols mpls
apply-macro blue-type-lsp {
    10.1.1.1;
    10.2.2.2;
    10.3.3.3;
    10.4.4.4;
    color blue;
    group-value 0;
}

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