backend_confs
- class pytest_splunk_addon_ui_smartx.backend_confs.BackendConf(url, username, password)[source]
Bases:
object
Base Class to fetch configurations from rest endpoint. The classes need management url & session_id of the splunk to fetch the configurations.
- parse_conf(json_res, single_stanza=False)[source]
- Parse the json result in to the configuration dictionary
- param json_res
the json_res got from the request
- returns
dictionary
- class pytest_splunk_addon_ui_smartx.backend_confs.ListBackendConf(url, username, password)[source]
Bases:
pytest_splunk_addon_ui_smartx.backend_confs.BackendConf
For the configuration which can have more than one stanzas. The list will be fetched from endpoint/ and a specific stanza will be fetched from endpoint/{stanza_name}
- delete_all_stanzas(query=None)[source]
- Delete all stanza from the configuration.
- query
query params for filter the stanza
- returns
json result of the request
- delete_stanza(stanza)[source]
- Delete a specific stanza of the configuration.
- param stanza
stanza to delete
- returns
json result of the request
- get_all_stanzas(query=None)[source]
- Get list of all stanzas of the configuration
- query
query params for filter the stanza
- returns
dictionary {stanza: {param: value, … }, … }
- get_stanza(stanza, decrypt=False)[source]
- Get a specific stanza of the configuration.
- param stanza
stanza to fetch
- returns
dictionary {param: value, … }
- class pytest_splunk_addon_ui_smartx.backend_confs.SingleBackendConf(url, username, password)[source]
Bases:
pytest_splunk_addon_ui_smartx.backend_confs.BackendConf
For the configurations which can only have one stanza. for example, logging.
- get_parameter(param, decrypt=False)[source]
- Get value of a specific parameter from the stanza
- param param
the parameter to fetch
- returns
str value