diff --git a/CHANGELOG.md b/CHANGELOG.md index 790dc66..4633846 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.0.3 - 2023-??-?? - + +* Add SUPPORTS_ROOT_NS to enable mangement of root NS records + ## v0.0.2 - 2023-02-15 - Support the filter of weight * Added filter support with type "weighted_shuffle" diff --git a/octodns_edgecenter/__init__.py b/octodns_edgecenter/__init__.py index 07767d2..82ddf14 100644 --- a/octodns_edgecenter/__init__.py +++ b/octodns_edgecenter/__init__.py @@ -141,6 +141,7 @@ def _build_url(base, *items): class _BaseProvider(BaseProvider): SUPPORTS_GEO = False SUPPORTS_DYNAMIC = True + SUPPORTS_ROOT_NS = True SUPPORTS = set(("A", "AAAA", "NS", "MX", "TXT", "SRV", "CNAME", "PTR")) def __init__(self, id, api_url, auth_url, *args, **kwargs): diff --git a/tests/test_octodns_provider_edgecenter.py b/tests/test_octodns_provider_edgecenter.py index b5f32e6..3e9d74c 100644 --- a/tests/test_octodns_provider_edgecenter.py +++ b/tests/test_octodns_provider_edgecenter.py @@ -234,8 +234,8 @@ def test_apply(self): plan = provider.plan(self.expected) # TC: create all - self.assertEqual(13, len(plan.changes)) - self.assertEqual(13, provider.apply(plan)) + self.assertEqual(14, len(plan.changes)) + self.assertEqual(14, provider.apply(plan)) self.assertFalse(plan.exists) provider._client._request.assert_has_calls( @@ -258,6 +258,17 @@ def test_apply(self): ], }, ), + call( + 'POST', + 'http://api/zones/unit.tests/unit.tests./NS', + data={ + 'ttl': 300, + 'resource_records': [ + {'content': ['ns1.edgedns.ru.']}, + {'content': ['ns2.edgedns.ru.']}, + ], + }, + ), call( "POST", "http://api/zones/unit.tests/_imap._tcp.unit.tests./SRV", @@ -383,7 +394,7 @@ def test_apply(self): ] ) # expected number of total calls - self.assertEqual(16, provider._client._request.call_count) + self.assertEqual(17, provider._client._request.call_count) # TC: delete 1 and update 1 provider._client._request.reset_mock()