|
26 | 26 | AUTO_TECHSUPPORT
|
27 | 27 | Description: AUTO_TECHSUPPORT part of config_db.json
|
28 | 28 |
|
29 |
| -+-----------------------+----------------------------------------------------+-------------+-----------+-------------+ |
30 |
| -| Field | Description | Mandatory | Default | Reference | |
31 |
| -+=======================+====================================================+=============+===========+=============+ |
32 |
| -| state | Knob to make techsupport invocation event-driven | | | | |
33 |
| -| | based on core-dump generation | | | | |
34 |
| -+-----------------------+----------------------------------------------------+-------------+-----------+-------------+ |
35 |
| -| rate_limit_interval | Minimum time in seconds between two successive | | | | |
36 |
| -| | techsupport invocations. Configure 0 to explicitly | | | | |
37 |
| -| | disable | | | | |
38 |
| -+-----------------------+----------------------------------------------------+-------------+-----------+-------------+ |
39 |
| -| max_techsupport_limit | Max Limit in percentage for the cummulative size | | | | |
40 |
| -| | of ts dumps. No cleanup is performed if the value | | | | |
41 |
| -| | isn't configured or is 0.0 | | | | |
42 |
| -+-----------------------+----------------------------------------------------+-------------+-----------+-------------+ |
43 |
| -| max_core_limit | Max Limit in percentage for the cummulative size | | | | |
44 |
| -| | of core dumps. No cleanup is performed if the | | | | |
45 |
| -| | value isn't congiured or is 0.0 | | | | |
46 |
| -+-----------------------+----------------------------------------------------+-------------+-----------+-------------+ |
47 |
| -| since | Only collect the logs & core-dumps generated since | | | | |
48 |
| -| | the time provided. A default value of '2 days ago' | | | | |
49 |
| -| | is used if this value is not set explicitly or a | | | | |
50 |
| -| | non-valid string is provided | | | | |
51 |
| -+-----------------------+----------------------------------------------------+-------------+-----------+-------------+ |
| 29 | ++-------------------------+----------------------------------------------------+-------------+-----------+-------------+ |
| 30 | +| Field | Description | Mandatory | Default | Reference | |
| 31 | ++=========================+====================================================+=============+===========+=============+ |
| 32 | +| state | Knob to make techsupport invocation event-driven | | | | |
| 33 | +| | based on core-dump generation | | | | |
| 34 | ++-------------------------+----------------------------------------------------+-------------+-----------+-------------+ |
| 35 | +| rate_limit_interval | Minimum time in seconds between two successive | | | | |
| 36 | +| | techsupport invocations. Configure 0 to explicitly | | | | |
| 37 | +| | disable | | | | |
| 38 | ++-------------------------+----------------------------------------------------+-------------+-----------+-------------+ |
| 39 | +| max_techsupport_limit | Max Limit in percentage for the cummulative size | | | | |
| 40 | +| | of ts dumps. No cleanup is performed if the value | | | | |
| 41 | +| | isn't configured or is 0.0 | | | | |
| 42 | ++-------------------------+----------------------------------------------------+-------------+-----------+-------------+ |
| 43 | +| max_core_limit | Max Limit in percentage for the cummulative size | | | | |
| 44 | +| | of core dumps. No cleanup is performed if the | | | | |
| 45 | +| | value isn't congiured or is 0.0 | | | | |
| 46 | ++-------------------------+----------------------------------------------------+-------------+-----------+-------------+ |
| 47 | +| available_mem_threshold | Memory threshold; 0 to disable techsupport | | 10.0 | | |
| 48 | +| | invocation on memory usage threshold crossing | | | | |
| 49 | ++-------------------------+----------------------------------------------------+-------------+-----------+-------------+ |
| 50 | +| min_available_mem | Minimum Free memory (in MB) that should be | | 200 | | |
| 51 | +| | available for the techsupport execution to start | | | | |
| 52 | ++-------------------------+----------------------------------------------------+-------------+-----------+-------------+ |
| 53 | +| since | Only collect the logs & core-dumps generated since | | | | |
| 54 | +| | the time provided. A default value of '2 days ago' | | | | |
| 55 | +| | is used if this value is not set explicitly or a | | | | |
| 56 | +| | non-valid string is provided | | | | |
| 57 | ++-------------------------+----------------------------------------------------+-------------+-----------+-------------+ |
52 | 58 |
|
53 | 59 | """
|
54 | 60 |
|
@@ -117,7 +123,7 @@ class TestCfgHelp(TestCase):
|
117 | 123 |
|
118 | 124 | def setUp(self):
|
119 | 125 | self.test_dir = os.path.dirname(os.path.realpath(__file__))
|
120 |
| - self.script_file = 'python ' + os.path.join(self.test_dir, '..', 'sonic-cfg-help') |
| 126 | + self.script_file = os.path.join(self.test_dir, '..', 'sonic-cfg-help') |
121 | 127 |
|
122 | 128 | def run_script(self, argument):
|
123 | 129 | print('\n Running sonic-cfg-help ' + argument)
|
@@ -150,17 +156,15 @@ def test_single_field(self):
|
150 | 156 | def test_leaf_list(self):
|
151 | 157 | argument = '-t PORTCHANNEL -f members'
|
152 | 158 | output = self.run_script(argument)
|
153 |
| - print(output) |
154 | 159 | self.assertEqual(output, portchannel_table_field_output)
|
155 | 160 |
|
156 | 161 | def test_leaf_list_map(self):
|
157 | 162 | argument = '-t DSCP_TO_TC_MAP'
|
158 | 163 | output = self.run_script(argument)
|
159 |
| - print(output) |
| 164 | + self.maxDiff = None |
160 | 165 | self.assertEqual(output, dscp_to_tc_table_field_output)
|
161 | 166 |
|
162 | 167 | def test_when_condition(self):
|
163 | 168 | argument = '-t ACL_RULE -f ICMP_TYPE'
|
164 | 169 | output = self.run_script(argument)
|
165 |
| - print(output) |
166 | 170 | self.assertEqual(output, acl_rule_table_field_output)
|
0 commit comments