An example for a SLAX script for Junos Space (I believe that this is what you are using). If you require other examples, just drop a message and we can try to help you.
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 = "Clean storage" */
/* @DESCRIPTION = "clean storage on selected device" */
/* @ISLOCAL = "true" */
main <op-script-results> {
/* open connection */
var $connection = jcs:open();
var $rpc = <request-system-storage-cleanup> {
<no-confirm>;
}
var $results = jcs:execute($connection, $rpc);
/* output block */
<output> {
uexpr $results;
}
/* close connection */
var $closeResult = jcs:close ( $connection );
}
------------------------------
Andy Sharp
------------------------------
Original Message:
Sent: 11-17-2022 09:49
From: MARK JOHNS
Subject: scripting request system storage cleanup
For scripting the command "request system storage cleanup" how do i pass yes for the confirmation on "Do you want to proceed?"
------------------------------
MARK JOHNS
------------------------------