Description

Op script from flash storage is not getting executed .

Op script in flash was not getting executed in device despite being referred in the system scripts.

Symptoms

Op script in flash was not getting excecuted in device despite being referred in the system scripts.

This is due to knob which needs to enabled 'load-scripts-from-flash ' when op script is executed from flash storage.

Details as below

[edit system]
scripts {
    op {
        file test.py;
    }
    language python3;
}


DUT> op test.py 
error: invalid filename: /var/db/scripts/op/test.py


DUT> start shell 
% cd /config/scripts/op/

% pwd
/config/scripts/op
% ls
test.py



Post configuring below knob command execution will be successful

DUT# set system scripts load-scripts-from-flash 

[edit]
DUT# edit system 

[edit system scripts]
DUT# show 
op {
    file test.py;
}
load-scripts-from-flash;
language python3;

[edit system scripts]
DUT# commit 
commit complete



DUT> op test.py 
Hello worlD!

Solution

Configure load-scripts-from-flash  when script is in flash storage /config/scripts/op

Modification History

NA

Related Information

NA