opn_api 1.0.0 → 1.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4849faffbc79c96ff2c9cd0b00d0b22ddb376fefc1179bef6759d87571becbce
4
- data.tar.gz: 6b37d3cdb52fd5d71e4ad1a9daa1e01fd30a308344e49dad1be66016a26b3e9a
3
+ metadata.gz: f94456d689ab1989cfc696c287aa509ab927317704ea4fd82966c65da96597d2
4
+ data.tar.gz: 7f386d5b41222ff0c8d36f0de8290be7498b18adb5bcf026e47adbf2e58ba5ab
5
5
  SHA512:
6
- metadata.gz: 04a49796e1ab3bf2a1fdbe5eb01ad7d7487c7396e54d5a020480c7113925afb5a3dfbeb1cbe6cfc08d72929684e4d0e6f2e99bb4cdce473f9ab46e36f0de1928
7
- data.tar.gz: 8c3cded6629294868dfce670e77fd724f099018b03859efd0540fb70eb09d72ed000802fb77565a2487a50a8939d3440fa51b609052f15bc29b43cdc3a0124d7
6
+ metadata.gz: f947e646e36ceed441dba97b007f7e7e5a1862118b8f1217f5e9017fb5e2676f82a1599acd827f7eb1aa70c559944c0ae454462a09dd5336ce8454547747cea4
7
+ data.tar.gz: 125f3896963cecedb3ebb72812abb9e5894bd489ffc29b64d794acef4c8445efeabc039b17492950fb92906299326aaedbf85840898a1f3f5c8c245b71c3ace0
data/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [v1.1.0] - 2026-03-23
9
+
10
+ ### Added
11
+ * Add support for Puppet Agent plugin
12
+
8
13
  ## [v1.0.0] - 2026-03-17
9
14
 
10
15
  ### Added
@@ -17,4 +22,5 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
17
22
 
18
23
  Initial release.
19
24
 
25
+ [v1.1.0]: https://github.com/markt-de/opn-api/compare/v1.0.0...v1.1.0
20
26
  [v1.0.0]: https://github.com/markt-de/opn-api/compare/v0.1.0...v1.0.0
data/README.md CHANGED
@@ -27,6 +27,7 @@ A Ruby client library and CLI tool for the OPNsense REST API.
27
27
  - [Node Exporter](#node-exporter)
28
28
  - [OpenVPN](#openvpn)
29
29
  - [Plugins](#plugins)
30
+ - [Puppet Agent](#puppet-agent)
30
31
  - [Routes](#routes)
31
32
  - [Service reconfigure](#service-reconfigure-1)
32
33
  - [Snapshots](#snapshots)
@@ -121,6 +122,7 @@ Backups and plugins are managed separately via dedicated commands (`backup`, `pl
121
122
  | `openvpn_cso` | OpenVPN client-specific overrides |
122
123
  | `openvpn_instance` | OpenVPN instances |
123
124
  | `openvpn_statickey` | OpenVPN static keys |
125
+ | `puppet_agent` | Puppet Agent settings (singleton) |
124
126
  | `route` | Static routes |
125
127
  | `snapshot` | ZFS snapshots |
126
128
  | `syslog` | Syslog remote destinations |
@@ -607,6 +609,22 @@ $ opn-api -d opnsense01 uninstall os-haproxy
607
609
 
608
610
  Note: Install/uninstall are asynchronous — the API returns immediately while the operation continues in the background.
609
611
 
612
+ ### Puppet Agent
613
+
614
+ Puppet Agent is a singleton resource (one per device).
615
+
616
+ ```
617
+ # Show Puppet Agent settings (singleton)
618
+ $ opn-api -d opnsense01 show puppet_agent
619
+
620
+ # Update Puppet Agent settings (wrapper key: "puppetagent")
621
+ $ opn-api -d opnsense01 update puppet_agent \
622
+ -j '{"puppetagent":{"general":{"Enabled":"1","FQDN":"puppet.example.com","Environment":"production"}}}'
623
+
624
+ # Apply changes
625
+ $ opn-api -d opnsense01 reconfigure puppet_agent
626
+ ```
627
+
610
628
  ### Routes
611
629
 
612
630
  ```
@@ -962,7 +980,7 @@ Resource names follow the [puppet-opn](https://github.com/markt-de/puppet-opn) n
962
980
 
963
981
  `OpnApi::ServiceReconfigure` orchestrates service reloads after configuration changes. Features include:
964
982
 
965
- - Registry pattern with 18 pre-registered OPNsense service groups
983
+ - Registry pattern with many pre-registered OPNsense service groups
966
984
  - Mark/run pattern: track devices with changes, then batch-reconfigure
967
985
  - Configtest support (e.g. HAProxy validates config before reconfigure)
968
986
  - Error tracking: skip reconfigure for devices with failed resource changes
@@ -259,6 +259,13 @@ module OpnApi
259
259
  crud_action: '%{action}', wrapper: 'general',
260
260
  singleton: true, search_method: :get
261
261
  },
262
+ # --- Puppet Agent ---
263
+ 'puppet_agent' => {
264
+ base_path: 'puppetagent/settings', search_action: 'get',
265
+ crud_action: '%{action}', wrapper: 'puppetagent',
266
+ singleton: true, search_method: :get,
267
+ response_dig: ['general']
268
+ },
262
269
  # --- OpenVPN ---
263
270
  'openvpn_cso' => {
264
271
  base_path: 'openvpn/client_overwrites', search_action: 'search',
@@ -258,6 +258,11 @@ module OpnApi
258
258
  endpoint: 'nodeexporter/service/reconfigure',
259
259
  log_prefix: 'opn_node_exporter')
260
260
 
261
+ # Puppet Agent
262
+ register(:puppet_agent,
263
+ endpoint: 'puppetagent/service/reconfigure',
264
+ log_prefix: 'opn_puppet_agent')
265
+
261
266
  # OpenVPN
262
267
  register(:openvpn,
263
268
  endpoint: 'openvpn/service/reconfigure',
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpnApi
4
- VERSION = '1.0.0'
4
+ VERSION = '1.1.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opn_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - markt-de