[noctool-cvs] CVS source
imattsson
imattsson at common-lisp.net
Sun May 18 10:59:58 UTC 2008
Update of /project/noctool/cvsroot/source
In directory clnet:/tmp/cvs-serv13161
Modified Files:
packages.lisp config.lisp
Log Message:
IM
Added a PING config thing to the config parser (within a :machine context).
Needed to add PING as an exported symbol from the NOCTOOL-CONFIG package,
otherwise the scrap package couldn't find teh symbol and bugged out.
Half considering what to do with monitors that have lots of selective
tuning. Will mail the -dev mailing list, asking for opinions.
--- /project/noctool/cvsroot/source/packages.lisp 2008/05/17 12:43:27 1.2
+++ /project/noctool/cvsroot/source/packages.lisp 2008/05/18 10:59:57 1.3
@@ -24,7 +24,7 @@
(:nicknames #:noctool-config)
(:use #:net.hexapodia.noctool #:cl)
(:shadow #:load)
- (:export #:load #:machine #:user #:ip #:ssh-port #:disk #:disks #:disk-ignore))
+ (:export #:ping #:load #:machine #:user #:ip #:ssh-port #:disk #:disks #:disk-ignore))
(defpackage #:net.hexapodia.noctool-network
(:use #:net.hexapodia.noctool #:cl #:usocket)
--- /project/noctool/cvsroot/source/config.lisp 2008/05/17 12:43:27 1.3
+++ /project/noctool/cvsroot/source/config.lisp 2008/05/18 10:59:57 1.4
@@ -26,6 +26,13 @@
sym))
+(defmacro expand-config-stanza (&rest body)
+ "Macro-expand a configuration snippet. Intended solely as a debug aid."
+ `(progn
+ (bodge-package)
+ (loop for form in ',body
+ collect (macroexpand-1 form))))
+
(defmacro defnested (name args nesting &body clauses)
`(defmacro ,name ,args
(unless (member ,nesting *macro-nesting*)
@@ -92,8 +99,12 @@
(defnested ip (address)
:machine
`(progn
- (setf (slot-value ,*config-object* 'noctool::address) ,address)
- (noctool::make-monitor 'noctool::ping-monitor ,*config-object*)))
+ (setf (slot-value ,*config-object* 'noctool::address) ,address)))
+
+(defnested ping (&rest args &key (max-rtt 20) (max-fail 1) (interval 60))
+ :machine
+ (list max-rtt max-fail interval)
+ `(noctool::make-monitor 'ping-monitor ,*config-object* , at args))
(defmacro defmon (mon-class)
(export (list mon-class))
More information about the noctool-cvs
mailing list