How to use the solnlib.splunkenv.get_splunkd_uri function in solnlib

To help you get started, we’ve selected a few solnlib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github remg427 / misp42splunk / misp42splunk / bin / packages / aob_py3 / splunk_aoblib / rest_migration.py View on Github external
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
github remg427 / misp42splunk / misp42splunk / bin / packages / aob_py2 / splunk_aoblib / rest_migration.py View on Github external
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
github remg427 / misp42splunk / misp42splunk / bin / packages / aob_py2 / splunktaucclib / rest_handler / admin_external.py View on Github external
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()