This repository has been archived by the owner on Mar 6, 2024. It is now read-only.
Fixing error in list_nics(self): primary_index referenced before assignment #696
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue details:
When we use Ansible VMware vCloud Director modules from:
https://github.com/vmware/ansible-module-vcloud-director
When we add_nic() are first, after successful complete adding module fail with error about referenced variable which called before assigment.
Description of proposed changes in the PR:
Detailed description of proposed changes:
When we use Ansible Module, and inside Ansible module calling list_nics() on adding time (list_nics called afer add_nic), we crash after successful adding the NIC - Fatal error, what try to say about first added NIC and him "primary_index", which referenced before assignment.
This issue blocks fix Ansible module in child repository
feat2RFC(vcd_vapp_vm_nic): Do a module invocation better #131
Example of exception:
gist_exception_example
This change is