Sha256: 4ca05e64a5417cbfb1a25375edf49bddf5dd0ef9d31a5caeb984dd7bc2e9ea33
Contents?: true
Size: 622 Bytes
Versions: 25
Compression:
Stored size: 622 Bytes
Contents
class PhysicalNetwork < CloudstackCli::Base desc "list", "list physical networks" option :project def list project = find_project if options[:project] networks = client.list_physical_networks zones = client.list_zones if networks.size < 1 puts "No networks found" else table = [['Name', 'State', 'Zone', 'ID']] networks.each do |network| table << [ network["name"], network["state"], zones.select{|zone| zone['id'] == network["zoneid"]}.first["name"], network["id"] ] end print_table table end end end
Version data entries
25 entries across 25 versions & 1 rubygems