Revision 713a79e7

b/qa/qa_rapi.py
526 526
  try:
527 527
    memory = utils.ParseUnit(qa_config.get("mem"))
528 528
    disk_sizes = [utils.ParseUnit(size) for size in qa_config.get("disk")]
529
    disks = [{"size": size} for size in disk_sizes]
530
    nics = [{}]
529 531

  
530
    if use_client:
531
      disks = [{"size": size} for size in disk_sizes]
532
      nics = [{}]
533

  
534
      beparams = {
535
        constants.BE_MEMORY: memory,
536
        }
532
    beparams = {
533
      constants.BE_MEMORY: memory,
534
      }
537 535

  
536
    if use_client:
538 537
      job_id = _rapi_client.CreateInstance(constants.INSTANCE_CREATE,
539 538
                                           instance["name"],
540 539
                                           constants.DT_PLAIN,
......
544 543
                                           beparams=beparams)
545 544
    else:
546 545
      body = {
546
        "__version__": 1,
547
        "mode": constants.INSTANCE_CREATE,
547 548
        "name": instance["name"],
548
        "os": qa_config.get("os"),
549
        "os_type": qa_config.get("os"),
549 550
        "disk_template": constants.DT_PLAIN,
550 551
        "pnode": node["primary"],
551
        "memory": memory,
552
        "disks": disk_sizes,
552
        "beparams": beparams,
553
        "disks": disks,
554
        "nics": nics,
553 555
        }
554 556

  
555 557
      (job_id, ) = _DoTests([

Also available in: Unified diff