Skip to content
Open
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
24 changes: 24 additions & 0 deletions ansible/roles/test/tasks/ecn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"WRED_PROFILE": {
"AZURE_LOSSLESS": {
"red_max_threshold": "32760",
"yellow_max_threshold": "32760",
"green_min_threshold": "4095",
"red_min_threshold": "4095",
"yellow_min_threshold": "4095",
"green_max_threshold": "32760",
"wred_yellow_enable": "true",
"wred_green_enable": "true"
},
"AZURE_LOSSY": {
"red_max_threshold": "32760",
"yellow_max_threshold": "32760",
"green_min_threshold": "4095",
"red_min_threshold": "4095",
"yellow_min_threshold": "4095",
"green_max_threshold": "32760",
"wred_yellow_enable": "true",
"wred_green_enable": "true"
}
}
}
21 changes: 19 additions & 2 deletions ansible/roles/test/tasks/ecn_wred.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,26 @@
register: wred_value
failed_when: wred_value.rc != 0

- name: Copy JSON config to switch.
copy: src=roles/test/tasks/ecn.json dest=/tmp
when: wred_value.stdout == ""

- name: Add config
shell: config load /tmp/ecn.json -y
become: yes
when: wred_value.stdout == ""

- name: Make sure config updated
pause: seconds=2
when: wred_value.stdout == ""

- set_fact:
red_min_threshold=4095
when: wred_value.stdout == ""

- set_fact:
red_min_threshold={{ wred_value.stdout }}
when: wred_value.stdout != ""

- block:
- name: Copy test files to DUT
Expand All @@ -45,5 +63,4 @@
become: yes
shell: ecnconfig -p AZURE_LOSSY -rmin {{ red_min_threshold }}
register: ecn_restore
failed_when: ecn_restore.rc != 0

failed_when: ecn_restore.rc != 0