Sha256: 09653a007add0559432ae9325aa2435bffc55ca45a26ba4b37cb7493eae9e0ae

Contents?: true

Size: 437 Bytes

Versions: 14

Compression:

Stored size: 437 Bytes

Contents

require_relative 'common'

module Kontena::Cli::Stacks
  class RemoveCommand < Clamp::Command
    include Kontena::Cli::Common
    include Kontena::Cli::GridOptions
    include Common

    parameter "NAME", "Service name"

    def execute
      require_api_url
      require_token

      remove_stack(name)
    end

    private


    def remove_stack(name)
      client(token).delete("stacks/#{current_grid}/#{name}")
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
kontena-cli-0.15.5 lib/kontena/cli/stacks/remove_command.rb
kontena-cli-0.15.5.rc2 lib/kontena/cli/stacks/remove_command.rb
kontena-cli-0.15.5.rc1 lib/kontena/cli/stacks/remove_command.rb
kontena-cli-0.15.4 lib/kontena/cli/stacks/remove_command.rb
kontena-cli-0.15.4.rc2 lib/kontena/cli/stacks/remove_command.rb
kontena-cli-0.15.4.rc1 lib/kontena/cli/stacks/remove_command.rb
kontena-cli-0.15.4.pre1 lib/kontena/cli/stacks/remove_command.rb
kontena-cli-0.15.3 lib/kontena/cli/stacks/remove_command.rb
kontena-cli-0.15.2 lib/kontena/cli/stacks/remove_command.rb
kontena-cli-0.15.1 lib/kontena/cli/stacks/remove_command.rb
kontena-cli-0.15.0 lib/kontena/cli/stacks/remove_command.rb
kontena-cli-0.15.0.rc3 lib/kontena/cli/stacks/remove_command.rb
kontena-cli-0.15.0.rc2 lib/kontena/cli/stacks/remove_command.rb
kontena-cli-0.15.0.rc1 lib/kontena/cli/stacks/remove_command.rb