(defparameter *disable-dns-plesk-xml-packet*
"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
<packet>
<dns>
<disable>
<filter>
<site-id>~a</site-id>
</filter>
</disable>
</dns>
</packet>")
(defun disable-dns-plesk-xml-packet (site-id)
(format t *disable-dns-plesk-xml-packet* site-id))
(defun disable-dns-plesk (server-name servers-config domain)
(let ((server-config (gethash server-name servers-config)))
(when server-config
(with-accessors ((ip ip) (api-key api-key) (site-ids site-ids) (site-alias-ids site-alias-ids)) server-config
(drakma:http-request (uri->string *plesk-xml-uri-defaults* :host ip)
:method :post
:additional-headers (api-key->header api-key)
:content (disable-dns-plesk-xml-packet (or (gethash domain site-ids)
(gethash domain site-alias-ids)))
:content-type "text/xml")))))