Skip to content
Snippets Groups Projects
Commit 21bcb9aa authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

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: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent b8716596
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment