From b0d190e2c0bc73d83f2418008550cac2a63d2e9a Mon Sep 17 00:00:00 2001 From: Judy Joseph Date: Tue, 27 Oct 2020 11:35:25 -0700 Subject: [PATCH] Unit tests added to cover for single/multi-asic. --- crm/main.py | 4 +- tests/crm_test.py | 902 +++++++++++++++++++++++ tests/mock_tables/asic0/config_db.json | 42 ++ tests/mock_tables/asic0/counters_db.json | 92 +++ tests/mock_tables/asic1/config_db.json | 42 ++ tests/mock_tables/asic1/counters_db.json | 86 +++ tests/mock_tables/config_db.json | 42 ++ tests/mock_tables/counters_db.json | 88 ++- 8 files changed, 1295 insertions(+), 3 deletions(-) create mode 100644 tests/crm_test.py diff --git a/crm/main.py b/crm/main.py index 83c22e21f6..03e2441b49 100644 --- a/crm/main.py +++ b/crm/main.py @@ -113,10 +113,9 @@ def get_acl_table_resources(self): """ # Retrieve all ACL table keys from CRM:ACL_TABLE_STATS crm_acl_keys = self.db.keys(self.db.COUNTERS_DB, 'CRM:ACL_TABLE_STATS*') + data = [] for key in crm_acl_keys or [None]: - data = [] - if key: id = key.replace('CRM:ACL_TABLE_STATS:', '') @@ -127,6 +126,7 @@ def get_acl_table_resources(self): data.append([id, res, crm_stats['crm_stats_' + res + '_used'], crm_stats['crm_stats_' + res + '_available']]) return data + @multi_asic_util.run_on_multi_asic def show_resources(self, resource): """ diff --git a/tests/crm_test.py b/tests/crm_test.py new file mode 100644 index 0000000000..4f07cf6384 --- /dev/null +++ b/tests/crm_test.py @@ -0,0 +1,902 @@ +import os +import sys + +from click.testing import CliRunner +import crm.main as crm + +# Expected output for CRM + +crm_show_summary = """\ + +Polling Interval: 300 second(s) + +""" + +crm_show_thresholds_acl_group = """\ + +Resource Name Threshold Type Low Threshold High Threshold +--------------- ---------------- --------------- ---------------- +acl_group percentage 70 85 + +""" + +crm_show_thresholds_acl_table = """\ + +Resource Name Threshold Type Low Threshold High Threshold +--------------- ---------------- --------------- ---------------- +acl_table percentage 70 85 + +""" + +crm_show_thresholds_all = """\ + +Resource Name Threshold Type Low Threshold High Threshold +-------------------- ---------------- --------------- ---------------- +ipv4_route percentage 70 85 +ipv6_route percentage 70 85 +ipv4_nexthop percentage 70 85 +ipv6_nexthop percentage 70 85 +ipv4_neighbor percentage 70 85 +ipv6_neighbor percentage 70 85 +nexthop_group_member percentage 70 85 +nexthop_group percentage 70 85 +acl_table percentage 70 85 +acl_group percentage 70 85 +acl_entry percentage 70 85 +acl_counter percentage 70 85 +fdb_entry percentage 70 85 + +""" + +crm_show_thresholds_fdb = """\ + +Resource Name Threshold Type Low Threshold High Threshold +--------------- ---------------- --------------- ---------------- +fdb_entry percentage 70 85 + +""" + +crm_show_thresholds_ipv4_neighbor = """\ + +Resource Name Threshold Type Low Threshold High Threshold +--------------- ---------------- --------------- ---------------- +ipv4_neighbor percentage 70 85 + +""" + +crm_show_thresholds_ipv4_nexthop = """\ + +Resource Name Threshold Type Low Threshold High Threshold +--------------- ---------------- --------------- ---------------- +ipv4_nexthop percentage 70 85 + +""" + +crm_show_thresholds_ipv4_route = """\ + +Resource Name Threshold Type Low Threshold High Threshold +--------------- ---------------- --------------- ---------------- +ipv4_route percentage 70 85 + +""" + +crm_show_thresholds_ipv6_neighbor = """\ + +Resource Name Threshold Type Low Threshold High Threshold +--------------- ---------------- --------------- ---------------- +ipv6_neighbor percentage 70 85 + +""" + +crm_show_thresholds_ipv6_nexthop = """\ + +Resource Name Threshold Type Low Threshold High Threshold +--------------- ---------------- --------------- ---------------- +ipv6_nexthop percentage 70 85 + +""" + +crm_show_thresholds_ipv6_route= """\ + +Resource Name Threshold Type Low Threshold High Threshold +--------------- ---------------- --------------- ---------------- +ipv6_route percentage 70 85 + +""" + +crm_show_thresholds_nexthop_group_member = """\ + +Resource Name Threshold Type Low Threshold High Threshold +-------------------- ---------------- --------------- ---------------- +nexthop_group_member percentage 70 85 + +""" + +crm_show_thresholds_nexthop_group_object = """\ + +Resource Name Threshold Type Low Threshold High Threshold +--------------- ---------------- --------------- ---------------- +nexthop_group percentage 70 85 + +""" + +crm_show_resources_acl_group = """\ + +Stage Bind Point Resource Name Used Count Available Count +------- ------------ --------------- ------------ ----------------- +INGRESS PORT acl_group 16 232 +INGRESS PORT acl_table 2 3 +INGRESS LAG acl_group 8 232 +INGRESS LAG acl_table 0 3 +INGRESS VLAN acl_group 0 232 +INGRESS VLAN acl_table 0 6 +INGRESS RIF acl_group 0 232 +INGRESS RIF acl_table 0 6 +INGRESS SWITCH acl_group 0 232 +INGRESS SWITCH acl_table 0 6 +EGRESS PORT acl_group 0 232 +EGRESS PORT acl_table 0 2 +EGRESS LAG acl_group 0 232 +EGRESS LAG acl_table 0 2 +EGRESS VLAN acl_group 0 232 +EGRESS VLAN acl_table 0 2 +EGRESS RIF acl_group 0 232 +EGRESS RIF acl_table 0 2 +EGRESS SWITCH acl_group 0 232 +EGRESS SWITCH acl_table 0 2 + +""" + +crm_show_resources_acl_table = """\ + +Table ID Resource Name Used Count Available Count +--------------- --------------- ------------ ----------------- +0x700000000063f acl_entry 0 2048 +0x700000000063f acl_counter 0 2048 +0x7000000000670 acl_entry 0 1024 +0x7000000000670 acl_counter 0 1280 + +""" + +crm_show_resources_all = """\ + +Resource Name Used Count Available Count +-------------------- ------------ ----------------- +ipv4_route 58 98246 +ipv6_route 60 16324 +ipv4_nexthop 8 49086 +ipv6_nexthop 8 49086 +ipv4_neighbor 8 8168 +ipv6_neighbor 8 4084 +nexthop_group_member 0 16384 +nexthop_group 0 512 +fdb_entry 0 32767 + + +Stage Bind Point Resource Name Used Count Available Count +------- ------------ --------------- ------------ ----------------- +INGRESS PORT acl_group 16 232 +INGRESS PORT acl_table 2 3 +INGRESS LAG acl_group 8 232 +INGRESS LAG acl_table 0 3 +INGRESS VLAN acl_group 0 232 +INGRESS VLAN acl_table 0 6 +INGRESS RIF acl_group 0 232 +INGRESS RIF acl_table 0 6 +INGRESS SWITCH acl_group 0 232 +INGRESS SWITCH acl_table 0 6 +EGRESS PORT acl_group 0 232 +EGRESS PORT acl_table 0 2 +EGRESS LAG acl_group 0 232 +EGRESS LAG acl_table 0 2 +EGRESS VLAN acl_group 0 232 +EGRESS VLAN acl_table 0 2 +EGRESS RIF acl_group 0 232 +EGRESS RIF acl_table 0 2 +EGRESS SWITCH acl_group 0 232 +EGRESS SWITCH acl_table 0 2 + + +Table ID Resource Name Used Count Available Count +--------------- --------------- ------------ ----------------- +0x700000000063f acl_entry 0 2048 +0x700000000063f acl_counter 0 2048 +0x7000000000670 acl_entry 0 1024 +0x7000000000670 acl_counter 0 1280 + +""" + +crm_show_resources_fdb = """\ + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +fdb_entry 0 32767 + +""" + +crm_show_resources_ipv4_neighbor = """\ + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv4_neighbor 8 8168 + +""" + +crm_show_resources_ipv4_nexthop = """\ + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv4_nexthop 8 49086 + +""" + +crm_show_resources_ipv4_route = """\ + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv4_route 58 98246 + +""" + +crm_show_resources_ipv6_route = """\ + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv6_route 60 16324 + +""" + +crm_show_resources_ipv6_neighbor = """\ + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv6_neighbor 8 4084 + +""" + +crm_show_resources_ipv6_nexthop = """\ + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv6_nexthop 8 49086 + +""" + +crm_show_resources_nexthop_group_member = """\ + +Resource Name Used Count Available Count +-------------------- ------------ ----------------- +nexthop_group_member 0 16384 + +""" + +crm_show_resources_nexthop_group_object = """\ + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +nexthop_group 0 512 + +""" + +crm_multi_asic_show_resources_acl_group = """\ + +ASIC0 + +Stage Bind Point Resource Name Used Count Available Count +------- ------------ --------------- ------------ ----------------- +INGRESS PORT acl_group 16 232 +INGRESS PORT acl_table 2 3 +INGRESS LAG acl_group 8 232 +INGRESS LAG acl_table 0 3 +INGRESS VLAN acl_group 0 232 +INGRESS VLAN acl_table 0 6 +INGRESS RIF acl_group 0 232 +INGRESS RIF acl_table 0 6 +INGRESS SWITCH acl_group 0 232 +INGRESS SWITCH acl_table 0 6 +EGRESS PORT acl_group 0 232 +EGRESS PORT acl_table 0 2 +EGRESS LAG acl_group 0 232 +EGRESS LAG acl_table 0 2 +EGRESS VLAN acl_group 0 232 +EGRESS VLAN acl_table 0 2 +EGRESS RIF acl_group 0 232 +EGRESS RIF acl_table 0 2 +EGRESS SWITCH acl_group 0 232 +EGRESS SWITCH acl_table 0 2 + + +ASIC1 + +Stage Bind Point Resource Name Used Count Available Count +------- ------------ --------------- ------------ ----------------- +INGRESS PORT acl_group 16 232 +INGRESS PORT acl_table 2 3 +INGRESS LAG acl_group 8 232 +INGRESS LAG acl_table 0 3 +INGRESS VLAN acl_group 0 232 +INGRESS VLAN acl_table 0 6 +INGRESS RIF acl_group 0 232 +INGRESS RIF acl_table 0 6 +INGRESS SWITCH acl_group 0 232 +INGRESS SWITCH acl_table 0 6 +EGRESS PORT acl_group 0 232 +EGRESS PORT acl_table 0 2 +EGRESS LAG acl_group 0 232 +EGRESS LAG acl_table 0 2 +EGRESS VLAN acl_group 0 232 +EGRESS VLAN acl_table 0 2 +EGRESS RIF acl_group 0 232 +EGRESS RIF acl_table 0 2 +EGRESS SWITCH acl_group 0 232 +EGRESS SWITCH acl_table 0 2 + +""" + +crm_multi_asic_show_resources_acl_table = """\ + +ASIC0 + +Table ID Resource Name Used Count Available Count +--------------- --------------- ------------ ----------------- +0x700000000063f acl_entry 0 2048 +0x700000000063f acl_counter 0 2048 +0x7000000000670 acl_entry 0 1024 +0x7000000000670 acl_counter 0 1280 + + +ASIC1 + +Table ID Resource Name Used Count Available Count +--------------- --------------- ------------ ----------------- +0x700000000063f acl_entry 0 2048 +0x700000000063f acl_counter 0 2048 +0x7000000000670 acl_entry 0 1024 +0x7000000000670 acl_counter 0 1280 + +""" + +crm_multi_asic_show_resources_all = """\ + +ASIC0 + +Resource Name Used Count Available Count +-------------------- ------------ ----------------- +ipv4_route 58 98246 +ipv6_route 60 16324 +ipv4_nexthop 8 49086 +ipv6_nexthop 8 49086 +ipv4_neighbor 8 8168 +ipv6_neighbor 8 4084 +nexthop_group_member 0 16384 +nexthop_group 0 512 +fdb_entry 0 32767 + + +ASIC1 + +Resource Name Used Count Available Count +-------------------- ------------ ----------------- +ipv4_route 58 98246 +ipv6_route 60 16324 +ipv4_nexthop 8 49086 +ipv6_nexthop 8 49086 +ipv4_neighbor 8 8168 +ipv6_neighbor 8 4084 +nexthop_group_member 0 16384 +nexthop_group 0 512 +fdb_entry 0 32767 + + +ASIC0 + +Stage Bind Point Resource Name Used Count Available Count +------- ------------ --------------- ------------ ----------------- +INGRESS PORT acl_group 16 232 +INGRESS PORT acl_table 2 3 +INGRESS LAG acl_group 8 232 +INGRESS LAG acl_table 0 3 +INGRESS VLAN acl_group 0 232 +INGRESS VLAN acl_table 0 6 +INGRESS RIF acl_group 0 232 +INGRESS RIF acl_table 0 6 +INGRESS SWITCH acl_group 0 232 +INGRESS SWITCH acl_table 0 6 +EGRESS PORT acl_group 0 232 +EGRESS PORT acl_table 0 2 +EGRESS LAG acl_group 0 232 +EGRESS LAG acl_table 0 2 +EGRESS VLAN acl_group 0 232 +EGRESS VLAN acl_table 0 2 +EGRESS RIF acl_group 0 232 +EGRESS RIF acl_table 0 2 +EGRESS SWITCH acl_group 0 232 +EGRESS SWITCH acl_table 0 2 + + +ASIC1 + +Stage Bind Point Resource Name Used Count Available Count +------- ------------ --------------- ------------ ----------------- +INGRESS PORT acl_group 16 232 +INGRESS PORT acl_table 2 3 +INGRESS LAG acl_group 8 232 +INGRESS LAG acl_table 0 3 +INGRESS VLAN acl_group 0 232 +INGRESS VLAN acl_table 0 6 +INGRESS RIF acl_group 0 232 +INGRESS RIF acl_table 0 6 +INGRESS SWITCH acl_group 0 232 +INGRESS SWITCH acl_table 0 6 +EGRESS PORT acl_group 0 232 +EGRESS PORT acl_table 0 2 +EGRESS LAG acl_group 0 232 +EGRESS LAG acl_table 0 2 +EGRESS VLAN acl_group 0 232 +EGRESS VLAN acl_table 0 2 +EGRESS RIF acl_group 0 232 +EGRESS RIF acl_table 0 2 +EGRESS SWITCH acl_group 0 232 +EGRESS SWITCH acl_table 0 2 + + +ASIC0 + +Table ID Resource Name Used Count Available Count +--------------- --------------- ------------ ----------------- +0x700000000063f acl_entry 0 2048 +0x700000000063f acl_counter 0 2048 +0x7000000000670 acl_entry 0 1024 +0x7000000000670 acl_counter 0 1280 + + +ASIC1 + +Table ID Resource Name Used Count Available Count +--------------- --------------- ------------ ----------------- +0x700000000063f acl_entry 0 2048 +0x700000000063f acl_counter 0 2048 +0x7000000000670 acl_entry 0 1024 +0x7000000000670 acl_counter 0 1280 + +""" + +crm_multi_asic_show_resources_fdb = """\ + +ASIC0 + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +fdb_entry 0 32767 + + +ASIC1 + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +fdb_entry 0 32767 + +""" + +crm_multi_asic_show_resources_ipv4_neighbor = """\ + +ASIC0 + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv4_neighbor 8 8168 + + +ASIC1 + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv4_neighbor 8 8168 + +""" + +crm_multi_asic_show_resources_ipv4_nexthop = """\ + +ASIC0 + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv4_nexthop 8 49086 + + +ASIC1 + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv4_nexthop 8 49086 + +""" + +crm_multi_asic_show_resources_ipv4_route = """\ + +ASIC0 + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv4_route 58 98246 + + +ASIC1 + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv4_route 58 98246 + +""" + +crm_multi_asic_show_resources_ipv6_route = """\ + +ASIC0 + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv6_route 60 16324 + + +ASIC1 + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv6_route 60 16324 + +""" + +crm_multi_asic_show_resources_ipv6_neighbor = """\ + +ASIC0 + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv6_neighbor 8 4084 + + +ASIC1 + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv6_neighbor 8 4084 + +""" + +crm_multi_asic_show_resources_ipv6_nexthop = """\ + +ASIC0 + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv6_nexthop 8 49086 + + +ASIC1 + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +ipv6_nexthop 8 49086 + +""" + +crm_multi_asic_show_resources_nexthop_group_member = """\ + +ASIC0 + +Resource Name Used Count Available Count +-------------------- ------------ ----------------- +nexthop_group_member 0 16384 + + +ASIC1 + +Resource Name Used Count Available Count +-------------------- ------------ ----------------- +nexthop_group_member 0 16384 + +""" + +crm_multi_asic_show_resources_nexthop_group_object = """\ + +ASIC0 + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +nexthop_group 0 512 + + +ASIC1 + +Resource Name Used Count Available Count +--------------- ------------ ----------------- +nexthop_group 0 512 + +""" + +class TestCrm(object): + @classmethod + def setup_class(cls): + print("SETUP") + os.environ["UTILITIES_UNIT_TESTING"] = "1" + + def test_crm_show_summary(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'summary']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_summary + + def test_crm_show_thresholds_acl_group(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'thresholds', 'acl', 'group']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_thresholds_acl_group + + def test_crm_show_thresholds_acl_table(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'thresholds', 'acl', 'table']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_thresholds_acl_table + + def test_crm_show_thresholds_all(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'thresholds', 'all']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_thresholds_all + + def test_crm_show_thresholds_fdb(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'thresholds', 'fdb']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_thresholds_fdb + + def test_crm_show_thresholds_ipv4_neighbor(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'thresholds', 'ipv4', 'neighbor']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_thresholds_ipv4_neighbor + + def test_crm_show_thresholds_ipv4_nexthop(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'thresholds', 'ipv4', 'nexthop']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_thresholds_ipv4_nexthop + + def test_crm_show_thresholds_ipv4_route(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'thresholds', 'ipv4', 'route']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_thresholds_ipv4_route + + def test_crm_show_thresholds_ipv6_neighbor(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'thresholds', 'ipv6', 'neighbor']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_thresholds_ipv6_neighbor + + def test_crm_show_thresholds_ipv6_nexthop(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'thresholds', 'ipv6', 'nexthop']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_thresholds_ipv6_nexthop + + def test_crm_show_thresholds_ipv6_route(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'thresholds', 'ipv6', 'route']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_thresholds_ipv6_route + + def test_crm_show_thresholds_nexthop_group_member(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'thresholds', 'nexthop', 'group', 'member']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_thresholds_nexthop_group_member + + def test_crm_show_thresholds_nexthop_group_object(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'thresholds', 'nexthop', 'group', 'object']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_thresholds_nexthop_group_object + + def test_crm_show_resources_acl_group(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'acl', 'group']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_resources_acl_group + + def test_crm_show_resources_acl_table(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'acl', 'table']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_resources_acl_table + + def test_crm_show_resources_all(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'all']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_resources_all + + def test_crm_show_resources_fdb(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'fdb']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_resources_fdb + + def test_crm_show_resources_ipv4_neighbor(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'ipv4', 'neighbor']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_resources_ipv4_neighbor + + def test_crm_show_resources_ipv4_nexthop(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'ipv4', 'nexthop']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_resources_ipv4_nexthop + + def test_crm_show_resources_ipv4_route(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'ipv4', 'route']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_resources_ipv4_route + + def test_crm_show_resources_ipv6_route(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'ipv6', 'route']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_resources_ipv6_route + + def test_crm_show_resources_ipv6_neighbor(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'ipv6', 'neighbor']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_resources_ipv6_neighbor + + def test_crm_show_resources_ipv6_nexthop(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'ipv6', 'nexthop']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_resources_ipv6_nexthop + + def test_crm_show_resources_nexthop_group_member(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'nexthop', 'group', 'member']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_resources_nexthop_group_member + + def test_crm_show_resources_nexthop(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'nexthop', 'group', 'object']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_show_resources_nexthop_group_object + + @classmethod + def teardown_class(cls): + print("TEARDOWN") + os.environ["PATH"] = os.pathsep.join(os.environ["PATH"].split(os.pathsep)[:-1]) + os.environ["UTILITIES_UNIT_TESTING"] = "0" + +class TestCrmMultiAsic(object): + @classmethod + def setup_class(cls): + print("SETUP") + os.environ["UTILITIES_UNIT_TESTING"] = "2" + os.environ["UTILITIES_UNIT_TESTING_TOPOLOGY"] = "multi_asic" + import mock_tables.mock_multi_asic + mock_tables.dbconnector.load_namespace_config() + + def test_crm_multi_asic_show_resources_acl_group(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'acl', 'group']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_multi_asic_show_resources_acl_group + + def test_crm_multi_asic_show_resources_acl_table(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'acl', 'table']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_multi_asic_show_resources_acl_table + + def test_crm_multi_asic_show_resources_all(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'all']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_multi_asic_show_resources_all + + def test_crm_multi_asic_show_resources_fdb(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'fdb']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_multi_asic_show_resources_fdb + + def test_crm_multi_asic_show_resources_ipv4_neighbor(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'ipv4', 'neighbor']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_multi_asic_show_resources_ipv4_neighbor + + def test_crm_multi_asic_show_resources_ipv4_nexthop(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'ipv4', 'nexthop']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_multi_asic_show_resources_ipv4_nexthop + + def test_crm_multi_asic_show_resources_ipv4_route(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'ipv4', 'route']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_multi_asic_show_resources_ipv4_route + + def test_crm_multi_asic_show_resources_ipv6_route(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'ipv6', 'route']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_multi_asic_show_resources_ipv6_route + + def test_crm_multi_asic_show_resources_ipv6_neighbor(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'ipv6', 'neighbor']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_multi_asic_show_resources_ipv6_neighbor + + def test_crm_multi_asic_show_resources_ipv6_nexthop(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'ipv6', 'nexthop']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_multi_asic_show_resources_ipv6_nexthop + + def test_crm_multi_asic_show_resources_nexthop_group_member(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'nexthop', 'group', 'member']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_multi_asic_show_resources_nexthop_group_member + + def test_crm_multi_asic_show_resources_nexthop(self): + runner = CliRunner() + result = runner.invoke(crm.cli, ['show', 'resources', 'nexthop', 'group', 'object']) + print(sys.stderr, result.output) + assert result.exit_code == 0 + assert result.output == crm_multi_asic_show_resources_nexthop_group_object + + @classmethod + def teardown_class(cls): + print("TEARDOWN") + os.environ["PATH"] = os.pathsep.join(os.environ["PATH"].split(os.pathsep)[:-1]) + os.environ["UTILITIES_UNIT_TESTING"] = "0" + os.environ["UTILITIES_UNIT_TESTING_TOPOLOGY"] = "" diff --git a/tests/mock_tables/asic0/config_db.json b/tests/mock_tables/asic0/config_db.json index fb6169bfc7..f4d4383b72 100644 --- a/tests/mock_tables/asic0/config_db.json +++ b/tests/mock_tables/asic0/config_db.json @@ -107,5 +107,47 @@ "PFC_WD|GLOBAL": { "BIG_RED_SWITCH": "enable", "POLL_INTERVAL": "199" + }, + "CRM|Config": { + "acl_table_threshold_type": "percentage", + "nexthop_group_threshold_type": "percentage", + "fdb_entry_high_threshold": "85", + "acl_entry_threshold_type": "percentage", + "ipv6_neighbor_low_threshold": "70", + "nexthop_group_member_low_threshold": "70", + "acl_group_high_threshold": "85", + "ipv4_route_high_threshold": "85", + "acl_counter_high_threshold": "85", + "ipv4_route_low_threshold": "70", + "ipv4_route_threshold_type": "percentage", + "ipv4_neighbor_low_threshold": "70", + "acl_group_threshold_type": "percentage", + "ipv4_nexthop_high_threshold": "85", + "ipv6_route_threshold_type": "percentage", + "nexthop_group_low_threshold": "70", + "ipv4_neighbor_high_threshold": "85", + "ipv6_route_high_threshold": "85", + "ipv6_nexthop_threshold_type": "percentage", + "polling_interval": "300", + "ipv4_nexthop_threshold_type": "percentage", + "acl_group_low_threshold": "70", + "acl_entry_low_threshold": "70", + "nexthop_group_member_threshold_type": "percentage", + "ipv4_nexthop_low_threshold": "70", + "acl_counter_threshold_type": "percentage", + "ipv6_neighbor_high_threshold": "85", + "nexthop_group_member_high_threshold": "85", + "acl_table_low_threshold": "70", + "fdb_entry_threshold_type": "percentage", + "ipv6_neighbor_threshold_type": "percentage", + "acl_table_high_threshold": "85", + "ipv6_nexthop_low_threshold": "70", + "acl_counter_low_threshold": "70", + "ipv4_neighbor_threshold_type": "percentage", + "nexthop_group_high_threshold": "85", + "ipv6_route_low_threshold": "70", + "acl_entry_high_threshold": "85", + "fdb_entry_low_threshold": "70", + "ipv6_nexthop_high_threshold": "85" } } diff --git a/tests/mock_tables/asic0/counters_db.json b/tests/mock_tables/asic0/counters_db.json index 3286a0a752..488915a79c 100644 --- a/tests/mock_tables/asic0/counters_db.json +++ b/tests/mock_tables/asic0/counters_db.json @@ -1662,5 +1662,97 @@ }, "COUNTERS_DEBUG_NAME_SWITCH_STAT_MAP": { "DEBUG_1": "SAI_SWITCH_STAT_IN_DROP_REASON_RANGE_BASE" + }, + "CRM:ACL_STATS:INGRESS:VLAN":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"6", + "crm_stats_acl_group_used":"0" + }, + "CRM:STATS":{ + "crm_stats_ipv4_neighbor_used":"8", + "crm_stats_ipv4_route_available":"98246", + "crm_stats_nexthop_group_used":"0", + "crm_stats_ipv6_neighbor_used":"8", + "crm_stats_ipv6_nexthop_available":"49086", + "crm_stats_ipv4_nexthop_used":"8", + "crm_stats_ipv4_nexthop_available":"49086", + "crm_stats_nexthop_group_available":"512", + "crm_stats_nexthop_group_member_used":"0", + "crm_stats_nexthop_group_member_available":"16384", + "crm_stats_fdb_entry_used":"0", + "crm_stats_fdb_entry_available":"32767", + "crm_stats_ipv4_route_used":"58", + "crm_stats_ipv4_neighbor_available":"8168", + "crm_stats_ipv6_route_used":"60", + "crm_stats_ipv6_route_available":"16324", + "crm_stats_ipv6_nexthop_used":"8", + "crm_stats_ipv6_neighbor_available":"4084" + }, + "CRM:ACL_STATS:EGRESS:PORT":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"2", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:INGRESS:RIF":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"6", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:INGRESS:PORT":{ + "crm_stats_acl_table_used":"2", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"3", + "crm_stats_acl_group_used":"16" + }, + "CRM:ACL_STATS:INGRESS:LAG":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"3", + "crm_stats_acl_group_used":"8" + }, + "CRM:ACL_STATS:EGRESS:LAG":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"2", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:INGRESS:SWITCH":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"6", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:EGRESS:SWITCH":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"2", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:EGRESS:VLAN":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"2", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:EGRESS:RIF":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"2", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_TABLE_STATS:0x700000000063f":{ + "crm_stats_acl_counter_used":"0", + "crm_stats_acl_entry_used":"0", + "crm_stats_acl_counter_available":"2048", + "crm_stats_acl_entry_available":"2048" + }, + "CRM:ACL_TABLE_STATS:0x7000000000670":{ + "crm_stats_acl_counter_used":"0", + "crm_stats_acl_entry_used":"0", + "crm_stats_acl_counter_available":"1280", + "crm_stats_acl_entry_available":"1024" } } diff --git a/tests/mock_tables/asic1/config_db.json b/tests/mock_tables/asic1/config_db.json index 1ae3cff40b..691f7df7c9 100644 --- a/tests/mock_tables/asic1/config_db.json +++ b/tests/mock_tables/asic1/config_db.json @@ -76,5 +76,47 @@ "PFC_WD|GLOBAL": { "BIG_RED_SWITCH": "enable", "POLL_INTERVAL": "199" + }, + "CRM|Config": { + "acl_table_threshold_type": "percentage", + "nexthop_group_threshold_type": "percentage", + "fdb_entry_high_threshold": "85", + "acl_entry_threshold_type": "percentage", + "ipv6_neighbor_low_threshold": "70", + "nexthop_group_member_low_threshold": "70", + "acl_group_high_threshold": "85", + "ipv4_route_high_threshold": "85", + "acl_counter_high_threshold": "85", + "ipv4_route_low_threshold": "70", + "ipv4_route_threshold_type": "percentage", + "ipv4_neighbor_low_threshold": "70", + "acl_group_threshold_type": "percentage", + "ipv4_nexthop_high_threshold": "85", + "ipv6_route_threshold_type": "percentage", + "nexthop_group_low_threshold": "70", + "ipv4_neighbor_high_threshold": "85", + "ipv6_route_high_threshold": "85", + "ipv6_nexthop_threshold_type": "percentage", + "polling_interval": "300", + "ipv4_nexthop_threshold_type": "percentage", + "acl_group_low_threshold": "70", + "acl_entry_low_threshold": "70", + "nexthop_group_member_threshold_type": "percentage", + "ipv4_nexthop_low_threshold": "70", + "acl_counter_threshold_type": "percentage", + "ipv6_neighbor_high_threshold": "85", + "nexthop_group_member_high_threshold": "85", + "acl_table_low_threshold": "70", + "fdb_entry_threshold_type": "percentage", + "ipv6_neighbor_threshold_type": "percentage", + "acl_table_high_threshold": "85", + "ipv6_nexthop_low_threshold": "70", + "acl_counter_low_threshold": "70", + "ipv4_neighbor_threshold_type": "percentage", + "nexthop_group_high_threshold": "85", + "ipv6_route_low_threshold": "70", + "acl_entry_high_threshold": "85", + "fdb_entry_low_threshold": "70", + "ipv6_nexthop_high_threshold": "85" } } diff --git a/tests/mock_tables/asic1/counters_db.json b/tests/mock_tables/asic1/counters_db.json index 111912867f..b3c806cf17 100644 --- a/tests/mock_tables/asic1/counters_db.json +++ b/tests/mock_tables/asic1/counters_db.json @@ -869,5 +869,91 @@ }, "COUNTERS_DEBUG_NAME_SWITCH_STAT_MAP": { "DEBUG_1": "SAI_SWITCH_STAT_IN_DROP_REASON_RANGE_BASE" + }, + "CRM:STATS":{ + "crm_stats_ipv4_neighbor_used":"8", + "crm_stats_ipv4_route_available":"98246", + "crm_stats_nexthop_group_used":"0", + "crm_stats_ipv6_neighbor_used":"8", + "crm_stats_ipv6_nexthop_available":"49086", + "crm_stats_ipv4_nexthop_used":"8", + "crm_stats_ipv4_nexthop_available":"49086", + "crm_stats_nexthop_group_available":"512", + "crm_stats_nexthop_group_member_used":"0", + "crm_stats_nexthop_group_member_available":"16384", + "crm_stats_fdb_entry_used":"0", + "crm_stats_fdb_entry_available":"32767", + "crm_stats_ipv4_route_used":"58", + "crm_stats_ipv4_neighbor_available":"8168", + "crm_stats_ipv6_route_used":"60", + "crm_stats_ipv6_route_available":"16324", + "crm_stats_ipv6_nexthop_used":"8", + "crm_stats_ipv6_neighbor_available":"4084" + }, + "CRM:ACL_STATS:EGRESS:PORT":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"2", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:INGRESS:RIF":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"6", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:INGRESS:PORT":{ + "crm_stats_acl_table_used":"2", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"3", + "crm_stats_acl_group_used":"16" + }, + "CRM:ACL_STATS:INGRESS:LAG":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"3", + "crm_stats_acl_group_used":"8" + }, + "CRM:ACL_STATS:EGRESS:LAG":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"2", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:INGRESS:SWITCH":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"6", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:EGRESS:SWITCH":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"2", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:EGRESS:VLAN":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"2", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:EGRESS:RIF":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"2", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_TABLE_STATS:0x700000000063f":{ + "crm_stats_acl_counter_used":"0", + "crm_stats_acl_entry_used":"0", + "crm_stats_acl_counter_available":"2048", + "crm_stats_acl_entry_available":"2048" + }, + "CRM:ACL_TABLE_STATS:0x7000000000670":{ + "crm_stats_acl_counter_used":"0", + "crm_stats_acl_entry_used":"0", + "crm_stats_acl_counter_available":"1280", + "crm_stats_acl_entry_available":"1024" } } diff --git a/tests/mock_tables/config_db.json b/tests/mock_tables/config_db.json index a7e8041fbf..eeb72f74f6 100644 --- a/tests/mock_tables/config_db.json +++ b/tests/mock_tables/config_db.json @@ -1257,5 +1257,47 @@ }, "PFC_WD|GLOBAL": { "POLL_INTERVAL": "600" + }, + "CRM|Config": { + "acl_table_threshold_type": "percentage", + "nexthop_group_threshold_type": "percentage", + "fdb_entry_high_threshold": "85", + "acl_entry_threshold_type": "percentage", + "ipv6_neighbor_low_threshold": "70", + "nexthop_group_member_low_threshold": "70", + "acl_group_high_threshold": "85", + "ipv4_route_high_threshold": "85", + "acl_counter_high_threshold": "85", + "ipv4_route_low_threshold": "70", + "ipv4_route_threshold_type": "percentage", + "ipv4_neighbor_low_threshold": "70", + "acl_group_threshold_type": "percentage", + "ipv4_nexthop_high_threshold": "85", + "ipv6_route_threshold_type": "percentage", + "nexthop_group_low_threshold": "70", + "ipv4_neighbor_high_threshold": "85", + "ipv6_route_high_threshold": "85", + "ipv6_nexthop_threshold_type": "percentage", + "polling_interval": "300", + "ipv4_nexthop_threshold_type": "percentage", + "acl_group_low_threshold": "70", + "acl_entry_low_threshold": "70", + "nexthop_group_member_threshold_type": "percentage", + "ipv4_nexthop_low_threshold": "70", + "acl_counter_threshold_type": "percentage", + "ipv6_neighbor_high_threshold": "85", + "nexthop_group_member_high_threshold": "85", + "acl_table_low_threshold": "70", + "fdb_entry_threshold_type": "percentage", + "ipv6_neighbor_threshold_type": "percentage", + "acl_table_high_threshold": "85", + "ipv6_nexthop_low_threshold": "70", + "acl_counter_low_threshold": "70", + "ipv4_neighbor_threshold_type": "percentage", + "nexthop_group_high_threshold": "85", + "ipv6_route_low_threshold": "70", + "acl_entry_high_threshold": "85", + "fdb_entry_low_threshold": "70", + "ipv6_nexthop_high_threshold": "85" } } diff --git a/tests/mock_tables/counters_db.json b/tests/mock_tables/counters_db.json index 5636f27c1c..23e746a39d 100644 --- a/tests/mock_tables/counters_db.json +++ b/tests/mock_tables/counters_db.json @@ -1000,5 +1000,91 @@ }, "PERSISTENT_WATERMARKS:oid:0x18000000000b66": { "SAI_BUFFER_POOL_STAT_WATERMARK_BYTES": "4000" - } + }, + "CRM:STATS":{ + "crm_stats_ipv4_neighbor_used":"8", + "crm_stats_ipv4_route_available":"98246", + "crm_stats_nexthop_group_used":"0", + "crm_stats_ipv6_neighbor_used":"8", + "crm_stats_ipv6_nexthop_available":"49086", + "crm_stats_ipv4_nexthop_used":"8", + "crm_stats_ipv4_nexthop_available":"49086", + "crm_stats_nexthop_group_available":"512", + "crm_stats_nexthop_group_member_used":"0", + "crm_stats_nexthop_group_member_available":"16384", + "crm_stats_fdb_entry_used":"0", + "crm_stats_fdb_entry_available":"32767", + "crm_stats_ipv4_route_used":"58", + "crm_stats_ipv4_neighbor_available":"8168", + "crm_stats_ipv6_route_used":"60", + "crm_stats_ipv6_route_available":"16324", + "crm_stats_ipv6_nexthop_used":"8", + "crm_stats_ipv6_neighbor_available":"4084" + }, + "CRM:ACL_STATS:EGRESS:PORT":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"2", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:INGRESS:RIF":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"6", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:INGRESS:PORT":{ + "crm_stats_acl_table_used":"2", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"3", + "crm_stats_acl_group_used":"16" + }, + "CRM:ACL_STATS:INGRESS:LAG":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"3", + "crm_stats_acl_group_used":"8" + }, + "CRM:ACL_STATS:EGRESS:LAG":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"2", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:INGRESS:SWITCH":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"6", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:EGRESS:SWITCH":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"2", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:EGRESS:VLAN":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"2", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_STATS:EGRESS:RIF":{ + "crm_stats_acl_table_used":"0", + "crm_stats_acl_group_available":"232", + "crm_stats_acl_table_available":"2", + "crm_stats_acl_group_used":"0" + }, + "CRM:ACL_TABLE_STATS:0x700000000063f":{ + "crm_stats_acl_counter_used":"0", + "crm_stats_acl_entry_used":"0", + "crm_stats_acl_counter_available":"2048", + "crm_stats_acl_entry_available":"2048" + }, + "CRM:ACL_TABLE_STATS:0x7000000000670":{ + "crm_stats_acl_counter_used":"0", + "crm_stats_acl_entry_used":"0", + "crm_stats_acl_counter_available":"1280", + "crm_stats_acl_entry_available":"1024" + } }