Skip to content

Commit

Permalink
Add "state" field in CONFIG_DB fabric_monitor table as a toggle of the
Browse files Browse the repository at this point in the history
fabric port monitoring feature. The command to set this is "config
fabric port monitor state <enable/disable>"

Signed-off-by: Jie Feng <[email protected]>
  • Loading branch information
jfeng-arista committed Aug 3, 2023
1 parent 4d773cb commit 268e218
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/config_fabric_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,25 @@ def test_config_fabric_monitor_state(self, ctx):
result = self.basic_check("port", ["monitor", "state", "disable"], ctx)
expect_result = 0
assert operator.eq(result.exit_code, expect_result)

class TestMultiAsicConfigFabric(object):
@classmethod
def setup_class(cls):
print("SETUP")
os.environ["PATH"] += os.pathsep + scripts_path
os.environ["UTILITIES_UNIT_TESTING"] = "2"
os.environ["UTILITIES_UNIT_TESTING_TOPOLOGY"] = "multi_asic"

def basic_check(self, command_name, para_list, ctx):
# This function issues command of "config fabric xxxx",
# and returns the result of the command.
runner = CliRunner()
result = runner.invoke(config.config.commands["fabric"].commands[command_name], para_list, obj = ctx)
print(result.output)
return result

def test_multi_config_fabric_monitor_state(self, ctx):
result = self.basic_check("port", ["monitor", "state", "disable"], ctx)
expect_result = 0
assert operator.eq(result.exit_code, expect_result)

0 comments on commit 268e218

Please sign in to comment.