pyvcloud icon indicating copy to clipboard operation
pyvcloud copied to clipboard

Fix AttributeErrors in nic methods

Open dwettstein opened this issue 5 years ago • 3 comments

Fix a possible AttributeError in the following methods when NetworkConnection is not available:

  • vm.py:delete_nic()
  • vm.py:update_nic()

Additionally, I applied the same variable names in update_nic() method as used in other nic methods and fixed the error message when nic was not found.


This change is Reviewable

dwettstein avatar Nov 12 '20 18:11 dwettstein

What do you think about this PR, @rocknes ?

dwettstein avatar Nov 26 '20 17:11 dwettstein

Hey @Anirudh9794 or @rocknes

I'd like to kindly ask you to have a look at this PR, as these bugs are still not fixed.

Regarding the changes in update_nic(). There are actually not many:

  • I renamed to variable and logic from nic_found to nic_not_found as also used in delete_nic(),
  • I renamed to loop variable nc to network as also used in delete_nic(),
  • I have improved the error message in update_nic() analogous to the one used in delete_nic(),
  • I moved the method update_nic() to the other nic methods.

Do you have any questions?

dwettstein avatar Dec 11 '21 08:12 dwettstein

Hi @rocknes

Anything else I can do to get this PR merged?

dwettstein avatar Jun 20 '22 10:06 dwettstein