Sha256: 222459a8eecc8f835192defe8fb0d5a1d1cc3aed47513d9751dc7a72ed08b2d9
Contents?: true
Size: 990 Bytes
Versions: 24
Compression:
Stored size: 990 Bytes
Contents
require "vmc/cli/domain/base" module VMC::Domain class Domains < Base desc "List domains in a space" group :domains input :space, :desc => "Space to list the domains from", :argument => :optional, :default => proc { client.current_space }, :from_given => by_name(:space) input :all, :desc => "List all domains", :default => false def domains space = input[:space] domains = if input[:all] with_progress("Getting all domains") do client.domains end else with_progress("Getting domains in #{c(space.name, :name)}") do space.domains end end line unless quiet? table( %w{name owner}, domains.sort_by(&:name).collect { |r| [c(r.name, :name), if org = r.owning_organization c(org.name, :name) else d("none") end ] }) end end end
Version data entries
24 entries across 24 versions & 2 rubygems