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.
Files changed (111) hide show
  1. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/CHANGELOG.md +19 -0
  2. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/CLAUDE.md +1 -15
  3. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/PKG-INFO +4 -4
  4. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/README.md +2 -2
  5. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/ci/docker-compose.yml +2 -1
  6. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/ci/testsuite +1 -1
  7. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/ci/testsuite-result.json +2948 -6600
  8. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/data/mreg-cli.conf +1 -1
  9. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/_version.py +3 -3
  10. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/cli.py +15 -6
  11. mreg_cli-1.12.0/mreg_cli/client.py +295 -0
  12. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/cache.py +5 -5
  13. mreg_cli-1.12.0/mreg_cli/commands/dhcp.py +226 -0
  14. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/group.py +51 -36
  15. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/help.py +11 -17
  16. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/host_submodules/a_aaaa.py +63 -43
  17. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/host_submodules/bacnet.py +37 -23
  18. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/host_submodules/cname.py +25 -36
  19. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/host_submodules/core.py +117 -56
  20. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/host_submodules/rr.py +205 -153
  21. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/label.py +23 -18
  22. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/network.py +279 -147
  23. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/permission.py +35 -44
  24. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/policy.py +85 -78
  25. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/root.py +2 -3
  26. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/zone.py +131 -47
  27. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/config.py +2 -2
  28. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/exceptions.py +27 -54
  29. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/main.py +4 -27
  30. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/group.py +5 -2
  31. mreg_cli-1.12.0/mreg_cli/output/history.py +57 -0
  32. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/host.py +26 -20
  33. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/network.py +15 -7
  34. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/policy.py +8 -4
  35. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/zone.py +3 -1
  36. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/outputmanager.py +20 -2
  37. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/types.py +4 -2
  38. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/utilities/api.py +5 -7
  39. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/utilities/shared.py +1 -1
  40. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli.egg-info/PKG-INFO +4 -4
  41. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli.egg-info/SOURCES.txt +5 -0
  42. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli.egg-info/requires.txt +1 -1
  43. mreg_cli-1.12.0/mreg_cli.egg-info/scm_file_list.json +100 -0
  44. mreg_cli-1.12.0/mreg_cli.egg-info/scm_version.json +8 -0
  45. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/pyproject.toml +3 -2
  46. mreg_cli-1.12.0/tests/api/test_client.py +108 -0
  47. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/commands/test_host.py +3 -3
  48. mreg_cli-1.12.0/tests/commands/test_network.py +162 -0
  49. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/conftest.py +3 -6
  50. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/test_config.py +1 -1
  51. mreg_cli-1.12.0/tests/test_exceptions.py +291 -0
  52. mreg_cli-1.12.0/tests/utilities/__init__.py +0 -0
  53. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/uv.lock +109 -7
  54. mreg_cli-1.10.0/mreg_cli/commands/dhcp.py +0 -129
  55. mreg_cli-1.10.0/mreg_cli/output/history.py +0 -90
  56. mreg_cli-1.10.0/tests/api/test_client.py +0 -33
  57. mreg_cli-1.10.0/tests/test_exceptions.py +0 -164
  58. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/.github/workflows/publish.yml +0 -0
  59. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/.github/workflows/test.yml +0 -0
  60. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/.gitignore +0 -0
  61. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/.markdownlint.json +0 -0
  62. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/AUTHORS +0 -0
  63. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/CONTRIBUTING +0 -0
  64. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/LICENSE +0 -0
  65. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/ci/Dockerfile +0 -0
  66. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/ci/diff.py +0 -0
  67. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/ci/run_testsuite_and_record_V2.sh +0 -0
  68. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/__about__.py +0 -0
  69. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/__init__.py +0 -0
  70. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/__main__.py +0 -0
  71. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/choices.py +0 -0
  72. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/__init__.py +0 -0
  73. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/base.py +0 -0
  74. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/host.py +0 -0
  75. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/host_submodules/__init__.py +0 -0
  76. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/logging.py +0 -0
  77. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/recording.py +0 -0
  78. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/commands/registry.py +0 -0
  79. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/dirs.py +0 -0
  80. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/errorbuilder.py +0 -0
  81. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/help_formatter.py +0 -0
  82. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/log.py +0 -0
  83. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/__init__.py +0 -0
  84. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/base.py +0 -0
  85. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/cache.py +0 -0
  86. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/output/meta.py +0 -0
  87. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/prompt.py +0 -0
  88. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/py.typed +0 -0
  89. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/tags.txt +0 -0
  90. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/tokenfile.py +0 -0
  91. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/utilities/__init__.py +0 -0
  92. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/utilities/fs.py +0 -0
  93. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli/utilities/validators.py +0 -0
  94. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli.egg-info/dependency_links.txt +0 -0
  95. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli.egg-info/entry_points.txt +0 -0
  96. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/mreg_cli.egg-info/top_level.txt +0 -0
  97. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/run.py +0 -0
  98. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/setup.cfg +0 -0
  99. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/__init__.py +0 -0
  100. {mreg_cli-1.10.0/tests/commands → mreg_cli-1.12.0/tests/api}/__init__.py +0 -0
  101. {mreg_cli-1.10.0/tests/utilities → mreg_cli-1.12.0/tests/commands}/__init__.py +0 -0
  102. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/commands/test_rr.py +0 -0
  103. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/test_errorbuilder.py +0 -0
  104. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/test_log.py +0 -0
  105. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/test_outputmanager.py +0 -0
  106. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/test_prompt.py +0 -0
  107. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/test_tokenfile.py +0 -0
  108. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/test_types.py +0 -0
  109. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/utilities/test_fs.py +0 -0
  110. {mreg_cli-1.10.0 → mreg_cli-1.12.0}/tests/utils.py +0 -0
  111. {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(hostlist)` - HostList result
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.10.0
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.3.0,>=0.2.0
29
+ Requires-Dist: mreg-api<0.7.0,>=0.6.0
30
30
  Dynamic: license-file
31
31
 
32
32
  # MREG CLI [![Build Status](https://github.com/unioslo/mreg-cli/actions/workflows/test.yml/badge.svg)](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 300 seconds (5 minutes).
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=300
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 300 seconds (5 minutes).
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=300
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: 10
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 -created 2018-07-07 orange "Round and orange"
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"