Revision 3582eef6 qa/qa_node.py
b/qa/qa_node.py | ||
---|---|---|
1 | 1 |
# |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2007 Google Inc. |
|
4 |
# Copyright (C) 2007, 2011 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
19 | 19 |
# 02110-1301, USA. |
20 | 20 |
|
21 | 21 |
|
22 |
"""Node-related QA tests. |
|
23 |
|
|
24 |
""" |
|
25 |
|
|
22 | 26 |
from ganeti import utils |
23 | 27 |
from ganeti import constants |
24 | 28 |
from ganeti import query |
... | ... | |
232 | 236 |
"""gnt-node power""" |
233 | 237 |
master = qa_config.GetMasterNode() |
234 | 238 |
|
235 |
# Find first non master node for tests |
|
236 |
for node in qa_config.get("nodes"): |
|
237 |
if node != master: |
|
238 |
break |
|
239 |
else: |
|
240 |
raise qa_error.Error("Can't find non-master node") |
|
239 |
node = qa_config.AcquireNode(exclude=master) |
|
241 | 240 |
|
242 | 241 |
node_name = node["primary"] |
243 | 242 |
full_node_name = qa_utils.ResolveNodeName(node) |
Also available in: Unified diff