Sha256: 1d69ac02cb98f92c2c05d649df772c8cf1eaa34c67bdc72bbe0e1555e2bc20d6

Contents?: true

Size: 846 Bytes

Versions: 2

Compression:

Stored size: 846 Bytes

Contents

module KatelloForemanEngine
  module Actions
    class ContentViewPromote < Dynflow::Action

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

      def plan(content_view, from_env, to_env)
        unless Bindings.environment_find(input['organization_label'], input['to_env_label'], input['label'])
          plan_self input
        end
        content_view.repos(to_env) do |repo|
          plan_action(RepositoryChange, repo)
        end
      end

      input_format do
        param :id, Integer
        param :label, String
        param :organization_label, String
        param :from_env_label, String
        param :to_env_label, String
      end

      def run
        Bindings.environment_create(input['id'], input['organization_label'], input['to_env_label'], input['label'])
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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