lib/cloudstack-cli/commands/network.rb in cloudstack-cli-0.0.1 vs lib/cloudstack-cli/commands/network.rb in cloudstack-cli-0.0.2

- old
+ new

@@ -9,19 +9,18 @@ desc "list", "list networks" option :project option :physical, type: :boolean def list - cs_cli = CloudstackCli::Helper.new + cs_cli = CloudstackCli::Helper.new(options[:config]) if options[:project] project = cs_cli.projects.select { |p| p['name'] == options[:project] }.first raise "Project '#{options[:project]}' not found" unless project end if options[:physical] networks = cs_cli.physical_networks - if networks.size < 1 puts "No networks found" else table(border: true) do row do @@ -40,10 +39,9 @@ end end end else networks = cs_cli.networks(project ? project['id'] : -1) - if networks.size < 1 puts "No networks found" else table(border: true) do row do \ No newline at end of file