Revision 4236968a

b/qa/rapi-workload.py
241 241
  client.Query(resource_name, fields)
242 242

  
243 243

  
244
def TestQueryFiltering(client, master_name):
245
  """ Performs queries by playing around with the only guaranteed resource, the
246
  master node.
247

  
248
  @type client C{GanetiRapiClientWrapper}
249
  @param client A wrapped RAPI client.
250
  @type master_name string
251
  @param master_name The hostname of the master node.
252

  
253
  """
254
  client.Query("node", ["name"],
255
               ["|",
256
                ["=", "name", master_name],
257
                [">", "dtotal", 0],
258
               ])
259

  
260
  client.Query("instance", ["name"],
261
               ["|",
262
                ["=", "name", "NonexistentInstance"],
263
                [">", "oper_ram", 0],
264
               ])
265

  
266

  
244 267
def RemoveAllInstances(client):
245 268
  """ Queries for a list of instances, then removes them all.
246 269

  
......
538 561

  
539 562
  node = qa_config.AcquireNode(exclude=qa_config.GetMasterNode())
540 563
  TestNodeOperations(client, node.primary)
564
  TestQueryFiltering(client, node.primary)
541 565
  node.Release()
542

  
566
  
543 567
  nodes = qa_config.AcquireManyNodes(2)
544 568
  TestGroupOperations(client, nodes[0].primary, nodes[1].primary)
545 569
  qa_config.ReleaseManyNodes(nodes)

Also available in: Unified diff