summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2024-08-14 13:20:46 +0300
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-08-15 07:23:03 +0000
commit316cdd5294f6de3dd5aef3a062e9877dd28d6773 (patch)
tree596a9d7a33ff17a0694263a3580929d80f727e73
parent8baa5b535430d1a14f16004174cb91f3e6d266ca (diff)
downloadvyos-1x-mergify/bp/sagitta/pr-3980.tar.gz
vyos-1x-mergify/bp/sagitta/pr-3980.zip
op_mode: T6651: Add a top level op mode word "execute"mergify/bp/sagitta/pr-3980
(cherry picked from commit 69ab44309d56d73d92c2f8a7b0b4ca3016e61ff6) # Conflicts: # src/opt/vyatta/etc/shell/level/users/allowed-op # src/opt/vyatta/etc/shell/level/users/allowed-op.in
-rw-r--r--op-mode-definitions/execute.xml.in8
-rw-r--r--python/vyos/opmode.py2
-rw-r--r--src/opt/vyatta/etc/shell/level/users/allowed-op21
-rw-r--r--src/opt/vyatta/etc/shell/level/users/allowed-op.in17
4 files changed, 47 insertions, 1 deletions
diff --git a/op-mode-definitions/execute.xml.in b/op-mode-definitions/execute.xml.in
new file mode 100644
index 000000000..66069c927
--- /dev/null
+++ b/op-mode-definitions/execute.xml.in
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="execute">
+ <properties>
+ <help>Initiate an operation</help>
+ </properties>
+ </node>
+</interfaceDefinition> \ No newline at end of file
diff --git a/python/vyos/opmode.py b/python/vyos/opmode.py
index b52da9d4e..55213c453 100644
--- a/python/vyos/opmode.py
+++ b/python/vyos/opmode.py
@@ -81,7 +81,7 @@ 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)", name):
+ if re.match(r"^(show|clear|reset|restart|add|update|delete|generate|set|renew|release|execute)", name):
return True
else:
return False
diff --git a/src/opt/vyatta/etc/shell/level/users/allowed-op b/src/opt/vyatta/etc/shell/level/users/allowed-op
new file mode 100644
index 000000000..381fd26e5
--- /dev/null
+++ b/src/opt/vyatta/etc/shell/level/users/allowed-op
@@ -0,0 +1,21 @@
+c
+cl
+cle
+clea
+clear
+connect
+delete
+disconnect
+execute
+exit
+force
+monitor
+ping
+reset
+release
+renew
+set
+show
+telnet
+traceroute
+update
diff --git a/src/opt/vyatta/etc/shell/level/users/allowed-op.in b/src/opt/vyatta/etc/shell/level/users/allowed-op.in
new file mode 100644
index 000000000..9752f99a2
--- /dev/null
+++ b/src/opt/vyatta/etc/shell/level/users/allowed-op.in
@@ -0,0 +1,17 @@
+clear
+connect
+delete
+disconnect
+execute
+exit
+force
+monitor
+ping
+reset
+release
+renew
+set
+show
+telnet
+traceroute
+update