aboutsummaryrefslogtreecommitdiff
path: root/src/property
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-04-23 14:00:16 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-04-23 14:00:16 -0700
commit16072787a88b8fdddda4c0e238f2c9570186321e (patch)
tree3e58dd043f9725f8c7512c608134a2f00029e127 /src/property
parent86835f4b31370ea3da04f0e662a6a78f0e64933e (diff)
downloadconsfigurator-16072787a88b8fdddda4c0e238f2c9570186321e.tar.gz
rename a number of FIREWALLD properties
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property')
-rw-r--r--src/property/firewalld.lisp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/property/firewalld.lisp b/src/property/firewalld.lisp
index 8d0835c..bd69252 100644
--- a/src/property/firewalld.lisp
+++ b/src/property/firewalld.lisp
@@ -114,15 +114,15 @@
(file:exists-with-content #?"/etc/firewalld/${type}/${name}.xml" xml)
(%reloaded)))
-(defproplist service :posix (service xml)
+(defproplist knows-service :posix (service xml)
(:desc #?"firewalld knows service ${service}")
(%setxml "services" service xml))
-(defproplist policy :posix (policy xml)
+(defproplist has-policy :posix (policy xml)
(:desc #?"firewalld has policy ${policy}")
(%setxml "policies" policy xml))
-(defproplist zone :posix (zone xml)
+(defproplist has-zone-xml :posix (zone xml)
"Set the whole XML configuration for zone ZONE.
In preference to using this property, it is usually best to incrementally
@@ -135,8 +135,8 @@ firewall configuration themselves, to render the things that those properties
set up appropriately accessible and inaccessible.
(By contrast, for defining services and policies we take the simpler approach
-of just setting the whole XML configuration, using FIREWALLD:SERVICE and
-FIREWALLD:POLICY.)"
+of just setting the whole XML configuration, using FIREWALLD:KNOWS-SERVICE and
+FIREWALLD:HAS-POLICY.)"
;; Another option might be to push all the settings to hostattrs and then at
;; :APPLY time, generate the whole .xml / run commands to set all the XML.
(:desc #?"firewalld has zone configuration for ${zone}")
@@ -160,7 +160,7 @@ properties which add services, interfaces etc. to zones."
:apply #?"--delete-zone=${zone}"))
(%reloaded)))
-(defproplist zone-target :posix (zone target)
+(defproplist zone-has-target :posix (zone target)
(:desc #?"firewalld zone ${zone} has target ${target}")
(:check (if (service:no-services-p)
(string= target
@@ -205,9 +205,9 @@ an interface to a zone once, as the default route might later be changed
temporarily by something like a VPN connection, and in such a case the
firewall should not be reconfigured.
-Typically you will apply both this property and FIREWALLD:DEFAULT-ZONE,
+Typically you will apply both this property and FIREWALLD:HAS-DEFAULT-ZONE,
passing the same zone name to each. If you have Network Manager, you need
-only FIREWALLD:DEFAULT-ZONE."
+only FIREWALLD:HAS-DEFAULT-ZONE."
(with-flagfile "/etc/consfigurator/firewalld/default-route-zoned"
(installed)
(has-zone zone)
@@ -263,7 +263,7 @@ only FIREWALLD:DEFAULT-ZONE."
:offline-apply
`(,#?"--zone=${zone}" ,#?"--remove-service-from-zone=${service}"))))
-(defproplist zone-masquerade :posix (zone)
+(defproplist zone-has-masquerade :posix (zone)
(:desc #?"firewalld zone ${zone} has masquerade")
(with-unapply
(installed)
@@ -277,7 +277,7 @@ only FIREWALLD:DEFAULT-ZONE."
:check `(,#?"--zone=${zone}" "--query-masquerade")
:apply `(,#?"--zone=${zone}" "--remove-masquerade"))))
-(defproplist zone-rich-rule :posix (zone rule)
+(defproplist zone-has-rich-rule :posix (zone rule)
(:desc #?"firewalld zone ${zone} has rich rule \"${rule}\"")
(with-unapply
(installed)
@@ -299,7 +299,7 @@ only FIREWALLD:DEFAULT-ZONE."
;; Note that direct rules will be deprecated as of firewalld 1.0.0, as
;; policies and rich rules should be able to cover all uses of direct rules.
;; <https://firewalld.org/2021/06/the-upcoming-1-0-0>
-(defpropspec direct-rule :posix (&rest rule-args)
+(defpropspec has-direct-rule :posix (&rest rule-args)
(:desc #?"firewalld has direct rule \"@{rule-args}\"")
`(with-unapply
(installed)
@@ -312,7 +312,7 @@ only FIREWALLD:DEFAULT-ZONE."
:check ("--direct" "--query-rule" ,@rule-args)
:apply ("--direct" "--remove-rule" ,@rule-args))))
-(defproplist default-zone :posix (zone)
+(defproplist has-default-zone :posix (zone)
(:desc #?"firewalld default zone is ${zone}")
(installed)
(has-zone zone)