Revision f9b76ed4
b/qa/ganeti-qa.py | ||
---|---|---|
408 | 408 |
# based storage types are untested, though. Also note that import could still |
409 | 409 |
# work, but is deeply embedded into the "export" case. |
410 | 410 |
if (qa_config.TestEnabled("instance-export") and |
411 |
instance.disk_template != constants.DT_FILE): |
|
411 |
instance.disk_template not in [constants.DT_FILE, |
|
412 |
constants.DT_SHARED_FILE]): |
|
412 | 413 |
RunTest(qa_instance.TestInstanceExportNoTarget, instance) |
413 | 414 |
|
414 | 415 |
pnode = inodes[0] |
... | ... | |
707 | 708 |
("instance-add-diskless", constants.DT_DISKLESS, |
708 | 709 |
qa_instance.TestInstanceAddDiskless, 1), |
709 | 710 |
("instance-add-file", constants.DT_FILE, |
710 |
qa_instance.TestInstanceAddFile, 1) |
|
711 |
qa_instance.TestInstanceAddFile, 1), |
|
712 |
("instance-add-shared-file", constants.DT_SHARED_FILE, |
|
713 |
qa_instance.TestInstanceAddSharedFile, 1), |
|
711 | 714 |
] |
712 | 715 |
|
713 | 716 |
for (test_name, templ, create_fun, num_nodes) in instance_tests: |
b/qa/qa-sample.json | ||
---|---|---|
195 | 195 |
|
196 | 196 |
"instance-add-plain-disk": true, |
197 | 197 |
"instance-add-file": true, |
198 |
"instance-add-shared-file": true, |
|
198 | 199 |
"instance-add-drbd-disk": true, |
199 | 200 |
"instance-add-diskless": true, |
200 | 201 |
"instance-add-restricted-by-disktemplates": true, |
b/qa/qa_instance.py | ||
---|---|---|
277 | 277 |
|
278 | 278 |
|
279 | 279 |
@InstanceCheck(None, INST_UP, RETURN_VALUE) |
280 |
def TestInstanceAddSharedFile(nodes): |
|
281 |
"""gnt-instance add -t sharedfile""" |
|
282 |
assert len(nodes) == 1 |
|
283 |
if constants.DT_SHARED_FILE in qa_config.GetEnabledDiskTemplates(): |
|
284 |
return CreateInstanceByDiskTemplateOneNode(nodes, constants.DT_SHARED_FILE) |
|
285 |
|
|
286 |
|
|
287 |
@InstanceCheck(None, INST_UP, RETURN_VALUE) |
|
280 | 288 |
def TestInstanceAddDiskless(nodes): |
281 | 289 |
"""gnt-instance add -t diskless""" |
282 | 290 |
assert len(nodes) == 1 |
... | ... | |
915 | 923 |
def TestInstanceExport(instance, node): |
916 | 924 |
"""gnt-backup export -n ...""" |
917 | 925 |
name = instance.name |
926 |
# Export does not work for file-based templates, thus we skip the test |
|
927 |
if instance.disk_template in [constants.DT_FILE, constants.DT_SHARED_FILE]: |
|
928 |
return |
|
918 | 929 |
AssertCommand(["gnt-backup", "export", "-n", node.primary, name]) |
919 | 930 |
return qa_utils.ResolveInstanceName(name) |
920 | 931 |
|
... | ... | |
936 | 947 |
def TestInstanceImport(newinst, node, expnode, name): |
937 | 948 |
"""gnt-backup import""" |
938 | 949 |
templ = constants.DT_PLAIN |
950 |
if not qa_config.IsTemplateSupported(templ): |
|
951 |
return |
|
939 | 952 |
cmd = (["gnt-backup", "import", |
940 | 953 |
"--disk-template=%s" % templ, |
941 | 954 |
"--no-ip-check", |
Also available in: Unified diff