Sha256: f6fb01a311f73c3548f0625b6b313ce78314749f7a4aba1f6280d1f8221c560b
Contents?: true
Size: 634 Bytes
Versions: 11
Compression:
Stored size: 634 Bytes
Contents
module Kontena::Cli::Vpn class RemoveCommand < Kontena::Command include Kontena::Cli::Common include Kontena::Cli::GridOptions option "--force", :flag, "Force remove", default: false, attribute_name: :forced def execute require_api_url token = require_token confirm unless forced? name = 'vpn' vpn = client(token).get("services/#{current_grid}/#{name}") rescue nil exit_with_error("#{name} service does not exist") if vpn.nil? spinner "Removing #{name.colorize(:cyan)} service " do client(token).delete("services/#{current_grid}/vpn") end end end end
Version data entries
11 entries across 11 versions & 1 rubygems