Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into quinteros
Browse files Browse the repository at this point in the history
  • Loading branch information
Fryguy committed Dec 7, 2023
2 parents 8f62196 + 57df84c commit 7b26641
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 2 additions & 6 deletions app/models/manageiq/providers/openstack/helper_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,8 @@ def with_notification(type, options: {})
success_options.merge!(options)
error_options.merge!(options)

# copy subject, initiator and cause from options
named_options_keys = [:subject, :initiator, :cause]
named_options = {}
named_options_keys.map do |key|
named_options[key] = options.fetch(key, nil)
end
# extract subject, initiator and cause from options
named_options = options.extract!(:subject, :initiator, :cause)

begin
yield
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
@flavor = FactoryBot.create(:flavor_openstack)
@volume = FactoryBot.create(:cloud_volume_openstack)

# We're storing objects in the instance_type, so we must permit loading this class
ActiveRecord::Base.yaml_column_permitted_classes = ActiveRecord::Base.yaml_column_permitted_classes | [@flavor.class]
@task = FactoryBot.create(:miq_provision_openstack,
:source => @template,
:state => 'pending',
Expand Down

0 comments on commit 7b26641

Please sign in to comment.