summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--op-mode-definitions/show-system.xml.in4
-rwxr-xr-xsrc/op_mode/config_mgmt.py10
-rw-r--r--src/services/api/graphql/graphql/mutations.py3
-rw-r--r--src/services/api/graphql/graphql/queries.py3
4 files changed, 9 insertions, 11 deletions
diff --git a/op-mode-definitions/show-system.xml.in b/op-mode-definitions/show-system.xml.in
index 746601f43..85bfdcdba 100644
--- a/op-mode-definitions/show-system.xml.in
+++ b/op-mode-definitions/show-system.xml.in
@@ -29,13 +29,13 @@
<properties>
<help>Compare config file revisions</help>
</properties>
- <command>${vyos_op_scripts_dir}/config_mgmt.py show_commit_diff --rev "$5" --revb "$7"</command>
+ <command>${vyos_op_scripts_dir}/config_mgmt.py show_commit_diff --rev "$5" --rev2 "$7"</command>
<children>
<leafNode name="commands">
<properties>
<help>Compare config file revision commands</help>
</properties>
- <command>${vyos_op_scripts_dir}/config_mgmt.py show_commit_diff --rev "$5" --revb "$7" --commands</command>
+ <command>${vyos_op_scripts_dir}/config_mgmt.py show_commit_diff --rev "$5" --rev2 "$7" --commands</command>
</leafNode>
</children>
</tagNode>
diff --git a/src/op_mode/config_mgmt.py b/src/op_mode/config_mgmt.py
index 0ffb1468b..66de26d1f 100755
--- a/src/op_mode/config_mgmt.py
+++ b/src/op_mode/config_mgmt.py
@@ -20,17 +20,17 @@ import typing
import vyos.opmode
from vyos.config_mgmt import ConfigMgmt
-def show_commit_diff(raw: bool, rev: int, revb: typing.Optional[int],
+def show_commit_diff(raw: bool, rev: int, rev2: typing.Optional[int],
commands: bool):
config_mgmt = ConfigMgmt()
- config_diff = config_mgmt.show_commit_diff(rev, revb, commands)
+ config_diff = config_mgmt.show_commit_diff(rev, rev2, commands)
if raw:
- revb = (rev+1) if revb is None else revb
+ rev2 = (rev+1) if rev2 is None else rev2
if commands:
- d = {f'config_command_diff_{revb}_{rev}': config_diff}
+ d = {f'config_command_diff_{rev2}_{rev}': config_diff}
else:
- d = {f'config_file_diff_{revb}_{rev}': config_diff}
+ d = {f'config_file_diff_{rev2}_{rev}': config_diff}
return d
return config_diff
diff --git a/src/services/api/graphql/graphql/mutations.py b/src/services/api/graphql/graphql/mutations.py
index 87ea59c43..8254e22b1 100644
--- a/src/services/api/graphql/graphql/mutations.py
+++ b/src/services/api/graphql/graphql/mutations.py
@@ -15,7 +15,7 @@
from importlib import import_module
from typing import Any, Dict, Optional
-from ariadne import ObjectType, convert_kwargs_to_snake_case, convert_camel_case_to_snake
+from ariadne import ObjectType, convert_camel_case_to_snake
from graphql import GraphQLResolveInfo
from makefun import with_signature
@@ -45,7 +45,6 @@ def make_mutation_resolver(mutation_name, class_name, session_func):
func_sig = '(obj: Any, info: GraphQLResolveInfo, data: Optional[Dict]=None)'
@mutation.field(mutation_name)
- @convert_kwargs_to_snake_case
@with_signature(func_sig, func_name=resolver_name)
async def func_impl(*args, **kwargs):
try:
diff --git a/src/services/api/graphql/graphql/queries.py b/src/services/api/graphql/graphql/queries.py
index 1ad586428..daccc19b2 100644
--- a/src/services/api/graphql/graphql/queries.py
+++ b/src/services/api/graphql/graphql/queries.py
@@ -15,7 +15,7 @@
from importlib import import_module
from typing import Any, Dict, Optional
-from ariadne import ObjectType, convert_kwargs_to_snake_case, convert_camel_case_to_snake
+from ariadne import ObjectType, convert_camel_case_to_snake
from graphql import GraphQLResolveInfo
from makefun import with_signature
@@ -45,7 +45,6 @@ def make_query_resolver(query_name, class_name, session_func):
func_sig = '(obj: Any, info: GraphQLResolveInfo, data: Optional[Dict]=None)'
@query.field(query_name)
- @convert_kwargs_to_snake_case
@with_signature(func_sig, func_name=resolver_name)
async def func_impl(*args, **kwargs):
try: