Skip to content

Commit

Permalink
Added API documentation for the new post_flight option.
Browse files Browse the repository at this point in the history
  • Loading branch information
krihal committed Oct 18, 2020
1 parent befd5d0 commit 8cdec15
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docs/apiref/firmware.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,17 @@ The API method will accept a few parameters:
* filename: Mandatory. Name of the new firmware, for example "test.swi".
* url: Optional, can also be configured as an environment variable, FIRMQRE_URL. URL to the firmware storage, for example "http://hostname/firmware/". This should typically point to the CNaaS NMS server and files will be downloaded from the CNaaS HTTP server.
* download: Optional, default is false. Only download the firmware.
* pre_flight: Optional, default is false. If false, check disk-space etc before downloading the firmware.
* pre_flight: Optional, default is false. If true, check disk-space etc before downloading the firmware.
* post_flight: Optional, default is false. If true, update OS version after the upgrade have been finished.
* post_waittime: Optional, default is 0. Defines the time we should wait before trying to connect to an updated device.
* activate: Optional, default is false. Control whether we should install the new firmware or not.
* reboot: Optional, default is false. When the firmware is downloaded, reboot the switch.
* start_at: Schedule a firmware upgrade to be started sometime in the future.

An example CURL command can look like this:
::

curl -k -s -H "Content-Type: application/json" -X POST https://hostname/api/v1.0/firmware/upgrade -d '{"group": "ACCESS", "filename": "test_firmware.swi", "url": "http://hostname/", "pre-flight": true, "download": true, "activate": true, "reboot": true, "start_at": "2019-12-24 00:00:00"}'
curl -k -s -H "Content-Type: application/json" -X POST https://hostname/api/v1.0/firmware/upgrade -d '{"group": "ACCESS", "filename": "test_firmware.swi", "url": "http://hostname/", "pre-flight": true, "download": true, "activate": true, "reboot": true, "start_at": "2019-12-24 00:00:00", "post_flight": true, "post_waittime": 600'}

The output from the job will look like this:

Expand Down Expand Up @@ -207,6 +209,12 @@ The output from the job will look like this:
"result": "Device reboot done.",
"diff": "",
"failed": false
},
{
"result": "Post-flight, OS version updated for device eosaccess, now 4.23.2F-15405360.4232F.",
"task_name": "arista_post_flight_check",
"diff": "",
"failed": false
}
],
"_totals": {
Expand Down

0 comments on commit 8cdec15

Please sign in to comment.