Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The script header block influences a number of runtime behaviors, including:

Script-Timeout

Specifies the per-command timeout for the entire script in seconds.

  • Type: Integer
  • Required: No
  • Default if not specified: 60

Script-Login

Specifies whether the job engine should automatically establish a connection with the target device.

  • Type: Boolean
  • Required: No
  • Default if not specified: true

Script-Variables

  • Specifies inputs needed by the script.
  • Type: Tuple (ordered list of elements)
  • Required: No
  • Default if not specified: None

Script-Filter

Specifies the device types processed by the script.

...

Python scripts run inside the sandbox, using the Pyrthon API to communicate with the Device Interaction Server (DIS) on NetMRI. The DIS proxies CLI requests/responses to/from network devices on behalf of the Python scripts. Before commands can be sent to a network device, a Python script must first establish a DIS session (see v2 API object DisSession). After a session has been established, a CLI connection with the target device must be established for the given session (see v2 API object CliConnection). The majority of the time, a Python script will follow this same initialization sequence. First, establish the API session, establish the DIS session, then establish a CLI connection with the target device. For this reason, netmri_easy.py, a pre-installed Python library, is provided in the appliance (see Configuration Management –> > Job Management –> > Library –> > netmri_easy).