Revision d488adb6

b/qa/qa_instance.py
259 259
@InstanceCheck(INST_UP, INST_UP, FIRST_ARG)
260 260
def TestInstanceModify(instance):
261 261
  """gnt-instance modify"""
262
  default_hv = qa_config.GetDefaultHypervisor()
263

  
262 264
  # Assume /sbin/init exists on all systems
263 265
  test_kernel = "/sbin/init"
264 266
  test_initrd = test_kernel
......
266 268
  orig_maxmem = qa_config.get(constants.BE_MAXMEM)
267 269
  orig_minmem = qa_config.get(constants.BE_MINMEM)
268 270
  #orig_bridge = qa_config.get("bridge", "xen-br0")
271

  
269 272
  args = [
270 273
    ["-B", "%s=128" % constants.BE_MINMEM],
271 274
    ["-B", "%s=128" % constants.BE_MAXMEM],
......
279 282

  
280 283
    ["-H", "%s=%s" % (constants.HV_KERNEL_PATH, test_kernel)],
281 284
    ["-H", "%s=%s" % (constants.HV_KERNEL_PATH, constants.VALUE_DEFAULT)],
282
    ["-H", "%s=%s" % (constants.HV_INITRD_PATH, test_initrd)],
283
    ["-H", "no_%s" % (constants.HV_INITRD_PATH, )],
284
    ["-H", "%s=%s" % (constants.HV_INITRD_PATH, constants.VALUE_DEFAULT)],
285 285

  
286 286
    # TODO: bridge tests
287 287
    #["--bridge", "xen-br1"],
288 288
    #["--bridge", orig_bridge],
289

  
290
    # TODO: Do these tests only with xen-hvm
291
    #["-H", "%s=acn" % constants.HV_BOOT_ORDER],
292
    #["-H", "%s=%s" % (constants.HV_BOOT_ORDER, constants.VALUE_DEFAULT)],
293 289
    ]
290

  
291
  if default_hv == constants.HT_XEN_PVM:
292
    args.extend([
293
      ["-H", "%s=%s" % (constants.HV_INITRD_PATH, test_initrd)],
294
      ["-H", "no_%s" % (constants.HV_INITRD_PATH, )],
295
      ["-H", "%s=%s" % (constants.HV_INITRD_PATH, constants.VALUE_DEFAULT)],
296
      ])
297
  elif default_hv == constants.HT_XEN_HVM:
298
    args.extend([
299
      ["-H", "%s=acn" % constants.HV_BOOT_ORDER],
300
      ["-H", "%s=%s" % (constants.HV_BOOT_ORDER, constants.VALUE_DEFAULT)],
301
      ])
302

  
294 303
  for alist in args:
295 304
    AssertCommand(["gnt-instance", "modify"] + alist + [instance["name"]])
296 305

  

Also available in: Unified diff