summaryrefslogtreecommitdiff
path: root/src/services/api/graphql/recipes/session.py
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:01:00 -0600
commit1f926e1b1fe7d82113be55916a55ca7e3cceac76 (patch)
tree5a6e33ef92d386698f7eda08cb2944a148007b06 /src/services/api/graphql/recipes/session.py
parent18c10000a92904050572b2f785ac1686ff6d7d5b (diff)
downloadvyos-1x-1f926e1b1fe7d82113be55916a55ca7e3cceac76.tar.gz
vyos-1x-1f926e1b1fe7d82113be55916a55ca7e3cceac76.zip
graphql: T3993: add op-mode requests
Diffstat (limited to 'src/services/api/graphql/recipes/session.py')
-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