task_result

Code

BIGIP.task_result(obj: RESTObject) str

Get the result text of the task.

Sends an HTTP GET request to the iControl REST API.

Parameters:

obj – Object that represents the task.

Exceptions:

RESTAPIError: Raised when iControl REST API returns an error.

Example

data = {}
data["command"] = "save"
task = device.task_start("/mgmt/tm/task/sys/config", data)
device.task_wait(task)
if device.task_completed(task):
    print(device.task_result(task))

Explanation

If the task produces a result, the method task_result will return the result string.