Revision a39ec11a qa/ganeti-qa.py
b/qa/ganeti-qa.py | ||
---|---|---|
21 | 21 |
|
22 | 22 |
"""Script for doing QA on Ganeti. |
23 | 23 |
|
24 |
You can create the required known_hosts file using ssh-keyscan. It's mandatory |
|
25 |
to use the full name of a node (FQDN). For security reasons, verify the keys |
|
26 |
before using them. |
|
27 |
Example: ssh-keyscan -t rsa node{1,2,3,4}.example.com > known_hosts |
|
28 | 24 |
""" |
29 | 25 |
|
30 | 26 |
import sys |
... | ... | |
38 | 34 |
import qa_instance |
39 | 35 |
import qa_node |
40 | 36 |
import qa_os |
41 |
import qa_other |
|
42 | 37 |
import qa_rapi |
43 | 38 |
import qa_tags |
44 | 39 |
import qa_utils |
... | ... | |
241 | 236 |
"""Main program. |
242 | 237 |
|
243 | 238 |
""" |
244 |
parser = optparse.OptionParser(usage="%prog [options] <config-file>" |
|
245 |
" <known-hosts-file>") |
|
239 |
parser = optparse.OptionParser(usage="%prog [options] <config-file>") |
|
246 | 240 |
parser.add_option('--dry-run', dest='dry_run', |
247 | 241 |
action="store_true", |
248 | 242 |
help="Show what would be done") |
... | ... | |
251 | 245 |
help="Really execute the tests") |
252 | 246 |
(qa_config.options, args) = parser.parse_args() |
253 | 247 |
|
254 |
if len(args) == 2:
|
|
255 |
(config_file, known_hosts_file) = args
|
|
248 |
if len(args) == 1:
|
|
249 |
(config_file, ) = args |
|
256 | 250 |
else: |
257 |
parser.error("Not enough arguments.")
|
|
251 |
parser.error("Wrong number of arguments.")
|
|
258 | 252 |
|
259 | 253 |
if not qa_config.options.yes_do_it: |
260 | 254 |
print ("Executing this script irreversibly destroys any Ganeti\n" |
... | ... | |
264 | 258 |
|
265 | 259 |
qa_config.Load(config_file) |
266 | 260 |
|
267 |
RunTest(qa_other.UploadKnownHostsFile, known_hosts_file) |
|
268 |
|
|
269 | 261 |
RunEnvTests() |
270 | 262 |
SetupCluster() |
271 | 263 |
RunClusterTests() |
Also available in: Unified diff