mirror of
git://git.savannah.gnu.org/guix.git
synced 2023-12-14 03:33:07 +01:00
services: configuration: Remove 'validate-configuration'.
Now that configuration records use the 'sanitize' property for each field, 'validate-configuration' has become useless because it's impossible to construct an invalid configuration record. * gnu/services/configuration.scm (validate-configuration): Remove. * gnu/services/mail.scm (dovecot-service): Remove call. * gnu/services/vpn.scm (openvpn-client-service) (openvpn-server-service): Likewise. * doc/guix.texi (Complex Configurations): Remove documentation.
This commit is contained in:
parent
fb7e6ccba7
commit
6505f727e1
4 changed files with 0 additions and 21 deletions
|
@ -38917,12 +38917,6 @@ Return a G-expression that contains the values corresponding to the
|
|||
disk by using something like @code{mixed-text-file}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} validate-configuration @var{configuration}
|
||||
@var{fields}
|
||||
Type-check @var{fields}, a list of field names of @var{configuration}, a
|
||||
configuration record created by @code{define-configuration}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} empty-serializer @var{field-name} @var{value}
|
||||
A serializer that just returns an empty string. The
|
||||
@code{serialize-package} procedure is an alias for this.
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
serialize-configuration
|
||||
define-maybe
|
||||
define-maybe/no-serialization
|
||||
validate-configuration
|
||||
generate-documentation
|
||||
configuration->documentation
|
||||
empty-serializer
|
||||
|
@ -125,14 +124,6 @@ does not have a default value" field kind)))
|
|||
((configuration-field-getter field) config)))
|
||||
fields)))
|
||||
|
||||
(define (validate-configuration config fields)
|
||||
(for-each (lambda (field)
|
||||
(let ((val ((configuration-field-getter field) config)))
|
||||
(unless ((configuration-field-predicate field) val)
|
||||
(configuration-field-error
|
||||
(configuration-field-name field) val))))
|
||||
fields))
|
||||
|
||||
(define-syntax-rule (id ctx parts ...)
|
||||
"Assemble PARTS into a raw (unhygienic) identifier."
|
||||
(datum->syntax ctx (symbol-append (syntax->datum parts) ...)))
|
||||
|
|
|
@ -1610,10 +1610,6 @@ POP3, IMAP, and LMTP. @var{config} should be a configuration object created
|
|||
by @code{dovecot-configuration}. @var{config} may also be created by
|
||||
@code{opaque-dovecot-configuration}, which allows specification of the
|
||||
@code{dovecot.conf} as a string."
|
||||
(validate-configuration config
|
||||
(if (opaque-dovecot-configuration? config)
|
||||
opaque-dovecot-configuration-fields
|
||||
dovecot-configuration-fields))
|
||||
(service dovecot-service-type config))
|
||||
|
||||
;; A little helper to make it easier to document all those fields.
|
||||
|
|
|
@ -540,11 +540,9 @@ is truncated and rewritten every minute.")
|
|||
to an existing @acronym{VPN, virtual private network}.")))
|
||||
|
||||
(define* (openvpn-client-service #:key (config (openvpn-client-configuration)))
|
||||
(validate-configuration config openvpn-client-configuration-fields)
|
||||
(service openvpn-client-service-type config))
|
||||
|
||||
(define* (openvpn-server-service #:key (config (openvpn-server-configuration)))
|
||||
(validate-configuration config openvpn-server-configuration-fields)
|
||||
(service openvpn-server-service-type config))
|
||||
|
||||
(define (generate-openvpn-server-documentation)
|
||||
|
|
Loading…
Reference in a new issue