Skip to content

Commit

Permalink
Merge branch 'develop' into feat/proxy-component
Browse files Browse the repository at this point in the history
  • Loading branch information
hetangmodi-crest authored Dec 13, 2024
2 parents 2d6ac73 + 78e5d7a commit d2bfe29
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
5 changes: 3 additions & 2 deletions splunk_add_on_ucc_framework/templates/oauth.template
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ logger = log.Logs().get_logger('{{app_name|lower}}_rh_oauth2_token')
# Map for available proxy type
_PROXY_TYPE_MAP = {
'http': socks.PROXY_TYPE_HTTP,
# comment the below line if your add-on is not compatible with 'http_no_tunnel' protocol
'http_no_tunnel': socks.PROXY_TYPE_HTTP_NO_TUNNEL,
'socks4': socks.PROXY_TYPE_SOCKS4,
'socks5': socks.PROXY_TYPE_SOCKS5,
Expand All @@ -40,7 +41,7 @@ class {{app_name | lower}}_rh_oauth2_token(admin.MConfigHandler):
"""

def __init__(self, *args, **kwargs):
super().__init__(self, *args, **kwargs)
super().__init__(*args, **kwargs)
session_key = self.getSessionKey()
log_level = conf_manager.get_log_level(
logger=logger,
Expand All @@ -50,7 +51,7 @@ class {{app_name | lower}}_rh_oauth2_token(admin.MConfigHandler):
log_stanza="{{log_stanza}}",
log_level_field="{{log_level_field}}"
)
logger.set_level(log_level)
log.Logs().set_level(log_level)

def setup(self):
if self.requestedAction == admin.ACTION_EDIT:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
# Map for available proxy type
_PROXY_TYPE_MAP = {
'http': socks.PROXY_TYPE_HTTP,
# comment the below line if your add-on is not compatible with 'http_no_tunnel' protocol
'http_no_tunnel': socks.PROXY_TYPE_HTTP_NO_TUNNEL,
'socks4': socks.PROXY_TYPE_SOCKS4,
'socks5': socks.PROXY_TYPE_SOCKS5,
Expand All @@ -40,7 +41,7 @@ class splunk_ta_uccexample_rh_oauth2_token(admin.MConfigHandler):
"""

def __init__(self, *args, **kwargs):
super().__init__(self, *args, **kwargs)
super().__init__(*args, **kwargs)
session_key = self.getSessionKey()
log_level = conf_manager.get_log_level(
logger=logger,
Expand All @@ -50,7 +51,7 @@ def __init__(self, *args, **kwargs):
log_stanza="logging",
log_level_field="loglevel"
)
logger.set_level(log_level)
log.Logs().set_level(log_level)

def setup(self):
if self.requestedAction == admin.ACTION_EDIT:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
# Map for available proxy type
_PROXY_TYPE_MAP = {
'http': socks.PROXY_TYPE_HTTP,
# comment the below line if your add-on is not compatible with 'http_no_tunnel' protocol
'http_no_tunnel': socks.PROXY_TYPE_HTTP_NO_TUNNEL,
'socks4': socks.PROXY_TYPE_SOCKS4,
'socks5': socks.PROXY_TYPE_SOCKS5,
Expand All @@ -40,7 +41,7 @@ class splunk_ta_uccexample_rh_oauth2_token(admin.MConfigHandler):
"""

def __init__(self, *args, **kwargs):
super().__init__(self, *args, **kwargs)
super().__init__(*args, **kwargs)
session_key = self.getSessionKey()
log_level = conf_manager.get_log_level(
logger=logger,
Expand All @@ -50,7 +51,7 @@ def __init__(self, *args, **kwargs):
log_stanza="logging",
log_level_field="loglevel"
)
logger.set_level(log_level)
log.Logs().set_level(log_level)

def setup(self):
if self.requestedAction == admin.ACTION_EDIT:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
splunktaucclib
httplib2

0 comments on commit d2bfe29

Please sign in to comment.