summaryrefslogtreecommitdiff
path: root/src/services/api/graphql/generate
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2022-11-21 12:45:46 -0600
committerJohn Estabrook <jestabro@vyos.io>2022-11-21 15:03:54 -0600
commit3d4dedd6709760ebf7bb9cff2b1a22ab5b212532 (patch)
tree176934f50b9b1a34be6739c1b54e2065dccfc2b8 /src/services/api/graphql/generate
parent827f2b223d703539101c60e265b360c987d9c3da (diff)
downloadvyos-1x-3d4dedd6709760ebf7bb9cff2b1a22ab5b212532.tar.gz
vyos-1x-3d4dedd6709760ebf7bb9cff2b1a22ab5b212532.zip
graphql: T4544: use load_as_module from vyos.util
load_as_module was added to util.py for T4821; prefer over local copy
Diffstat (limited to 'src/services/api/graphql/generate')
-rwxr-xr-xsrc/services/api/graphql/generate/schema_from_op_mode.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/services/api/graphql/generate/schema_from_op_mode.py b/src/services/api/graphql/generate/schema_from_op_mode.py
index 1fd198a37..fc63b0100 100755
--- a/src/services/api/graphql/generate/schema_from_op_mode.py
+++ b/src/services/api/graphql/generate/schema_from_op_mode.py
@@ -25,15 +25,16 @@ from inspect import signature, getmembers, isfunction, isclass, getmro
from jinja2 import Template
from vyos.defaults import directories
+from vyos.util import load_as_module
if __package__ is None or __package__ == '':
sys.path.append("/usr/libexec/vyos/services/api")
- from graphql.libs.op_mode import load_as_module, is_op_mode_function_name, is_show_function_name
+ from graphql.libs.op_mode import is_op_mode_function_name, is_show_function_name
from graphql.libs.op_mode import snake_to_pascal_case, map_type_name
from vyos.config import Config
from vyos.configdict import dict_merge
from vyos.xml import defaults
else:
- from .. libs.op_mode import load_as_module, is_op_mode_function_name, is_show_function_name
+ from .. libs.op_mode import is_op_mode_function_name, is_show_function_name
from .. libs.op_mode import snake_to_pascal_case, map_type_name
from .. import state