Automation

last person joined: 2 days ago 

Ask questions and share experiences about Apstra, Paragon, and all things network automation.
  • 1.  [HELP] Cant run op script

    Posted 07-14-2013 20:24

    hi everyone!
    I am learning in JunOs Automaition.
    I try practise with an example in ebook "Day One: Applying Junos
    Operations Automation" but i cant run it in Olive 8.5 and Olive12.1 on Vmvare.
    It give me this error message

     

    root@Olive12.1# run op show-status 
    error: xsl:import : unable to load /var/db/scripts/import/Junos.xsl
    
    error: error reading stylesheet: show-status.slax
    
    
    /var/db/scripts/import/Junos.xsl:failed to load external entity "/var/db/scripts/import/Junos.xsl"
    error: compilation error: file /var/db/scripts/op/show-status.slax line 6 element import
    error: xsl:import : unable to load /var/db/scripts/import/Junos.xsl
    error: error reading stylesheet: show-status.slax
    
    [edit]
    root@Olive12.1# 

     Here are the script:

    /* show-status.slax */
    version 1.0;
    ns Junos = "http://xml.juniper.net/Junos/*/Junos";
    ns xnm = "http://xml.juniper.net/xnm/1.1/xnm";
    ns jcs = "http://xml.juniper.net/Junos/commit-scripts/1.0";
    import "../import/Junos.xsl";
    var $arguments = { <argument> { <name> "interface"; <description> "Show admin status of interface"; } } /* Command-line argument */ param $interface; match / { <op-script-results> { var $get-interface-rpc = <get-interface-information> { <terse>; } var $results = jcs:invoke($get-interface-rpc); var $admin-status = $results/physical-interface[name==$interface]/admin-status; <output> "The admin status of " _ $interface _ " is " _ $admin-status; } }

     Can anyone help me slove it?



  • 2.  RE: [HELP] Cant run op script
    Best Answer

     
    Posted 07-14-2013 20:30

    Try again with "junos.xsl" instead of "Junos.xsl".

     

    /Charlie



  • 3.  RE: [HELP] Cant run op script

    Posted 07-14-2013 21:07

    Thanks