upload

Code

BIGIP.upload(path: str, filename: str) → None

Uploads a file to the device.

Sends an HTTP POST request to the iControl REST API.

Parameters:
  • path – HTTP path used in the HTTP request sent to the device.
  • filename – Name of the file to be uploaded.
Exceptions:
RESTAPIError: Raised when iControl REST API returns an error.

Example

device.upload(
    "/mgmt/cm/autodeploy/software-image-uploads", "bigrest.iso")

Explanation

This upload the local file to the device.
The API limit uploads to chunks of 1M, so BIGREST will handle that.
You just need to pass the HTTP path to the location to upload and the local file.
I am only aware of 2 locations that you can upload files to BIG-IP.
Folder: /var/config/rest/downloads
HTTP path: /mgmt/shared/file-transfer/uploads
Folder: /shared/images
HTTP path: /mgmt/cm/autodeploy/software-image-downloads
/var/config/rest/downloads is the folder created for iControl REST API downloads and uploads.
While /shared/images is where we have software images.