EasyManua.ls Logo

Digi TransPort LR54 - Digidevice Module

Digi TransPort LR54
512 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Services and applications Python
Digi TransPort WR Routers User Guide
155
Digidevice module
The Python digidevice module provides platform-specific extensions that allow you to interact with
the device’s configuration and interfaces. Two submodules are included with the digidevice module:
n cli
n datapoint
The digidevice cli submodule
Use the cli submodule to issue CLI commands from Python to change the configuration of the
TransPort device, and to retrieve status and statistical information about the device.
For example, to display the system status and statistics, use the show system CLIcommand with the
digidevice cli submodule:
1. Import the cli submodule; for example, at the interactive python command:
digi.router> python
Python 3.5.3
>>> from digidevice import cli
2. Print the system status and statistics to stdout using the show system command:
>>> response = cli.execute("show system")
>>>
>>> print (response)
Model : LR54W-FIPS
Part Number : LR54-AW403
Serial Number : LR000130
Hardware Version : 50001899-03 A
Using Bank : 1
Firmware Version : 4.3.0.52 06/28/2018 14:54:33
Bootloader Version: 1.1.3 (Jun 20 2018 - 20:48:44)
Using Config File : config.da0
Uptime : 3 Days, 11 Hours, 12 Minutes, 20 Seconds
System Time : 16 July 2018, 06:24:28
CPU : 0% (min 0%, max 99%, avg 2%)
Temperature : 30.50 C
Description :
Location :
Contact :
>>>
Many of the cli show commands can output the response in JSON format, using the -fjson option. This
makes it easier for Python applications to read the data.
digi.router> python

Table of Contents

Other manuals for Digi TransPort LR54

Related product manuals