Fix ansible variable VM_targets undefined issue for ptf topology#4229
Merged
wangxin merged 1 commit intosonic-net:masterfrom Sep 12, 2021
Merged
Fix ansible variable VM_targets undefined issue for ptf topology#4229wangxin merged 1 commit intosonic-net:masterfrom
wangxin merged 1 commit intosonic-net:masterfrom
Conversation
PR sonic-net#4156 replaced variable VM_hosts with VM_targets when call the vm_topology module. With this change, the vm_topology will create bridges for VMs used by current testbed instead of create bridges for all VMs available on the test server. However, the change missed the ptf topology scenario. In case of ptf topology, the VM_targets ansible varialbe is not defined. The fix is to assign default value `[]` to VM_targets when it is not defined. Signed-off-by: Xin Wang <[email protected]>
richardyu-ms
approved these changes
Sep 10, 2021
Contributor
|
#4220 looks similar |
4 tasks
lolyu
approved these changes
Sep 12, 2021
vmittal-msft
pushed a commit
to vmittal-msft/sonic-mgmt
that referenced
this pull request
Sep 28, 2021
…ic-net#4229) What is the motivation for this PR? PR sonic-net#4156 replaced variable VM_hosts with VM_targets when call the vm_topology module. With this change, the vm_topology module will create bridges for VMs used by current testbed instead of create bridges for all VMs available on the test server. However, the change missed the ptf topology scenario. In case of ptf topology, the VM_targets ansible variable is not defined. Calling the vm_topology module will fail. How did you do it? The fix is to assign default value [] to VM_targets when it is not defined. How did you verify/test it? Test add-topo/remove-topo for ptf and t0 topologies. Signed-off-by: Xin Wang <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
PR #4156 replaced variable
VM_hostswithVM_targetswhen call thevm_topology module. With this change, the
vm_topologymodule willcreate bridges for VMs used by current testbed instead of create bridges
for all VMs available on the test server.
However, the change missed the ptf topology scenario. In case of
ptf topology, the
VM_targetsansible variable is not defined. Callingthe
vm_topologymodule will fail.How did you do it?
The fix is to assign default value
[]toVM_targetswhen it is not defined.How did you verify/test it?
Test add-topo/remove-topo for ptf and t0 topologies.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation