 (ns com.sixsq.slipstream.ssclj.resources.simu-usage-test
   (:require
     [clojure.test                                       :refer :all]
+    [clojure.java.shell                                 :only [sh] :as sh]
     [com.sixsq.slipstream.ssclj.resources.usage-record  :refer :all]
     [com.sixsq.slipstream.ssclj.usage.record-keeper     :as rc]
     [korma.core                                         :as kc]

;; public
;;

(defn delete-all
  []
  (acl/-init)
  (rc/-init)

  []
  (compute-summaries (some-days)))

;;
;; user-1 for the day january 21st 2015:
;;
;; ?$filter=user='user-3' and start_timestamp='2010-02-10T00:00:00.000Z' and end_timestamp='2010-02-11T00:00:00.000Z'
;;
;; cloud-2
;;
;; ?$filter=cloud='cloud-2' and start_timestamp='2010-02-10T00:00:00.000Z' and end_timestamp='2010-02-11T00:00:00.000Z'

(defn curl
  [qs]
  (print
    (str "time curl -H \"slipstream-authn-info: super ADMIN\" -X GET \"http://localhost:8201/api/Usage"
       (tu/urlencode-params qs) "\"")))