Janu
ary 201
9
464 Legrand PDU User Guide
curl
-k
-F
"config_file=@<config
file>"
-F
"device_list_file=@<dev_list
file>"
https://<user>:<password>@<device IP>/cgi-bin/raw_config_update.cgi?
match=<dev_col>
Parameter
Description
<user>
,
<password>
,
<device IP>
,
<config
file>
Refer to the above table for explanation.
For device-specific settings in the
<config
file>
, refer each device-specific
configuration key to a specific column in the
<dev_list file>
. See
config.txt
(on page
<dev_list
file>
Filename of the device list file in CSV format.
For the content format, see
devices.csv
(on
page 439).
<dev_col>
<dev_col>
comprises "serial:" or "mac:" and the
number of the column where the serial number or
MAC address of each Legrand PDU is in the
uploaded CSV file. This is the data based on
which each device finds its device-specific
settings.
For example:
If the second column contains each device's
serial number, the parameter is then
serial:2
.
If the seventh column contains each device's
MAC address, the parameter is then
mac:7
.
2. Legrand PDU will reboot after Curl shows the return code 0. For details, refer to above steps 2 to 3.
Examples:
Upload of the configuration file only:
curl -k -F "config_file=@config.txt"
https://admin:legrand@192.168.84.114/cgi-bin/raw_config_download.cgi
Upload of both configuration and device list files:
curl -k -F "config_file=@config.txt" -F "device_list_file=@devices.csv"
https://admin:legrand@192.168.84.114/cgi-bin/raw_config_download.cgi
Curl Upload Return Codes
After performing raw configuration
Upload via Curl
(on page 462), curl will return a code to indicate the
result of the file upload.
Code
Description
0 Operation
was
successful.
1
An internal error occurred.