From c0549458edb397dbb47849d8ca1606b806b8a548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ray=5Fwang=20=E7=8E=8B=E5=B4=87=E5=8F=A1?= Date: Wed, 16 Oct 2019 15:30:45 +0800 Subject: [PATCH] [copp] fix hard coding for arp test --- ansible/roles/test/tasks/copp.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ansible/roles/test/tasks/copp.yml b/ansible/roles/test/tasks/copp.yml index 48c8ed436ca..356da5aac42 100644 --- a/ansible/roles/test/tasks/copp.yml +++ b/ansible/roles/test/tasks/copp.yml @@ -20,14 +20,14 @@ script: roles/test/files/helpers/add_ip.sh delegate_to: "{{ ptf_host }}" - - name: set default nn_target_port if it's not defined - set_fact: nn_target_port="3" - when: nn_target_port is undefined - - name: set default nn_target_interface if it's not defined - set_fact: nn_target_interface="Ethernet12" + set_fact: nn_target_interface="{{ minigraph_ports.keys()[3] }}" when: nn_target_interface is undefined + - name: set default nn_target_port if it's not defined + set_fact: nn_target_port="{{ minigraph_port_indices[nn_target_interface] }}" + when: nn_target_port is undefined + - name: Update ptf_nn_agent configuration inside ptf template: src=ptf_nn_agent.conf.ptf.j2 dest=/etc/supervisor/conf.d/ptf_nn_agent.conf delegate_to: "{{ ptf_host }}" @@ -115,3 +115,4 @@ with_items: - lldpd - lldp-syncd +