summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2024-10-18 15:42:59 +0300
committerNataliia Solomko <natalirs1985@gmail.com>2024-10-18 15:42:59 +0300
commit8943446c8c79c6daad2326ddc7a59950123b35d2 (patch)
treeeca41b73cac77d5bc6362f3f13d3b6adf531978c /python/vyos
parente5d2ac54150922640c08bacab124e96c7bbd1f7f (diff)
downloadvyos-1x-8943446c8c79c6daad2326ddc7a59950123b35d2.tar.gz
vyos-1x-8943446c8c79c6daad2326ddc7a59950123b35d2.zip
pki: T4914: Rewrite the PKI op mode in the new style
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/configsession.py3
-rw-r--r--python/vyos/opmode.py5
2 files changed, 5 insertions, 3 deletions
diff --git a/python/vyos/configsession.py b/python/vyos/configsession.py
index 9c56d246a..5876dc5b0 100644
--- a/python/vyos/configsession.py
+++ b/python/vyos/configsession.py
@@ -42,8 +42,7 @@ INSTALL_IMAGE = [
IMPORT_PKI = ['/opt/vyatta/bin/vyatta-op-cmd-wrapper', 'import']
IMPORT_PKI_NO_PROMPT = [
'/usr/libexec/vyos/op_mode/pki.py',
- '--action',
- 'import',
+ 'import_pki',
'--no-prompt',
]
REMOVE_IMAGE = [
diff --git a/python/vyos/opmode.py b/python/vyos/opmode.py
index 066c8058f..136ac35e2 100644
--- a/python/vyos/opmode.py
+++ b/python/vyos/opmode.py
@@ -89,7 +89,10 @@ class InternalError(Error):
def _is_op_mode_function_name(name):
- if re.match(r"^(show|clear|reset|restart|add|update|delete|generate|set|renew|release|execute)", name):
+ if re.match(
+ r'^(show|clear|reset|restart|add|update|delete|generate|set|renew|release|execute|import)',
+ name,
+ ):
return True
else:
return False