Sha256: 009756f13b1265746c4e4baa90282eccbd48a3643bbe428931acdebfd0db0b59

Contents?: true

Size: 544 Bytes

Versions: 5

Compression:

Stored size: 544 Bytes

Contents

module Kontena::Cli::Vpn
  class DeleteCommand < Kontena::Command
    include Kontena::Cli::Common
    include Kontena::Cli::GridOptions

    def execute
       puts "DEPRECATION WARNING: Support for 'kontena vpn delete' will be dropped. Use 'kontena vpn remove' instead.".colorize(:red)
      require_api_url
      token = require_token

      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

5 entries across 5 versions & 1 rubygems

Version Path
kontena-cli-0.16.0.pre5 lib/kontena/cli/vpn/delete_command.rb
kontena-cli-0.16.0.pre4 lib/kontena/cli/vpn/delete_command.rb
kontena-cli-0.16.0.pre3 lib/kontena/cli/vpn/delete_command.rb
kontena-cli-0.16.0.pre2 lib/kontena/cli/vpn/delete_command.rb
kontena-cli-0.16.0.pre1 lib/kontena/cli/vpn/delete_command.rb