4 Commits

Author SHA1 Message Date
Takashi Kajinami
9b27968a04 Stop accepting encoded JSON string
... to avoid redundant parsing of json content from a given string.

This also allows us to add more strict validation later using Struct
data type.

Change-Id: I2a8bbd266d5e97a06b89c131bbd86e3710a68923
2025-03-17 01:43:38 +09:00
Takashi Kajinami
2dcad6d8dc Replace usage of uriescape
The uriescape function from puppetlabs-stdlib is no longer functional
in Puppet 8, because the URI.escape, which is internally used by that
function, is no longer available in Ruby 3+.

This replaces the function by own function to avoid the failure in
Puppet 8.

Closes-Bug: #2057860
Change-Id: I7b4db4c1e64416e20d8470cbff0b8497c6a0cfc9
2024-03-15 23:05:08 +09:00
Takashi Kajinami
f8bde51891 pci: Drop support for "broken" json
JSON does not allow usage of single quotes and require double quotes.
We have been converting single quotes to support such invalid usage but
that was deprecated a long ago[1].

This also simplifies the logic to handle aliases. Using undef results
in the value set to service default fact.

[1] 1cd349f893408803fec307f615ae3fe265d54fed

Change-Id: If1328531f33a9fe778091ce38b5c1f8072b473b8
2023-11-03 23:11:29 +09:00
Tobias Urdin
d65396b7b4 Use puppet4 functions-api
Change-Id: I3aad89ddc53d08c4357dd278f8dc6560137ab0ae
2018-12-17 23:22:34 +00:00