Skip to content

Commit

Permalink
Merge pull request #41 from squintfox/add-list-zones
Browse files Browse the repository at this point in the history
Add list_zones()
  • Loading branch information
ross authored Jan 26, 2024
2 parents 619dbe8 + 718a8de commit 0244e13
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## v0.0.3 - 2023-??-??

* Enable support for root level NS records (`SUPPORTS_ROOT_NS=true`)
* Enable support for wildcard zone lookups (list_zones())


## v0.0.2 - 2022-10-10 - APIs gonna break

Expand Down
3 changes: 3 additions & 0 deletions octodns_ultra/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ def zones(self):

return self._zones

def list_zones(self):
return self.zones

def _data_for_multiple(self, _type, records):
return {
'ttl': records['ttl'],
Expand Down
4 changes: 4 additions & 0 deletions tests/test_provider_octodns_ultra.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ def test_get_zones(self):
self.assertEqual(1, mock.call_count)
self.assertEqual(1, len(zones))
self.assertEqual('testzone123.com.', zones[0])
zones = provider.list_zones()
self.assertEqual(1, mock.call_count)
self.assertEqual(1, len(zones))
self.assertEqual('testzone123.com.', zones[0])

# Test different paging behavior
provider._zones = None
Expand Down

0 comments on commit 0244e13

Please sign in to comment.