-
Notifications
You must be signed in to change notification settings - Fork 658
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix multi-asic behaviour for ecnconfig (#3062)
* Fixes multi-asic behaviour for ecnconfig. Previously, ecnconfig -l was not behaving correctly on multi-asic devices, as the '-n' namespace option was not available, and correct namespaces were not traversed on multi-asic devices to retrieve correct results for ecnconfig. This change fixes multi-asic behaviour of CLI commands that rely on ecnconfig. * tests cleanup * Remove wred on lossy * Addendum to previous commit regarding wred lossy * Enhancements to multi-asic support in ecnconfig - Removed unix socket and fixed failing unit test - Replace argparse with click - Add multi-asic support for get and set queue - Add multi-asic support for set threshold and prob - Modify test framework to support multi-asic - Use multi_asic decorators - Resolve precommit errors --------- Co-authored-by: rdjeric <rdjeric@arista.com> Co-authored-by: arista-hpandya <hpandya@arista.com>
- Loading branch information
1 parent
9a3f359
commit e4df80a
Showing
8 changed files
with
755 additions
and
395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import os | ||
import sys | ||
from .ecn_test import TestEcnConfigBase | ||
from .ecn_input.ecn_test_vectors import testData | ||
|
||
root_path = os.path.dirname(os.path.abspath(__file__)) | ||
modules_path = os.path.dirname(root_path) | ||
scripts_path = os.path.join(modules_path, "scripts") | ||
sys.path.insert(0, root_path) | ||
sys.path.insert(0, modules_path) | ||
|
||
|
||
class TestEcnConfigMultiAsic(TestEcnConfigBase): | ||
@classmethod | ||
def setup_class(cls): | ||
super().setup_class() | ||
os.environ["UTILITIES_UNIT_TESTING_TOPOLOGY"] = "multi_asic" | ||
|
||
def test_ecn_show_config_all_masic(self): | ||
self.executor(testData['ecn_show_config_masic']) | ||
|
||
def test_ecn_show_config_all_verbose_masic(self): | ||
self.executor(testData['test_ecn_show_config_verbose_masic']) | ||
|
||
def test_ecn_show_config_one_masic(self): | ||
self.executor(testData['test_ecn_show_config_namespace']) | ||
|
||
def test_ecn_show_config_one_verbose_masic(self): | ||
self.executor(testData['test_ecn_show_config_namespace_verbose']) | ||
|
||
def test_ecn_config_change_other_threshold_masic(self): | ||
self.executor(testData['ecn_cfg_threshold_masic']) | ||
|
||
def test_ecn_config_change_other_prob_masic(self): | ||
self.executor(testData['ecn_cfg_probability_masic']) | ||
|
||
def test_ecn_config_change_gdrop_verbose_all_masic(self): | ||
self.executor(testData['ecn_cfg_gdrop_verbose_all_masic']) | ||
|
||
def test_ecn_config_multi_set_verbose_all_masic(self): | ||
self.executor(testData['ecn_cfg_multi_set_verbose_all_masic']) | ||
|
||
def test_ecn_queue_get_masic(self): | ||
self.executor(testData['ecn_q_get_masic']) | ||
|
||
def test_ecn_queue_get_verbose_masic(self): | ||
self.executor(testData['ecn_q_get_verbose_masic']) | ||
|
||
def test_ecn_queue_get_all_masic(self): | ||
self.executor(testData['ecn_q_get_all_ns_masic']) | ||
|
||
def test_ecn_queue_get_all_verbose_masic(self): | ||
self.executor(testData['ecn_q_get_all_ns_verbose_masic']) | ||
|
||
def test_ecn_q_set_off_all_masic(self): | ||
self.executor(testData['ecn_cfg_q_all_ns_off_masic']) | ||
|
||
def test_ecn_q_set_off_one_masic(self): | ||
self.executor(testData['ecn_cfg_q_one_ns_off_verbose_masic']) | ||
|
||
@classmethod | ||
def teardown_class(cls): | ||
super().teardown_class() | ||
os.environ["UTILITIES_UNIT_TESTING_TOPOLOGY"] = "" |