diff options
author | John Estabrook <jestabro@vyos.io> | 2025-06-23 14:46:33 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2025-07-08 08:26:11 -0500 |
commit | 500c150bf049421b74dd6bc6a3e55c3e2600cc62 (patch) | |
tree | deb5bdbf38281b3acbb21421f907b59e4450e0d4 /python | |
parent | 8e84c690e59fc27d601c24261442ce34e00af1f2 (diff) | |
download | vyos-1x-500c150bf049421b74dd6bc6a3e55c3e2600cc62.tar.gz vyos-1x-500c150bf049421b74dd6bc6a3e55c3e2600cc62.zip |
T7499: load from internal representation to avoid re-parsing
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/vyconf_session.py | 8 |
1 files changed, 6 insertions, 2 deletions
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() |