Skip to content

Commit c62a128

Browse files
oleksandrivantsivmarian-pritsak
authored andcommitted
[everflow_testbed]: Get info about IPv4 neighbors only. (#153)
1 parent 564781c commit c62a128

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ansible/roles/test/tasks/everflow_testbed/get_neighbor_info.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set_fact:
33
neighbor_info_1: "{{ item }}"
44
with_items: "{{ minigraph_bgp }}"
5-
when: item['name'] == minigraph_neighbors[dst_port_1]['name']
5+
when: item['name'] == minigraph_neighbors[dst_port_1]['name'] and item['addr']|ipv4
66

77
- name: Get neighbor 1 MAC address.
88
shell: ip neigh show {{ neighbor_info_1['addr'] }} | awk -F' ' '{print $5}'
@@ -19,7 +19,7 @@
1919
set_fact:
2020
neighbor_info_2: "{{ item }}"
2121
with_items: "{{ minigraph_bgp }}"
22-
when: item['name'] == minigraph_neighbors[dst_port_2]['name']
22+
when: item['name'] == minigraph_neighbors[dst_port_2]['name'] and item['addr']|ipv4
2323

2424
- name: Get neighbor 2 MAC address.
2525
shell: ip neigh show {{ neighbor_info_2['addr'] }} | awk -F' ' '{print $5}'
@@ -36,7 +36,7 @@
3636
set_fact:
3737
neighbor_info_3: "{{ item }}"
3838
with_items: "{{ minigraph_bgp }}"
39-
when: item['name'] == minigraph_neighbors[dst_port_3]['name']
39+
when: item['name'] == minigraph_neighbors[dst_port_3]['name'] and item['addr']|ipv4
4040

4141
- name: Get neighbor 3 MAC address.
4242
shell: ip neigh show {{ neighbor_info_3['addr'] }} | awk -F' ' '{print $5}'

0 commit comments

Comments
 (0)