Sha256: 8035a8b11deefe570414064984c1aadff5f05b13ea6453777691d2c2e490065c
Contents?: true
Size: 725 Bytes
Versions: 5
Compression:
Stored size: 725 Bytes
Contents
class Project < CloudstackCli::Base desc "project 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 "project 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
5 entries across 5 versions & 1 rubygems