Sha256: 44f684246bf8161ecfd52a31f138210b41883bde566bba57a7edebeb0cbb51f9

Contents?: true

Size: 654 Bytes

Versions: 3

Compression:

Stored size: 654 Bytes

Contents

module KatelloForemanEngine
  module Actions
    class ContentViewDemote < Dynflow::Action

      def self.subscribe
        Katello::Actions::ContentViewDemote
      end

      def plan(content_view, from_env)
        if foreman_env = Bindings.environment_find(content_view.organization.label,
                                                   from_env.label, content_view.label)
          plan_self 'foreman_env_id' => foreman_env['environment']['id']
        end
      end

      input_format do
        param :foreman_env_id, Integer
      end

      def run
        Bindings.environment_destroy(input['foreman_env_id'])
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
katello-foreman-engine-0.0.3 lib/katello_foreman_engine/actions/content_view_demote.rb
katello-foreman-engine-0.0.2 lib/katello_foreman_engine/actions/content_view_demote.rb
katello-foreman-engine-0.0.1 lib/katello_foreman_engine/actions/content_view_demote.rb