diff options
| author | John Estabrook <jestabro@vyos.io> | 2025-09-10 20:56:48 -0500 |
|---|---|---|
| committer | John Estabrook <jestabro@vyos.io> | 2025-09-18 07:43:20 -0500 |
| commit | 563656a29d969a198d8c27eb1f718d0117d4fe99 (patch) | |
| tree | 753c416ffb4fd83246fa683067c86ddf207443d7 /python | |
| parent | b9dcbdeb8ba43618cb7d88583ac47b394ad81ae1 (diff) | |
| download | vyos-1x-563656a29d969a198d8c27eb1f718d0117d4fe99.tar.gz vyos-1x-563656a29d969a198d8c27eb1f718d0117d4fe99.zip | |
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.
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/vyconf_session.py | 26 |
1 files changed, 26 insertions, 0 deletions
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 @@ -142,6 +142,32 @@ class VyconfSession: 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]: if not self.session_changed(): |
