Junos Automation (Scripting)
Highlighted
Junos Automation (Scripting)

correct my script

‎06-22-2010 09:19 AM

hello here is my script can you help me correct my script

Attachments

5 REPLIES 5
Highlighted
Junos Automation (Scripting)

Re: correct my script

‎06-22-2010 11:19 AM

please help me

I want someone to check my script.

Highlighted
Junos Automation (Scripting)

Re: correct my script

‎06-22-2010 01:09 PM

What is wrong with it?

Highlighted
Junos Automation (Scripting)

Re: correct my script

‎06-22-2010 04:04 PM

hello

<path>{
                                    <name> "via-M120_H";
                                    <path-list>{
                                    <name> 1.1.1.2;
                                    <loose> ;
                                    }
                                    }

 

i want the path to be via M120_H but it didnt work!

Highlighted
Junos Automation (Scripting)

Re: correct my script

‎06-22-2010 04:14 PM

You have three syntax errors, first you have an extra } curly-brace before your "var $connection = jcsSmiley Surprisedpen()" line, which is terminating your if( not( contains( ... code block too early. The other two errors are that you are missing the necessary quotation marks around the following strings:

 

                                    <name> via-M120_H;

                                    <name> 1.1.1.2;

Highlighted
Junos Automation (Scripting)

Re: correct my script

‎06-22-2010 04:28 PM

/* Create new LSP */
                var $configuration = {
                    <configuration> {
                        <protocols> {
                            <mpls> {
                                <label-switched-path> {
                                    <name> "M120_BB-to-M7i";
                                    <to> "7.7.7.7";
                                    <primary>{
                                    <name> via-M120_H;
                                    }
                                    }
                                    <path>{
                                    <name> via-M120_H;
                                    <path-list>{
                                    <name> 1.1.1.2;
                                    <loose> ;
                                    }
                                    }
                                }
                            }
                        }
                    }
                }