Class: JCF::CLI::Commands::CF::ServiceInstances

Inherits:
JCF::CLI::Command
  • Object
show all
Defined in:
lib/jcf/cli/commands/cf/service_instances.rb

Instance Method Summary collapse

Methods inherited from JCF::CLI::Command

inherited

Instance Method Details

#call(name: nil, **options) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/jcf/cli/commands/cf/service_instances.rb', line 18

def call(name: nil, **options)
  data = if name
           JCF::CF::ServiceInstance.find_by(name: name)
         else
           JCF::CF::ServiceInstance.all(
             organization_guids: options[:org],
             space_guids: options[:space],
             service_plan: options[:service_plan]
           )
         end

  out.puts formatter.format(data: JCF::CF::Base.format(data))
end