Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[yang]Fixing sonic-cfg-help to handle nested container (sonic-net#17260)
Why I did it Fixing sonic-cfg-help to handle nested container scenario. In case of nested container, the inner container name acts as key for the table. For e.g. "AUTO_TECHSUPPORT": { "GLOBAL": { } } Previous output AUTO_TECHSUPPORT Description: AUTO_TECHSUPPORT part of config_db.json +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | Field | Description | Mandatory | Default | Reference | +=========================+====================================================+=============+===========+=============+ | state | Knob to make techsupport invocation event-driven | | | | | | based on core-dump generation | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | rate_limit_interval | Minimum time in seconds between two successive | | | | | | techsupport invocations. Configure 0 to explicitly | | | | | | disable | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | max_techsupport_limit | Max Limit in percentage for the cummulative size | | | | | | of ts dumps. No cleanup is performed if the value | | | | | | isn't configured or is 0.0 | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | max_core_limit | Max Limit in percentage for the cummulative size | | | | | | of core dumps. No cleanup is performed if the | | | | | | value isn't congiured or is 0.0 | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | available_mem_threshold | Memory threshold; 0 to disable techsupport | | 10.0 | | | | invocation on memory usage threshold crossing | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | min_available_mem | Minimum Free memory (in MB) that should be | | 200 | | | | available for the techsupport execution to start | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | since | Only collect the logs & core-dumps generated since | | | | | | the time provided. A default value of '2 days ago' | | | | | | is used if this value is not set explicitly or a | | | | | | non-valid string is provided | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ New output AUTO_TECHSUPPORT Description: AUTO_TECHSUPPORT part of config_db.json key - GLOBAL +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | Field | Description | Mandatory | Default | Reference | +=========================+====================================================+=============+===========+=============+ | state | Knob to make techsupport invocation event-driven | | | | | | based on core-dump generation | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | rate_limit_interval | Minimum time in seconds between two successive | | | | | | techsupport invocations. Configure 0 to explicitly | | | | | | disable | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | max_techsupport_limit | Max Limit in percentage for the cummulative size | | | | | | of ts dumps. No cleanup is performed if the value | | | | | | isn't configured or is 0.0 | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | max_core_limit | Max Limit in percentage for the cummulative size | | | | | | of core dumps. No cleanup is performed if the | | | | | | value isn't congiured or is 0.0 | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | available_mem_threshold | Memory threshold; 0 to disable techsupport | | 10.0 | | | | invocation on memory usage threshold crossing | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | min_available_mem | Minimum Free memory (in MB) that should be | | 200 | | | | available for the techsupport execution to start | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | since | Only collect the logs & core-dumps generated since | | | | | | the time provided. A default value of '2 days ago' | | | | | | is used if this value is not set explicitly or a | | | | | | non-valid string is provided | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ Work item tracking Microsoft ADO (number only): How I did it Fixing sonic-cfg-help tool to handle nested container How to verify it Added UT to verify it.
- Loading branch information