From 029a151b7ce936b708c8c88763b1e833fcadeb66 Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Wed, 15 Nov 2023 09:29:07 -0500 Subject: [PATCH] Update safe_load calls to work with psych 3/4 Part of https://github.com/ManageIQ/manageiq/issues/22696 Keep compatibility with psych 3.1+ since permitted_classes and aliases were added as keyword arguments to safe_load. Note, psych 4 changed the interface to drop support with positional arguments for the permitted_classes. Now, we must explicitly specify them using kwargs. --- .../providers/openstack/cloud_manager/orchestration_template.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/manageiq/providers/openstack/cloud_manager/orchestration_template.rb b/app/models/manageiq/providers/openstack/cloud_manager/orchestration_template.rb index 1f1122d9d..23f5990cf 100644 --- a/app/models/manageiq/providers/openstack/cloud_manager/orchestration_template.rb +++ b/app/models/manageiq/providers/openstack/cloud_manager/orchestration_template.rb @@ -105,7 +105,7 @@ def self.display_name(number = 1) def parse return JSON.parse(content) if format == 'json' - YAML.safe_load(content, [Date]) + YAML.safe_load(content, :permitted_classes => [Date]) end def validate_format_yaml