194 |
194 |
def TestInstanceAddWithPlainDisk(nodes):
|
195 |
195 |
"""gnt-instance add -t plain"""
|
196 |
196 |
assert len(nodes) == 1
|
197 |
|
return _DiskTest(nodes[0].primary, "plain")
|
|
197 |
return _DiskTest(nodes[0].primary, constants.DT_PLAIN)
|
198 |
198 |
|
199 |
199 |
|
200 |
200 |
@InstanceCheck(None, INST_UP, RETURN_VALUE)
|
... | ... | |
202 |
202 |
"""gnt-instance add -t drbd"""
|
203 |
203 |
assert len(nodes) == 2
|
204 |
204 |
return _DiskTest(":".join(map(operator.attrgetter("primary"), nodes)),
|
205 |
|
"drbd")
|
|
205 |
constants.DT_DRBD8)
|
206 |
206 |
|
207 |
207 |
|
208 |
208 |
@InstanceCheck(None, INST_DOWN, FIRST_ARG)
|
... | ... | |
498 |
498 |
def TestInstanceConvertDiskToPlain(instance, inodes):
|
499 |
499 |
"""gnt-instance modify -t"""
|
500 |
500 |
name = instance.name
|
|
501 |
|
501 |
502 |
template = qa_config.GetInstanceTemplate(instance)
|
502 |
|
if template != "drbd":
|
|
503 |
if template != constants.DT_DRBD8:
|
503 |
504 |
print qa_utils.FormatInfo("Unsupported template %s, skipping conversion"
|
504 |
505 |
" test" % template)
|
505 |
506 |
return
|
|
507 |
|
506 |
508 |
assert len(inodes) == 2
|
507 |
|
AssertCommand(["gnt-instance", "modify", "-t", "plain", name])
|
508 |
|
AssertCommand(["gnt-instance", "modify", "-t", "drbd",
|
|
509 |
AssertCommand(["gnt-instance", "modify", "-t", constants.DT_PLAIN, name])
|
|
510 |
AssertCommand(["gnt-instance", "modify", "-t", constants.DT_DRBD8,
|
509 |
511 |
"-n", inodes[1].primary, name])
|
510 |
512 |
|
511 |
513 |
|