summaryrefslogtreecommitdiff
path: root/src/services/api/graphql/recipes/templates
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2021-11-23 14:10:51 -0600
committerJohn Estabrook <jestabro@vyos.io>2021-11-24 13:33:45 -0600
commitf97c72ee7efd7ecd57c72a0387154738922c48f5 (patch)
tree4468ae825406dd99959d31e8d1ac4b2a01976ecc /src/services/api/graphql/recipes/templates
parent114be88565cd09c0a7dcbe67a753d7d2834659b9 (diff)
downloadvyos-1x-f97c72ee7efd7ecd57c72a0387154738922c48f5.tar.gz
vyos-1x-f97c72ee7efd7ecd57c72a0387154738922c48f5.zip
graphql: T3993: add requests for manipulating firewall groups
(cherry picked from commit ee53af35eb1edb6167a65b290f25a95b2a586498)
Diffstat (limited to 'src/services/api/graphql/recipes/templates')
-rw-r--r--src/services/api/graphql/recipes/templates/create_firewall_address_group.tmpl4
-rw-r--r--src/services/api/graphql/recipes/templates/remove_firewall_address_group_members.tmpl3
-rw-r--r--src/services/api/graphql/recipes/templates/update_firewall_address_group_members.tmpl3
3 files changed, 10 insertions, 0 deletions
diff --git a/src/services/api/graphql/recipes/templates/create_firewall_address_group.tmpl b/src/services/api/graphql/recipes/templates/create_firewall_address_group.tmpl
new file mode 100644
index 000000000..a890d0086
--- /dev/null
+++ b/src/services/api/graphql/recipes/templates/create_firewall_address_group.tmpl
@@ -0,0 +1,4 @@
+set firewall group address-group {{ name }}
+{% for add in address %}
+set firewall group address-group {{ name }} address {{ add }}
+{% endfor %}
diff --git a/src/services/api/graphql/recipes/templates/remove_firewall_address_group_members.tmpl b/src/services/api/graphql/recipes/templates/remove_firewall_address_group_members.tmpl
new file mode 100644
index 000000000..458f3e5fc
--- /dev/null
+++ b/src/services/api/graphql/recipes/templates/remove_firewall_address_group_members.tmpl
@@ -0,0 +1,3 @@
+{% for add in address %}
+delete firewall group address-group {{ name }} address {{ add }}
+{% endfor %}
diff --git a/src/services/api/graphql/recipes/templates/update_firewall_address_group_members.tmpl b/src/services/api/graphql/recipes/templates/update_firewall_address_group_members.tmpl
new file mode 100644
index 000000000..f56c61231
--- /dev/null
+++ b/src/services/api/graphql/recipes/templates/update_firewall_address_group_members.tmpl
@@ -0,0 +1,3 @@
+{% for add in address %}
+set firewall group address-group {{ name }} address {{ add }}
+{% endfor %}