lib/cloudstack-cli/commands/network.rb in cloudstack-cli-0.4.3 vs lib/cloudstack-cli/commands/network.rb in cloudstack-cli-0.5.0

- old
+ new

@@ -1,8 +1,8 @@ class Network < CloudstackCli::Base - desc "network list", "list networks" + desc "list", "list networks" option :project option :account option :showid, type: :boolean option :isdefault, type: :boolean def list @@ -36,11 +36,11 @@ end print_table table end end - desc "network default", "get the default network" + desc "default", "get the default network" option :zone def default network = client.get_default_network(options[:zone]) unless network puts "No default network found." @@ -56,11 +56,11 @@ table[-1] << network["id"] if options[:showid] print_table table end end - desc "network show NAME", "show detailed infos about a network" + desc "show NAME", "show detailed infos about a network" option :project def show(name) if options[:project] if options[:project].downcase == "all" options[:project_id] = -1 @@ -77,11 +77,11 @@ say "#{value}" end end end - desc "network restart NAME", "restart network" + desc "restart NAME", "restart network" option :cleanup, type: :boolean, default: true def restart(name) network = client.get_network(name) network = client.get_network(name, -1) unless network unless network @@ -91,10 +91,10 @@ if yes? "Restart network \"#{network['name']}\" (cleanup=#{options[:cleanup]})?" p client.restart_network(network['id'], options[:cleanup]) end end - desc "network delete NAME", "delete network" + desc "delete NAME", "delete network" def delete(name) network = client.get_network(name) network = client.get_network(name, -1) unless network unless network say "Network \"#{name}\" not found." \ No newline at end of file