Support UUIDs and names when refering to a device
authorChristos Stavrakakis <cstavr@grnet.gr>
Thu, 4 Apr 2013 08:51:08 +0000 (11:51 +0300)
committerHelga Velroyen <helgav@google.com>
Wed, 17 Apr 2013 14:49:22 +0000 (16:49 +0200)
commitb21d488b1c3c897e734f6633b83c36815b824ab2
tree8ec0d8e0ae5ec710269518215c336133a715a394
parent2dd5390e768d509cffe4449f6a51e1c6a7957a2b
Support UUIDs and names when refering to a device

Modify _ApplyContainerMods function to lookup NICs/Disks not only by their
index inside the container, but also by their UUID or name. Abstract the
lookup code in new GetItemFromContainer function.

Make type of identifier in "opcode._TestInstSetParamsModList" to be
TInt or TString.

Modify gnt-instance client to not check if identifier is an integer.

Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Helga Velroyen <helgav@google.com>
lib/client/gnt_instance.py
lib/cmdlib.py
lib/opcodes.py
test/py/ganeti.client.gnt_instance_unittest.py