Sha256: d2e3b2ec788f6bdba5eb3dc2ce772569852e223138009eef635a1fa6ec03dc03
Contents?: true
Size: 676 Bytes
Versions: 32
Compression:
Stored size: 676 Bytes
Contents
require_relative 'common' module Kontena::Cli::Grids class RemoveCommand < Clamp::Command include Kontena::Cli::Common include Common parameter "NAME", "Grid name" def execute require_api_url token = require_token grid = find_grid_by_name(name) if !grid.nil? response = client(token).delete("grids/#{grid['id']}") if response clear_current_grid if grid['id'] == current_grid puts "removed #{grid['name'].cyan}" end else abort "Could not resolve grid by name [#{name}]. For a list of existing grids please run: kontena grid list".colorize(:red) end end end end
Version data entries
32 entries across 32 versions & 1 rubygems