Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PE-36479) remove use of clj-yaml #2763

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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