From 894aa52dce4f92cb42de8f0b0c1c460e9fa1d87d Mon Sep 17 00:00:00 2001 From: bryan1978 Date: Thu, 24 Aug 2023 06:17:12 +0000 Subject: [PATCH] apply: Fix yang model checking failed for MGMT_PORT #2601 [storm_control] CLI show error when trying to show the configuration with the specified interface #2729 --- config/main.py | 1 + show/main.py | 1 + 2 files changed, 2 insertions(+) diff --git a/config/main.py b/config/main.py index 004b40bd..1e903735 100644 --- a/config/main.py +++ b/config/main.py @@ -4351,6 +4351,7 @@ def add(ctx, interface_name, ip_addr, gw): config_db.set_entry("MGMT_INTERFACE", (interface_name, str(ip_address)), {"NULL": "NULL"}) else: config_db.set_entry("MGMT_INTERFACE", (interface_name, str(ip_address)), {"gwaddr": gw}) + config_db.set_entry("MGMT_PORT", interface_name, {"admin_status": "up", "alias": interface_name}) return diff --git a/show/main.py b/show/main.py index b206b486..0c7956a4 100755 --- a/show/main.py +++ b/show/main.py @@ -457,6 +457,7 @@ def storm_control(ctx, namespace, display): click.echo(tabulate(body, header, tablefmt="grid")) @storm_control.command('interface') +@multi_asic_util.multi_asic_click_options @click.argument('interface', metavar='',required=True) def interface(interface, namespace, display): if multi_asic.is_multi_asic() and namespace not in multi_asic.get_namespace_list():