summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2022-11-02 14:28:51 -0500
committerGitHub <noreply@github.com>2022-11-02 14:28:51 -0500
commitf11b76ec56f9a94c4cfb435081c7b9a5986c060c (patch)
tree643871c3f5585f3c2437caeb7eb7beaf3b5a3390 /python
parentf2ec92a78c4ee2a35e7d071387460fc6ce360740 (diff)
parentdb0791238c9cccaf73aac61844a6c0293c513a54 (diff)
downloadvyos-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 'python')
-rw-r--r--python/vyos/opmode.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/vyos/opmode.py b/python/vyos/opmode.py
index 727e118a8..2e896c8e6 100644
--- a/python/vyos/opmode.py
+++ b/python/vyos/opmode.py
@@ -16,6 +16,7 @@
import re
import sys
import typing
+from humps import decamelize
class Error(Exception):
@@ -200,6 +201,7 @@ def run(module):
if not args["raw"]:
return res
else:
+ res = decamelize(res)
res = _normalize_field_names(res)
from json import dumps
return dumps(res, indent=4)