mreg-api 0.2.1__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mreg_api-0.2.1 → mreg_api-0.2.3}/CHANGELOG.md +16 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/PKG-INFO +1 -1
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/_version.py +3 -3
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/endpoints.py +0 -1
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/models/models.py +8 -8
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api.egg-info/PKG-INFO +1 -1
- {mreg_api-0.2.1 → mreg_api-0.2.3}/.github/workflows/publish.yml +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/.github/workflows/test.yml +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/.gitignore +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/.markdownlint.json +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/.pre-commit-config.yaml +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/LICENSE +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/NOTES.md +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/README.md +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/__about__.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/__init__.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/cache.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/client.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/events.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/exceptions.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/models/__init__.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/models/abstracts.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/models/fields.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/models/history.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/py.typed +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/types.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/utilities/__init__.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/utilities/fs.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/utilities/shared.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api.egg-info/SOURCES.txt +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api.egg-info/dependency_links.txt +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api.egg-info/requires.txt +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api.egg-info/top_level.txt +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/pyproject.toml +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/setup.cfg +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/__init__.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/conftest.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/models/__init__.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/models/test_fields.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/models/test_history.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/models/test_models.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/test_cache.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/test_client.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/test_events.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/test_exceptions.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/test_types.py +0 -0
- {mreg_api-0.2.1 → mreg_api-0.2.3}/uv.lock +0 -0
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
<!-- ## Unreleased -->
|
|
9
9
|
|
|
10
|
+
## [0.2.3](https://github.com/unioslo/mreg-api/releases/tag/0.2.3) - 2026-05-21
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Fixed `NAPTR` fields missing defaults after removal of nullability.
|
|
15
|
+
|
|
16
|
+
## [0.2.2](https://github.com/unioslo/mreg-api/releases/tag/0.2.2) - 2026-04-23
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Removed nullability of `NAPTR` fields.
|
|
21
|
+
|
|
22
|
+
### Removed
|
|
23
|
+
|
|
24
|
+
- Duplicate endpoint `Endpoints.NAPTRs`. Now only `Endpoints.Naptrs` exists.
|
|
25
|
+
|
|
10
26
|
## [0.2.1](https://github.com/unioslo/mreg-api/releases/tag/0.2.1) - 2026-04-20
|
|
11
27
|
|
|
12
28
|
### Added
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.2.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 2,
|
|
21
|
+
__version__ = version = '0.2.3'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 2, 3)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'ga3717eba5'
|
|
@@ -891,7 +891,7 @@ class Zone(FrozenModelWithTimestamps, WithTTL, APIMixin):
|
|
|
891
891
|
|
|
892
892
|
self.ensure_delegation_in_zone(name)
|
|
893
893
|
cls = Delegation.type_by_zone(self)
|
|
894
|
-
resp = MregClient().get(cls.
|
|
894
|
+
resp = MregClient().get(cls.endpoint_with_name(self, name), ok404=True)
|
|
895
895
|
if not resp:
|
|
896
896
|
return None
|
|
897
897
|
return cls.model_validate_json(resp.text)
|
|
@@ -951,7 +951,7 @@ class Zone(FrozenModelWithTimestamps, WithTTL, APIMixin):
|
|
|
951
951
|
# Check if delegation exists
|
|
952
952
|
self.ensure_delegation_in_zone(name) # check name
|
|
953
953
|
delegation = self.get_delegation_or_raise(name)
|
|
954
|
-
resp = MregClient().delete(delegation.
|
|
954
|
+
resp = MregClient().delete(delegation.endpoint_with_name(self, name))
|
|
955
955
|
return resp.is_success if resp else False
|
|
956
956
|
|
|
957
957
|
def set_delegation_comment(self, name: str, comment: str) -> None:
|
|
@@ -966,7 +966,7 @@ class Zone(FrozenModelWithTimestamps, WithTTL, APIMixin):
|
|
|
966
966
|
delegation = self.get_delegation_or_raise(name)
|
|
967
967
|
try:
|
|
968
968
|
MregClient().patch(
|
|
969
|
-
delegation.
|
|
969
|
+
delegation.endpoint_with_name(self, delegation.name), json={"comment": comment}
|
|
970
970
|
)
|
|
971
971
|
except PatchError as e:
|
|
972
972
|
# TODO: implement after mreg-cli parity
|
|
@@ -1087,7 +1087,7 @@ class Delegation(FrozenModelWithTimestamps, WithZone):
|
|
|
1087
1087
|
return Endpoint.ForwardZonesDelegations
|
|
1088
1088
|
|
|
1089
1089
|
@classmethod
|
|
1090
|
-
def
|
|
1090
|
+
def endpoint_with_name(cls, zone: Zone, name: str) -> str:
|
|
1091
1091
|
"""Return the path to a delegation in a specific zone."""
|
|
1092
1092
|
if cls.is_reverse():
|
|
1093
1093
|
endpoint = Endpoint.ReverseZonesDelegationsZone
|
|
@@ -2603,9 +2603,9 @@ class NAPTR(FrozenModelWithTimestamps, WithHost, APIMixin):
|
|
|
2603
2603
|
id: int # noqa: A003
|
|
2604
2604
|
preference: int
|
|
2605
2605
|
order: int
|
|
2606
|
-
flag: str
|
|
2607
|
-
service: str
|
|
2608
|
-
regex: str
|
|
2606
|
+
flag: str = ""
|
|
2607
|
+
service: str = ""
|
|
2608
|
+
regex: str = ""
|
|
2609
2609
|
replacement: str
|
|
2610
2610
|
|
|
2611
2611
|
@classmethod
|
|
@@ -2614,7 +2614,7 @@ class NAPTR(FrozenModelWithTimestamps, WithHost, APIMixin):
|
|
|
2614
2614
|
return Endpoint.Naptrs
|
|
2615
2615
|
|
|
2616
2616
|
@classmethod
|
|
2617
|
-
def headers(cls) -> list[str]:
|
|
2617
|
+
def headers(cls) -> list[str]: # TODO: remove. Move to mreg-cli
|
|
2618
2618
|
"""Return the headers for the NAPTR record."""
|
|
2619
2619
|
return [
|
|
2620
2620
|
"NAPTRs:",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|