diff options
author | John Estabrook <jestabro@vyos.io> | 2022-11-02 14:28:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 14:28:51 -0500 |
commit | f11b76ec56f9a94c4cfb435081c7b9a5986c060c (patch) | |
tree | 643871c3f5585f3c2437caeb7eb7beaf3b5a3390 /src/services/api/graphql/session/session.py | |
parent | f2ec92a78c4ee2a35e7d071387460fc6ce360740 (diff) | |
parent | db0791238c9cccaf73aac61844a6c0293c513a54 (diff) | |
download | vyos-1x-f11b76ec56f9a94c4cfb435081c7b9a5986c060c.tar.gz vyos-1x-f11b76ec56f9a94c4cfb435081c7b9a5986c060c.zip |
Merge pull request #1636 from jestabro/standardize-op-mode-output
op-mode: T4791: consistent normalization of 'raw' output of op-mode scripts for CLI and API
Diffstat (limited to 'src/services/api/graphql/session/session.py')
-rw-r--r-- | src/services/api/graphql/session/session.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/services/api/graphql/session/session.py b/src/services/api/graphql/session/session.py index c2c1db1df..0b77b1433 100644 --- a/src/services/api/graphql/session/session.py +++ b/src/services/api/graphql/session/session.py @@ -25,6 +25,7 @@ from vyos.template import render from vyos.opmode import Error as OpModeError from api.graphql.libs.op_mode import load_op_mode_as_module, split_compound_op_mode_name +from api.graphql.libs.op_mode import normalize_output op_mode_include_file = os.path.join(directories['data'], 'op-mode-standardized.json') @@ -149,6 +150,8 @@ class Session: except OpModeError as e: raise e + res = normalize_output(res) + return res def gen_op_mutation(self): |