diff --git a/fmcapi/api_objects/deployment_services/deploymentrequests.py b/fmcapi/api_objects/deployment_services/deploymentrequests.py index 4b9296c..a78e51d 100644 --- a/fmcapi/api_objects/deployment_services/deploymentrequests.py +++ b/fmcapi/api_objects/deployment_services/deploymentrequests.py @@ -63,7 +63,7 @@ def post(self): response = self.fmc.send_to_api( method="post", url=self.URL, json_data=json_data ) - return response["deviceList"] + return response def put(self): """PUT method for API for DeploymentRequests not supported.""" diff --git a/unit_tests/upgrades.py b/unit_tests/upgrades.py index d0a6f23..bffc961 100644 --- a/unit_tests/upgrades.py +++ b/unit_tests/upgrades.py @@ -71,7 +71,8 @@ def test__upgrades(fmc): # logging.info(f"Upgrade completed. Triggering deployment to devices") # deployment = fmcapi.DeploymentRequests(fmc=fmc) - # logging.info(deployment) - # wait_for_task(fmc=fmc, task=deployment["metadata"]["task"], wait_time=60) + # response = deployment.post() + # logging.info(response) + # wait_for_task(fmc=fmc, task=response["metadata"]["task"], wait_time=60) logging.info("Test UpgradePackages/ApplicableDevices/Upgrades Complete") diff --git a/unit_tests/wait_for_task.py b/unit_tests/wait_for_task.py index c1c43f3..b8d29c6 100644 --- a/unit_tests/wait_for_task.py +++ b/unit_tests/wait_for_task.py @@ -4,7 +4,7 @@ def wait_for_task(fmc, task, wait_time=10): - task_completed_states = ["Success", "SUCCESS", "COMPLETED"] + task_completed_states = ["Success", "SUCCESS", "COMPLETED", "Deployed"] try: status = fmcapi.TaskStatuses(fmc=fmc, id=task["id"]) current_status = status.get()