Sha256: 45019ea9520f546ee302982e975040b2f9f5bad927efcce401b8133770020d38
Contents?: true
Size: 1.01 KB
Versions: 11
Compression:
Stored size: 1.01 KB
Contents
require "vmc/cli/domain/base" module VMC::Domain class Domains < Base desc "List domains in a space" group :domains input :space, :argument => :optional, :default => proc { client.current_space }, :from_given => by_name("space"), :desc => "Space to list the domains from" input :all, :type => :boolean, :default => false, :desc => "List all domains" 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
11 entries across 11 versions & 1 rubygems