Skip to content

Commit

Permalink
os-firewall: add new endpoints (using extended template) for opnsense…
Browse files Browse the repository at this point in the history
  • Loading branch information
AdSchellevis committed Apr 7, 2020
1 parent 03a8497 commit 6700e6c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
28 changes: 23 additions & 5 deletions source/development/api/plugins/firewall.rst
Expand Up @@ -6,21 +6,39 @@ a user interface, it's main focus is only to provide machine to machine interact
for selected features.


.. csv-table:: Resources (FilterController.php)
.. csv-table:: Abstract [non-callable] (FilterBaseController.php)
:header: "Method", "Module", "Controller", "Command", "Parameters"
:widths: 4, 15, 15, 30, 40

"``POST``","firewall","filter_base","apply","$rollback_revision=null"
"``POST``","firewall","filter_base","cancelRollback","$rollback_revision"
"``POST``","firewall","filter_base","revert","$revision"
"``POST``","firewall","filter_base","savepoint",""

"``<<uses>>``", "", "", "", "*model* `Filter.xml <https://github.com/opnsense/plugins/blob/master/net/firewall/src/opnsense/mvc/app/models/OPNsense/Firewall/Filter.xml>`__"

.. csv-table:: Resources (FilterController.php) -- extends : FilterBaseController
:header: "Method", "Module", "Controller", "Command", "Parameters"
:widths: 4, 15, 15, 30, 40

"``POST``","firewall","filter","addRule",""
"``POST``","firewall","filter","apply","$rollback_revision=null"
"``POST``","firewall","filter","cancelRollback","$rollback_revision"
"``POST``","firewall","filter","delRule","$uuid"
"``GET``","firewall","filter","getRule","$uuid=null"
"``POST``","firewall","filter","revert","$revision"
"``POST``","firewall","filter","savepoint",""
"``*``","firewall","filter","searchRule",""
"``POST``","firewall","filter","setRule","$uuid"
"``POST``","firewall","filter","toggleRule","$uuid,$enabled=null"

.. csv-table:: Resources (SourceNatController.php) -- extends : FilterBaseController
:header: "Method", "Module", "Controller", "Command", "Parameters"
:widths: 4, 15, 15, 30, 40

"``POST``","firewall","source_nat","addRule",""
"``POST``","firewall","source_nat","delRule","$uuid"
"``GET``","firewall","source_nat","getRule","$uuid=null"
"``*``","firewall","source_nat","searchRule",""
"``POST``","firewall","source_nat","setRule","$uuid"
"``POST``","firewall","source_nat","toggleRule","$uuid,$enabled=null"



-----------------------
Expand Down
11 changes: 8 additions & 3 deletions source/development/api/plugins/firewall.rst.in
Expand Up @@ -6,12 +6,17 @@ a user interface, it's main focus is only to provide machine to machine interact
for selected features.

{% for controller in controllers %}
.. csv-table:: {{controller.type}} ({{controller.filename}})
.. csv-table:: {{controller.type}} ({{controller.filename}}) {% if not controller.is_abstract %} -- extends : {{controller.base_class}} {% endif %}
:header: "Method", "Module", "Controller", "Command", "Parameters"
:widths: 4, 15, 15, 30, 40
{% for endpoint in controller.endpoints %}
{% for endpoint in controller.endpoints %}
"``{{endpoint.method}}``","{{endpoint.module}}","{{endpoint.controller}}","{{endpoint.command}}","{{endpoint.parameters}}"
{%- endfor %}
{%- endfor %}
{%- if controller.uses %}
{% for use in controller.uses %}
"``<<uses>>``", "", "", "", "*{{use.type}}* `{{use.name}} <{{use.link}}>`__"
{%- endfor %}
{%- endif %}
{% endfor %}


Expand Down

0 comments on commit 6700e6c

Please sign in to comment.