Commit 491297af1db67c8cd22a5cc1b0d3867cdafa852b

Thomas de Grivel 2018-07-26T14:31:45

resource-additional-specs

diff --git a/core/resource-container.lisp b/core/resource-container.lisp
index 96c9525..b102d5c 100644
--- a/core/resource-container.lisp
+++ b/core/resource-container.lisp
@@ -83,7 +83,11 @@
 (defmethod resource-before-p ((r1 resource) (r2 resource))
   nil)
 
-;;  Sync
+(defmethod resource-additional-specs ((res resource-container) (os t))
+  (call-next-method)
+  (with-parent-resource res
+    (do-resources (child) res
+      (resource-additional-specs child os))))
 
 (defmethod sync :after ((res resource-container))
   (with-parent-resource res
diff --git a/core/resource.lisp b/core/resource.lisp
index 360660c..be9f8c2 100644
--- a/core/resource.lisp
+++ b/core/resource.lisp
@@ -207,4 +207,5 @@
 
 (defmethod sync ((host host))
   (with-host host
+    (resource-additional-specs host (host-os host))
     (call-next-method)))
diff --git a/core/spec.lisp b/core/spec.lisp
index f95d4ed..31c690a 100644
--- a/core/spec.lisp
+++ b/core/spec.lisp
@@ -62,14 +62,6 @@
        (setq spec next-spec)))
   res)
 
-(defmethod parse-specification ((res resource-container) (spec t))
-  (with-parent-resource res
-    (call-next-method)
-    (do-resources (child) res
-      (resource-additional-specs child (host-os (current-host))))))
-
-(trace parse-specification)
-
 #+nil
 (parse-specification *localhost*
                      '(:hostname "arrakis.lowh.net"))
diff --git a/package.lisp b/package.lisp
index 71242be..62b67e4 100644
--- a/package.lisp
+++ b/package.lisp
@@ -75,6 +75,7 @@
    #:probed-properties
    #:probe-all-properties
    #:resource
+   #:resource-additional-specs
    #:resource-type
    #:specified-properties
    #:sync