Provisioning and precompiling Python applications

Python applications can be configured and executed in the MD-CLI. This allows administrators to provide specific Python applications to users.

Python applications can be referenced in configuration statements, such as MD-CLI aliases.

Python applications are configured in the configure python context. The following is a Python application configuration example.

(ex)[/configure python]
A:admin@sros# info
    python-script "my_example" {
        admin-state enable
        urls ["cf3:\example.py" "ftp://user:password@192.168.168.254/example.py"]
        version python3
    }

After a Python application is configured and committed, the SRĀ OS node attempts to load the files specified in the urls field in the order they are listed. If the first URL location can be reached and a file containing valid Python code is found, the system stores this source code ready for use.

If the first URL cannot be reached or the file does not contain valid source code, the system moves to the next URL in the list. If no URL locations contain valid Python source code, the oper-state leaf for the configured application is set to down in the state python python-script application_name context.