assemblyline-v4-service 4.5.1.dev407__py3-none-any.whl → 4.5.1.dev408__py3-none-any.whl
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.
Potentially problematic release.
This version of assemblyline-v4-service might be problematic. Click here for more details.
- assemblyline_v4_service/VERSION +1 -1
- assemblyline_v4_service/dev/run_service_once.py +19 -26
- {assemblyline_v4_service-4.5.1.dev407.dist-info → assemblyline_v4_service-4.5.1.dev408.dist-info}/METADATA +1 -1
- {assemblyline_v4_service-4.5.1.dev407.dist-info → assemblyline_v4_service-4.5.1.dev408.dist-info}/RECORD +7 -7
- {assemblyline_v4_service-4.5.1.dev407.dist-info → assemblyline_v4_service-4.5.1.dev408.dist-info}/LICENCE.md +0 -0
- {assemblyline_v4_service-4.5.1.dev407.dist-info → assemblyline_v4_service-4.5.1.dev408.dist-info}/WHEEL +0 -0
- {assemblyline_v4_service-4.5.1.dev407.dist-info → assemblyline_v4_service-4.5.1.dev408.dist-info}/top_level.txt +0 -0
assemblyline_v4_service/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.5.1.
|
|
1
|
+
4.5.1.dev408
|
|
@@ -19,7 +19,7 @@ from assemblyline.common.uid import get_random_id
|
|
|
19
19
|
from assemblyline.odm.messages.task import Task as ServiceTask
|
|
20
20
|
from assemblyline.odm.models.result import Result
|
|
21
21
|
from assemblyline.odm.models.service import Service
|
|
22
|
-
from assemblyline_v4_service.common.helper import get_heuristics
|
|
22
|
+
from assemblyline_v4_service.common.helper import get_heuristics, get_service_manifest
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
class RunService:
|
|
@@ -190,36 +190,29 @@ class RunService:
|
|
|
190
190
|
self.identify.stop()
|
|
191
191
|
|
|
192
192
|
def load_service_manifest(self, return_heuristics=False) -> Union[None, Dict]:
|
|
193
|
-
|
|
193
|
+
service_manifest_data = get_service_manifest()
|
|
194
|
+
heuristics = service_manifest_data.get('heuristics', None)
|
|
194
195
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
# Pop the 'extra' data from the service manifest
|
|
197
|
+
for x in ['file_required', 'tool_version', 'heuristics']:
|
|
198
|
+
service_manifest_data.pop(x, None)
|
|
198
199
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
# Validate the service manifest
|
|
206
|
-
try:
|
|
207
|
-
self.service = Service(service_manifest_data)
|
|
208
|
-
except Exception as e:
|
|
209
|
-
LOG.error(f"Invalid service manifest: {str(e)}")
|
|
200
|
+
# Validate the service manifest
|
|
201
|
+
try:
|
|
202
|
+
self.service = Service(service_manifest_data)
|
|
203
|
+
except Exception as e:
|
|
204
|
+
LOG.error(f"Invalid service manifest: {str(e)}")
|
|
210
205
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
206
|
+
service_config = {}
|
|
207
|
+
if service_manifest_data:
|
|
208
|
+
service_config = service_manifest_data.get('config', {})
|
|
214
209
|
|
|
215
|
-
|
|
216
|
-
|
|
210
|
+
self.submission_params = {x['name']: x['value']
|
|
211
|
+
for x in service_manifest_data.get('submission_params', [])}
|
|
217
212
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
else:
|
|
222
|
-
raise Exception("Service manifest YAML file not found in root folder of service.")
|
|
213
|
+
self.service = self.service_class(config=service_config)
|
|
214
|
+
if return_heuristics:
|
|
215
|
+
return heuristics
|
|
223
216
|
|
|
224
217
|
|
|
225
218
|
if __name__ == '__main__':
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
assemblyline_v4_service/VERSION,sha256=
|
|
1
|
+
assemblyline_v4_service/VERSION,sha256=LB-fD4DlO44lXp2t8adWksIjWTJ6TDOThRlO2Eeb-h0,13
|
|
2
2
|
assemblyline_v4_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
assemblyline_v4_service/healthz.py,sha256=sS1cFkDLw8hUPMpj7tbHXFv8ZmHcazrwZ0l6oQDwwkQ,1575
|
|
4
4
|
assemblyline_v4_service/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -15,7 +15,7 @@ assemblyline_v4_service/common/result.py,sha256=9AqM6qCYiia_Bpyn_fBFhzNQMcqJbtFS
|
|
|
15
15
|
assemblyline_v4_service/common/task.py,sha256=dJsvRpW0x88CCF_LW6w87jQ_UKTVaOs2Gb117IDNiU8,14233
|
|
16
16
|
assemblyline_v4_service/common/utils.py,sha256=k2__d-V5LjB6o2IKbjVe7tJWKcKuUHto5TyT5oKhIa0,3890
|
|
17
17
|
assemblyline_v4_service/dev/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
assemblyline_v4_service/dev/run_service_once.py,sha256=
|
|
18
|
+
assemblyline_v4_service/dev/run_service_once.py,sha256=BicBzWVArRzGf8Qxi-_NfP-Cgy9J_1gEQpQb3HBPGTg,10151
|
|
19
19
|
assemblyline_v4_service/updater/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
assemblyline_v4_service/updater/__main__.py,sha256=9Os-u8Tf7MD73JSrUSPmOaErTgfvesNLiEeszU4ujXA,133
|
|
21
21
|
assemblyline_v4_service/updater/app.py,sha256=Mtmx4bkXfP4nFqqa5q15jW8QIXr4JK84lCovxAVyvPs,3317
|
|
@@ -38,8 +38,8 @@ test/test_common/test_request.py,sha256=Ceyds8BNO1O0f1kH1VEb84faJcaupvSjVKIrGdHe
|
|
|
38
38
|
test/test_common/test_result.py,sha256=6BiOKxEPrKBjOY44jv3TY-yiXm0qI1ok_CZBnjP9TM4,45447
|
|
39
39
|
test/test_common/test_task.py,sha256=P44mNcSe-3tJgDk9ppN3KbM7oN4LBVIuhONG-Gveh74,19007
|
|
40
40
|
test/test_common/test_utils.py,sha256=TbnBxqpS_ZC5ptXR9XJX3xtbItD0mTbtiBxxdyP8J5k,5904
|
|
41
|
-
assemblyline_v4_service-4.5.1.
|
|
42
|
-
assemblyline_v4_service-4.5.1.
|
|
43
|
-
assemblyline_v4_service-4.5.1.
|
|
44
|
-
assemblyline_v4_service-4.5.1.
|
|
45
|
-
assemblyline_v4_service-4.5.1.
|
|
41
|
+
assemblyline_v4_service-4.5.1.dev408.dist-info/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
|
|
42
|
+
assemblyline_v4_service-4.5.1.dev408.dist-info/METADATA,sha256=2LwhYm26sUhEh2fjIP5oocChpDV_GWmZ_r3wg3QHsUo,9724
|
|
43
|
+
assemblyline_v4_service-4.5.1.dev408.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
44
|
+
assemblyline_v4_service-4.5.1.dev408.dist-info/top_level.txt,sha256=LpTOEaVCatkrvbVq3EZseMSIa2PQZU-2rhuO_FTpZgY,29
|
|
45
|
+
assemblyline_v4_service-4.5.1.dev408.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|