Automation

last person joined: yesterday 

Ask questions and share experiences about Apstra, Paragon, and all things network automation.
  • 1.  Need help with op script

    Posted 10-21-2009 11:51

    Hello!

     

    I'm trying to write op script that changes policers attached to an interface.

    It fails to work with error:

     

    minotaur@br1-gdr.ki> op change-policer interface ge-0/0/0.0 unit 400 policer-in pol-50Mbit policer-out pol-50Mbit           
    Changing policers on interface ge-0/0/0.0.400
    
    unit
    syntax error
    
    
    unit
    syntax error
    
    2

    I cannot find why it does not work because XML generated by it looks ok to me:

     

    Oct 21 21:27:30 begin dump
    <load-configuration format="xml" action="">
      <configuration>
        <interfaces>
          <interface>
            <name>ge-0/0/0.0</name>
            <unit>      
              <name>400</name>
              <family>  
                <inet>  
                  <policer>
                    <input>pol-50Mbit</input>
                    <output>pol-50Mbit</output>
                  </policer>
                </inet> 
              </family> 
            </unit>     
          </interface>  
        </interfaces>   
      </configuration>  
    </load-configuration>Oct 21 21:27:30 end dump

    Any help will be appreciated! Thanks.

    P.S. Script is attached.

     

     


    #SCRIPTS


  • 2.  RE: Need help with op script
    Best Answer

    Posted 10-21-2009 13:56

    Does it work if you do not include a logical unit for your interface argument?

     

    Right now you specify ge-0/0/0.0, when it should be ge-0/0/0



  • 3.  RE: Need help with op script

    Posted 10-22-2009 07:08

    Ooohh... it's just my typo. Thank you very much!