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 <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
Loading
Please register or sign in to comment