| @@ 2040-2052 (lines=13) @@ | ||
| 2037 | ||
| 2038 | return self._send_xml_command(cmd) |
|
| 2039 | ||
| 2040 | def __get_task(self, task_id: str, usage_type: UsageType) -> Any: |
|
| 2041 | if not task_id: |
|
| 2042 | raise RequiredArgument( |
|
| 2043 | function=self.get_task.__name__, argument='task_id' |
|
| 2044 | ) |
|
| 2045 | ||
| 2046 | cmd = XmlCommand("get_tasks") |
|
| 2047 | cmd.set_attribute("task_id", task_id) |
|
| 2048 | cmd.set_attribute("usage_type", usage_type.value) |
|
| 2049 | ||
| 2050 | # for single entity always request all details |
|
| 2051 | cmd.set_attribute("details", "1") |
|
| 2052 | return self._send_xml_command(cmd) |
|
| 2053 | ||
| 2054 | def resume_audit(self, audit_id: str) -> Any: |
|
| 2055 | """Resume an existing stopped audit |
|
| @@ 1913-1925 (lines=13) @@ | ||
| 1910 | ||
| 1911 | return self._send_xml_command(cmd) |
|
| 1912 | ||
| 1913 | def __get_task(self, task_id: str, usage_type: UsageType) -> Any: |
|
| 1914 | if not task_id: |
|
| 1915 | raise RequiredArgument( |
|
| 1916 | function=self.get_task.__name__, argument='task_id' |
|
| 1917 | ) |
|
| 1918 | ||
| 1919 | cmd = XmlCommand("get_tasks") |
|
| 1920 | cmd.set_attribute("task_id", task_id) |
|
| 1921 | cmd.set_attribute("usage_type", usage_type.value) |
|
| 1922 | ||
| 1923 | # for single entity always request all details |
|
| 1924 | cmd.set_attribute("details", "1") |
|
| 1925 | return self._send_xml_command(cmd) |
|
| 1926 | ||
| 1927 | def resume_audit(self, audit_id: str) -> Any: |
|
| 1928 | """Resume an existing stopped audit |
|