mreg-cli 1.10.0__tar.gz → 1.12.0__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_cli-1.10.0 → mreg_cli-1.12.0}/CHANGELOG.md +19 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/CLAUDE.md +1 -15
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/PKG-INFO +4 -4
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/README.md +2 -2
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/ci/docker-compose.yml +2 -1
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/ci/testsuite +1 -1
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/ci/testsuite-result.json +2948 -6600
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/data/mreg-cli.conf +1 -1
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/_version.py +3 -3
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/cli.py +15 -6
- mreg_cli-1.12.0/mreg_cli/client.py +295 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/cache.py +5 -5
- mreg_cli-1.12.0/mreg_cli/commands/dhcp.py +226 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/group.py +51 -36
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/help.py +11 -17
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/host_submodules/a_aaaa.py +63 -43
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/host_submodules/bacnet.py +37 -23
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/host_submodules/cname.py +25 -36
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/host_submodules/core.py +117 -56
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/host_submodules/rr.py +205 -153
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/label.py +23 -18
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/network.py +279 -147
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/permission.py +35 -44
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/policy.py +85 -78
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/root.py +2 -3
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/zone.py +131 -47
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/config.py +2 -2
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/exceptions.py +27 -54
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/main.py +4 -27
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/group.py +5 -2
- mreg_cli-1.12.0/mreg_cli/output/history.py +57 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/host.py +26 -20
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/network.py +15 -7
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/policy.py +8 -4
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/zone.py +3 -1
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/outputmanager.py +20 -2
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/types.py +4 -2
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/utilities/api.py +5 -7
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/utilities/shared.py +1 -1
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli.egg-info/PKG-INFO +4 -4
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli.egg-info/SOURCES.txt +5 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli.egg-info/requires.txt +1 -1
- mreg_cli-1.12.0/mreg_cli.egg-info/scm_file_list.json +100 -0
- mreg_cli-1.12.0/mreg_cli.egg-info/scm_version.json +8 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/pyproject.toml +3 -2
- mreg_cli-1.12.0/tests/api/test_client.py +108 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/commands/test_host.py +3 -3
- mreg_cli-1.12.0/tests/commands/test_network.py +162 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/conftest.py +3 -6
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/test_config.py +1 -1
- mreg_cli-1.12.0/tests/test_exceptions.py +291 -0
- mreg_cli-1.12.0/tests/utilities/__init__.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/uv.lock +109 -7
- mreg_cli-1.10.0/mreg_cli/commands/dhcp.py +0 -129
- mreg_cli-1.10.0/mreg_cli/output/history.py +0 -90
- mreg_cli-1.10.0/tests/api/test_client.py +0 -33
- mreg_cli-1.10.0/tests/test_exceptions.py +0 -164
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/.github/workflows/publish.yml +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/.github/workflows/test.yml +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/.gitignore +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/.markdownlint.json +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/AUTHORS +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/CONTRIBUTING +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/LICENSE +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/ci/Dockerfile +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/ci/diff.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/ci/run_testsuite_and_record_V2.sh +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/__about__.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/__init__.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/__main__.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/choices.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/__init__.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/base.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/host.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/host_submodules/__init__.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/logging.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/recording.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/registry.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/dirs.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/errorbuilder.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/help_formatter.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/log.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/__init__.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/base.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/cache.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/meta.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/prompt.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/py.typed +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/tags.txt +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/tokenfile.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/utilities/__init__.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/utilities/fs.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/utilities/validators.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli.egg-info/dependency_links.txt +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli.egg-info/entry_points.txt +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli.egg-info/top_level.txt +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/run.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/setup.cfg +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/__init__.py +0 -0
- {mreg_cli-1.10.0/tests/commands → mreg_cli-1.12.0/tests/api}/__init__.py +0 -0
- {mreg_cli-1.10.0/tests/utilities → mreg_cli-1.12.0/tests/commands}/__init__.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/commands/test_rr.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/test_errorbuilder.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/test_log.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/test_outputmanager.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/test_prompt.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/test_tokenfile.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/test_types.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/utilities/test_fs.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/utils.py +0 -0
- {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tox.ini +0 -0
|
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
<!-- ## Unreleased -->
|
|
9
9
|
|
|
10
|
+
## [1.12.0](https://github.com/unioslo/mreg-cli/releases/tag/1.12.0) - 2026-10-05
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Mreg API errors are now rendered as human-readable messages instead of formatted JSON. This is a result of improved exception parsing and handling in `mreg-api` 0.6.0.
|
|
15
|
+
- Large internal refactor of exceptions, drastically reducing the number of exception classes. Should have no effect on the user experience.
|
|
16
|
+
|
|
17
|
+
## [1.11.0](https://github.com/unioslo/mreg-cli/releases/tag/1.11.0) - 2026-09-09
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Cache TTL now defaults to 60 seconds.
|
|
22
|
+
- `mreg-api` upgraded to 0.5.0, which optimizes creating and updating resources.
|
|
23
|
+
|
|
10
24
|
## [1.10.0](https://github.com/unioslo/mreg-cli/releases/tag/1.10.0) - 2026-05-22
|
|
11
25
|
|
|
12
26
|
### Changed
|
|
@@ -18,6 +32,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
18
32
|
|
|
19
33
|
- `naptr_remove` removing all records regardless of the provided options. Now requires all options to match for a record to be removed.
|
|
20
34
|
|
|
35
|
+
### Deprecated
|
|
36
|
+
|
|
37
|
+
- `policy atom_create -created` option. This option is now hidden and will be removed in a future release.
|
|
38
|
+
- `policy role_create -created` option. This option is now hidden and will be removed in a future release.
|
|
39
|
+
|
|
21
40
|
## [1.9.0](https://github.com/unioslo/mreg-cli/releases/tag/1.9.0) - 2026-04-14
|
|
22
41
|
|
|
23
42
|
### Changed
|
|
@@ -53,7 +53,7 @@ def zone_info(args):
|
|
|
53
53
|
|
|
54
54
|
- `output_host(host, names=False, traverse_hostgroups=False)` - Single host
|
|
55
55
|
- `output_hosts(hosts, names=False, traverse_hostgroups=False)` - Multiple hosts
|
|
56
|
-
- `output_hostlist(
|
|
56
|
+
- `output_hostlist(hosts)` - table of hosts
|
|
57
57
|
- `output_ipaddresses(ips, padding=14, names=False)` - IP addresses
|
|
58
58
|
- `output_cnames(cnames, host=None, padding=14)` - CNAME records
|
|
59
59
|
- `output_mxs(mxs, padding=14)` - MX records
|
|
@@ -125,20 +125,6 @@ This allows uniform handling of exceptions from both `mreg_cli` and `mreg_api`.
|
|
|
125
125
|
|
|
126
126
|
### Exception Classes
|
|
127
127
|
|
|
128
|
-
Exception classes in `mreg_cli.exceptions` are pure data containers with no output methods:
|
|
129
|
-
|
|
130
|
-
```text
|
|
131
|
-
CliException (base)
|
|
132
|
-
├── CliError (non-recoverable errors, displayed in red)
|
|
133
|
-
│ ├── CreateError, PatchError, DeleteError, GetError
|
|
134
|
-
│ ├── InternalError, FileError, ValidationError, LoginFailedError
|
|
135
|
-
└── CliWarning (recoverable, displayed in italics)
|
|
136
|
-
├── APIError (has response attribute), UnexpectedDataError
|
|
137
|
-
├── EntityNotFound, EntityAlreadyExists, MultipleEntitiesFound
|
|
138
|
-
├── TooManyResults, NoHistoryFound, ForceMissing
|
|
139
|
-
└── IPNetworkWarning and subclasses
|
|
140
|
-
```
|
|
141
|
-
|
|
142
128
|
### Exception Handling Locations
|
|
143
129
|
|
|
144
130
|
- `mreg_cli/cli.py` - Main command parsing catches and handles exceptions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mreg-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.12.0
|
|
4
4
|
Summary: MREG interactive command line client
|
|
5
5
|
Author: Others (see AUTHORS)
|
|
6
6
|
Author-email: Øyvind Kolbu <oyvind.kolbu@usit.uio.no>, Safet A <amedov@usit.uio.no>, Magnus Hirth <mhmorgan42@gmail.com>, Nico <nicolaydmohebi@gmail.com>, Marius Bakke <marius.bakke@usit.uio.no>, Fredrik Larsen <fredrik.larsen@usit.uio.no>, Paal Braathen <paal.braathen@usit.uio.no>, Nils Hiorth <nils@nls.me>, Dmytro Karpenko <dmytrok@usit.uio.no>
|
|
@@ -26,7 +26,7 @@ Requires-Dist: pydantic-extra-types>=2.1.0
|
|
|
26
26
|
Requires-Dist: platformdirs>=4.3.0
|
|
27
27
|
Requires-Dist: pydantic-settings>=2.10.1
|
|
28
28
|
Requires-Dist: rich>=13.9.4
|
|
29
|
-
Requires-Dist: mreg-api<0.
|
|
29
|
+
Requires-Dist: mreg-api<0.7.0,>=0.6.0
|
|
30
30
|
Dynamic: license-file
|
|
31
31
|
|
|
32
32
|
# MREG CLI [](https://github.com/unioslo/mreg-cli/actions/workflows/test.yml)
|
|
@@ -200,11 +200,11 @@ cache=true
|
|
|
200
200
|
|
|
201
201
|
### Cache TTL
|
|
202
202
|
|
|
203
|
-
Time-to-live for cached API results, in seconds. Defaults to
|
|
203
|
+
Time-to-live for cached API results, in seconds. Defaults to 60 seconds (1 minute).
|
|
204
204
|
|
|
205
205
|
```ini
|
|
206
206
|
[mreg]
|
|
207
|
-
cache_ttl=
|
|
207
|
+
cache_ttl=60
|
|
208
208
|
```
|
|
209
209
|
|
|
210
210
|
### History
|
|
@@ -169,11 +169,11 @@ cache=true
|
|
|
169
169
|
|
|
170
170
|
### Cache TTL
|
|
171
171
|
|
|
172
|
-
Time-to-live for cached API results, in seconds. Defaults to
|
|
172
|
+
Time-to-live for cached API results, in seconds. Defaults to 60 seconds (1 minute).
|
|
173
173
|
|
|
174
174
|
```ini
|
|
175
175
|
[mreg]
|
|
176
|
-
cache_ttl=
|
|
176
|
+
cache_ttl=60
|
|
177
177
|
```
|
|
178
178
|
|
|
179
179
|
### History
|
|
@@ -14,6 +14,7 @@ services:
|
|
|
14
14
|
|
|
15
15
|
mreg:
|
|
16
16
|
image: ${MREG_IMAGE:?MREG_IMAGE environment variable not set}
|
|
17
|
+
pull_policy: ${MREG_IMAGE_PULL_POLICY:-missing}
|
|
17
18
|
container_name: mreg
|
|
18
19
|
depends_on:
|
|
19
20
|
postgres:
|
|
@@ -31,7 +32,7 @@ services:
|
|
|
31
32
|
test: sh -c "[ -f /var/run/gunicorn.pid ]"
|
|
32
33
|
interval: 5s
|
|
33
34
|
timeout: 5s
|
|
34
|
-
retries:
|
|
35
|
+
retries: 20
|
|
35
36
|
start_period: 30s
|
|
36
37
|
|
|
37
38
|
# The purpose of the dummy container is to depend on the mreg container,
|
|
@@ -180,7 +180,7 @@ zone delegation_delete example.org wut.example.org
|
|
|
180
180
|
# - rename
|
|
181
181
|
# - set description
|
|
182
182
|
policy atom_create apple "Here's the description"
|
|
183
|
-
policy atom_create
|
|
183
|
+
policy atom_create orange "Round and orange"
|
|
184
184
|
policy list_atoms *
|
|
185
185
|
policy list_atoms ppl
|
|
186
186
|
policy role_create fruit "5 a day"
|