Sha256: ddbce756f81b14f30260f51485ed950cd96d13a173e580b0350e0baf2ce7cfd8

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

module ThreeScaleToolbox
  module Commands
    module ImportCommand
      module OpenAPI
        class ImportProductStep
          include Step

          def call
            tasks = []
            tasks << CreateServiceStep.new(context)
            # other tasks might read proxy settings (CreateActiveDocsStep does)
            tasks << UpdateServiceProxyStep.new(context)
            tasks << CreateMethodsStep.new(context)
            tasks << ThreeScaleToolbox::Commands::ServiceCommand::CopyCommand::DestroyMappingRulesTask.new(context)
            tasks << CreateMappingRulesStep.new(context)
            tasks << CreateActiveDocsStep.new(context)
            tasks << UpdateServiceOidcConfStep.new(context)
            tasks << UpdatePoliciesStep.new(context)

            # run tasks
            tasks.each(&:call)

            # This should be the last step
            ThreeScaleToolbox::Commands::ServiceCommand::CopyCommand::BumpProxyVersionTask.new(service: context[:target]).call
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
3scale_toolbox-1.0.1 lib/3scale_toolbox/commands/import_command/openapi/import_product_step.rb
3scale_toolbox-1.0.0 lib/3scale_toolbox/commands/import_command/openapi/import_product_step.rb
3scale_toolbox-0.20.0 lib/3scale_toolbox/commands/import_command/openapi/import_product_step.rb