From 500c150bf049421b74dd6bc6a3e55c3e2600cc62 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Mon, 23 Jun 2025 14:46:33 -0500 Subject: T7499: load from internal representation to avoid re-parsing --- python/vyos/vyconf_session.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/vyos/vyconf_session.py b/python/vyos/vyconf_session.py index 4a2e6e393..3f3f3957b 100644 --- a/python/vyos/vyconf_session.py +++ b/python/vyos/vyconf_session.py @@ -163,7 +163,9 @@ class VyconfSession: @raise_exception @config_mode - def load_config(self, file: str, migrate: bool = False) -> tuple[str, int]: + def load_config( + self, file: str, migrate: bool = False, cached: bool = False + ) -> tuple[str, int]: # pylint: disable=consider-using-with if migrate: tmp = tempfile.NamedTemporaryFile() @@ -178,7 +180,9 @@ class VyconfSession: else: tmp = '' - out = vyconf_client.send_request('load', token=self.__token, location=file) + out = vyconf_client.send_request( + 'load', token=self.__token, location=file, cached=cached + ) if tmp: tmp.close() -- cgit v1.2.3