                              :rand-percentage rand-percentage
                              :run-interval run-interval
                              :lastrun (- (System/currentTimeMillis) (rand-int run-interval))
-                             :catalog (associate-catalog-with-host % (rand-nth catalogs))})
+                             :catalog (if catalogs (associate-catalog-with-host % (rand-nth catalogs)))
+                             :report (if reports (associate-report-with-host % (rand-nth reports)))})
                     hostnames)]
 
+    (when-not catalogs
+      (log/info "No catalogs specified; skipping catalog submission"))
+    (when-not reports
+      (log/info "No reports specified; skipping report submission"))
     ;; Loop forever
     (world-loop hosts)))


      ;; Send out updated ticks to each agent
      (doseq [host hosts]
        (send host update-host curr-time))

      (Thread/sleep 10)
      (recur curr-time))))

(defn associate-catalog-with-host
  "Takes the given catalog and transforms it to appear related to
  `hostname`"
  [hostname catalog]
  (-> catalog
      (assoc-in ["data" "name"] hostname)
      (assoc-in ["data" "resources"] (for [resource (get-in catalog ["data" "resources"])]
                                       (update-in resource ["tags"] conj hostname)))))
(defn -main
  [& args]
  (let [[options _]     (cli! args
                              ["-C" "--catalogs" "Path to a directory containing sample JSON catalogs (files must end with .json)"]
                              ["-i" "--runinterval" "What runinterval (in minutes) to use during simulation"]
                              ["-n" "--numhosts" "How many hosts to use during simulation"]
                              ["-rp" "--rand-perc" "What percentage of submitted catalogs are tweaked (int between 0 and 100)"])

    (when-not (= pl-http/status-ok (:status result))
      (log/error result))))

(defn submit-report
  "Send the given wire-format `report` (associated with `host`) to a
  command-processing endpoint located at `puppetdb-host`:`puppetdb-port`."
  [puppetdb-host puppetdb-port report]
  (let [result (command/submit-command-via-http! puppetdb-host puppetdb-port "store report" 1 report)]
    (when-not (= pl-http/status-ok (:status result))
      (log/error result))))

(defn maybe-tweak-catalog
  "Slightly tweak the given catalog, returning a new catalog, `rand-percentage`
  percent of the time."
  [rand-percentage catalog]
  (if (< (rand 100) rand-percentage)
    (catutils/add-random-resource-to-wire-catalog catalog)
    catalog))

(defn update-host
  "Send a new _clock tick_ to a host
