Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit bdefe0a

Browse files
richard-julienaHenryJard
authored andcommitted
[client] As rewrite is not possible, remove this approach
1 parent 8cbe2ad commit bdefe0a

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

pycti/connector/opencti_connector_helper.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -849,13 +849,6 @@ def __init__(self, config: Dict, playbook_compatible=False) -> None:
849849
False,
850850
True,
851851
)
852-
self.keep_original_id = get_config_variable(
853-
"CONNECTOR_KEEP_ORIGINAL_ID",
854-
["connector", "keep_original_id"],
855-
config,
856-
False,
857-
False,
858-
)
859852
self.bundle_send_to_directory = get_config_variable(
860853
"CONNECTOR_SEND_TO_DIRECTORY",
861854
["connector", "send_to_directory"],
@@ -1578,7 +1571,6 @@ def send_stix2_bundle(self, bundle: str, **kwargs) -> list:
15781571
file_name = kwargs.get("file_name", None)
15791572
bundle_send_to_queue = kwargs.get("send_to_queue", self.bundle_send_to_queue)
15801573
cleanup_inconsistent_bundle = kwargs.get("cleanup_inconsistent_bundle", False)
1581-
keep_original_id = kwargs.get("keep_original_id", self.keep_original_id)
15821574
bundle_send_to_directory = kwargs.get(
15831575
"send_to_directory", self.bundle_send_to_directory
15841576
)

pycti/utils/opencti_stix2.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ def import_bundle_from_file(
180180
file_path: str,
181181
update: bool = False,
182182
types: List = None,
183-
keep_original_id: bool = False,
184183
) -> Optional[List]:
185184
"""import a stix2 bundle from a file
186185
@@ -190,8 +189,6 @@ def import_bundle_from_file(
190189
:type update: bool, optional
191190
:param types: list of stix2 types, defaults to None
192191
:type types: list, optional
193-
:param keep_original_id: import need to keep original id
194-
:type keep_original_id: bool, optional
195192
:return: list of imported stix2 objects
196193
:rtype: List
197194
"""
@@ -200,7 +197,7 @@ def import_bundle_from_file(
200197
return None
201198
with open(os.path.join(file_path), encoding="utf-8") as file:
202199
data = json.load(file)
203-
return self.import_bundle(data, update, types, None, keep_original_id)
200+
return self.import_bundle(data, update, types, None)
204201

205202
def import_bundle_from_json(
206203
self,
@@ -2639,7 +2636,6 @@ def import_bundle(
26392636
update: bool = False,
26402637
types: List = None,
26412638
work_id: str = None,
2642-
keep_original_id: bool = False,
26432639
) -> List:
26442640
# Check if the bundle is correctly formatted
26452641
if "type" not in stix_bundle or stix_bundle["type"] != "bundle":

0 commit comments

Comments
 (0)