AVX::FILEDOWNLOAD

This command is used to generate a .csv file on runtime based on a dictionary of values and download the file output.

Syntax:

output = {"AVX::FileDownload" :{"linkData": <dictionary value> ,"fileName":‘<excel file name>', "columnHeaders":<list of column headers to be added>}}

To use this command:

  1. Design a new workflow.
  2. In the deisgn space, from the left menu, under Reports > CPU and TMM folder, drag and drop the CPU and TMM Memory task. This script will scan all the F5 devices managed for the CPU and TMM memory.
  3. From the same folder, drag and drop the CPU and TMM memory List task. This task will display the Device name, CPU (%), and TMM (%) in a grid view.
    Note: Assign RBAC to users who can access this task.
  4. From the same folder, drag and drop the Download CSV file task. This task contains the device and CPU/TMM details from the Grid task in a .csv file.
  5. In the Download CSV file task window, define the file download logic to generate a <.csv> file on run time.
import sys
import json

sys.path.insert(0,AVX::DEPENDENCIES)
sys.path.insert(0,AVX::HELPER)

excellist ='<grid_data>'
excellist =json.loads(excellist)
column_names = ['Device Name','Version','CPU Memory (%)','TMM Memory (%)']
   
cmd = {"AVX::FileDownload" :{"linkData": excellist ,"fileName":'Memory Data for F5 Devices', "columnHeaders":column_names}}
print(json.dumps(cmd))
  1. Connect and enable the workflow.
  2. Trigger the workflow.
  3. At the Download CSV file stage of workflow execution, click Download File to generate the .csv file.
    The file is downloaded to your machine.