Description
Description
Hey,
I would like to validate the API tokens during the configuration phase, thus I need to access helper
instance. All the examples that I've seen on the existing add-ons has following code from the _helper.py file generated by ucc.
def validate_input(helper, definition):
"""Implement your own validation logic to validate the input stanza configurations"""
# This example accesses the modular input variable
# notes = definition.parameters.get('notes', None)
pass
But what I've seen on my _helper.py file is following one.
def validate_input(definition: smi.ValidationDefinition):
pass
I would like to have an access to the helper instance because of it's proxy aware http client function etc.
Otherwise I guess I have to access to the metadata fields of the ValidationDefinition and fetch the sessionid and use conf_manager.ConfManager like it's being used at get_account_api_key
function that is auto generated ?
I would like to simply build a proxy aware (I mean I wanna use proxy details defined under the Configuration > Proxy of the add-on instead of global one) http client in order to validate the API token before saving the "input" so that I can make sure our SaaS is accesible before Splunk try to ingest the data. What is the best practice for this ?
I also would like to use the helper within the def stream_events
for get_check_point etc
What UCC version are you using?
Latest
Additional System Info
WSL