Add method delete_all_nics to vm.py#788
Add method delete_all_nics to vm.py#788dwettstein wants to merge 2 commits intovmware-archive:masterfrom
Conversation
|
@dwettstein, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction. |
|
@dwettstein, VMware has approved your signed contributor license agreement. |
rocknes
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @dwettstein and @rocknes)
pyvcloud/vcd/vm.py, line 757 at r1 (raw file):
net_conn_section.remove(nc) else: raise InvalidStateException(
I think we don't need to raise an exception if no nics are found.
dwettstein
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @rocknes)
pyvcloud/vcd/vm.py, line 757 at r1 (raw file):
Previously, rocknes wrote…
I think we don't need to raise an exception if no nics are found.
Thanks @rocknes, you're right, I have removed the else part.
|
Hi @rocknes I have implemented your requested changes. Is there something left to do for this PR? Thanks. |
This PR adds the method
delete_all_nicstovm.py. The logic is basically the same as in thedelete_nicmethod, except that instead of deleting just the NIC with given index, it deletes all.NOTE: I have not added a dedicated test for this method, because of the same reason as above.
PS: I recommend to merge also PR #720, as it contains some bugfixes for
delete_nicmethod.This change is