MCPcopy Create free account
hub / github.com/adobe/Marinus / set_offset

Method set_offset

python3_cron_scripts/libs3/UltraDNSHelper.py:128–138  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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()

Calls

no outgoing calls

Tested by

no test coverage detected