Sha256: 64201247f70913040ed20a117165f7d8bb7481b2c59975a8f3555a2166acc161
Contents?: true
Size: 587 Bytes
Versions: 32
Compression:
Stored size: 587 Bytes
Contents
module Kontena::Cli::Containers class InspectCommand < Clamp::Command include Kontena::Cli::Common include Kontena::Cli::GridOptions parameter "CONTAINER_ID", "Container id" def execute require_api_url token = require_token match = container_id.match(/(.+)-(\d+)/) if match service_name = match[1] result = client(token).get("containers/#{current_grid}/#{service_name}/#{container_id}/inspect") puts JSON.pretty_generate(result) else abort("Cannot resolve container service") end end end end
Version data entries
32 entries across 32 versions & 1 rubygems