Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add list_zones() #41

Merged
merged 4 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor tweak here, 0.0.3 is a work in progress so it can just go into this section until a release is cut.



## 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
Loading