Sha256: 0b9357874a2893d4c5b11366fd7b768c21513f383d9075fdacf20018f8cb68d7
Contents?: true
Size: 659 Bytes
Versions: 27
Compression:
Stored size: 659 Bytes
Contents
class PhysicalNetwork < CloudstackCli::Base desc "list", "list physical networks" option :project def list resolve_project networks = client.list_physical_networks(options) 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 say "Total number of networks: #{networks.count}" end end end
Version data entries
27 entries across 27 versions & 1 rubygems