opn_api 0.1.0 → 1.0.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: 8f4a5b4f37a74d43e959a0dde3c5933284713c2840e640d5398b638cb6092545
4
- data.tar.gz: 15f1ce76e1ba52d46363022aeb405f860a838af32276a57155b5efeb1f074757
3
+ metadata.gz: 4849faffbc79c96ff2c9cd0b00d0b22ddb376fefc1179bef6759d87571becbce
4
+ data.tar.gz: 6b37d3cdb52fd5d71e4ad1a9daa1e01fd30a308344e49dad1be66016a26b3e9a
5
5
  SHA512:
6
- metadata.gz: ae8a89720dfb7364ed49c6df05e87fd85cb9eca7bc5ba42f7cce4d9c8269e772ea4a21299a092dda352ad1d27c0fcc4da98b5d02d8222273a11e27e4698cac91
7
- data.tar.gz: 9c607e3f96345a7f4544600f070084f63495b812fb5f5e4e57a551fb2b7a28e14b6eff33cc5cd6597edc348a0745f822a55c2bef98e13206b560ed6a4a6cc490
6
+ metadata.gz: 04a49796e1ab3bf2a1fdbe5eb01ad7d7487c7396e54d5a020480c7113925afb5a3dfbeb1cbe6cfc08d72929684e4d0e6f2e99bb4cdce473f9ab46e36f0de1928
7
+ data.tar.gz: 8c3cded6629294868dfce670e77fd724f099018b03859efd0540fb70eb09d72ed000802fb77565a2487a50a8939d3440fa51b609052f15bc29b43cdc3a0124d7
data/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ 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
- ## 0.1.0
8
+ ## [v1.0.0] - 2026-03-17
9
+
10
+ ### Added
11
+ * Add GitHub Actions CI workflow
12
+
13
+ ### Fixed
14
+ * Fix unit tests
15
+
16
+ ## v0.1.0 - 2026-03-16
9
17
 
10
18
  Initial release.
19
+
20
+ [v1.0.0]: https://github.com/markt-de/opn-api/compare/v0.1.0...v1.0.0
data/README.md CHANGED
@@ -928,7 +928,7 @@ results = OpnApi::ServiceReconfigure[:haproxy].run
928
928
 
929
929
  ### Config loader
930
930
 
931
- `OpnApi::Config` loads device credentials from YAML files with a hierarchical search path. Supports multiple devices and is compatible with puppet-opn's device file format.
931
+ `OpnApi::Config` loads device credentials from YAML files with a hierarchical search path. Supports multiple devices and is compatible with [puppet-opn's](https://github.com/markt-de/puppet-opn) device file format.
932
932
 
933
933
  ### ID resolver
934
934
 
@@ -13,7 +13,7 @@ module OpnApi
13
13
  #
14
14
  # @example Direct instantiation
15
15
  # client = OpnApi::Client.new(
16
- # url: 'https://fw.example.com/api',
16
+ # url: 'https://opnsense01.example.com/api',
17
17
  # api_key: '+ABC...', api_secret: '+XYZ...',
18
18
  # ssl_verify: false,
19
19
  # )
@@ -21,12 +21,12 @@ module OpnApi
21
21
  #
22
22
  # @example From Config
23
23
  # config = OpnApi::Config.new
24
- # client = config.client_for('myfw')
24
+ # client = config.client_for('opnsense01')
25
25
  class Client
26
26
  DEFAULT_URL = 'http://localhost:80/api'
27
27
  MAX_REDIRECTS = 5
28
28
 
29
- # @param url [String] Base URL of the OPNsense API (e.g. 'https://fw.example.com/api')
29
+ # @param url [String] Base URL of the OPNsense API (e.g. 'https://opnsense01.example.com/api')
30
30
  # @param api_key [String] OPNsense API key
31
31
  # @param api_secret [String] OPNsense API secret
32
32
  # @param ssl_verify [Boolean] Whether to verify SSL certificates (default: true)
@@ -23,12 +23,12 @@ module OpnApi
23
23
  #
24
24
  # @example
25
25
  # config = OpnApi::Config.new
26
- # config.device_names # => ['myfw', 'backup']
27
- # client = config.client_for('myfw')
26
+ # config.device_names # => ['opnsense01', 'backup']
27
+ # client = config.client_for('opnsense01')
28
28
  #
29
29
  # @example With explicit path (e.g. for puppet-opn integration)
30
30
  # config = OpnApi::Config.new(config_dir: '/etc/puppetlabs/puppet/opn')
31
- # client = config.client_for('myfw')
31
+ # client = config.client_for('opnsense01')
32
32
  class Config
33
33
  SYSTEM_DIR = '/etc/opn-api/devices'
34
34
  USER_DIR = File.join(Dir.home, '.config', 'opn-api', 'devices')
@@ -17,7 +17,7 @@ module OpnApi
17
17
  # 'linkedServers' => { endpoint: 'haproxy/settings/search_servers', multiple: true },
18
18
  # 'sslCA' => { endpoint: 'trust/ca/search', id_field: 'refid', name_field: 'descr' },
19
19
  # }
20
- # translated = OpnApi::IdResolver.translate_to_names(client, 'myfw', relation_fields, config)
20
+ # translated = OpnApi::IdResolver.translate_to_names(client, 'opnsense01', relation_fields, config)
21
21
  module IdResolver
22
22
  UUID_RE = %r{\A[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}\z}
23
23
 
@@ -16,9 +16,9 @@ module OpnApi
16
16
  # endpoint: 'ipsec/service/reconfigure',
17
17
  # log_prefix: 'opn_ipsec')
18
18
  #
19
- # OpnApi::ServiceReconfigure[:ipsec].mark('myfw', client)
19
+ # OpnApi::ServiceReconfigure[:ipsec].mark('opnsense01', client)
20
20
  # results = OpnApi::ServiceReconfigure[:ipsec].run
21
- # # => { 'myfw' => :ok }
21
+ # # => { 'opnsense01' => :ok }
22
22
  class ServiceReconfigure
23
23
  # Global registry of named instances.
24
24
  @registry = {}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpnApi
4
- VERSION = '0.1.0'
4
+ VERSION = '1.0.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opn_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - markt-de
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-03-16 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: |
14
13
  A standalone Ruby library and command-line tool for communicating with
@@ -51,7 +50,6 @@ licenses:
51
50
  - BSD-2-Clause
52
51
  metadata:
53
52
  rubygems_mfa_required: 'true'
54
- post_install_message:
55
53
  rdoc_options: []
56
54
  require_paths:
57
55
  - lib
@@ -66,8 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
64
  - !ruby/object:Gem::Version
67
65
  version: '0'
68
66
  requirements: []
69
- rubygems_version: 3.4.20
70
- signing_key:
67
+ rubygems_version: 4.0.6
71
68
  specification_version: 4
72
69
  summary: Ruby client library and CLI for the OPNsense REST API
73
70
  test_files: []