Sha256: eba8fc01bc26da9728bb2236fd67bf60f27ffc87ea530c008668c7af64cd87b1

Contents?: true

Size: 1.23 KB

Versions: 101

Compression:

Stored size: 1.23 KB

Contents

# frozen_string_literal: true

module Foreman
  module Controller
    module Parameters
      # Keys to allow as parameters in the AnsibleVariable controller
      module AnsibleVariable
        extend ActiveSupport::Concern
        include Foreman::Controller::Parameters::LookupKey

        class_methods do
          def ansible_variable_params_filter
            Foreman::ParameterFilter.new(::AnsibleVariable).tap do |filter|
              filter.permit :imported, :ansible_role_id,
                            :ansible_roles => [], :ansible_role_ids => [],
                            :ansible_role_names => [],
                            :param_classes => [], :param_classes_ids => [],
                            :param_classes_names => []
              filter.permit_by_context :required, :nested => true
              filter.permit_by_context :id, :ui => false, :api => false,
                                            :nested => true

              add_lookup_key_params_filter(filter)
            end
          end
        end

        def ansible_variable_params
          self.class.ansible_variable_params_filter.filter_params(
            params,
            parameter_filter_context
          )
        end
      end
    end
  end
end

Version data entries

101 entries across 101 versions & 1 rubygems

Version Path
foreman_ansible-6.3.2 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-6.3.1 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-6.4.1 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-6.4.0 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-6.3.0 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-6.2.0 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-6.1.1 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-6.0.2 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-6.1.0 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-6.0.1 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-5.1.3 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-6.0.0 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-5.1.2 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-5.1.1 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-5.1.0 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-4.0.3.5 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-4.0.3.4 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-4.0.3.3 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-4.0.3.2 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-5.0.1 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb