Revision aecba21e qa/qa_rapi.py
b/qa/qa_rapi.py | ||
---|---|---|
80 | 80 |
|
81 | 81 |
# Write to temporary file |
82 | 82 |
_rapi_ca = tempfile.NamedTemporaryFile() |
83 |
_rapi_ca.write(qa_utils.GetCommandOutput(master["primary"],
|
|
83 |
_rapi_ca.write(qa_utils.GetCommandOutput(master.primary,
|
|
84 | 84 |
utils.ShellQuoteArgs(cmd))) |
85 | 85 |
_rapi_ca.flush() |
86 | 86 |
|
... | ... | |
88 | 88 |
cfg_curl = rapi.client.GenericCurlConfig(cafile=_rapi_ca.name, |
89 | 89 |
proxy="") |
90 | 90 |
|
91 |
_rapi_client = rapi.client.GanetiRapiClient(master["primary"], port=port,
|
|
91 |
_rapi_client = rapi.client.GanetiRapiClient(master.primary, port=port,
|
|
92 | 92 |
username=username, |
93 | 93 |
password=password, |
94 | 94 |
curl_config_fn=cfg_curl) |
... | ... | |
418 | 418 |
_VerifyNode(node_data) |
419 | 419 |
|
420 | 420 |
_DoTests([ |
421 |
("/2/nodes/%s" % node["primary"], _VerifyNode, "GET", None),
|
|
421 |
("/2/nodes/%s" % node.primary, _VerifyNode, "GET", None),
|
|
422 | 422 |
("/2/nodes", _VerifyNodesList, "GET", None), |
423 | 423 |
("/2/nodes?bulk=1", _VerifyNodesBulk, "GET", None), |
424 | 424 |
]) |
... | ... | |
575 | 575 |
constants.DT_PLAIN, |
576 | 576 |
disks, nics, |
577 | 577 |
os=qa_config.get("os"), |
578 |
pnode=node["primary"],
|
|
578 |
pnode=node.primary,
|
|
579 | 579 |
beparams=beparams) |
580 | 580 |
else: |
581 | 581 |
body = { |
... | ... | |
584 | 584 |
"name": instance["name"], |
585 | 585 |
"os_type": qa_config.get("os"), |
586 | 586 |
"disk_template": constants.DT_PLAIN, |
587 |
"pnode": node["primary"],
|
|
587 |
"pnode": node.primary,
|
|
588 | 588 |
"beparams": beparams, |
589 | 589 |
"disks": disks, |
590 | 590 |
"nics": nics, |
... | ... | |
783 | 783 |
# note: pnode:snode are the *current* nodes, so we move it first to |
784 | 784 |
# tnode:pnode, then back to pnode:snode |
785 | 785 |
for si, di, pn, sn in [(src_instance["name"], dest_instance["name"], |
786 |
tnode["primary"], pnode["primary"]),
|
|
786 |
tnode.primary, pnode.primary),
|
|
787 | 787 |
(dest_instance["name"], src_instance["name"], |
788 |
pnode["primary"], snode["primary"])]:
|
|
788 |
pnode.primary, snode.primary)]:
|
|
789 | 789 |
cmd = [ |
790 | 790 |
"../tools/move-instance", |
791 | 791 |
"--verbose", |
... | ... | |
796 | 796 |
"--dest-primary-node=%s" % pn, |
797 | 797 |
"--dest-secondary-node=%s" % sn, |
798 | 798 |
"--net=0:mac=%s" % constants.VALUE_GENERATE, |
799 |
master["primary"],
|
|
800 |
master["primary"],
|
|
799 |
master.primary,
|
|
800 |
master.primary,
|
|
801 | 801 |
si, |
802 | 802 |
] |
803 | 803 |
|
Also available in: Unified diff