diff options
author | John Estabrook <jestabro@vyos.io> | 2022-10-07 13:55:21 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2022-10-07 15:02:13 -0500 |
commit | 76c9a376c7d4fbb46f8882a1ce42dd7a6c0fa85a (patch) | |
tree | 6b523604d51b4c16e0c8693353ec57650d163022 /src/services/api/graphql/session | |
parent | 5f81ced8d57d3e315252abc58e777ff946ccf494 (diff) | |
download | vyos-1x-76c9a376c7d4fbb46f8882a1ce42dd7a6c0fa85a.tar.gz vyos-1x-76c9a376c7d4fbb46f8882a1ce42dd7a6c0fa85a.zip |
graphql: T4738: remove templated requests pending rewrite
Diffstat (limited to 'src/services/api/graphql/session')
-rw-r--r-- | src/services/api/graphql/session/session.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/services/api/graphql/session/session.py b/src/services/api/graphql/session/session.py index 61dd3ed1b..f990e63d0 100644 --- a/src/services/api/graphql/session/session.py +++ b/src/services/api/graphql/session/session.py @@ -45,40 +45,6 @@ class Session: except Exception: self._op_mode_list = None - def configure(self): - session = self._session - data = self._data - func_base_name = self._name - - tmpl_file = f'{func_base_name}.tmpl' - cmd_file = f'/tmp/{func_base_name}.cmds' - tmpl_dir = directories['api_templates'] - - try: - render(cmd_file, tmpl_file, data, location=tmpl_dir) - commands = [] - with open(cmd_file) as f: - lines = f.readlines() - for line in lines: - commands.append(line.split()) - for cmd in commands: - if cmd[0] == 'set': - session.set(cmd[1:]) - elif cmd[0] == 'delete': - session.delete(cmd[1:]) - else: - raise ValueError('Operation must be "set" or "delete"') - session.commit() - except Exception as error: - raise error - - def delete_path_if_childless(self, path): - session = self._session - config = Config(session.get_session_env()) - if not config.list_nodes(path): - session.delete(path) - session.commit() - def show_config(self): session = self._session data = self._data |