summaryrefslogtreecommitdiff
path: root/src/services/api/graphql/recipes
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2021-11-29 11:27:40 -0600
committerJohn Estabrook <jestabro@vyos.io>2021-11-30 10:43:29 -0600
commita17f8caf10a3e19f52f41e45ab3f28d12f460858 (patch)
treedb429905f6e92349851b197b1c6977018f07d36d /src/services/api/graphql/recipes
parent62e52d071610945bc3c9b8ca803d8ba1a5499876 (diff)
downloadvyos-1x-a17f8caf10a3e19f52f41e45ab3f28d12f460858.tar.gz
vyos-1x-a17f8caf10a3e19f52f41e45ab3f28d12f460858.zip
graphql: T3993: add op-mode requests
(cherry picked from commit 1f926e1b1fe7d82113be55916a55ca7e3cceac76)
Diffstat (limited to 'src/services/api/graphql/recipes')
-rw-r--r--src/services/api/graphql/recipes/session.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/services/api/graphql/recipes/session.py b/src/services/api/graphql/recipes/session.py
index b96cc1753..c6c3209c0 100644
--- a/src/services/api/graphql/recipes/session.py
+++ b/src/services/api/graphql/recipes/session.py
@@ -63,3 +63,15 @@ class Session(object):
session.commit()
except Exception as error:
raise error
+
+ def show(self):
+ session = self._session
+ data = self._data
+ out = ''
+
+ try:
+ out = session.show(data['path'])
+ except Exception as error:
+ raise error
+
+ return out