opnsense_api 0.1.0 → 0.2.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 +4 -4
- data/lib/opnsense_api/client.rb +16 -1
- data/lib/opnsense_api/core/captive_portal/access.rb +15 -0
- data/lib/opnsense_api/core/captive_portal/service.rb +15 -0
- data/lib/opnsense_api/core/captive_portal/session.rb +15 -0
- data/lib/opnsense_api/core/captive_portal/settings.rb +15 -0
- data/lib/opnsense_api/core/captive_portal/voucher.rb +15 -0
- data/lib/opnsense_api/core/captive_portal.rb +15 -0
- data/lib/opnsense_api/core/core/firmware.rb +43 -0
- data/lib/opnsense_api/core/core/menu.rb +15 -0
- data/lib/opnsense_api/core/core/system.rb +16 -1
- data/lib/opnsense_api/core/core.rb +15 -0
- data/lib/opnsense_api/core/cron/service.rb +15 -0
- data/lib/opnsense_api/core/cron/settings.rb +15 -0
- data/lib/opnsense_api/core/cron.rb +15 -0
- data/lib/opnsense_api/core/diagnostics/activity.rb +15 -0
- data/lib/opnsense_api/core/diagnostics/dns.rb +15 -0
- data/lib/opnsense_api/core/diagnostics/dns_diagnostics.rb +15 -0
- data/lib/opnsense_api/core/diagnostics/firewall.rb +15 -0
- data/lib/opnsense_api/core/diagnostics/interface.rb +15 -0
- data/lib/opnsense_api/core/diagnostics/lv_template.rb +15 -0
- data/lib/opnsense_api/core/diagnostics/netflow.rb +15 -0
- data/lib/opnsense_api/core/diagnostics/network_insight.rb +15 -0
- data/lib/opnsense_api/core/diagnostics/packet_capture.rb +15 -0
- data/lib/opnsense_api/core/diagnostics/system.rb +15 -0
- data/lib/opnsense_api/core/diagnostics/system_health.rb +15 -0
- data/lib/opnsense_api/core/diagnostics/traffic.rb +15 -0
- data/lib/opnsense_api/core/diagnostics.rb +15 -0
- data/lib/opnsense_api/core/firewall/alias.rb +15 -0
- data/lib/opnsense_api/core/firewall/alias_util.rb +15 -0
- data/lib/opnsense_api/core/firewall/category.rb +15 -0
- data/lib/opnsense_api/core/firewall/filter_util.rb +15 -0
- data/lib/opnsense_api/core/firewall.rb +15 -0
- data/lib/opnsense_api/core/ids/service.rb +15 -0
- data/lib/opnsense_api/core/ids/settings.rb +15 -0
- data/lib/opnsense_api/core/ids.rb +15 -0
- data/lib/opnsense_api/core/interfaces/base.rb +15 -0
- data/lib/opnsense_api/core/interfaces/loopback_settings.rb +15 -0
- data/lib/opnsense_api/core/interfaces/vip_settings.rb +15 -0
- data/lib/opnsense_api/core/interfaces/vlan_settings.rb +15 -0
- data/lib/opnsense_api/core/interfaces/vxlan_settings.rb +15 -0
- data/lib/opnsense_api/core/interfaces.rb +15 -0
- data/lib/opnsense_api/core/ipsec/key_pairs.rb +15 -0
- data/lib/opnsense_api/core/ipsec/leases.rb +15 -0
- data/lib/opnsense_api/core/ipsec/legacy_subsystem.rb +15 -0
- data/lib/opnsense_api/core/ipsec/pre_shared_keys.rb +15 -0
- data/lib/opnsense_api/core/ipsec/sad.rb +15 -0
- data/lib/opnsense_api/core/ipsec/service.rb +15 -0
- data/lib/opnsense_api/core/ipsec/sessions.rb +15 -0
- data/lib/opnsense_api/core/ipsec/spd.rb +15 -0
- data/lib/opnsense_api/core/ipsec/tunnel.rb +15 -0
- data/lib/opnsense_api/core/ipsec.rb +15 -0
- data/lib/opnsense_api/core/monit/service.rb +15 -0
- data/lib/opnsense_api/core/monit/settings.rb +15 -0
- data/lib/opnsense_api/core/monit/status.rb +15 -0
- data/lib/opnsense_api/core/monit.rb +15 -0
- data/lib/opnsense_api/core/open_vpn/export.rb +15 -0
- data/lib/opnsense_api/core/open_vpn.rb +15 -0
- data/lib/opnsense_api/core/proxy/service.rb +15 -0
- data/lib/opnsense_api/core/proxy/settings.rb +15 -0
- data/lib/opnsense_api/core/proxy/template.rb +15 -0
- data/lib/opnsense_api/core/proxy.rb +15 -0
- data/lib/opnsense_api/core/routes/gateway.rb +15 -0
- data/lib/opnsense_api/core/routes/routes.rb +15 -0
- data/lib/opnsense_api/core/routes.rb +15 -0
- data/lib/opnsense_api/core/syslog/service.rb +15 -0
- data/lib/opnsense_api/core/syslog/settings.rb +15 -0
- data/lib/opnsense_api/core/syslog.rb +15 -0
- data/lib/opnsense_api/core/traffic_shaping/service.rb +15 -0
- data/lib/opnsense_api/core/traffic_shaping/settings.rb +15 -0
- data/lib/opnsense_api/core/traffic_shaping.rb +15 -0
- data/lib/opnsense_api/core/unbound/diagnostics.rb +15 -0
- data/lib/opnsense_api/core/unbound/service.rb +15 -0
- data/lib/opnsense_api/core/unbound/settings.rb +15 -0
- data/lib/opnsense_api/core/unbound.rb +15 -0
- data/lib/opnsense_api/core.rb +15 -0
- data/lib/opnsense_api/error.rb +15 -0
- data/lib/opnsense_api/version.rb +16 -1
- data/lib/opnsense_api.rb +15 -0
- data/sig/lib/opnsense_api/client.rbs +1 -1
- data/sig/lib/opnsense_api/core/core/firmware.rbs +14 -0
- metadata +3 -3
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
class Proxy
|
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
class Proxy
|
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
class Proxy
|
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
# @see https://docs.opnsense.org/development/api/core/proxy.html
|
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
class Routes
|
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
class Routes
|
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
# @see https://docs.opnsense.org/development/api/core/routes.html
|
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
class Syslog
|
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
class Syslog
|
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
# @see https://docs.opnsense.org/development/api/core/syslog.html
|
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
class TrafficShaping
|
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
class TrafficShaping
|
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
# @see https://docs.opnsense.org/development/api/core/trafficshaper.html
|
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
class Unbound
|
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
class Unbound
|
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
class Unbound
|
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
module Core
|
5
20
|
# @see https://docs.opnsense.org/development/api/core/unbound.html
|
data/lib/opnsense_api/core.rb
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
# @see https://docs.opnsense.org/development/api.html#core-api
|
5
20
|
module Core
|
data/lib/opnsense_api/error.rb
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
19
|
class Error < StandardError; end
|
5
20
|
end
|
data/lib/opnsense_api/version.rb
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
module OPNsenseAPI
|
4
|
-
VERSION = '0.
|
19
|
+
VERSION = '0.2.0'
|
5
20
|
end
|
data/lib/opnsense_api.rb
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright (C) 2022 Zach Bensley
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
17
|
+
|
3
18
|
require_relative 'opnsense_api/error'
|
4
19
|
require_relative 'opnsense_api/version'
|
5
20
|
|
@@ -7,7 +7,7 @@ module OPNsenseAPI
|
|
7
7
|
attr_reader api_secret: String
|
8
8
|
attr_reader options: Hash[Symbol, untyped]
|
9
9
|
|
10
|
-
def initialize: (URI | String
|
10
|
+
def initialize: (host: URI | String, api_key: String , api_secret: String, **Hash[Symbol, untyped] options) -> void
|
11
11
|
|
12
12
|
def captive_portal: () -> Core::CaptivePortal
|
13
13
|
|
@@ -31,6 +31,20 @@ module OPNsenseAPI
|
|
31
31
|
def upgrade_status: (?Hash[untyped, untyped] params) -> untyped
|
32
32
|
|
33
33
|
def changelog: (version: String) -> untyped
|
34
|
+
|
35
|
+
def install: (String pkg_name, ?Hash[untyped, untyped] body) -> untyped
|
36
|
+
|
37
|
+
def reinstall: (String pkg_name, ?Hash[untyped, untyped] body) -> untyped
|
38
|
+
|
39
|
+
def remove: (String pkg_name, ?Hash[untyped, untyped] body) -> untyped
|
40
|
+
|
41
|
+
def lock: (String pkg_name, ?Hash[untyped, untyped] body) -> untyped
|
42
|
+
|
43
|
+
def unlock: (String pkg_name, ?Hash[untyped, untyped] body) -> untyped
|
44
|
+
|
45
|
+
def details: (String pkg_name, ?Hash[untyped, untyped] body) -> untyped
|
46
|
+
|
47
|
+
def license: (String pkg_name, ?Hash[untyped, untyped] body) -> untyped
|
34
48
|
end
|
35
49
|
end
|
36
50
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opnsense_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zach Bensley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -235,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '0'
|
237
237
|
requirements: []
|
238
|
-
rubygems_version: 3.1
|
238
|
+
rubygems_version: 3.4.1
|
239
239
|
signing_key:
|
240
240
|
specification_version: 4
|
241
241
|
summary: Library for using the OPNsense API
|