summaryrefslogtreecommitdiff
path: root/src/conf_mode/http-api.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2022-03-27 11:47:15 +0300
committerGitHub <noreply@github.com>2022-03-27 11:47:15 +0300
commit34814e576adbe6aa3e863b6fd7404dbe54cdba55 (patch)
treeaeaa3a023617707d2593db603acecf64fdbe83ab /src/conf_mode/http-api.py
parent6ad04c53e296cbc445474f1dcb0ceaba64af47f9 (diff)
parent3665d9f8dc9435b70084a5c185fb8bd27023fa4c (diff)
downloadvyos-1x-34814e576adbe6aa3e863b6fd7404dbe54cdba55.tar.gz
vyos-1x-34814e576adbe6aa3e863b6fd7404dbe54cdba55.zip
Merge pull request #1254 from jestabro/eq-gql-test-node
graphql: T3993: add unsettable gql option; this is not exposed by CLI
Diffstat (limited to 'src/conf_mode/http-api.py')
-rwxr-xr-xsrc/conf_mode/http-api.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/conf_mode/http-api.py b/src/conf_mode/http-api.py
index b5f5e919f..00f3d4f7f 100755
--- a/src/conf_mode/http-api.py
+++ b/src/conf_mode/http-api.py
@@ -66,6 +66,15 @@ def get_config(config=None):
if conf.exists('debug'):
http_api['debug'] = True
+ # this node is not available by CLI by default, and is reserved for
+ # the graphql tools. One can enable it for testing, with the warning
+ # that this will open an unauthenticated server. To do so
+ # mkdir /opt/vyatta/share/vyatta-cfg/templates/service/https/api/gql
+ # touch /opt/vyatta/share/vyatta-cfg/templates/service/https/api/gql/node.def
+ # and configure; editing the config alone is insufficient.
+ if conf.exists('gql'):
+ http_api['gql'] = True
+
if conf.exists('socket'):
http_api['socket'] = True