Sha256: 0222926f897bcde1521f9908d49349d4926a8bbfcc08a6306090fd52749553e2

Contents?: true

Size: 732 Bytes

Versions: 6

Compression:

Stored size: 732 Bytes

Contents

module Foreman::Controller::Parameters::DockerRegistry
  extend ActiveSupport::Concern

  class_methods do
    def docker_registry_params_filter
      Foreman::ParameterFilter.new(::DockerRegistry).tap do |filter|
        filter.permit :name, :url, :username, :password, :description, :verify_ssl,
                      :location_ids => [], :organization_ids => []
      end
    end
  end

  def docker_registry_params
    param_name = parameter_filter_context.api? ? 'registry' : 'docker_registry'
    self.class.docker_registry_params_filter.filter_params(params, parameter_filter_context,
                                                           param_name
                                                          )
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
foreman_docker-5.0.0 app/controllers/concerns/foreman/controller/parameters/docker_registry.rb
foreman_docker-4.1.1 app/controllers/concerns/foreman/controller/parameters/docker_registry.rb
foreman_docker-4.1.0 app/controllers/concerns/foreman/controller/parameters/docker_registry.rb
foreman_docker-4.0.0 app/controllers/concerns/foreman/controller/parameters/docker_registry.rb
foreman_docker-3.2.1 app/controllers/concerns/foreman/controller/parameters/docker_registry.rb
foreman_docker-3.2.0 app/controllers/concerns/foreman/controller/parameters/docker_registry.rb