def get_server(name)
      params = {
          'command' => 'listVirtualMachines',
          'name' => name
      }
      json = send_request(params)
      machines = json['virtualmachine']

      if !machines || machines.empty? then
        return nil
      end
      machine = machines.select { |item| name == item['name'] }
      machine.first
    end
def get_server(name)
      params = {
          'command' => 'listVirtualMachines',
          'name' => name
      }
      json = send_request(params)
      machines = json['virtualmachine']

      if !machines || machines.empty? then
        return nil
      end
      machine = machines.select { |item| name == item['name'] }
      machine.first
    end
Finds the server with the specified name.