sonic-utilities icon indicating copy to clipboard operation
sonic-utilities copied to clipboard

ConfigMgmt has default verbose print (low priority)

Open wen587 opened this issue 2 years ago • 0 comments

Description

ConfigMgmt has too many verbose output. It needs to be shortened.

Steps to reproduce the issue

  1. call a function below
def validate_config_by_yang(sy, config_json, jname):
    tmp_config_json = copy.deepcopy(config_json)
    cm = ConfigMgmt()
    try:
        cm.loadData(tmp_config_json)
        cm.validateConfigData():
    except Exception as ex:
         click.secho("Failed to validate {}. Error: {}".format(jname, ex), fg="magenta")
         sys.exit(1)

Describe the results you received

    sonic_yang(6):Note: Below table(s) have no YANG models: CONSOLE_SWITCH, DEVICE_NEIGHBOR_METADATA, DHCP_SERVER, RESTAPI, SNMP, SNMP_COMMUNITY
    libyang[0]: Invalid value "denable" in "synchronous_mode" element. (path: /sonic-device_metadata:sonic-device_metadata/DEVICE_METADATA/localhost/synchronous_mode)
    sonic_yang(3):Data Loading Failed:Invalid value "denable" in "synchronous_mode" element.

    Failed to validate config_input. Error: Data Loading Failed
    Invalid value "denable" in "synchronous_mode" element.

Describe the results you expected

    Failed to validate config_input. Error: Data Loading Failed
    Invalid value "denable" in "synchronous_mode" element.

Additional information you deem important (e.g. issue happens only occasionally)

Output of show version

SONiC Software Version: SONiC.master.120126-23dffe596
Distribution: Debian 11.3
Kernel: 5.10.0-12-2-amd64
Build commit: 23dffe596
Build date: Sat Jul  9 07:56:54 UTC 2022
Built by: AzDevOps@sonic-build-workers-001QSK

Platform: x86_64-kvm_x86_64-r0
HwSKU: Force10-S6000
ASIC: vs
ASIC Count: 1
Serial Number: N/A
Model Number: N/A
Hardware Revision: N/A
Uptime: 06:38:18 up 10 days,  4:46,  1 user,  load average: 0.12, 0.13, 0.10
Date: Fri 19 Aug 2022 06:38:18

wen587 avatar Aug 19 '22 06:08 wen587