Uploading New UFM Appliance Version REST API
Using upgrade_ufm_appliance.py package which is part of the UFM software.
Using UFM REST API infrastructure to control the upgrade.
Prerequisite:
The upgrade is performed only on UFM APL.
The system's initial version is HA master/slave.
UFM runs on the master system.
Via REST API, download the UFM appliance image.
Via REST API, start upgrade using upgrade_ufm_appliance.py tool. The tool performs the following steps:
Validates cluster.
Retrieves HA status.
Verifies installed version.
Uploads the image to both systems.
Installs the image on both systems.
Changes boot location on slave.
Reloads slave.
Changes boot location on master.
Via REST API reload master.
Upload New UFM APL Image
Description – Allows users to upload a new UFM APL image before applying the upgrade.
Request URL – POST /ufmRest/app//images/appliance
Request Content Type – Application/json
Request Data:
{
"file":" image-ufm_appliance-x86_64-UFMAPL_4.8.0.6_UFM_6.9.0.7-20220502-060753.img"}Status Codes
202 – ACCEPTED
400 – bad request (bad or missing parameters, allowed only 10 images).
Delete UFM APL Image
Description – Allows users to delete an uploaded UFM APL.
Request URL – DELETE /ufmRest/app/images/appliance/<image_name>
Request Content Type – Application/json
Status Codes
202 – ACCEPTED
404 – NOT_FOUND
Activate UFM APL Upgrade Image
Description – Allows users to activate UFM APL upgrade.
Request URL – POST /ufmRest/actions/appliance/upgrade
Request Content Type – Application/json
Request Data:
{
"name":" image-ufm_appliance-x86_64-UFMAPL_4.8.0.6_UFM_6.9.0.7-20220502-060753.img"}Status Codes
202 – ACCEPTED
400 – BAD REQUEST— Bad or missing parameter
404 – NOT_FOUND
Activate UFM APL Master reload
Description – Allows users to reload master system.
Request URL – POST /ufmRest/actions/appliance/master_reboot
Request Content Type – Application/json
Request Data:
Status Codes
202 – ACCEPTED
Get the List of Available Images
Description – Allows users to get all the available images applied on a device.
Request URL – GET /ufmRest/app/images/appliance
Request Content Type – Application/json
Response Data:
{ image-ufm_appliance-x86_64-UFMAPL_4.
8.0.6_UFM_6.9.0.7-20220502-060753.img, image-ufm_appliance-x86_64-UFMAPL_4.8.0.6_UFM_6.9.0.9-20220502-060753.img }Status Codes
200 – OK
Get Upgrade Status
Description – Allows users to get upgrade status.
Request URL – GET /ufmRest/actions/appliance/upgrade_status
Request Content Type – Application/json
Response Data:
{
2022-05-1707:44:49.374INFO Going to install image-ufm_appliance-x86_64-UFMAPL_4.8.0.6_UFM_6.9.0.7-20220502-060753.img: image version UFMAPL_4.8.0.6_UFM_6.9.0.72022-05-1707:44:49.381INFO Validating cluster:10.209.36.38,10.209.36.352022-05-1707:44:49.382INFO Validating cluster:10.209.36.38,10.209.36.352022-05-1707:44:49.382INFO Retrieving ha status info from:10.209.36.382022-05-1707:44:49.382INFO Retrieving version info from:10.209.36.382022-05-1707:45:25.069INFO Image versionfor10.209.36.38is: UFMAPL_4.8.0.4_UFM_6.9.0.42022-05-1707:45:25.069INFO Retrieving ufm status info from:10.209.36.382022-05-1707:45:41.007INFO Show installed images on:10.209.36.382022-05-1707:45:47.015INFO Retrieving ha status info from:10.209.36.352022-05-1707:45:47.016INFO Retrieving version info from:10.209.36.352022-05-1707:45:52.491INFO Image versionfor10.209.36.35is: UFMAPL_4.8.0.4_UFM_6.9.0.42022-05-1707:45:52.491INFO Retrieving ufm status info from:10.209.36.352022-05-1707:46:07.550INFO Show installed images on:10.209.36.352022-05-1707:46:13.212INFO Upgrading cluster:10.209.36.38,10.209.36.352022-05-1707:46:13.212INFO Uploading image /tmp/image-ufm_appliance-x86_64-UFMAPL_4.8.0.6_UFM_6.9.0.7-20220502-060753.img on:10.209.36.382022-05-1707:46:13.213INFO Uploading image /tmp/image-ufm_appliance-x86_64-UFMAPL_4.8.0.6_UFM_6.9.0.7-20220502-060753.img on:10.209.36.352022-05-1707:47:59.972INFO Installing image on:10.209.36.382022-05-1707:48:00.964INFO Installing image on:10.209.36.352022-05-1707:49:28.473INFO Changing boot location on:10.209.36.382022-05-1707:49:33.882INFO Rebooting device:10.209.36.382022-05-1707:49:38.744INFO Reload command'reload noconfirm'initiated on'10.209.36.38'2022-05-1707:53:47.738INFO Reload command on'10.209.36.38'ended, status: True2022-05-1707:53:47.739INFO Retrieving version info from:10.209.36.382022-05-1707:53:52.999INFO Changing boot location on:10.209.36.35}Status Codes
200 – OK
404 – NOT_FOUND (log file not found)
Create New System Dump
Description – Allows users to execute UFM system dump according to the mode of operation (if mode is not specified, the Default mode is set, see below). The system triggers the job, and once created, it signals the start of the backup process. Upon process completion, the job returns the location of the backup (system dump) on the machine.
Request URL – POST /ufmRest/app/backup?mode=Default
Mode
Default – For basic collection
Snapshot – For more extended collection (including UFM logs)
Request Content Type – Application/json
Response type - hyperlink
Response Data
!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2 Final//EN"> <title>Redirecting...</title> <h1>Redirecting...</h1> <p>You should be redirected automatically to target URL: <a href="/ufmRestV2/jobs/10">/ufmRestV2/jobs/10</a>. If not click the link. Status Codes202– ACCEPTED400– bad request.