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
8 changes: 4 additions & 4 deletions ansible/roles/test/tasks/arpall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
when: po1 is defined

- name: bring {{ intf1 }} up
shell: config interface {{ intf1 }} startup
shell: config interface startup {{ intf1 }}
become: yes
when: po1 is defined

Expand All @@ -51,16 +51,16 @@
when: po2 is defined

- name: bring {{ intf2 }} up
shell: config interface {{ intf2 }} startup
shell: config interface startup {{ intf2 }}
become: yes
when: po2 is defined

- name: change SONiC DUT interface IP to test IP address
command: config interface {{ intf1 }} ip add 10.10.1.2/28
command: config interface ip add {{ intf1 }} 10.10.1.2/28
become: yes

- name: change SONiC DUT interface IP to test IP address
command: config interface {{ intf2 }} ip add 10.10.1.20/28
command: config interface ip add {{ intf2 }} 10.10.1.20/28
become: yes

- name: wait for interfaces to be up after removed from portchannel
Expand Down
8 changes: 4 additions & 4 deletions ansible/roles/test/tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
remove_portchannel_members: true

- name: Step 2 Remove {{ portchannel_ip }} from {{ portchannel }}
shell: config interface {{ portchannel }} ip remove {{ portchannel_ip }}/31
shell: config interface ip remove {{ portchannel }} {{ portchannel_ip }}/31
become: yes
- set_fact:
remove_portchannel_ip: true
Expand Down Expand Up @@ -73,7 +73,7 @@
add_tmp_portchannel_members: true

- name: Step 5 Add {{ portchannel_ip }} to {{ tmp_portchannel }}
shell: config interface {{ tmp_portchannel }} ip add {{ portchannel_ip }}/31
shell: config interface ip add {{ tmp_portchannel }} {{ portchannel_ip }}/31
become: yes
- set_fact:
add_tmp_portchannel_ip: true
Expand All @@ -97,7 +97,7 @@

always:
- name: Remove {{ portchannel_ip }} from {{ tmp_portchannel }}
shell: config interface {{ tmp_portchannel }} ip remove {{ portchannel_ip }}/31
shell: config interface ip remove {{ tmp_portchannel }} {{ portchannel_ip }}/31
become: yes
when: add_tmp_portchannel_ip

Expand All @@ -113,7 +113,7 @@
when: create_tmp_portchannel

- name: Add {{ portchannel_ip }} to {{ portchannel }}
shell: config interface {{ portchannel }} ip add {{ portchannel_ip }}/31
shell: config interface ip add {{ portchannel }} {{ portchannel_ip }}/31
become: yes
when: remove_portchannel_ip

Expand Down
12 changes: 6 additions & 6 deletions ansible/roles/test/tasks/iface_naming_mode/interface_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- block:

- name: shutdown the interface {{intf}} in {{mode}} mode
shell: sudo config interface {{intf}} shutdown
shell: sudo config interface shutdown {{intf}}
register: out
failed_when: out.rc != 0

Expand All @@ -24,7 +24,7 @@
assert: {that: "'{{int_status[intf]['admin_state']}}' == 'down'"}

- name: Bringup the interface {{intf}} in {{mode}} mode
shell: sudo config interface {{intf}} startup
shell: sudo config interface startup {{intf}}
register: out
failed_when: out.rc != 0

Expand All @@ -39,7 +39,7 @@
# check the config interface speed

- name: configure interface speed to 10G in {{mode}} mode
shell: sudo config interface {{intf}} speed 10000
shell: sudo config interface speed {{intf}} 10000
register: out
failed_when: out.rc != 0

Expand All @@ -53,7 +53,7 @@
assert: {that: "'{{speed.stdout}}' == '10000'"}

- name: chamge interface speed to native speed and check
shell: sudo config interface {{intf}} speed {{native_speed}}
shell: sudo config interface speed {{intf}} {{native_speed}}
register: out
failed_when: out.rc != 0

Expand All @@ -72,8 +72,8 @@
always:

- name: set the interface up
shell: sudo config interface {{intf}} startup
shell: sudo config interface startup {{intf}}

- name: change interface speed to native speed and check
shell: sudo config interface {{intf}} speed {{native_speed}}
shell: sudo config interface speed {{intf}} {{native_speed}}

2 changes: 1 addition & 1 deletion ansible/roles/test/tasks/neighbour-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

- name: Change DUT interface IP to test IP address
become: yes
command: config interface {{ dut_if }} ip add {{ dut_ip }}/24
command: config interface ip add {{ dut_if }} {{ dut_ip }}/24

- name: Change host interface IP to test IP address
become: yes
Expand Down
8 changes: 4 additions & 4 deletions ansible/roles/test/tasks/port_toggle.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- name: build shell command string
debug: msg="PORTS={{minigraph_ports.keys() | join(' ')}}; for port in $PORTS; do config interface $port shutdown; done"
debug: msg="PORTS={{minigraph_ports.keys() | join(' ')}}; for port in $PORTS; do config interface shutdown $port; done"

- name: turn off all ports on device
shell: PORTS="{{minigraph_ports.keys() | join(' ')}}"; for port in $PORTS; do config interface $port shutdown; done
shell: PORTS="{{minigraph_ports.keys() | join(' ')}}"; for port in $PORTS; do config interface shutdown $port; done
become: yes

- name: Get interface facts
Expand All @@ -13,10 +13,10 @@

- always:
- name: build shell command string
debug: msg="PORTS={{minigraph_ports.keys() | join(' ')}}; for port in $PORTS; do config interface $port startup; done"
debug: msg="PORTS={{minigraph_ports.keys() | join(' ')}}; for port in $PORTS; do config interface startup $port; done"

- name: turn on all ports on device
shell: PORTS="{{minigraph_ports.keys() | join(' ')}}"; for port in $PORTS; do config interface $port startup; done
shell: PORTS="{{minigraph_ports.keys() | join(' ')}}"; for port in $PORTS; do config interface startup $port; done
become: yes

- name: wait 1 minute for ports to come up
Expand Down