Sha256: cb04a35570cd2112986ca6e172b775149fbaf1465a20ce783e724b2f2ee65b28

Contents?: true

Size: 495 Bytes

Versions: 3

Compression:

Stored size: 495 Bytes

Contents

class Volume < CloudstackCli::Base

  desc "list", "list networks"
  option :project
  def list
    project = find_project if options[:project]
    networks = client.list_networks(project ? project['id'] : nil)
    if networks.size < 1
      puts "No networks found"
    else
      table = [["Name", "Displaytext", "Default?"]]
      networks.each do |network|
        table << [network['name'], network['displaytext'], network['isdefault']]
      end
      print_table(table)
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cloudstack-cli-0.1.2 lib/cloudstack-cli/commands/volume.rb
cloudstack-cli-0.1.1 lib/cloudstack-cli/commands/volume.rb
cloudstack-cli-0.1.0 lib/cloudstack-cli/commands/volume.rb