Skip to content

Commit 7e1b63b

Browse files
author
Naor Livne
committed
adding token based auth to the manager
1 parent e49da6a commit 7e1b63b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ freeze==1.0.10
88
idna==2.8
99
ipaddress==1.0.22
1010
kafka-python==1.4.4
11-
NebulaPythonSDK==2.2.0
11+
NebulaPythonSDK==2.2.1
1212
psutil==5.5.1
1313
requests==2.21.0
1414
retrying==1.3.3

worker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ def get_device_group_info(nebula_connection_object, device_group_to_get_info):
205205
# the following config variables are for configuring Nebula workers
206206
nebula_manager_auth_user = get_conf_setting("nebula_manager_auth_user", auth_file, None)
207207
nebula_manager_auth_password = get_conf_setting("nebula_manager_auth_password", auth_file, None)
208+
nebula_manager_auth_token = get_conf_setting("nebula_manager_auth_token", auth_file, None)
208209
nebula_manager_host = get_conf_setting("nebula_manager_host", auth_file)
209210
nebula_manager_port = int(get_conf_setting("nebula_manager_port", auth_file, "80"))
210211
nebula_manager_protocol = get_conf_setting("nebula_manager_protocol", auth_file, "http")
@@ -253,7 +254,7 @@ def get_device_group_info(nebula_connection_object, device_group_to_get_info):
253254
# login to the nebula manager
254255
nebula_connection = Nebula(username=nebula_manager_auth_user, password=nebula_manager_auth_password,
255256
host=nebula_manager_host, port=nebula_manager_port, protocol=nebula_manager_protocol,
256-
request_timeout=nebula_manager_request_timeout)
257+
request_timeout=nebula_manager_request_timeout, token=nebula_manager_auth_token)
257258

258259
# make sure the nebula manager connects properly
259260
try:

0 commit comments

Comments
 (0)