Revision aecba21e qa/qa_utils.py

b/qa/qa_utils.py
404 404
  """
405 405
  master = qa_config.GetMasterNode()
406 406

  
407
  output = GetCommandOutput(master["primary"], utils.ShellQuoteArgs(cmd))
407
  output = GetCommandOutput(master.primary, utils.ShellQuoteArgs(cmd))
408 408
  for line in output.splitlines():
409 409
    (lkey, lvalue) = line.split(":", 1)
410 410
    if lkey == key:
......
427 427
  """Gets the full name of a node.
428 428

  
429 429
  """
430
  return _ResolveName(["gnt-node", "info", node["primary"]],
430
  return _ResolveName(["gnt-node", "info", node.primary],
431 431
                      "Node name")
432 432

  
433 433

  
......
441 441
  # Get list of all instances
442 442
  cmd = ["gnt-instance", "list", "--separator=:", "--no-headers",
443 443
         "--output=name,pnode,snodes"]
444
  output = GetCommandOutput(master["primary"], utils.ShellQuoteArgs(cmd))
444
  output = GetCommandOutput(master.primary, utils.ShellQuoteArgs(cmd))
445 445

  
446 446
  instances = []
447 447
  for line in output.splitlines():
......
485 485
  if names:
486 486
    cmd.extend(names)
487 487

  
488
  return GetCommandOutput(master["primary"],
488
  return GetCommandOutput(master.primary,
489 489
                          utils.ShellQuoteArgs(cmd)).splitlines()
490 490

  
491 491

  
......
541 541

  
542 542
  # Check listed fields (all, must be sorted)
543 543
  realcmd = [cmd, "list-fields", "--separator=|", "--no-headers"]
544
  output = GetCommandOutput(master["primary"],
544
  output = GetCommandOutput(master.primary,
545 545
                            utils.ShellQuoteArgs(realcmd)).splitlines()
546 546
  AssertEqual([line.split("|", 1)[0] for line in output],
547 547
              utils.NiceSort(fields))
......
570 570

  
571 571
  """
572 572
  master = qa_config.GetMasterNode()
573
  tmp_hosts = UploadData(master["primary"], "", mode=0644)
573
  tmp_hosts = UploadData(master.primary, "", mode=0644)
574 574

  
575 575
  data = []
576 576
  for localhost in ("::1", "127.0.0.1"):
......
595 595

  
596 596
  """
597 597
  master = qa_config.GetMasterNode()
598
  tmp_hosts = UploadData(master["primary"], "", mode=0644)
598
  tmp_hosts = UploadData(master.primary, "", mode=0644)
599 599
  quoted_tmp_hosts = utils.ShellQuote(tmp_hosts)
600 600

  
601 601
  sed_data = " ".join(hostnames)
......
623 623
  master_node = qa_config.GetMasterNode()
624 624

  
625 625
  # Build command to connect to master node
626
  master_ssh = GetSSHCommand(master_node["primary"], "--")
626
  master_ssh = GetSSHCommand(master_node.primary, "--")
627 627

  
628 628
  if running:
629 629
    running_shellval = "1"

Also available in: Unified diff