Sha256: fe68948e156027db6a39f0c310abff67b23139b86bfe6bb927f9becb6fd16db4

Contents?: true

Size: 803 Bytes

Versions: 62

Compression:

Stored size: 803 Bytes

Contents

require "cf/cli/organization/base"

module CF::Organization
  class Orgs < Base
    desc "List available organizations"
    group :organizations
    input :full, :desc => "Show full information for apps, services, etc.",
          :default => false
    def orgs
      orgs =
        with_progress("Getting organizations") do
          client.organizations.sort_by(&:name)
        end

      return if orgs.empty?

      line unless quiet?

      if input[:full]
        orgs.each do |o|
          invoke :org, :organization => o, :full => true
        end
      else
        table(
          %w{name spaces domains},
          orgs.collect { |o|
            [ c(o.name, :name),
              name_list(o.spaces),
              name_list(o.domains)
            ]
          })
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
cf-4.1.5.rc1 lib/cf/cli/organization/orgs.rb
cf-4.1.4 lib/cf/cli/organization/orgs.rb
cf-4.1.4.rc2 lib/cf/cli/organization/orgs.rb
cf-4.1.4.rc1 lib/cf/cli/organization/orgs.rb
cf-4.1.3 lib/cf/cli/organization/orgs.rb
cf-4.1.2.rc2 lib/cf/cli/organization/orgs.rb
cf-4.1.2.rc1 lib/cf/cli/organization/orgs.rb
cf-4.1.1 lib/cf/cli/organization/orgs.rb
cf-4.1.0rc2 lib/cf/cli/organization/orgs.rb
cf-4.1.0rc1 lib/cf/cli/organization/orgs.rb
cf-4.0.1.rc2 lib/cf/cli/organization/orgs.rb
cf-4.0.1.rc1 lib/cf/cli/organization/orgs.rb
cf-4.0.0rc2 lib/cf/cli/organization/orgs.rb
cf-4.0.0rc1 lib/cf/cli/organization/orgs.rb
cf-3.1.0rc2 lib/cf/cli/organization/orgs.rb
cf-3.1.0.rc1 lib/cf/cli/organization/orgs.rb
cf-3.0.1.rc1 lib/cf/cli/organization/orgs.rb
cf-3.0.0 lib/cf/cli/organization/orgs.rb
cf-3.0.0rc3 lib/cf/cli/organization/orgs.rb
cf-3.0.0rc2 lib/cf/cli/organization/orgs.rb