Sha256: fe53d252fde2cdf579f7f0b119a99b5e46a19b55ec40a8277f5079693668f840

Contents?: true

Size: 572 Bytes

Versions: 34

Compression:

Stored size: 572 Bytes

Contents

require_relative 'common'

module Kontena::Cli::Stacks
  class StopCommand < Kontena::Command
    include Kontena::Cli::Common
    include Kontena::Cli::GridOptions
    include Common

    banner "Stops all services of a stack"

    parameter "NAME ...", "Stack name", attribute_name: :names

    requires_current_master
    requires_current_master_token

    def execute
      names.each do |name|
        spinner "Sending stop signal for stack #{name} services" do
          client.post("stacks/#{current_grid}/#{name}/stop", {})
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
krates-1.7.11 lib/kontena/cli/stacks/stop_command.rb
krates-1.7.10 lib/kontena/cli/stacks/stop_command.rb
krates-1.7.9 lib/kontena/cli/stacks/stop_command.rb
krates-1.7.8 lib/kontena/cli/stacks/stop_command.rb
krates-1.7.7 lib/kontena/cli/stacks/stop_command.rb
krates-1.7.6 lib/kontena/cli/stacks/stop_command.rb
krates-1.7.5 lib/kontena/cli/stacks/stop_command.rb
krates-1.7.4 lib/kontena/cli/stacks/stop_command.rb
krates-1.7.3 lib/kontena/cli/stacks/stop_command.rb
krates-1.7.2 lib/kontena/cli/stacks/stop_command.rb
krates-1.7.1 lib/kontena/cli/stacks/stop_command.rb
krates-1.7.0 lib/kontena/cli/stacks/stop_command.rb
krates-1.6.9 lib/kontena/cli/stacks/stop_command.rb
krates-1.6.8 lib/kontena/cli/stacks/stop_command.rb
krates-1.6.7 lib/kontena/cli/stacks/stop_command.rb
krates-1.6.6 lib/kontena/cli/stacks/stop_command.rb
krates-1.6.5 lib/kontena/cli/stacks/stop_command.rb
krates-1.6.4 lib/kontena/cli/stacks/stop_command.rb
krates-1.6.3 lib/kontena/cli/stacks/stop_command.rb
krates-1.6.2 lib/kontena/cli/stacks/stop_command.rb