summaryrefslogtreecommitdiff
path: root/python/vyos/configsession.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-06-13 03:10:08 +0200
committerDaniil Baturin <daniil@baturin.org>2019-06-13 03:10:08 +0200
commit29df430906c830146e6cc9b7edda9be836a01837 (patch)
treea19cbab57765967717c4a9df97984f12a696f333 /python/vyos/configsession.py
parent6f42122bc4b8ae8a287f0350eba4d8cd2f5f9649 (diff)
downloadvyos-1x-29df430906c830146e6cc9b7edda9be836a01837.tar.gz
vyos-1x-29df430906c830146e6cc9b7edda9be836a01837.zip
T1431: make it possible to obtain session environment and run vyos.config functions under it.
This is required for programs running outside a CLI session, like the future API daemon.
Diffstat (limited to 'python/vyos/configsession.py')
-rw-r--r--python/vyos/configsession.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/vyos/configsession.py b/python/vyos/configsession.py
index b989d3be5..c84d80a77 100644
--- a/python/vyos/configsession.py
+++ b/python/vyos/configsession.py
@@ -69,6 +69,9 @@ class ConfigSession(object):
if result != 0:
raise ConfigSessionError(output)
+ def get_session_env(self):
+ return self.__session_env
+
def set(self, path, value=None):
if not value:
value = []