I ran into the exact same issue as you a few months ago! For operational command's you'll want to use Slax/Python. I learned Slax recently. From "version 1.0;" and below you should be able to copy-paste it into Notepad, save it as a ".slax", upload to Space, and from there you can choose to Stage & Enable it on a device or only deploy it when you want to run it and remove it afterward.
I included a few output statements so you'll know it's running.
Anything within "/*" and "*/" are comments.
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";
ns ext = "http://xmlsoft.org/XSLT/namespace";
import "/var/db/scripts/import/junos.xsl";
/* Most other scripts I saw have it as "import "../import/junos.xsl";" but for some reason I can't do the abbreviated version. */
/* Junos Space lets you add some information for organizational purposes. */
/* @NAME = "" */
/* @DESCRIPTION = "" */
/* @EXECUTIONTYPE = "SINGLEEXECUTION" */
match / {
<op-script-results> {
/* Stores the command to a variable */
var $cleanup-rpc = <request-system-storage-cleanup>;
/* Lets user know the script is running */
expr jcs:output("Running Request System Storage Cleanup...");
/* Runs the stored command */
var $cleanupResult = jcs:invoke($cleanup-rpc);
expr jcs:output("Cleanup completed!");
}
}
------------------------------
PHILIP SILK
------------------------------
Original Message:
Sent: 04-04-2023 12:29
From: Netscoped
Subject: configlet for cleaning system storage?
I know the cli command is
request system storage cleanup.
I assume the configlet is something like below, but no luck.
system {
storage {
cleanup
}
}
I know it's processing as a "set" command, so how do I run it as if it were in operational?
------------------------------
Net Scope
------------------------------