Revision c0f74c55
b/qa/ganeti-qa.py | ||
---|---|---|
137 | 137 |
if qa_config.TestEnabled('instance-info'): |
138 | 138 |
RunTest(qa_instance.TestInstanceInfo, instance) |
139 | 139 |
|
140 |
if qa_config.TestEnabled('instance-modify'): |
|
141 |
RunTest(qa_instance.TestInstanceModify, instance) |
|
142 |
|
|
140 | 143 |
if qa_config.TestEnabled('instance-reinstall'): |
141 | 144 |
RunTest(qa_instance.TestInstanceShutdown, instance) |
142 | 145 |
RunTest(qa_instance.TestInstanceReinstall, instance) |
b/qa/qa-sample.yaml | ||
---|---|---|
58 | 58 |
instance-list: True |
59 | 59 |
instance-failover: True |
60 | 60 |
instance-info: True |
61 |
instance-modify: True |
|
61 | 62 |
instance-export: True |
62 | 63 |
instance-import: True |
63 | 64 |
instance-reinstall: True |
b/qa/qa_instance.py | ||
---|---|---|
151 | 151 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
152 | 152 |
|
153 | 153 |
|
154 |
@qa_utils.DefineHook('instance-modify') |
|
155 |
def TestInstanceModify(instance): |
|
156 |
"""gnt-instance modify""" |
|
157 |
master = qa_config.GetMasterNode() |
|
158 |
|
|
159 |
orig_memory = qa_config.get('mem') |
|
160 |
orig_bridge = qa_config.get('bridge', 'xen-br0') |
|
161 |
args = [ |
|
162 |
["--memory", "128"], |
|
163 |
["--memory", str(orig_memory)], |
|
164 |
["--cpu", "2"], |
|
165 |
["--cpu", "1"], |
|
166 |
["--bridge", "xen-br1"], |
|
167 |
["--bridge", orig_bridge], |
|
168 |
["--kernel", "/dev/null"], |
|
169 |
["--kernel", "default"], |
|
170 |
["--initrd", "/dev/null"], |
|
171 |
["--initrd", "none"], |
|
172 |
["--initrd", "default"], |
|
173 |
["--hvm-boot-order", "acn"], |
|
174 |
["--hvm-boot-order", "default"], |
|
175 |
] |
|
176 |
for alist in args: |
|
177 |
cmd = ['gnt-instance', 'modify'] + alist + [instance['name']] |
|
178 |
AssertEqual(StartSSH(master['primary'], |
|
179 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
|
180 |
|
|
181 |
# check no-modify |
|
182 |
cmd = ['gnt-instance', 'modify', instance['name']] |
|
183 |
AssertNotEqual(StartSSH(master['primary'], |
|
184 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
|
185 |
|
|
186 |
|
|
154 | 187 |
@qa_utils.DefineHook('instance-list') |
155 | 188 |
def TestInstanceList(): |
156 | 189 |
"""gnt-instance list""" |
Also available in: Unified diff