Fix batcher for 2.0-style disks and nics
authorIustin Pop <iustin@google.com>
Fri, 23 Jan 2009 13:33:32 +0000 (13:33 +0000)
committerIustin Pop <iustin@google.com>
Fri, 23 Jan 2009 13:33:32 +0000 (13:33 +0000)
commit9939547bee91fe8a9ba95a74f2aa7bdc9db0095f
treea33c8553e33dd74b6bec7622756705d8434b5082
parent1325da74059c5971c0ff0ef1cbd44892de98e9a7
Fix batcher for 2.0-style disks and nics

This patch fixes the gnt-instance batch-create command, and in doing so
also slightly changes two other functions:
  - we change utils.ParseUnit so that it accepts integer values also
    (both ParseUnit(5) and ParseUnit("5") return the same value)
  - a bridge 'None' in LUCreateInstance will be converted to the default
    bridge; currently only missing bridges will be accepted to mean the
    default one

The main changes to batcher were the change to variable number of disks
and NICs.

The patch also adds a batcher-instances.json example file copied from
the 1.2 branch and properly modified.

Reviewed-by: imsnah, killerfoxi
doc/examples/batcher-instances.json [new file with mode: 0644]
lib/cmdlib.py
lib/utils.py
scripts/gnt-instance