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-15.0.2 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-15.0.1 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-15.0.0 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-14.2.2 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-14.2.1 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-13.0.7 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-14.2.0 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-14.1.1 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-14.1.0 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-13.0.5 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-14.0.0 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-13.0.4 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-13.0.3 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-13.0.2 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-13.0.1 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-13.0.0 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-12.0.7 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-10.4.4 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-7.1.8 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb
foreman_ansible-12.0.6 app/controllers/concerns/foreman/controller/parameters/ansible_variable.rb