aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-09 09:36:46 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-09 09:36:46 -0700
commit00b10d8767c0b9c0fbbd2b5f80bc3098fd7b8a80 (patch)
treeb34dd4c790d0d2b6db0290ac5792d4051a393fad
parent3b4891ce80580f8f43f3d64ab54c1d9ae66976db (diff)
downloadconsfigurator-00b10d8767c0b9c0fbbd2b5f80bc3098fd7b8a80.tar.gz
introduce PUSHNEW-HOSTATTRS
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/package.lisp1
-rw-r--r--src/property.lisp9
2 files changed, 9 insertions, 1 deletions
diff --git a/src/package.lisp b/src/package.lisp
index 4206f33..487dc53 100644
--- a/src/package.lisp
+++ b/src/package.lisp
@@ -91,6 +91,7 @@
#:get-hostattrs
#:get-hostattrs-car
#:push-hostattrs
+ #:pushnew-hostattrs
#:get-hostname
#:require-data
#:failed-change
diff --git a/src/property.lisp b/src/property.lisp
index f6910e1..9ee9393 100644
--- a/src/property.lisp
+++ b/src/property.lisp
@@ -247,12 +247,19 @@ Called by property :HOSTATTRS subroutines."
(dolist (v vs)
(push v (getf (slot-value *host* 'hostattrs) k))))
+(defun pushnew-hostattrs (k &rest vs)
+ "Push new static informational attributes VS of type KEY.
+
+Called by property :HOSTATTRS subroutines."
+ (dolist (v vs)
+ (pushnew v (getf (slot-value *host* 'hostattrs) k))))
+
(defun require-data (iden1 iden2)
"Wrapper around PUSH-HOSTATTRS to indicate that a piece of prerequisite data
is needed to deploy a property.
Called by property :HOSTATTRS subroutines."
- (push-hostattrs :data (cons iden1 iden2)))
+ (pushnew-hostattrs :data (cons iden1 iden2)))
(defun get-hostname ()
"Get the hostname of the host to which properties are being applied.