Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _migrate(self):
internal_endpoint = self.endpoint.internal_endpoint
if not (internal_endpoint.endswith('settings') or
internal_endpoint.endswith('account')):
return
splunkd_info = urlparse(get_splunkd_uri())
self.base_app_name = util.get_base_app_name()
self.conf_mgr = ConfManager(
self.getSessionKey(),
self.base_app_name,
scheme=splunkd_info.scheme,
host=splunkd_info.hostname,
port=splunkd_info.port,
)
self.client = SplunkRestClient(
self.getSessionKey(),
self.base_app_name,
scheme=splunkd_info.scheme,
host=splunkd_info.hostname,
port=splunkd_info.port,
)
self.legacy_passwords = None
def _migrate(self):
internal_endpoint = self.endpoint.internal_endpoint
if not (internal_endpoint.endswith('settings') or
internal_endpoint.endswith('account')):
return
splunkd_info = urlparse(get_splunkd_uri())
self.base_app_name = util.get_base_app_name()
self.conf_mgr = ConfManager(
self.getSessionKey(),
self.base_app_name,
scheme=splunkd_info.scheme,
host=splunkd_info.hostname,
port=splunkd_info.port,
)
self.client = SplunkRestClient(
self.getSessionKey(),
self.base_app_name,
scheme=splunkd_info.scheme,
host=splunkd_info.hostname,
port=splunkd_info.port,
)
self.legacy_passwords = None
def __init__(self, *args, **kwargs):
# use classic inheritance to be compatible for
# old version of Splunk private SDK
admin.MConfigHandler.__init__(
self,
*args,
**kwargs
)
self.handler = RestHandler(
get_splunkd_uri(),
self.getSessionKey(),
self.endpoint,
)
self.payload = self._convert_payload()