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.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/lib/opnsense_api/client.rb +16 -1
  3. data/lib/opnsense_api/core/captive_portal/access.rb +15 -0
  4. data/lib/opnsense_api/core/captive_portal/service.rb +15 -0
  5. data/lib/opnsense_api/core/captive_portal/session.rb +15 -0
  6. data/lib/opnsense_api/core/captive_portal/settings.rb +15 -0
  7. data/lib/opnsense_api/core/captive_portal/voucher.rb +15 -0
  8. data/lib/opnsense_api/core/captive_portal.rb +15 -0
  9. data/lib/opnsense_api/core/core/firmware.rb +43 -0
  10. data/lib/opnsense_api/core/core/menu.rb +15 -0
  11. data/lib/opnsense_api/core/core/system.rb +16 -1
  12. data/lib/opnsense_api/core/core.rb +15 -0
  13. data/lib/opnsense_api/core/cron/service.rb +15 -0
  14. data/lib/opnsense_api/core/cron/settings.rb +15 -0
  15. data/lib/opnsense_api/core/cron.rb +15 -0
  16. data/lib/opnsense_api/core/diagnostics/activity.rb +15 -0
  17. data/lib/opnsense_api/core/diagnostics/dns.rb +15 -0
  18. data/lib/opnsense_api/core/diagnostics/dns_diagnostics.rb +15 -0
  19. data/lib/opnsense_api/core/diagnostics/firewall.rb +15 -0
  20. data/lib/opnsense_api/core/diagnostics/interface.rb +15 -0
  21. data/lib/opnsense_api/core/diagnostics/lv_template.rb +15 -0
  22. data/lib/opnsense_api/core/diagnostics/netflow.rb +15 -0
  23. data/lib/opnsense_api/core/diagnostics/network_insight.rb +15 -0
  24. data/lib/opnsense_api/core/diagnostics/packet_capture.rb +15 -0
  25. data/lib/opnsense_api/core/diagnostics/system.rb +15 -0
  26. data/lib/opnsense_api/core/diagnostics/system_health.rb +15 -0
  27. data/lib/opnsense_api/core/diagnostics/traffic.rb +15 -0
  28. data/lib/opnsense_api/core/diagnostics.rb +15 -0
  29. data/lib/opnsense_api/core/firewall/alias.rb +15 -0
  30. data/lib/opnsense_api/core/firewall/alias_util.rb +15 -0
  31. data/lib/opnsense_api/core/firewall/category.rb +15 -0
  32. data/lib/opnsense_api/core/firewall/filter_util.rb +15 -0
  33. data/lib/opnsense_api/core/firewall.rb +15 -0
  34. data/lib/opnsense_api/core/ids/service.rb +15 -0
  35. data/lib/opnsense_api/core/ids/settings.rb +15 -0
  36. data/lib/opnsense_api/core/ids.rb +15 -0
  37. data/lib/opnsense_api/core/interfaces/base.rb +15 -0
  38. data/lib/opnsense_api/core/interfaces/loopback_settings.rb +15 -0
  39. data/lib/opnsense_api/core/interfaces/vip_settings.rb +15 -0
  40. data/lib/opnsense_api/core/interfaces/vlan_settings.rb +15 -0
  41. data/lib/opnsense_api/core/interfaces/vxlan_settings.rb +15 -0
  42. data/lib/opnsense_api/core/interfaces.rb +15 -0
  43. data/lib/opnsense_api/core/ipsec/key_pairs.rb +15 -0
  44. data/lib/opnsense_api/core/ipsec/leases.rb +15 -0
  45. data/lib/opnsense_api/core/ipsec/legacy_subsystem.rb +15 -0
  46. data/lib/opnsense_api/core/ipsec/pre_shared_keys.rb +15 -0
  47. data/lib/opnsense_api/core/ipsec/sad.rb +15 -0
  48. data/lib/opnsense_api/core/ipsec/service.rb +15 -0
  49. data/lib/opnsense_api/core/ipsec/sessions.rb +15 -0
  50. data/lib/opnsense_api/core/ipsec/spd.rb +15 -0
  51. data/lib/opnsense_api/core/ipsec/tunnel.rb +15 -0
  52. data/lib/opnsense_api/core/ipsec.rb +15 -0
  53. data/lib/opnsense_api/core/monit/service.rb +15 -0
  54. data/lib/opnsense_api/core/monit/settings.rb +15 -0
  55. data/lib/opnsense_api/core/monit/status.rb +15 -0
  56. data/lib/opnsense_api/core/monit.rb +15 -0
  57. data/lib/opnsense_api/core/open_vpn/export.rb +15 -0
  58. data/lib/opnsense_api/core/open_vpn.rb +15 -0
  59. data/lib/opnsense_api/core/proxy/service.rb +15 -0
  60. data/lib/opnsense_api/core/proxy/settings.rb +15 -0
  61. data/lib/opnsense_api/core/proxy/template.rb +15 -0
  62. data/lib/opnsense_api/core/proxy.rb +15 -0
  63. data/lib/opnsense_api/core/routes/gateway.rb +15 -0
  64. data/lib/opnsense_api/core/routes/routes.rb +15 -0
  65. data/lib/opnsense_api/core/routes.rb +15 -0
  66. data/lib/opnsense_api/core/syslog/service.rb +15 -0
  67. data/lib/opnsense_api/core/syslog/settings.rb +15 -0
  68. data/lib/opnsense_api/core/syslog.rb +15 -0
  69. data/lib/opnsense_api/core/traffic_shaping/service.rb +15 -0
  70. data/lib/opnsense_api/core/traffic_shaping/settings.rb +15 -0
  71. data/lib/opnsense_api/core/traffic_shaping.rb +15 -0
  72. data/lib/opnsense_api/core/unbound/diagnostics.rb +15 -0
  73. data/lib/opnsense_api/core/unbound/service.rb +15 -0
  74. data/lib/opnsense_api/core/unbound/settings.rb +15 -0
  75. data/lib/opnsense_api/core/unbound.rb +15 -0
  76. data/lib/opnsense_api/core.rb +15 -0
  77. data/lib/opnsense_api/error.rb +15 -0
  78. data/lib/opnsense_api/version.rb +16 -1
  79. data/lib/opnsense_api.rb +15 -0
  80. data/sig/lib/opnsense_api/client.rbs +1 -1
  81. data/sig/lib/opnsense_api/core/core/firmware.rbs +14 -0
  82. 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
@@ -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
@@ -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
@@ -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.1.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 host, String api_key, String api_secret, **Hash[Symbol, untyped] options) -> void
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.1.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: 2022-12-13 00:00:00.000000000 Z
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.4
238
+ rubygems_version: 3.4.1
239
239
  signing_key:
240
240
  specification_version: 4
241
241
  summary: Library for using the OPNsense API