pytest-splunk-addon 6.2.0__tar.gz → 6.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/PKG-INFO +1 -1
  2. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pyproject.toml +1 -1
  3. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/.ignore_splunk_internal_errors +3 -1
  4. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/CIM_Models/datamodel_definition.py +3 -2
  5. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/__init__.py +1 -1
  6. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/addon_parser/props_parser.py +2 -2
  7. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Data_Access.json +5 -0
  8. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Endpoint.json +1 -1
  9. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Intrusion_Detection.json +5 -0
  10. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Updates.json +1 -0
  11. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/sample_generation/rule.py +3 -3
  12. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/sample_generation/sample_stanza.py +1 -1
  13. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/splunk.py +1 -1
  14. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/LICENSE +0 -0
  15. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/CIM_Models/__init__.py +0 -0
  16. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/addon_parser/__init__.py +0 -0
  17. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/addon_parser/eventtype_parser.py +0 -0
  18. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/addon_parser/fields.py +0 -0
  19. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/addon_parser/savedsearches_parser.py +0 -0
  20. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/addon_parser/tags_parser.py +0 -0
  21. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/addon_parser/transforms_parser.py +0 -0
  22. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/app_test_generator.py +0 -0
  23. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_compliance/__init__.py +0 -0
  24. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_compliance/base_report.py +0 -0
  25. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_compliance/base_table.py +0 -0
  26. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_compliance/cim_report_generator.py +0 -0
  27. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_compliance/markdown_report.py +0 -0
  28. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_compliance/markdown_table.py +0 -0
  29. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_compliance/plugin.py +0 -0
  30. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_tests/CommonFields.json +0 -0
  31. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_tests/DatamodelSchema.json +0 -0
  32. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_tests/__init__.py +0 -0
  33. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_tests/base_schema.py +0 -0
  34. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_tests/data_model.py +0 -0
  35. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_tests/data_model_handler.py +0 -0
  36. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_tests/data_set.py +0 -0
  37. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_tests/field_test_adapter.py +0 -0
  38. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_tests/field_test_helper.py +0 -0
  39. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_tests/json_schema.py +0 -0
  40. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_tests/test_generator.py +0 -0
  41. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/cim_tests/test_templates.py +0 -0
  42. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Alerts.json +0 -0
  43. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Authentication.json +0 -0
  44. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Certificates.json +0 -0
  45. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Change.json +0 -0
  46. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Compute_Inventory.json +0 -0
  47. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/DLP.json +0 -0
  48. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Databases.json +0 -0
  49. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Email.json +0 -0
  50. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Event_Signatures.json +0 -0
  51. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Interprocess Messaging.json +0 -0
  52. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/JVM.json +0 -0
  53. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Malware.json +0 -0
  54. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Network_Resolution.json +0 -0
  55. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Network_Sessions.json +0 -0
  56. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Network_Traffic.json +0 -0
  57. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Performance.json +0 -0
  58. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Ticket_Management.json +0 -0
  59. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Vulnerabilities.json +0 -0
  60. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/data_models/Web.json +0 -0
  61. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/docker_class.py +0 -0
  62. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/event_ingestors/__init__.py +0 -0
  63. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/event_ingestors/base_event_ingestor.py +0 -0
  64. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/event_ingestors/file_monitor_ingestor.py +0 -0
  65. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/event_ingestors/hec_event_ingestor.py +0 -0
  66. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/event_ingestors/hec_metric_ingestor.py +0 -0
  67. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/event_ingestors/hec_raw_ingestor.py +0 -0
  68. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/event_ingestors/ingestor_helper.py +0 -0
  69. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/event_ingestors/sc4s_event_ingestor.py +0 -0
  70. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/fields_tests/__init__.py +0 -0
  71. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/fields_tests/field_bank.py +0 -0
  72. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/fields_tests/requirement_test_datamodel_tag_constants.py +0 -0
  73. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/fields_tests/sample_parser.py +0 -0
  74. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/fields_tests/test_generator.py +0 -0
  75. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/fields_tests/test_templates.py +0 -0
  76. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/index_tests/__init__.py +0 -0
  77. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/index_tests/key_fields.py +0 -0
  78. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/index_tests/test_generator.py +0 -0
  79. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/index_tests/test_templates.py +0 -0
  80. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/plugin.py +0 -0
  81. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/sample_generation/__init__.py +0 -0
  82. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/sample_generation/pytest_splunk_addon_data_parser.py +0 -0
  83. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/sample_generation/sample_event.py +0 -0
  84. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/sample_generation/sample_generator.py +0 -0
  85. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/sample_generation/sample_xdist_generator.py +0 -0
  86. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/sample_generation/schema.xsd +0 -0
  87. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/sample_generation/time_parser.py +0 -0
  88. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/standard_lib/addon_basic.py +0 -0
  89. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/utilities/__init__.py +0 -0
  90. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/utilities/junit_parser.py +0 -0
  91. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/utilities/log_helper.py +0 -0
  92. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/utilities/sample_splitter.py +0 -0
  93. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/utilities/xml_event_parser.py +0 -0
  94. {pytest_splunk_addon-6.2.0 → pytest_splunk_addon-6.3.0}/pytest_splunk_addon/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytest-splunk-addon
3
- Version: 6.2.0
3
+ Version: 6.3.0
4
4
  Summary: A Dynamic test tool for Splunk Apps and Add-ons
5
5
  License: Apache-2.0
6
6
  Author: Splunk
@@ -16,7 +16,7 @@
16
16
 
17
17
  [tool.poetry]
18
18
  name = "pytest-splunk-addon"
19
- version = "6.2.0"
19
+ version = "6.3.0"
20
20
  description = "A Dynamic test tool for Splunk Apps and Add-ons"
21
21
  authors = ["Splunk <addonfactory@splunk.com>"]
22
22
  license = "APACHE-2.0"
@@ -14,4 +14,6 @@ app="search" sid="*" message_key="" message=Failed to get latest bucketMap from
14
14
  ERROR SavedSplunker - savedsearch_id="nobody;cloud-monitoring-console-summarizer;splunk-svc", message="Error in 'eval' command: Failed to parse the provided arguments. Usage: eval dest_key = expression.". No actions executed
15
15
  SavedSplunker - savedsearch_id="nobody;splunk_instance_monitoring;SIM SS - Splunk Apps Manifest", message="Error in 'lookup' command: Could not construct lookup 'splunk_upgrade_prereq_es_installable_apps.csv, app, OUTPUT, es_managed'. See search.log for more details.". No actions executed
16
16
  ERROR SearchMessages - orig_component="SearchStatusEnforcer" app="search" sid="*" message_key="" message=Error in 'noah' command: operation='get_latest_bucket_map' failed with err='Failed Dependency'
17
- Error reading SSG config from KV Store
17
+ Error reading SSG config from KV Store
18
+ "service":"compsup"
19
+ "service":"ipc_broker"
@@ -2396,8 +2396,9 @@ datamodels = {
2396
2396
  },
2397
2397
  },
2398
2398
  }
2399
- # No fields changes between v6.0.0 and v6.0.2
2399
+ # No recommended/required fields changes between v6.0.0 and v6.2.0
2400
2400
  datamodels["6.0.1"] = datamodels["6.0.0"]
2401
2401
  datamodels["6.0.2"] = datamodels["6.0.0"]
2402
2402
  datamodels["6.1.0"] = datamodels["6.0.2"]
2403
- datamodels["latest"] = datamodels["6.1.0"]
2403
+ datamodels["6.2.0"] = datamodels["6.1.0"]
2404
+ datamodels["latest"] = datamodels["6.2.0"]
@@ -18,4 +18,4 @@
18
18
 
19
19
  __author__ = """Splunk Inc."""
20
20
  __email__ = "addonfactory@splunk.com"
21
- __version__ = "6.2.0"
21
+ __version__ = "6.3.0"
@@ -203,7 +203,7 @@ class PropsParser(object):
203
203
  yield field
204
204
 
205
205
  # If SOURCE_KEY is used in EXTRACT, generate the test for the same.
206
- regex_for_source_key = r"(?:(?i)in\s+(\w+))\s*$"
206
+ regex_for_source_key = r"(?i)(?:in\s+(\w+))\s*$"
207
207
  extract_source_key = re.search(regex_for_source_key, value, re.MULTILINE)
208
208
  if extract_source_key:
209
209
  LOGGER.info(f"Found a source key in {name}")
@@ -260,7 +260,7 @@ class PropsParser(object):
260
260
  """
261
261
  regex = (
262
262
  r"(\"(?:\\\"|[^\"])*\"|\'(?:\\\'|[^\'])*\'|[^\s,]+)"
263
- r"\s+(?i)(?:as(?:new)?)\s+"
263
+ r"\s+(?:as(?:new)?)\s+"
264
264
  r"(\"(?:\\\"|[^\"])*\"|\'(?:\\\'|[^\'])*\'|[^\s,]+)"
265
265
  )
266
266
  fields_tuples = re.findall(regex, value, re.IGNORECASE)
@@ -65,6 +65,11 @@
65
65
  "type": "optional",
66
66
  "comment": "Name of the destination as defined by the Vendor."
67
67
  },
68
+ {
69
+ "name": "dest_type",
70
+ "type": "optional",
71
+ "comment": "The type of the destination object, such as 'instance', 'storage', 'firewall', 'printer'."
72
+ },
68
73
  {
69
74
  "name": "dest_url",
70
75
  "type": "optional",
@@ -615,7 +615,7 @@
615
615
  {
616
616
  "name": "status",
617
617
  "type": "required",
618
- "expected_values": ["critical", "started", "stopped", "warning"],
618
+ "expected_values": ["critical", "started", "stopped", "warning", "installed"],
619
619
  "validation": "",
620
620
  "comment": "The status of the service."
621
621
  },
@@ -81,6 +81,11 @@
81
81
  "type": "optional",
82
82
  "comment": "The unique identifier or event code of the event signature."
83
83
  },
84
+ {
85
+ "name": "dest_type",
86
+ "type": "optional",
87
+ "comment": "The type of the destination object, such as 'instance', 'storage', 'firewall'."
88
+ },
84
89
  {
85
90
  "name": "src",
86
91
  "type": "conditional",
@@ -28,6 +28,7 @@
28
28
  {
29
29
  "name": "file_name",
30
30
  "type": "required",
31
+ "multi_value": true,
31
32
  "comment":"The name of the patch package that was installed or attempted."
32
33
  },
33
34
  {
@@ -188,7 +188,7 @@ class Rule:
188
188
  .replace(".", "-")
189
189
  )
190
190
  host_split = host.split("-")
191
- if re.match("\d+", host_split[-1]):
191
+ if re.match(r"\d+", host_split[-1]):
192
192
  host = "-".join(host_split[:-1])
193
193
  new_event.metadata["host"] = "{}-{}".format(
194
194
  host, event_host_count
@@ -327,7 +327,7 @@ class FloatRule(Rule):
327
327
  float_match = re.match(r"[Ff]loat\[(-?[\d\.]+):(-?[\d\.]+)\]", self.replacement)
328
328
  if float_match:
329
329
  lower_limit, upper_limit = float_match.groups()
330
- precision = re.search("\[-?\d+\.?(\d*):", self.replacement).group(1)
330
+ precision = re.search(r"\[-?\d+\.?(\d*):", self.replacement).group(1)
331
331
  if not precision:
332
332
  precision = str(1)
333
333
  for _ in range(token_count):
@@ -681,7 +681,7 @@ class TimeRule(Rule):
681
681
  yield self.token
682
682
  for _ in range(token_count):
683
683
  random_time = datetime.fromtimestamp(
684
- randint(earliest_in_epoch, latest_in_epoch)
684
+ randint(int(earliest_in_epoch), int(latest_in_epoch))
685
685
  )
686
686
  if timezone_time in ["local", '"local"', "'local'"]:
687
687
  random_time = random_time.replace(tzinfo=timezone.utc).astimezone(
@@ -25,7 +25,7 @@ from collections import namedtuple
25
25
 
26
26
  LOGGER = logging.getLogger("pytest-splunk-addon")
27
27
 
28
- TIMEZONE_REX = "((\+1[0-2])|(-1[0-4])|[+|-][0][0-9])([0-5][0-9])"
28
+ TIMEZONE_REX = r"((\+1[0-2])|(-1[0-4])|[+|-][0][0-9])([0-5][0-9])"
29
29
  BULK_EVENT_COUNT = 250
30
30
 
31
31
  token_value = namedtuple("token_value", ["key", "value"])
@@ -842,7 +842,7 @@ def docker_ip():
842
842
  if not docker_host:
843
843
  return "127.0.0.1"
844
844
 
845
- match = re.match("^tcp://(.+?):\d+$", docker_host)
845
+ match = re.match(r"^tcp://(.+?):\d+$", docker_host)
846
846
  if not match:
847
847
  raise ValueError('Invalid value for DOCKER_HOST: "%s".' % (docker_host,))
848
848
  return match.group(1)