Sha256: 596ea14479d378cec8a4da45827cf982c063ea0cc37bd7e83ac82992b80b658d

Contents?: true

Size: 1.06 KB

Versions: 15

Compression:

Stored size: 1.06 KB

Contents

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

        update_api(:create, :update) do
          param :hostgroup, Hash do
            param :content_source_id, :number, :desc => N_('Content source ID')
            param :content_view_id, :number, :desc => N_('Content view ID')
            param :lifecycle_environment_id, :number, :desc => N_('Lifecycle environment ID')
            param :kickstart_repository_id, :number, :desc => N_('Kickstart repository ID')
          end
        end
      end

      extend ActiveSupport::Concern

      included do
        include ApiPieExtensions

        def create
          @hostgroup = Hostgroup.new(hostgroup_params)
          process_response @hostgroup.save
        end

        def update
          process_response @hostgroup.update(hostgroup_params)
        end

        def show
          @render_template = 'katello/api/v2/hostgroups_extensions/show'
          render @render_template
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
katello-3.16.2 app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb
katello-3.16.1.2 app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb
katello-3.16.1.1 app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb
katello-3.16.1 app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb
katello-3.16.0 app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb
katello-3.16.0.rc5.1 app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb
katello-3.16.0.rc5 app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb
katello-3.16.0.rc4.1 app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb
katello-3.16.0.rc4 app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb
katello-3.16.0.rc3.1 app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb
katello-3.16.0.rc3 app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb
katello-3.16.0.rc2.1 app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb
katello-3.16.0.rc2 app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb
katello-3.16.0.rc1.1 app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb
katello-3.16.0.rc1 app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb