lib/cloudstack-cli/commands/system_vm.rb in cloudstack-cli-0.11.0 vs lib/cloudstack-cli/commands/system_vm.rb in cloudstack-cli-0.11.1

- old
+ new

@@ -16,6 +16,22 @@ print_table table say "Total number of system vms: #{vms.size}" end end + desc 'show [name]', 'show system vm' + option :zone + def show(name) + vms = client.list_system_vms(options) + vms = filter_by(vms, 'name', name) + vm = vms.first + unless vm + say "No system vm with name #{name} found." + else + table = vm.map do |key, value| + [ set_color("#{key}:", :yellow), "#{value}" ] + end + print_table table + end + end + end