Sha256: bb34fa44a3a94564adce6515a43d362ede28462ed8e7454319bbebe80b044617

Contents?: true

Size: 485 Bytes

Versions: 22

Compression:

Stored size: 485 Bytes

Contents

module Kontena::Cli::Vpn
  class RemoveCommand < Clamp::Command
    include Kontena::Cli::Common

    option "--force", :flag, "Force remove", default: false, attribute_name: :forced

    def execute
      require_api_url
      token = require_token
      confirm unless forced?

      vpn = client(token).get("services/#{current_grid}/vpn") rescue nil
      abort("VPN service does not exist") if vpn.nil?

      client(token).delete("services/#{current_grid}/vpn")
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
kontena-cli-0.15.5 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.15.5.rc2 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.15.5.rc1 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.15.4 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.15.4.rc2 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.15.4.rc1 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.15.4.pre1 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.15.3 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.15.2 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.15.1 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.15.0 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.15.0.rc3 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.15.0.rc2 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.15.0.rc1 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.14.7 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.14.6 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.14.5 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.14.4 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.14.3 lib/kontena/cli/vpn/remove_command.rb
kontena-cli-0.14.2 lib/kontena/cli/vpn/remove_command.rb