Revision 88f8f0f7 lib/client/gnt_instance.py
b/lib/client/gnt_instance.py | ||
---|---|---|
341 | 341 |
required_field, errors.ECODE_INVAL) |
342 | 342 |
# Validate special fields |
343 | 343 |
if spec['primary_node'] is not None: |
344 |
if (spec['template'] in constants.DTS_NET_MIRROR and
|
|
344 |
if (spec['template'] in constants.DTS_INT_MIRROR and
|
|
345 | 345 |
spec['secondary_node'] is None): |
346 | 346 |
raise errors.OpPrereqError('Template requires secondary node, but' |
347 | 347 |
' there was no secondary provided.', |
... | ... | |
1291 | 1291 |
disk_dict['size'] = utils.ParseUnit(disk_dict['size']) |
1292 | 1292 |
|
1293 | 1293 |
if (opts.disk_template and |
1294 |
opts.disk_template in constants.DTS_NET_MIRROR and
|
|
1294 |
opts.disk_template in constants.DTS_INT_MIRROR and
|
|
1295 | 1295 |
not opts.node): |
1296 | 1296 |
ToStderr("Changing the disk template to a mirrored one requires" |
1297 | 1297 |
" specifying a secondary node") |
Also available in: Unified diff