Sha256: ac3d0499000032130ff028fc3a9c7f70a0cf4d6b15a9d9eabee5fbaf899c9233
Contents?: true
Size: 625 Bytes
Versions: 10
Compression:
Stored size: 625 Bytes
Contents
require_relative 'services_helper' module Kontena::Cli::Services class ListCommand < Clamp::Command include Kontena::Cli::Common include ServicesHelper def execute require_api_url token = require_token grids = client(token).get("grids/#{current_grid}/services") puts "%-30.30s %-40.40s %-10s %-8s" % ['NAME', 'IMAGE', 'INSTANCES', 'STATEFUL'] grids['services'].each do |service| state = service['stateful'] ? 'yes' : 'no' puts "%-30.30s %-40.40s %-10.10s %-8s" % [service['name'], service['image'], service['container_count'], state] end end end end
Version data entries
10 entries across 10 versions & 1 rubygems