From bdb135fd82d1ea4fb3192fc20fb9a8f744c3163a Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Sat, 5 Oct 2024 18:13:38 +0200 Subject: [PATCH] cumulus_nvue: Don't call enable() and set enter_config_mode = False Let's stop using sudo for Cumulus NVUE since that's not needed. It blurs the configuration history with changes applied as root user. Closes-Bug: #2079916 Change-Id: Id1c8c93a5c0ced2a56bbcf0929c2fb8aea49b09a --- networking_generic_switch/devices/netmiko_devices/cumulus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/networking_generic_switch/devices/netmiko_devices/cumulus.py b/networking_generic_switch/devices/netmiko_devices/cumulus.py index 2547979a..94ef4937 100644 --- a/networking_generic_switch/devices/netmiko_devices/cumulus.py +++ b/networking_generic_switch/devices/netmiko_devices/cumulus.py @@ -171,9 +171,9 @@ def send_config_set(self, net_connect, cmd_set): :returns: The output of the configuration commands. """ cmd_set.append('nv config apply --assume-yes') - net_connect.enable() # NOTE: Do not exit config mode because save needs elevated # privileges return net_connect.send_config_set(config_commands=cmd_set, cmd_verify=False, + enter_config_mode=False, exit_config_mode=False)