Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions ansible/roles/test/tasks/bgp_speaker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
- fail: msg="Invalid testbed_type value '{{testbed_type}}'"
when: testbed_type not in ['t0', 't0-64']

- include_vars: "vars/deployment_id_asn_map.yml"

- name: Gather minigraph facts about the device
minigraph_facts: host={{inventory_hostname}}
become: no
Expand All @@ -18,9 +16,13 @@
- name: print deployment id
debug: msg="{{deployment_id}}"

- name: fetch bgp speaker asn number from DUT
shell: sonic-cfggen -m -d -y /etc/sonic/deployment_id_asn_map.yml -v "deployment_id_asn_map[DEVICE_METADATA['localhost']['deployment_id']]"
register: cfggen_out

- name: set bgp speaker asn number
set_fact:
bgp_speaker_asn={{deployment_id_asn_map[deployment_id]}}
bgp_speaker_asn={{cfggen_out.stdout}}

- name: print bgp speaker asn number
debug: msg="{{bgp_speaker_asn}}"
Expand Down Expand Up @@ -89,6 +91,11 @@
- {file_name: 'start.sh', config_file_1: 'config_1.ini', config_file_2: 'config_2.ini', config_file_3: 'config_3.ini', phy_ip: '{{vlan_ips[0]}}', logical_ip_1: '{{speaker_ips[0]}}', logical_ip_2: '{{speaker_ips[1]}}'}
delegate_to: "{{ptf_host}}"

- name: Kill exabgp instances if existing
shell: pkill exabgp
delegate_to: "{{ptf_host}}"
ignore_errors: yes

- name: Start exabgp instances
shell: sh {{exabgp_dir}}/start.sh
delegate_to: "{{ptf_host}}"
Expand Down
2 changes: 0 additions & 2 deletions ansible/vars/deployment_id_asn_map.yml

This file was deleted.