« Previous | Next » 

Revision 21bcb9aa

ID21bcb9aa80a5c2eb671dcba69af795e624a230f7

Added by Michael Hanselmann over 14 years ago

Fix off-by-one error when modifying instance NIC

For an instance with exactly one NIC:

$ gnt-instance modify --net 1:ip=1.2.3.4 inst1
Failure: prerequisites not met for this operation:
error type: wrong_input, error details:
Invalid NIC index 1, valid values are 0 to 1

For an instance with no NIC at all, it fails with “Invalid NIC index 0, valid
values are 0 to 0”. This is fixed by this patch.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences