diff --git a/plugins/module_utils/image_mgmt/image_policy_action.py b/plugins/module_utils/image_mgmt/image_policy_action.py index 85e2d8772..3564a12ee 100644 --- a/plugins/module_utils/image_mgmt/image_policy_action.py +++ b/plugins/module_utils/image_mgmt/image_policy_action.py @@ -106,7 +106,7 @@ def build_payload(self): self.switch_issu_details.refresh() for serial_number in self.serial_numbers: self.switch_issu_details.filter = serial_number - payload = {} + payload: Dict[str, Any] = {} payload["policyName"] = self.policy_name payload["hostName"] = self.switch_issu_details.device_name payload["ipAddr"] = self.switch_issu_details.ip_address @@ -238,7 +238,7 @@ def _attach_policy(self): self.properties["response"] = response for payload in self.payloads: - diff = {} + diff: Dict[str, Any] = {} diff["action"] = self.action diff["ip_address"] = payload["ipAddr"] diff["logical_name"] = payload["hostName"] @@ -281,7 +281,7 @@ def _detach_policy(self): for serial_number in self.serial_numbers: self.switch_issu_details.filter = serial_number - diff = {} + diff:Dict[str, Any] = {} diff["action"] = self.action diff["ip_address"] = self.switch_issu_details.ip_address diff["logical_name"] = self.switch_issu_details.device_name diff --git a/plugins/module_utils/image_mgmt/image_stage.py b/plugins/module_utils/image_mgmt/image_stage.py index 8c2f26d5f..6bff94b9d 100644 --- a/plugins/module_utils/image_mgmt/image_stage.py +++ b/plugins/module_utils/image_mgmt/image_stage.py @@ -239,6 +239,7 @@ def commit(self): diff["logical_name"] = self.issu_detail.device_name diff["policy"] = self.issu_detail.policy diff["serial_number"] = serial_number + # See image_upgrade_common.py for the definition of self.diff self.diff = copy.deepcopy(diff) def _wait_for_current_actions_to_complete(self): diff --git a/plugins/module_utils/image_mgmt/image_upgrade.py b/plugins/module_utils/image_mgmt/image_upgrade.py index 18ec2b9c6..c0f5c4456 100644 --- a/plugins/module_utils/image_mgmt/image_upgrade.py +++ b/plugins/module_utils/image_mgmt/image_upgrade.py @@ -488,6 +488,7 @@ def commit(self) -> None: self.response = copy.deepcopy(response) self.response_data = response_data + # See image_upgrade_common.py for the definition of self.diff self.diff = copy.deepcopy(self.payload) self._wait_for_image_upgrade_to_complete() diff --git a/plugins/module_utils/image_mgmt/image_validate.py b/plugins/module_utils/image_mgmt/image_validate.py index 2f5eff5b2..0f2f3bfcb 100644 --- a/plugins/module_utils/image_mgmt/image_validate.py +++ b/plugins/module_utils/image_mgmt/image_validate.py @@ -209,6 +209,7 @@ def commit(self) -> None: diff["logical_name"] = self.issu_detail.device_name diff["policy"] = self.issu_detail.policy diff["serial_number"] = serial_number + # See image_upgrade_common.py for the definition of self.diff self.diff = copy.deepcopy(diff) def _wait_for_current_actions_to_complete(self) -> None: