diff options
author | Nataliia Solomko <natalirs1985@gmail.com> | 2024-08-13 13:15:15 +0300 |
---|---|---|
committer | Nataliia Solomko <natalirs1985@gmail.com> | 2024-08-13 13:15:15 +0300 |
commit | 27fb633bbe45321eecd8225c32a2fd16882633a9 (patch) | |
tree | 79a07fbda13c6694b43ea7337ef75f42a3194053 /python/vyos/configsession.py | |
parent | 7a546896cb971ede7e1003bd7d0ce1f0485cbd72 (diff) | |
download | vyos-1x-27fb633bbe45321eecd8225c32a2fd16882633a9.tar.gz vyos-1x-27fb633bbe45321eecd8225c32a2fd16882633a9.zip |
T5743: HTTPS API ability to import PKI certificates
Diffstat (limited to 'python/vyos/configsession.py')
-rw-r--r-- | python/vyos/configsession.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/python/vyos/configsession.py b/python/vyos/configsession.py index ccf2ce8f2..7d51b94e4 100644 --- a/python/vyos/configsession.py +++ b/python/vyos/configsession.py @@ -34,6 +34,9 @@ MIGRATE_LOAD_CONFIG = ['/usr/libexec/vyos/vyos-load-config.py'] SAVE_CONFIG = ['/usr/libexec/vyos/vyos-save-config.py'] INSTALL_IMAGE = ['/usr/libexec/vyos/op_mode/image_installer.py', '--action', 'add', '--no-prompt', '--image-path'] +IMPORT_PKI = ['/opt/vyatta/bin/vyatta-op-cmd-wrapper', 'import'] +IMPORT_PKI_NO_PROMPT = ['/usr/libexec/vyos/op_mode/pki.py', + '--action', 'import', '--no-prompt'] REMOVE_IMAGE = ['/usr/libexec/vyos/op_mode/image_manager.py', '--action', 'delete', '--no-prompt', '--image-name'] SET_DEFAULT_IMAGE = ['/usr/libexec/vyos/op_mode/image_manager.py', @@ -239,6 +242,14 @@ class ConfigSession(object): out = self.__run_command(REMOVE_IMAGE + [name]) return out + def import_pki(self, path): + out = self.__run_command(IMPORT_PKI + path) + return out + + def import_pki_no_prompt(self, path): + out = self.__run_command(IMPORT_PKI_NO_PROMPT + path) + return out + def set_default_image(self, name): out = self.__run_command(SET_DEFAULT_IMAGE + [name]) return out |