Skip to content

Commit

Permalink
Merge pull request #2763 from jonathannewman/PE-36479/7.x/remove-clj-…
Browse files Browse the repository at this point in the history
…yaml

(PE-36479) remove use of clj-yaml
  • Loading branch information
steveax authored Jul 18, 2023
2 parents 85cf736 + e85f88b commit 19d50dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
:dependencies [[org.clojure/clojure]

[slingshot]
[clj-commons/clj-yaml]
[org.yaml/snakeyaml]
[commons-lang]
[commons-io]
Expand Down
6 changes: 3 additions & 3 deletions src/clj/puppetlabs/puppetserver/certificate_authority.clj
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
[puppetlabs.kitchensink.core :as ks]
[puppetlabs.kitchensink.file :as ks-file]
[puppetlabs.puppetserver.ringutils :as ringutils]
[puppetlabs.trapperkeeper.common :refer [parse-yaml]]
[puppetlabs.ssl-utils.core :as utils]
[clj-yaml.core :as yaml]
[puppetlabs.puppetserver.shell-utils :as shell-utils]
[puppetlabs.i18n.core :as i18n]))

Expand Down Expand Up @@ -862,7 +862,7 @@
certificate extensions from the `extensions_requests` section."
[csr-attributes-file :- schema/Str]
(if (fs/file? csr-attributes-file)
(let [csr-attrs (yaml/parse-string (slurp csr-attributes-file))
(let [csr-attrs (parse-yaml (slurp csr-attributes-file))
ext-req (:extension_requests csr-attrs)]
(map (fn [[oid value]]
{:oid (or (get puppet-short-names oid)
Expand Down Expand Up @@ -1813,7 +1813,7 @@
shortnames"
[custom-oid-mapping-file :- schema/Str]
(if (fs/file? custom-oid-mapping-file)
(let [oid-mappings (:oid_mapping (yaml/parse-string (slurp custom-oid-mapping-file)))]
(let [oid-mappings (:oid_mapping (parse-yaml (slurp custom-oid-mapping-file)))]
(into {} (for [[oid names] oid-mappings] [(name oid) (keyword (:shortname names))])))
(log/debug (i18n/trs "No custom OID mapping configuration file found at {0}, custom OID mappings will not be loaded"
custom-oid-mapping-file))))
Expand Down
4 changes: 2 additions & 2 deletions src/clj/puppetlabs/services/master/file_serving.clj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(ns puppetlabs.services.master.file-serving
(:require [bidi.bidi :as bidi]
[clj-yaml.core :as yaml]
[clojure.java.io :as io]
[clojure.string :as str]
[digest :as digest]
[me.raynes.fs :as fs]
[puppetlabs.i18n.core :as i18n]
[puppetlabs.ring-middleware.utils :as middleware-utils]
[puppetlabs.trapperkeeper.common :refer [parse-yaml]]
[ring.util.response :as rr])
(:import com.sun.security.auth.module.UnixSystem
[java.nio.file Files FileSystems FileVisitOption FileVisitResult LinkOption Paths SimpleFileVisitor]))
Expand Down Expand Up @@ -150,7 +150,7 @@
[project-dir]
(let [config-path (str project-dir "/bolt-project.yaml")]
(when (fs/file? config-path)
(yaml/parse-string (slurp config-path)))))
(parse-yaml (slurp config-path)))))

(defn parse-modulepath
"The modulepath for a bolt project can either be an array of paths or a string
Expand Down

0 comments on commit 19d50dc

Please sign in to comment.