Sets the offset value for the next API call to be made to UtraDNS. :param result_info: Part of response containing pagination infomation.
(self, result_info)
| 126 | self.previous_zones[sub_zone["sub_zone"]] = True |
| 127 | |
| 128 | def set_offset(self, result_info): |
| 129 | """ |
| 130 | Sets the offset value for the next API call to be made to UtraDNS. |
| 131 | :param result_info: Part of response containing pagination infomation. |
| 132 | """ |
| 133 | # The 'returnedCount' is the number of entries returned in the current API call. |
| 134 | # Add this to the previous offset to get the new offset. If the new offset value |
| 135 | # equals the 'totalCount' of records, unset offset to 0 to symbolise end of records. |
| 136 | self.offset += result_info["returnedCount"] |
| 137 | if self.offset == result_info["totalCount"]: |
| 138 | self.offset = 0 |
| 139 | |
| 140 | def __init__(self, invoking_job): |
| 141 | self._logger = self._log() |
no outgoing calls
no test coverage detected