Skip to content

Commit b8e704e

Browse files
Drop OPNsense 22.7 support (#167)
* Remove 22.7 occurencies from doc * Remove 22.7 molecule test cases * Remove opnsense 22.7 from module support * Add changelog fragment
1 parent ef89309 commit b8e704e

File tree

11 files changed

+9
-239
lines changed

11 files changed

+9
-239
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
deprecated_features:
3+
- OPNsense 22.7 support has been deprecated

docs/docsite/rst/development_guide.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ The ``VERSION_MAP`` is a crucial component in the OPNsense configuration utility
124124
Structure of VERSION_MAP
125125
~~~~~~~~~~~~~~~~~~~~~~~~
126126

127-
- Top-Level Keys: Each top-level key represents a specific version of OPNsense, such as "OPNsense 22.7 (amd64/OpenSSL)".
127+
- Top-Level Keys: Each top-level key represents a specific version of OPNsense, such as "OPNsense 24.7 (amd64/OpenSSL)".
128128

129129
- Config Context: Config context define a reusable context for modules to be consumed. They scope settings, configure functions and php requirements to single use cases. An Ansible Module can use one or multiple config contexts to access XML-Settings or php functions.
130130

@@ -152,7 +152,7 @@ Example
152152
.. code-block:: python
153153
154154
VERSION_MAP = {
155-
"OPNsense 22.7 (amd64/OpenSSL)": {
155+
"24.7": {
156156
"system_settings_general": {
157157
"hostname": "system/hostname",
158158
"domain": "system/domain",
@@ -170,12 +170,12 @@ Example
170170
},
171171
}
172172
},
173-
"OPNsense 23.1": {
173+
"25.1": {
174174
...
175175
},
176176
}
177177
178-
In this example, the configuration for "OPNsense 22.7 (amd64/OpenSSL)" is outlined, detailing settings, PHP requirements, and configure functions specific to the 'system_settings_general' module.
178+
In this example, the configuration for "24.7" is outlined, detailing settings, PHP requirements, and configure functions specific to the 'system_settings_general' module.
179179

180180
This detailed and version-specific mapping ensures the utility module operates correctly across different OPNsense releases, contributing significantly to the robustness and reliability of the configuration management process.
181181

molecule/firewall_alias/molecule.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@ driver:
1616
parallel: true
1717

1818
platforms:
19-
- name: "22.7"
20-
hostname: false
21-
box: puzzle/opnsense
22-
box_version: "22.7"
23-
memory: 1024
24-
cpus: 2
25-
instance_raw_config_args:
26-
- 'vm.guest = :freebsd'
27-
- 'ssh.sudo_command = "%c"'
28-
- 'ssh.shell = "/bin/sh"'
2919
- name: "23.1"
3020
box: puzzle/opnsense
3121
hostname: false

molecule/firewall_rules/molecule.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@ driver:
1616
parallel: true
1717

1818
platforms:
19-
- name: "22.7"
20-
hostname: false
21-
box: puzzle/opnsense
22-
box_version: "22.7"
23-
memory: 1024
24-
cpus: 2
25-
instance_raw_config_args:
26-
- 'vm.guest = :freebsd'
27-
- 'ssh.sudo_command = "%c"'
28-
- 'ssh.shell = "/bin/sh"'
2919
- name: "23.1"
3020
box: puzzle/opnsense
3121
hostname: false

molecule/interfaces_assignments/molecule.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@ driver:
1616
parallel: true
1717

1818
platforms:
19-
- name: "22.7"
20-
hostname: false
21-
box: puzzle/opnsense
22-
box_version: "22.7"
23-
memory: 1024
24-
cpus: 2
25-
instance_raw_config_args:
26-
- 'vm.guest = :freebsd'
27-
- 'ssh.sudo_command = "%c"'
28-
- 'ssh.shell = "/bin/sh"'
2919
- name: "23.1"
3020
box: puzzle/opnsense
3121
hostname: false

molecule/opnsense_config/molecule.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@ driver:
1616
parallel: true
1717

1818
platforms:
19-
- name: "22.7"
20-
hostname: false
21-
box: puzzle/opnsense
22-
box_version: "22.7"
23-
memory: 1024
24-
cpus: 2
25-
instance_raw_config_args:
26-
- 'vm.guest = :freebsd'
27-
- 'ssh.sudo_command = "%c"'
28-
- 'ssh.shell = "/bin/sh"'
2919
- name: "23.1"
3020
box: puzzle/opnsense
3121
hostname: false

molecule/system_access_users/molecule.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@ driver:
1818
parallel: true
1919

2020
platforms:
21-
- name: "22.7"
22-
hostname: false
23-
box: puzzle/opnsense
24-
box_version: "22.7"
25-
memory: 1024
26-
cpus: 2
27-
instance_raw_config_args:
28-
- 'vm.guest = :freebsd'
29-
- 'ssh.sudo_command = "%c"'
30-
- 'ssh.shell = "/bin/sh"'
3121
- name: "23.1"
3222
box: puzzle/opnsense
3323
hostname: false

molecule/system_high_availability_settings/molecule.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@ driver:
1515
parallel: true
1616

1717
platforms:
18-
- name: "22.7"
19-
hostname: false
20-
box: puzzle/opnsense
21-
box_version: "22.7"
22-
memory: 1024
23-
cpus: 2
24-
instance_raw_config_args:
25-
- 'vm.guest = :freebsd'
26-
- 'ssh.sudo_command = "%c"'
27-
- 'ssh.shell = "/bin/sh"'
2818
- name: "23.1"
2919
box: puzzle/opnsense
3020
hostname: false

molecule/system_settings_general/molecule.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@ driver:
1616
parallel: true
1717

1818
platforms:
19-
- name: "22.7"
20-
hostname: false
21-
box: puzzle/opnsense
22-
box_version: "22.7"
23-
memory: 1024
24-
cpus: 2
25-
instance_raw_config_args:
26-
- 'vm.guest = :freebsd'
27-
- 'ssh.sudo_command = "%c"'
28-
- 'ssh.shell = "/bin/sh"'
2919
- name: "23.1"
3020
box: puzzle/opnsense
3121
hostname: false

molecule/system_settings_logging/molecule.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@ driver:
1616
parallel: true
1717

1818
platforms:
19-
- name: "22.7"
20-
hostname: false
21-
box: puzzle/opnsense
22-
box_version: "22.7"
23-
memory: 1024
24-
cpus: 2
25-
instance_raw_config_args:
26-
- 'vm.guest = :freebsd'
27-
- 'ssh.sudo_command = "%c"'
28-
- 'ssh.shell = "/bin/sh"'
2919
- name: "23.1"
3020
box: puzzle/opnsense
3121
hostname: false

plugins/module_utils/module_index.py

Lines changed: 2 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
1010
Structure of VERSION_MAP:
1111
- The top-level keys are strings representing OPNsense versions
12-
(e.g., "OPNsense 22.7 (amd64/OpenSSL)").
12+
(e.g., "24.7").
1313
- Each value under a version key is a nested dictionary that maps module names to
1414
their specific configurations.
1515
- Each module's configuration includes keys for settings (with XPath values),
1616
PHP requirements, and configure functions.
1717
18-
For example, the 'system_settings_general' module for "OPNsense 22.7 (amd64/OpenSSL)" includes:
18+
For example, the 'system_settings_general' module for "24.7" includes:
1919
- Setting mappings: These are key-value pairs where the key is a friendly name for a setting
2020
(e.g., 'hostname'), and the value is the XPath in the OPNsense configuration file to access
2121
this setting (e.g., 'system/hostname').
@@ -29,159 +29,6 @@
2929
"""
3030
# pylint: disable=duplicate-code; Since this is rewritten in some tests.
3131
VERSION_MAP = {
32-
"22.7": {
33-
"system_settings_general": {
34-
"hostname": "system/hostname",
35-
"domain": "system/domain",
36-
"timezone": "system/timezone",
37-
# Add other mappings here.
38-
"php_requirements": [
39-
"/usr/local/etc/inc/config.inc",
40-
"/usr/local/etc/inc/util.inc",
41-
"/usr/local/etc/inc/filter.inc",
42-
"/usr/local/etc/inc/system.inc",
43-
"/usr/local/etc/inc/interfaces.inc",
44-
],
45-
"configure_functions": {
46-
"system_timezone_configure": {
47-
"name": "system_timezone_configure",
48-
"configure_params": ["true"],
49-
},
50-
"system_trust_configure": {
51-
"name": "system_trust_configure",
52-
"configure_params": ["true"],
53-
},
54-
"system_hostname_configure": {
55-
"name": "system_hostname_configure",
56-
"configure_params": ["true"],
57-
},
58-
"system_hosts_generate": {
59-
"name": "system_hosts_generate",
60-
"configure_params": ["true"],
61-
},
62-
"system_resolvconf_generate": {
63-
"name": "system_resolvconf_generate",
64-
"configure_params": ["true"],
65-
},
66-
"plugins_configure_dns": {
67-
"name": "plugins_configure",
68-
"configure_params": ["'dns'", "true"],
69-
},
70-
"plugins_configure_dhcp": {
71-
"name": "plugins_configure",
72-
"configure_params": ["'dhcp'", "true"],
73-
},
74-
"filter_configure": {
75-
"name": "filter_configure",
76-
"configure_params": ["true"],
77-
},
78-
},
79-
},
80-
"system_settings_logging": {
81-
"preserve_logs": "syslog/preservelogs",
82-
# Add other mappings here
83-
"php_requirements": [
84-
"/usr/local/etc/inc/config.inc",
85-
"/usr/local/etc/inc/util.inc",
86-
"/usr/local/etc/inc/system.inc",
87-
],
88-
"configure_functions": {
89-
"system_settings_logging": {
90-
"name": "system_syslog_start",
91-
"configure_params": ["true"],
92-
},
93-
},
94-
},
95-
"system_access_users": {
96-
"users": "system/user",
97-
"uid": "system/nextuid",
98-
"gid": "system/nextgid",
99-
"system": "system",
100-
"maximumtableentries": "system/maximumtableentries",
101-
"php_requirements": [
102-
"/usr/local/etc/inc/system.inc",
103-
],
104-
"configure_functions": {},
105-
},
106-
"password": {
107-
"php_requirements": [
108-
"/usr/local/etc/inc/auth.inc",
109-
],
110-
"configure_functions": {
111-
"password": {
112-
"name": "echo password_hash",
113-
"configure_params": [
114-
"'password'",
115-
"PASSWORD_BCRYPT",
116-
"[ 'cost' => 11 ]",
117-
],
118-
},
119-
},
120-
},
121-
"firewall_rules": {
122-
"rules": "filter",
123-
"php_requirements": [
124-
"/usr/local/etc/inc/config.inc",
125-
"/usr/local/etc/inc/util.inc",
126-
"/usr/local/etc/inc/filter.inc",
127-
"/usr/local/etc/inc/system.inc",
128-
"/usr/local/etc/inc/interfaces.inc",
129-
],
130-
"configure_functions": {
131-
"system_cron_configure": {
132-
"name": "system_cron_configure",
133-
"configure_params": ["true"],
134-
},
135-
"filter_configure": {
136-
"name": "filter_configure",
137-
"configure_params": [],
138-
},
139-
},
140-
},
141-
"interfaces_assignments": {
142-
"interfaces": "interfaces",
143-
# Add other mappings here.
144-
"php_requirements": [
145-
"/usr/local/etc/inc/config.inc",
146-
"/usr/local/etc/inc/util.inc",
147-
"/usr/local/etc/inc/filter.inc",
148-
"/usr/local/etc/inc/system.inc",
149-
"/usr/local/etc/inc/rrd.inc",
150-
"/usr/local/etc/inc/interfaces.inc",
151-
],
152-
"configure_functions": {
153-
"filter_configure": {
154-
"name": "filter_configure",
155-
"configure_params": [],
156-
},
157-
},
158-
},
159-
"system_high_availability_settings": {
160-
# Add other mappings here
161-
"hasync": "hasync",
162-
"synchronize_states": "hasync/pfsyncenabled",
163-
"synchronize_interface": "hasync/pfsyncinterface",
164-
"synchronize_peer_ip": "hasync/pfsyncpeerip",
165-
"synchronize_config_to_ip": "hasync/synchronizetoip",
166-
"remote_system_username": "hasync/username",
167-
"remote_system_password": "hasync/password",
168-
"disable_preempt": "hasync/disablepreempt",
169-
"disconnect_dialup_interfaces": "hasync/disconnectppps",
170-
"php_requirements": [
171-
"/usr/local/etc/inc/interfaces.inc",
172-
"/usr/local/etc/inc/util.inc",
173-
"/usr/local/etc/inc/config.inc",
174-
"/usr/local/etc/inc/plugins.inc",
175-
],
176-
"configure_functions": {},
177-
},
178-
"firewall_alias": {
179-
"alias": "OPNsense/Firewall/Alias/aliases",
180-
"geoip": "OPNsense/Firewall/Alias/geoip",
181-
"php_requirements": [],
182-
"configure_functions": {},
183-
},
184-
},
18532
"23.1": {
18633
"system_settings_general": {
18734
"hostname": "system/hostname",

0 commit comments

Comments
 (0)