Automation

 View Only
last person joined: 2 days ago 

Ask questions and share experiences about Apstra, Paragon, and all things network automation.
  • 1.  scripting request system storage cleanup

    Posted 20 days ago
    For scripting the command "request system storage cleanup" how do i pass yes for the confirmation on "Do you want to proceed?"

    ------------------------------
    MARK JOHNS
    ------------------------------


  • 2.  RE: scripting request system storage cleanup

    Posted 16 days ago
    bumping.

    ------------------------------
    MARK JOHNS
    ------------------------------



  • 3.  RE: scripting request system storage cleanup

    Posted 16 days ago
    sharing what i have:
    version 1.2;

    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";
    /* Junos Space annotations */
    /* @CONTEXT = "/device" */
    /* @NAME = "Storage Cleanup" */
    /* @DESCRIPTION = "Delete old logs and junos installation files" */
    /* @ISLOCAL = "true" */

    var $local = jcs:open();
    match / {
    <op-script-results> {
    var $command = <command> "request system storage cleanup";
    var $command2 = <command> "y";
    var $command3 = <command> "start shell user root";
    var $command4 = <command> "password";
    var $command5 = <command> "rm -r -f /packages/db/*";
    var $command6 = <command> "exit";
    }
    }

    ------------------------------
    MARK JOHNS
    ------------------------------