Revision aecba21e qa/qa_os.py
b/qa/qa_os.py | ||
---|---|---|
109 | 109 |
cmd = " && ".join(parts) |
110 | 110 |
|
111 | 111 |
print qa_utils.FormatInfo("Setting up %s with %s OS definition" % |
112 |
(node["primary"],
|
|
112 |
(node.primary,
|
|
113 | 113 |
["an invalid", "a valid"][int(valid)])) |
114 | 114 |
|
115 | 115 |
AssertCommand(cmd, node=node) |
... | ... | |
163 | 163 |
AssertCommand(["gnt-os", "diagnose"], fail=(mode != _ALL_VALID)) |
164 | 164 |
|
165 | 165 |
# Diagnose again, ignoring exit status |
166 |
output = qa_utils.GetCommandOutput(master["primary"],
|
|
166 |
output = qa_utils.GetCommandOutput(master.primary,
|
|
167 | 167 |
"gnt-os diagnose || :") |
168 | 168 |
for line in output.splitlines(): |
169 | 169 |
if line.startswith("OS: %s [global status:" % name): |
... | ... | |
173 | 173 |
|
174 | 174 |
# Check info for all |
175 | 175 |
cmd = ["gnt-os", "info"] |
176 |
output = qa_utils.GetCommandOutput(master["primary"],
|
|
176 |
output = qa_utils.GetCommandOutput(master.primary,
|
|
177 | 177 |
utils.ShellQuoteArgs(cmd)) |
178 | 178 |
AssertIn("%s:" % name, output.splitlines()) |
179 | 179 |
|
180 | 180 |
# Check info for OS |
181 | 181 |
cmd = ["gnt-os", "info", name] |
182 |
output = qa_utils.GetCommandOutput(master["primary"],
|
|
182 |
output = qa_utils.GetCommandOutput(master.primary,
|
|
183 | 183 |
utils.ShellQuoteArgs(cmd)).splitlines() |
184 | 184 |
AssertIn("%s:" % name, output) |
185 | 185 |
for (field, value) in [("valid", mode == _ALL_VALID), |
... | ... | |
189 | 189 |
|
190 | 190 |
# Only valid OSes should be listed |
191 | 191 |
cmd = ["gnt-os", "list", "--no-headers"] |
192 |
output = qa_utils.GetCommandOutput(master["primary"],
|
|
192 |
output = qa_utils.GetCommandOutput(master.primary,
|
|
193 | 193 |
utils.ShellQuoteArgs(cmd)) |
194 | 194 |
if mode == _ALL_VALID and not (hidden or blacklisted): |
195 | 195 |
assert_fn = AssertIn |
Also available in: Unified diff