Versions Compared

Key

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

This script allows you to request full node level configuration from multiple Edge ACM systems at once

Table of Contents
Info

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

  • ExportScript.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 Examples folder includes a csv and json CSV export with matching names, as expected by the scriptexpected formatting.

Usage

This script will collect the node level configuration json JSON from every device listed in a csv file. When run initially the script will create every folder it requires.

A csv file (eg. example123.csv) should be placed in the Exports folder. Then run ExportScript.py using python 3. In Windows, this can be done by entering cmd in the start menu, then using cd commands to navigate to the folder that holds the import script. From the command line, run:

Code Block
python ImportScript.py

CSV file. To execute this command from the command line, navigate to its folder and use:

Code Block
python ExportScript.py

Or, on a system with both Python 2 and 3 installed:

Code Block
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 JSON files with names specified in the csv.For further details on running scripts in different environments, see Client Scripts CSV.

CSV Formatting

The CSV file’s top row must be the header:

...

Column Header

Meaning

Site Name

The unique name for the site, this will be used as the name for the json JSon file retrieved

Edge Device IP

The IP address or url URL of the edge Edge device; this is the IP we will attempt to contact. Unless otherwise specified, it will be assumped an IP or url is of the format, Eg 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, eg e.g. https://192.168.0.10:8181”. Each Edge Device IP must be unique within the CSV.

reachable

If this is a Enter the lower case letter x in this field to signify the script will should attempt to connect to and read configuration from this device; otherwise it will be ignoredconfigure 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

Depending on the results of 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 as follows. The files will end up in into one of three subfolders of Exportsthese:

  • Complete - The script has run succesfully 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 JSon files generated will appear here.

  • Process Unrecognized - Files should only be here while the script is running; they will be collected from Import, moved to Process, then sent to Error or Complete. that are not CSV will be moved here.

Note

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.