Sha256: 87811e502bfd4e9efc4f5cf6779484f0f8c06fa0dd58f6623c8e3b15c0901c2f

Contents?: true

Size: 709 Bytes

Versions: 10

Compression:

Stored size: 709 Bytes

Contents

class Project < CloudstackCli::Base

  desc "show NAME", "show detailed infos about a project"
  option :project
  def show(name)
    unless project = client.get_project(name)
      puts "No project with name #{name} found."
    else
      project.each do |key, value|
        say "#{key}: ", :yellow
        say "#{value}"
      end
    end
  end

  desc "list", "list projects"
  def list
    projects = client.list_projects
    if projects.size < 1
      puts "No projects found."
    else
      table = [["Name", "Displaytext", "Domain"]]
      projects.each do |project|
        table << [project['name'], project['displaytext'], project['domain']]
      end
      print_table(table)
    end
  end
  
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
cloudstack-cli-0.5.8 lib/cloudstack-cli/commands/project.rb
cloudstack-cli-0.5.5 lib/cloudstack-cli/commands/project.rb
cloudstack-cli-0.5.4 lib/cloudstack-cli/commands/project.rb
cloudstack-cli-0.5.3 lib/cloudstack-cli/commands/project.rb
cloudstack-cli-0.5.2 lib/cloudstack-cli/commands/project.rb
cloudstack-cli-0.5.1 lib/cloudstack-cli/commands/project.rb
cloudstack-cli-0.5.0 lib/cloudstack-cli/commands/project.rb
cloudstack-cli-0.3.10 lib/cloudstack-cli/commands/project.rb
cloudstack-cli-0.3.9 lib/cloudstack-cli/commands/project.rb
cloudstack-cli-0.3.8 lib/cloudstack-cli/commands/project.rb