You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[testbed]: Support add topology for SONiC neighbor devices (#3324)
* temp
Signed-off-by: Ze Gan <ganze718@gmail.com>
* Polish variable name from sonic to vsonic
Signed-off-by: Ze Gan <ganze718@gmail.com>
* Add sonic vm topology
Signed-off-by: Ze Gan <ganze718@gmail.com>
* Polish code
Signed-off-by: Ze Gan <ganze718@gmail.com>
* Add neighbor timers in frr config file
Signed-off-by: Ze Gan <ganze718@gmail.com>
* Update Readme
Signed-off-by: Ze Gan <ganze718@gmail.com>
* Polish code
Signed-off-by: Ze Gan <ganze718@gmail.com>
Copy file name to clipboardexpand all lines: ansible/testbed_add_vm_topology.yml
+8-2
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@
27
27
# -e ptf_ipv6=fec0::ffff:afa:1/64 - the ipv6 address and prefix of ptf container mgmt interface
28
28
# -e topo=t0 - the name of removed topo
29
29
# -e ptf_imagename=docker-ptf - name of a docker-image which will be used for the ptf docker container
30
-
# -e vm_type=veos|ceos
30
+
# -e vm_type=veos|ceos|vsonic
31
31
32
32
- hosts: servers:&vm_host
33
33
gather_facts: no
@@ -105,6 +105,11 @@
105
105
- set_fact:
106
106
base_topo: "{{ topo.split('_') | first }}"
107
107
108
+
- name: Require VMs as VEOS by default
109
+
set_fact:
110
+
vm_type: "veos"
111
+
when: vm_type is not defined
112
+
108
113
- name: Check if it is a known topology
109
114
fail: msg="Unknown topology {{ topo }}"
110
115
when: base_topo not in topologies
@@ -132,4 +137,5 @@
132
137
delegate_to: localhost
133
138
134
139
roles:
135
-
- { role: eos, when: topology.VMs is defined and VM_targets is defined and inventory_hostname in VM_targets } # role eos will be executed in any case, and when will evaluate with every task
140
+
- { role: eos, when: topology.VMs is defined and VM_targets is defined and inventory_hostname in VM_targets and (vm_type == "veos" or vm_type == "ceos" ) } # If the vm_type is eos based, role eos will be executed in any case, and when will evaluate with every task
141
+
- { role: sonic, when: topology.VMs is defined and VM_targets is defined and inventory_hostname in VM_targets and (vm_type == "vsonic" ) } # If the vm_type is sonic based, role sonic will be executed in any case, and when will evaluate with every task
0 commit comments