Revision 112050d9 scripts/gnt-instance
b/scripts/gnt-instance | ||
---|---|---|
306 | 306 |
# default of one nic, all auto |
307 | 307 |
nics = [{}] |
308 | 308 |
|
309 |
if not opts.disks and opts.disk_template != constants.DT_DISKLESS: |
|
310 |
raise errors.OpPrereqError("No disk information specified") |
|
311 |
elif opts.disks and opts.disk_template == constants.DT_DISKLESS: |
|
312 |
raise errors.OpPrereqError("Diskless instance but disk information passeD") |
|
309 |
if opts.disk_template == constants.DT_DISKLESS: |
|
310 |
if opts.disks: |
|
311 |
raise errors.OpPrereqError("Diskless instance but disk" |
|
312 |
" information passed") |
|
313 |
disks = [] |
|
313 | 314 |
else: |
315 |
if not opts.disks: |
|
316 |
raise errors.OpPrereqError("No disk information specified") |
|
314 | 317 |
try: |
315 | 318 |
disk_max = max(int(didx[0])+1 for didx in opts.disks) |
316 | 319 |
except ValueError, err: |
Also available in: Unified diff