Revision d01e51a5 test/py/ganeti.block.bdev_unittest.py
b/test/py/ganeti.block.bdev_unittest.py | ||
---|---|---|
104 | 104 |
|
105 | 105 |
def testParserCreation(self): |
106 | 106 |
"""Test drbdsetup show parser creation""" |
107 |
drbd.DRBD8._GetShowParser() |
|
107 |
drbd.DRBD8ShowInfo._GetShowParser()
|
|
108 | 108 |
|
109 | 109 |
def testParser80(self): |
110 | 110 |
"""Test drbdsetup show parser for disk and network version 8.0""" |
111 | 111 |
data = testutils.ReadTestData("bdev-drbd-8.0.txt") |
112 |
result = drbd.DRBD8._GetDevInfo(data)
|
|
112 |
result = drbd.DRBD8ShowInfo.GetDevInfo(data)
|
|
113 | 113 |
self.failUnless(self._has_disk(result, "/dev/xenvg/test.data", |
114 | 114 |
"/dev/xenvg/test.meta"), |
115 | 115 |
"Wrong local disk info") |
... | ... | |
120 | 120 |
def testParser83(self): |
121 | 121 |
"""Test drbdsetup show parser for disk and network version 8.3""" |
122 | 122 |
data = testutils.ReadTestData("bdev-drbd-8.3.txt") |
123 |
result = drbd.DRBD8._GetDevInfo(data)
|
|
123 |
result = drbd.DRBD8ShowInfo.GetDevInfo(data)
|
|
124 | 124 |
self.failUnless(self._has_disk(result, "/dev/xenvg/test.data", |
125 | 125 |
"/dev/xenvg/test.meta"), |
126 | 126 |
"Wrong local disk info") |
... | ... | |
131 | 131 |
def testParserNetIP4(self): |
132 | 132 |
"""Test drbdsetup show parser for IPv4 network""" |
133 | 133 |
data = testutils.ReadTestData("bdev-drbd-net-ip4.txt") |
134 |
result = drbd.DRBD8._GetDevInfo(data)
|
|
134 |
result = drbd.DRBD8ShowInfo.GetDevInfo(data)
|
|
135 | 135 |
self.failUnless(("local_dev" not in result and |
136 | 136 |
"meta_dev" not in result and |
137 | 137 |
"meta_index" not in result), |
... | ... | |
143 | 143 |
def testParserNetIP6(self): |
144 | 144 |
"""Test drbdsetup show parser for IPv6 network""" |
145 | 145 |
data = testutils.ReadTestData("bdev-drbd-net-ip6.txt") |
146 |
result = drbd.DRBD8._GetDevInfo(data)
|
|
146 |
result = drbd.DRBD8ShowInfo.GetDevInfo(data)
|
|
147 | 147 |
self.failUnless(("local_dev" not in result and |
148 | 148 |
"meta_dev" not in result and |
149 | 149 |
"meta_index" not in result), |
... | ... | |
155 | 155 |
def testParserDisk(self): |
156 | 156 |
"""Test drbdsetup show parser for disk""" |
157 | 157 |
data = testutils.ReadTestData("bdev-drbd-disk.txt") |
158 |
result = drbd.DRBD8._GetDevInfo(data)
|
|
158 |
result = drbd.DRBD8ShowInfo.GetDevInfo(data)
|
|
159 | 159 |
self.failUnless(self._has_disk(result, "/dev/xenvg/test.data", |
160 | 160 |
"/dev/xenvg/test.meta"), |
161 | 161 |
"Wrong local disk info") |
Also available in: Unified diff