From 563656a29d969a198d8c27eb1f718d0117d4fe99 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Wed, 10 Sep 2025 20:56:48 -0500 Subject: T7737: add auxiliary set/delete functions Add methods to request auxiliary changes to the config file during a commit. Used only for non-actionable updates, for example removing a plaintext password and adding the encrypted password. --- python/vyos/vyconf_session.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'python') diff --git a/python/vyos/vyconf_session.py b/python/vyos/vyconf_session.py index 1f7f37663..379de4e24 100644 --- a/python/vyos/vyconf_session.py +++ b/python/vyos/vyconf_session.py @@ -141,6 +141,32 @@ class VyconfSession: out = vyconf_client.send_request('delete', token=self.__token, path=path) return self.output(out), out.status + @raise_exception + def aux_set( + self, path: list[str], script_name: str, tag_value: str = None + ) -> tuple[str, int]: + out = vyconf_client.send_request( + 'aux_set', + token=self.__token, + path=path, + script_name=script_name, + tag_value=tag_value, + ) + return self.output(out), out.status + + @raise_exception + def aux_delete( + self, path: list[str], script_name: str, tag_value: str = None + ) -> tuple[str, int]: + out = vyconf_client.send_request( + 'aux_delete', + token=self.__token, + path=path, + script_name=script_name, + tag_value=tag_value, + ) + return self.output(out), out.status + @raise_exception @config_mode def commit(self) -> tuple[str, int]: -- cgit v1.2.3