(bind-func fleet_submit_extempore_service
(let ((url:i8* (zalloc 256)))
(lambda (host:i8* port:i32)
(sprintf url "http://%s:%d/%s/units/extempore.service" host port FLEET_API_VERSION)
(let ((body (json_object))
;; (options (json_array))
(err:json_error_t* (zalloc)))
;; create the extempore unit (JSON version)
(json_object_set_new body "desiredState" (json_string "inactive"))
;; set the options
(json_object_set_new
body
"options"
(json_loads
"[{\\22section\\22: \\22Unit\\22, \\22name\\22: \\22After\\22, \\22value\\22: \\22docker.service\\22}
{\\22section\\22: \\22Unit\\22, \\22name\\22: \\22Requires\\22, \\22value\\22: \\22docker.service\\22}