Sha256: 3bdc2ba73d7ea8503976ef43770054635fb02dadeb1214dee1a5faad404ab07e

Contents?: true

Size: 947 Bytes

Versions: 51

Compression:

Stored size: 947 Bytes

Contents

module Katello
  module Concerns
    module Api::V2::SmartProxiesControllerExtensions
      module ApiPieExtensions
        extend ::Apipie::DSL::Concern

        update_api(:create, :update) do
          param :smart_proxy, Hash do
            param :download_policy, String, :required => false, :desc => N_('Download Policy of the capsule, must be one of %s') %
                SmartProxy::DOWNLOAD_POLICIES.join(', ')
            param :http_proxy_id, Integer, :required => false, :desc => N_('Id of the HTTP proxy to use with alternate content sources')
          end
        end
      end

      extend ActiveSupport::Concern

      included do
        include ApiPieExtensions

        def create
          @smart_proxy = SmartProxy.new(smart_proxy_params)
          process_response @smart_proxy.save
        end

        def update
          process_response @smart_proxy.update(smart_proxy_params)
        end
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
katello-4.7.5 app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb
katello-4.8.0 app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb
katello-4.8.0.rc2 app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb
katello-4.7.4 app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb
katello-4.8.0.rc1 app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb
katello-4.7.3 app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb
katello-4.7.2 app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb
katello-4.7.1 app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb
katello-4.7.0 app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb
katello-4.7.0.rc2 app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb
katello-4.7.0.rc1 app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb