Sha256: ffa4d3b399f3b5153c171a398e7c6244934662ee4e6ff6c66166a3c19968aec3

Contents?: true

Size: 646 Bytes

Versions: 12

Compression:

Stored size: 646 Bytes

Contents

module ForemanSalt
  module Concerns
    module SaltEnvironmentParameters
      extend ActiveSupport::Concern

      class_methods do
        def salt_environment_params_filter
          Foreman::ParameterFilter.new(::ForemanSalt::SaltEnvironment).tap do |filter|
            filter.permit(:name, salt_modules: [], salt_module_ids: [])
          end
        end
      end

      def salt_environment_params
        param_name = parameter_filter_context.api? ? 'environment' : 'foreman_salt_salt_environment'
        self.class.salt_environment_params_filter.filter_params(params, parameter_filter_context, param_name)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
foreman_salt-17.0.0 app/controllers/foreman_salt/concerns/salt_environment_parameters.rb
foreman_salt-16.0.3 app/controllers/foreman_salt/concerns/salt_environment_parameters.rb
foreman_salt-16.0.2 app/controllers/foreman_salt/concerns/salt_environment_parameters.rb
foreman_salt-16.0.1 app/controllers/foreman_salt/concerns/salt_environment_parameters.rb
foreman_salt-16.0.0 app/controllers/foreman_salt/concerns/salt_environment_parameters.rb
foreman_salt-15.2.3 app/controllers/foreman_salt/concerns/salt_environment_parameters.rb
foreman_salt-15.2.2 app/controllers/foreman_salt/concerns/salt_environment_parameters.rb
foreman_salt-15.2.1 app/controllers/foreman_salt/concerns/salt_environment_parameters.rb
foreman_salt-15.2.0 app/controllers/foreman_salt/concerns/salt_environment_parameters.rb
foreman_salt-15.1.0 app/controllers/foreman_salt/concerns/salt_environment_parameters.rb
foreman_salt-15.0.0 app/controllers/foreman_salt/concerns/salt_environment_parameters.rb
foreman_salt-14.1.0 app/controllers/foreman_salt/concerns/salt_environment_parameters.rb