Project

General

Profile

Download (575 Bytes) Statistics
| Branch: | Tag: | Revision:
module Api
module CompatibilityChecker
extend ActiveSupport::Concern

# removes unsupported "nested" flag from "host_parameters_attributes" (both Array and Hash formats supported)
def check_create_host_nested
if params[:host] && (attrs = params[:host][:host_parameters_attributes])
attrs = attrs.values unless attrs.is_a?(Array)
attrs.each do |attribute|
Foreman::Deprecation.api_deprecation_warning("Field host_parameters_attributes.nested ignored") unless attribute.delete(:nested).nil?
end
end
end
end
end
(1-1/3)