Export Script
This script allows you to request full node level configuration from multiple Edge ACM systems at once
For more information on how to execute scripts in different environments, view the “Client Scripts” page.
Contents of Package
This scripts is composed of 2 python files:
ApiClient.py: ApiClient can be used to interface with the Edge Node’s API but will do nothing if run directly.
ExportScript.py: ExportScript must be run in the same folder with ApiClient.
The Examples folder includes a CSV export with expected formatting.
Usage
This script will collect the node level configuration JSON from every device listed in a CSV file. To execute this command from the command line, navigate to its folder and use:
python ExportScript.py
Or, on a system with both Python 2 and 3 installed:
python3 ExportScript.py
When first run, it will create every folder required. To request node configuration, place a properly formatted CSV file in the Exports folder and execute the command again. It will connect to each device in order, export the current configuration, and write to individual JSON files with names specified in the CSV.
CSV Formatting
The CSV file’s top row must be the header:
Site Name,Edge Device IP,reachable,eACM username,eACM password
Each columns meaning is detailed below
Column Header | Meaning |
---|---|
Site Name | The unique name for the site, this will be used as the name for the JSon file retrieved |
Edge Device IP | The IP address or URL of the Edge device; this is the IP we will attempt to contact. By default, the IP address will be preceded with “http://” and the port used will be 8080, e.g. “192.168.0.10” will be read as “http://192.168.0.10:8080”. If a different port is expected, or the node is configured for https, that must be included, e.g. “https://192.168.0.10:8181”. Each Edge Device IP must be unique within the CSV. |
reachable | Enter the lower case letter x in this field to signify the script should attempt to connect to and configure the device. If any other value is entered, or it is left blank, this row will be skipped. |
eACM username | The web interface username used to connect to the Edge Manager website and API. Default: admin |
eACM password | The web interface password used to connect to the Edge Manager website and API. Default: admin |
Output
While the script is running, files will be collected from the Import folder and moved into the Process folder. After running the script, the files will be moved into one of these:
Complete - The script has run successfully on at least one of the devices in the csv. A report.txt file is also generated in this folder to detail which sites had their config retrieved and which did not. All of the JSon files generated will appear here.
Unrecognized - Files that are not CSV will be moved here.
Any files that remain in the Process folder when the program is done indicate an unexpected exception. Check the log for further details and contact support if necessary.
Logs
The logs can be found in ExportScript.log. They can be checked for further details if an error appears in the Complete report.
For assistance, please submit a ticket via our Support Portal, email autosol.support@autosoln.com or call 281.286.6017 to speak to a support team member.