synapse 2.193.0__py311-none-any.whl → 2.195.0__py311-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 synapse might be problematic. Click here for more details.

Files changed (83) hide show
  1. synapse/cortex.py +9 -7
  2. synapse/datamodel.py +9 -6
  3. synapse/exc.py +1 -1
  4. synapse/lib/agenda.py +17 -4
  5. synapse/lib/ast.py +217 -86
  6. synapse/lib/auth.py +5 -2
  7. synapse/lib/link.py +33 -19
  8. synapse/lib/modelrev.py +6 -1
  9. synapse/lib/parser.py +4 -0
  10. synapse/lib/scrape.py +18 -1
  11. synapse/lib/snap.py +40 -11
  12. synapse/lib/storm.lark +16 -1
  13. synapse/lib/storm.py +6 -4
  14. synapse/lib/storm_format.py +1 -0
  15. synapse/lib/stormctrl.py +88 -6
  16. synapse/lib/stormlib/auth.py +15 -1
  17. synapse/lib/stormlib/cache.py +6 -2
  18. synapse/lib/stormlib/cell.py +11 -0
  19. synapse/lib/stormlib/infosec.py +2 -0
  20. synapse/lib/stormlib/scrape.py +1 -1
  21. synapse/lib/stormlib/stix.py +8 -8
  22. synapse/lib/stormtypes.py +13 -5
  23. synapse/lib/version.py +2 -2
  24. synapse/lib/view.py +20 -3
  25. synapse/models/geopol.py +1 -0
  26. synapse/models/geospace.py +53 -10
  27. synapse/models/inet.py +3 -0
  28. synapse/models/infotech.py +12 -5
  29. synapse/models/material.py +67 -8
  30. synapse/models/orgs.py +11 -3
  31. synapse/models/person.py +28 -17
  32. synapse/models/risk.py +4 -1
  33. synapse/models/syn.py +3 -0
  34. synapse/models/telco.py +10 -3
  35. synapse/models/transport.py +382 -49
  36. synapse/tests/test_axon.py +6 -6
  37. synapse/tests/test_cortex.py +134 -12
  38. synapse/tests/test_exc.py +1 -0
  39. synapse/tests/test_lib_agenda.py +125 -1
  40. synapse/tests/test_lib_aha.py +13 -6
  41. synapse/tests/test_lib_ast.py +258 -9
  42. synapse/tests/test_lib_auth.py +6 -7
  43. synapse/tests/test_lib_cell.py +10 -0
  44. synapse/tests/test_lib_grammar.py +14 -0
  45. synapse/tests/test_lib_layer.py +1 -1
  46. synapse/tests/test_lib_link.py +6 -1
  47. synapse/tests/test_lib_lmdbslab.py +3 -3
  48. synapse/tests/test_lib_modelrev.py +7 -0
  49. synapse/tests/test_lib_scrape.py +8 -0
  50. synapse/tests/test_lib_storm.py +201 -25
  51. synapse/tests/test_lib_stormctrl.py +65 -0
  52. synapse/tests/test_lib_stormhttp.py +5 -5
  53. synapse/tests/test_lib_stormlib_auth.py +31 -5
  54. synapse/tests/test_lib_stormlib_cache.py +38 -6
  55. synapse/tests/test_lib_stormlib_cell.py +3 -0
  56. synapse/tests/test_lib_stormlib_modelext.py +3 -3
  57. synapse/tests/test_lib_stormlib_scrape.py +4 -4
  58. synapse/tests/test_lib_stormlib_spooled.py +1 -1
  59. synapse/tests/test_lib_stormlib_xml.py +5 -5
  60. synapse/tests/test_lib_stormtypes.py +54 -57
  61. synapse/tests/test_lib_view.py +1 -1
  62. synapse/tests/test_model_base.py +1 -2
  63. synapse/tests/test_model_geopol.py +4 -0
  64. synapse/tests/test_model_geospace.py +43 -4
  65. synapse/tests/test_model_inet.py +3 -0
  66. synapse/tests/test_model_infotech.py +31 -4
  67. synapse/tests/test_model_material.py +18 -0
  68. synapse/tests/test_model_orgs.py +25 -3
  69. synapse/tests/test_model_person.py +26 -1
  70. synapse/tests/test_model_risk.py +11 -0
  71. synapse/tests/test_model_syn.py +9 -3
  72. synapse/tests/test_model_transport.py +168 -0
  73. synapse/tests/test_telepath.py +24 -5
  74. synapse/tests/test_tools_healthcheck.py +4 -4
  75. synapse/tests/test_utils.py +17 -18
  76. synapse/tests/utils.py +0 -35
  77. synapse/tools/changelog.py +14 -5
  78. synapse/tools/storm.py +1 -1
  79. {synapse-2.193.0.dist-info → synapse-2.195.0.dist-info}/METADATA +5 -5
  80. {synapse-2.193.0.dist-info → synapse-2.195.0.dist-info}/RECORD +83 -82
  81. {synapse-2.193.0.dist-info → synapse-2.195.0.dist-info}/WHEEL +1 -1
  82. {synapse-2.193.0.dist-info → synapse-2.195.0.dist-info}/LICENSE +0 -0
  83. {synapse-2.193.0.dist-info → synapse-2.195.0.dist-info}/top_level.txt +0 -0
synapse/models/telco.py CHANGED
@@ -369,9 +369,16 @@ class TelcoModule(s_module.CoreModule):
369
369
  ('wifi:bssid', ('inet:mac', {}), {}),
370
370
 
371
371
  # host specific data
372
- ('adid', ('it:adid', {}), {}),
373
- ('aaid', ('it:os:android:aaid', {}), {}),
374
- ('idfa', ('it:os:ios:idfa', {}), {}),
372
+ ('adid', ('it:adid', {}), {
373
+ 'doc': 'The advertising ID of the mobile telemetry sample.'}),
374
+
375
+ ('aaid', ('it:os:android:aaid', {}), {
376
+ 'deprecated': True,
377
+ 'doc': 'Deprecated. Please use :adid.'}),
378
+
379
+ ('idfa', ('it:os:ios:idfa', {}), {
380
+ 'deprecated': True,
381
+ 'doc': 'Deprecated. Please use :adid.'}),
375
382
 
376
383
  # User related data
377
384
  ('name', ('ps:name', {}), {}),
@@ -5,11 +5,45 @@ class TransportModule(s_module.CoreModule):
5
5
  modl = {
6
6
  'types': (
7
7
 
8
+ # TODO is transport:journey a thing?
9
+
10
+ ('transport:cargo', ('guid', {}), {
11
+ 'doc': 'Cargo being carried by a vehicle on a trip.'}),
12
+
13
+ ('transport:point', ('str', {'lower': True, 'onespace': True}), {
14
+ 'doc': 'A departure/arrival point such as an airport gate or train platform.'}),
15
+
16
+ ('transport:trip', ('ndef', {'interface': 'transport:trip'}), {
17
+ 'doc': 'A trip such as a flight or train ride.'}),
18
+
19
+ ('transport:stop', ('guid', {}), {
20
+ 'interfaces': ('transport:schedule',),
21
+ 'doc': 'A stop made by a vehicle on a trip.'}),
22
+
23
+ ('transport:container', ('ndef', {'interface': 'transport:container'}), {
24
+ 'doc': 'A container capable of transporting cargo or personnel.'}),
25
+
26
+ ('transport:vehicle', ('ndef', {'interface': 'transport:vehicle'}), {
27
+ 'doc': 'A vehicle such as an aircraft or sea vessel.'}),
28
+
29
+ ('transport:occupant', ('guid', {}), {
30
+ 'doc': 'An occupant of a vehicle on a trip.'}),
31
+
32
+ ('transport:occupant:role:taxonomy', ('taxonomy', {}), {
33
+ 'interfaces': ('meta:taxonomy',),
34
+ 'doc': 'A taxonomy of transportation occupant roles.'}),
35
+
8
36
  ('transport:direction', ('hugenum', {'modulo': 360}), {
9
37
  'doc': 'A direction measured in degrees with 0.0 being true North.'}),
10
38
 
39
+ ('transport:land:vehicle:type:taxonomy', ('taxonomy', {}), {
40
+ 'interfaces': ('meta:taxonomy',),
41
+ 'doc': 'A type taxonomy for land vehicles.'}),
42
+
11
43
  ('transport:land:vehicle', ('guid', {}), {
12
- 'doc': 'An individual vehicle.'}),
44
+ 'interfaces': ('transport:vehicle',),
45
+ 'template': {'phys:object': 'vehicle'},
46
+ 'doc': 'An individual land based vehicle.'}),
13
47
 
14
48
  ('transport:land:registration', ('guid', {}), {
15
49
  'doc': 'Registration issued to a contact for a land vehicle.'}),
@@ -17,7 +51,18 @@ class TransportModule(s_module.CoreModule):
17
51
  ('transport:land:license', ('guid', {}), {
18
52
  'doc': 'A license to operate a land vehicle issued to a contact.'}),
19
53
 
54
+ ('transport:land:drive', ('guid', {}), {
55
+ 'interfaces': ('transport:trip',),
56
+ 'template': {
57
+ 'trip': 'drive',
58
+ 'gate': 'docking bay',
59
+ 'place': 'place',
60
+ 'vehicle': 'vehicle'},
61
+ 'doc': 'A drive taken by a land vehicle.'}),
62
+
20
63
  ('transport:air:craft', ('guid', {}), {
64
+ 'interfaces': ('transport:vehicle',),
65
+ 'template': {'phys:object': 'aircraft'},
21
66
  'doc': 'An individual aircraft.'}),
22
67
 
23
68
  ('transport:air:tailnum', ('str', {'lower': True, 'strip': True, 'regex': '^[a-z0-9-]{2,}$'}), {
@@ -32,15 +77,28 @@ class TransportModule(s_module.CoreModule):
32
77
  'doc': 'A telemetry sample from an aircraft in transit.'}),
33
78
 
34
79
  ('transport:air:flight', ('guid', {}), {
80
+ 'interfaces': ('transport:trip',),
81
+ 'template': {
82
+ 'trip': 'flight',
83
+ 'point': 'gate',
84
+ 'place': 'airport',
85
+ 'vehicle': 'aircraft'},
35
86
  'doc': 'An individual instance of a flight.'}),
36
87
 
37
88
  ('transport:air:occupant', ('guid', {}), {
38
- 'doc': 'An occupant of a specific flight.'}),
89
+ 'deprecated': True,
90
+ 'doc': 'Deprecated. Please use transport:occupant.'}),
39
91
 
40
92
  ('transport:air:port', ('str', {'lower': True}), {
41
93
  'doc': 'An IATA assigned airport code.'}),
42
94
 
95
+ ('transport:sea:vessel:type:taxonomy', ('taxonomy', {}), {
96
+ 'interfaces': ('meta:taxonomy',),
97
+ 'doc': 'A hierarchical taxonomy of sea vessel types.'}),
98
+
43
99
  ('transport:sea:vessel', ('guid', {}), {
100
+ 'interfaces': ('transport:vehicle',),
101
+ 'template': {'phys:object': 'vessel'},
44
102
  'doc': 'An individual sea vessel.'}),
45
103
 
46
104
  ('transport:sea:mmsi', ('str', {'regex': '[0-9]{9}'}), {
@@ -52,17 +110,182 @@ class TransportModule(s_module.CoreModule):
52
110
  ('transport:sea:telem', ('guid', {}), {
53
111
  'doc': 'A telemetry sample from a vessel in transit.'}),
54
112
 
55
- # TODO a few more items to plumb eventually
56
- # ('transport:sea:hin',
57
- # ('transport:sea:port',
113
+ ('transport:rail:train', ('guid', {}), {
114
+ 'interfaces': ('transport:trip',),
115
+ 'template': {
116
+ 'point': 'gate',
117
+ 'place': 'station',
118
+ 'trip': 'train trip',
119
+ 'vehicle': 'train'},
120
+ 'doc': 'An individual instance of a consist of train cars running a route.'}),
121
+
122
+ ('transport:rail:car:type:taxonomy', ('taxonomy', {}), {
123
+ 'interfaces': ('meta:taxonomy',),
124
+ 'ex': 'engine.diesel',
125
+ 'doc': 'A hierarchical taxonomy of rail car types.'}),
126
+
127
+ ('transport:rail:car', ('guid', {}), {
128
+ 'interfaces': ('transport:container',),
129
+ 'template': {'phys:object': 'train car'},
130
+ 'doc': 'An individual train car.'}),
131
+
132
+ ('transport:rail:consist', ('guid', {}), {
133
+ 'interfaces': ('transport:vehicle',),
134
+ 'template': {'phys:object': 'train'},
135
+ 'doc': 'A group of rail cars and locomotives connected together.'}),
136
+
137
+ ('transport:shipping:container', ('guid', {}), {
138
+ 'interfaces': ('transport:container',),
139
+ 'template': {'phys:object': 'shipping container'},
140
+ 'doc': 'An individual shipping container.'}),
141
+
142
+ ),
143
+ 'interfaces': (
144
+
145
+ ('transport:container', {
146
+ 'interfaces': ('phys:object',),
147
+ 'doc': 'Properties common to a container used to transport cargo or people.',
148
+ 'props': (
149
+
150
+ ('built', ('time', {}), {
151
+ 'doc': 'The date when the {phys:object} was built.'}),
152
+
153
+ ('manufacturer', ('ou:org', {}), {
154
+ 'doc': 'The organization which manufactured the {phys:object}.'}),
155
+
156
+ ('manufacturer:name', ('ou:name', {}), {
157
+ 'doc': 'The name of the organization which manufactured the {phys:object}.'}),
158
+
159
+ ('model', ('str', {'lower': True, 'onespace': True}), {
160
+ 'doc': 'The model of the {phys:object}.'}),
161
+
162
+ ('serial', ('str', {'strip': True}), {
163
+ 'doc': 'The manufacturer assigned serial number of the {phys:object}.'}),
164
+
165
+ ('max:occupants', ('int', {'min': 0}), {
166
+ 'doc': 'The maximum number of occupants the {phys:object} can hold.'}),
167
+
168
+ ('max:cargo:mass', ('mass', {}), {
169
+ 'doc': 'The maximum mass the {phys:object} can carry as cargo.'}),
170
+
171
+ ('max:cargo:volume', ('geo:dist', {}), {
172
+ 'doc': 'The maximum volume the {phys:object} can carry as cargo.'}),
173
+
174
+ # TODO deprecate for entity:ownership?
175
+ ('owner', ('ps:contact', {}), {
176
+ 'doc': 'The contact information of the owner of the {phys:object}.'}),
177
+ ),
178
+ }),
179
+ # most containers are vehicles, but some are not...
180
+ ('transport:vehicle', {
181
+ 'interfaces': ('transport:container',),
182
+ 'templates': {'phys:object': 'vehicle'},
183
+ 'doc': 'Properties common to a vehicle.',
184
+ 'props': (
185
+ ('operator', ('ps:contact', {}), {
186
+ 'doc': 'The contact information of the operator of the {phys:object}.'}),
187
+ ),
188
+ }),
189
+
190
+ ('transport:schedule', {
191
+ 'doc': 'Properties common to travel schedules.',
192
+ 'template': {
193
+ 'place': 'place', # airport, seaport, starport
194
+ 'point': 'point', # gate, slip, stargate...
195
+ 'vehicle': 'vehicle', # aircraft, vessel, space ship...
196
+ 'trip': 'trip'}, # flight, voyage...
197
+
198
+ 'props': (
199
+
200
+ ('duration', ('duration', {}), {
201
+ 'doc': 'The actual duration.'}),
202
+
203
+ ('departed', ('time', {}), {
204
+ 'doc': 'The actual departure time.'}),
205
+
206
+ ('departed:place', ('geo:place', {}), {
207
+ 'doc': 'The actual departure {place}.'}),
208
+
209
+ ('departed:point', ('transport:point', {}), {
210
+ 'doc': 'The actual departure {point}.'}),
211
+
212
+ ('arrived', ('time', {}), {
213
+ 'doc': 'The actual arrival time.'}),
214
+
215
+ ('arrived:place', ('geo:place', {}), {
216
+ 'doc': 'The actual arrival {place}.'}),
217
+
218
+ ('arrived:point', ('transport:point', {}), {
219
+ 'doc': 'The actual arrival {point}.'}),
220
+
221
+ ('scheduled:duration', ('duration', {}), {
222
+ 'doc': 'The scheduled duration.'}),
223
+
224
+ ('scheduled:departure', ('time', {}), {
225
+ 'doc': 'The scheduled departure time.'}),
226
+
227
+ ('scheduled:departure:place', ('geo:place', {}), {
228
+ 'doc': 'The scheduled departure {place}.'}),
229
+
230
+ ('scheduled:departure:point', ('transport:point', {}), {
231
+ 'doc': 'The scheduled departure {point}.'}),
232
+
233
+ ('scheduled:arrival', ('time', {}), {
234
+ 'doc': 'The scheduled arrival time.'}),
235
+
236
+ ('scheduled:arrival:place', ('geo:place', {}), {
237
+ 'doc': 'The scheduled arrival {place}.'}),
238
+
239
+ ('scheduled:arrival:point', ('transport:point', {}), {
240
+ 'doc': 'The scheduled arrival {point}.'}),
241
+ ),
242
+ }),
243
+
244
+ ('transport:trip', {
245
+ # train, flight, drive, launch...
246
+ 'doc': 'Properties common to a specific trip taken by a vehicle.',
247
+ 'interfaces': ('transport:schedule',),
248
+
249
+ 'props': (
250
+
251
+ ('status', ('str', {'enums': 'scheduled,cancelled,in-progress,completed,aborted,failed,unknown'}), {
252
+ 'doc': 'The status of the {trip}.'}),
253
+
254
+ ('occupants', ('int', {'min': 0}), {
255
+ 'doc': 'The number of occupants of the {vehicle} on this {trip}.'}),
256
+
257
+ ('cargo:mass', ('mass', {}), {
258
+ 'doc': 'The cargo mass carried by the {vehicle} on this {trip}.'}),
259
+
260
+ ('cargo:volume', ('geo:dist', {}), {
261
+ 'doc': 'The cargo volume carried by the {vehicle} on this {trip}.'}),
262
+
263
+ ('operator', ('ps:contact', {}), {
264
+ 'doc': 'The contact information of the operator of the {trip}.'}),
265
+
266
+ ('vehicle', ('transport:vehicle', {}), {
267
+ 'doc': 'The {vehicle} which traveled the {trip}.'}),
268
+ ),
269
+ }),
270
+ ),
271
+ 'edges': (
58
272
  ),
59
273
  'forms': (
274
+
275
+ ('transport:stop', {}, (
276
+
277
+ ('trip', ('transport:trip', {}), {
278
+ 'doc': 'The trip which contains the stop.'}),
279
+ )),
280
+
281
+ ('transport:land:drive', {}, ()),
282
+
60
283
  ('transport:land:license', {}, (
61
284
  ('id', ('str', {'strip': True}), {
62
285
  'doc': 'The license ID.'}),
63
286
  # TODO type ( drivers license, commercial trucking, etc? )
64
287
  ('contact', ('ps:contact', {}), {
65
- 'doc': 'The contact info of the registrant.'}),
288
+ 'doc': 'The contact info of the licensee.'}),
66
289
  ('issued', ('time', {}), {
67
290
  'doc': 'The time the license was issued.'}),
68
291
  ('expires', ('time', {}), {
@@ -90,35 +313,39 @@ class TransportModule(s_module.CoreModule):
90
313
  ('issuer:name', ('ou:name', {}), {
91
314
  'doc': 'The name of the org which issued the registration.'}),
92
315
  )),
316
+
317
+ ('transport:land:vehicle:type:taxonomy', {}, ()),
318
+
93
319
  ('transport:land:vehicle', {}, (
320
+
321
+ ('type', ('transport:land:vehicle:type:taxonomy', {}), {
322
+ 'doc': 'The type of land vehicle.'}),
323
+
324
+ ('desc', ('str', {}), {
325
+ 'doc': 'A description of the vehicle.'}),
326
+
94
327
  ('serial', ('str', {'strip': True}), {
95
328
  'doc': 'The serial number or VIN of the vehicle.'}),
96
- ('built', ('time', {}), {
97
- 'doc': 'The date the vehicle was constructed.'}),
329
+
98
330
  ('make', ('ou:name', {}), {
99
- 'doc': 'The make of the vehicle.'}),
100
- ('model', ('str', {'lower': True, 'onespace': True}), {
101
- 'doc': 'The model of the vehicle.'}),
331
+ 'deprecated': True,
332
+ 'doc': 'Deprecated. Please use :manufacturer:name.'}),
333
+
102
334
  ('registration', ('transport:land:registration', {}), {
103
335
  'doc': 'The current vehicle registration information.'}),
104
- ('owner', ('ps:contact', {}), {
105
- 'doc': 'The contact info of the owner of the vehicle.'}),
106
336
  )),
107
337
  ('transport:air:craft', {}, (
338
+
108
339
  ('tailnum', ('transport:air:tailnum', {}), {
109
340
  'doc': 'The aircraft tail number.'}),
341
+
342
+ # TODO 3.x modify type to being a taxonomy.
110
343
  ('type', ('str', {'lower': True, 'strip': True}), {
111
344
  'doc': 'The type of aircraft.'}),
112
- ('built', ('time', {}), {
113
- 'doc': 'The date the aircraft was constructed.'}),
345
+
114
346
  ('make', ('str', {'lower': True, 'strip': True}), {
115
- 'doc': 'The make of the aircraft.'}),
116
- ('model', ('str', {'lower': True, 'strip': True}), {
117
- 'doc': 'The model of the aircraft.'}),
118
- ('serial', ('str', {'strip': True}), {
119
- 'doc': 'The serial number of the aircraft.'}),
120
- ('operator', ('ps:contact', {}), {
121
- 'doc': 'Contact info representing the person or org that operates the aircraft.'}),
347
+ 'deprecated': True,
348
+ 'doc': 'Deprecated. Please use :manufacturer:name.'}),
122
349
  )),
123
350
  ('transport:air:port', {}, (
124
351
  ('name', ('str', {'lower': True, 'onespace': True}), {
@@ -143,30 +370,37 @@ class TransportModule(s_module.CoreModule):
143
370
  'doc': 'An ordered list of aiport codes for the flight segments.'}),
144
371
  )),
145
372
  ('transport:air:flight', {}, (
373
+
146
374
  ('num', ('transport:air:flightnum', {}), {
147
375
  'doc': 'The flight number of this flight.'}),
148
- ('scheduled:departure', ('time', {}), {
149
- 'doc': 'The time this flight was originally scheduled to depart'}),
150
- ('scheduled:arrival', ('time', {}), {
151
- 'doc': 'The time this flight was originally scheduled to arrive'}),
152
- ('departed', ('time', {}), {
153
- 'doc': 'The time this flight departed'}),
154
- ('arrived', ('time', {}), {
155
- 'doc': 'The time this flight arrived'}),
156
- ('carrier', ('ou:org', {}), {
157
- 'doc': 'The org which operates the given flight number.'}),
158
- ('craft', ('transport:air:craft', {}), {
159
- 'doc': 'The aircraft that flew this flight.'}),
376
+
160
377
  ('tailnum', ('transport:air:tailnum', {}), {
161
378
  'doc': 'The tail/registration number at the time the aircraft flew this flight.'}),
379
+
380
+ ('cancelled', ('bool', {}), {
381
+ 'deprecated': True,
382
+ 'doc': 'Deprecated. Please use :status.'}),
383
+
384
+ ('carrier', ('ou:org', {}), {
385
+ 'deprecated': True,
386
+ 'doc': 'Deprecated. Please use :operator.'}),
387
+
388
+ ('craft', ('transport:air:craft', {}), {
389
+ 'deprecated': True,
390
+ 'doc': 'Deprecated. Please use :vehicle.'}),
391
+
162
392
  ('to:port', ('transport:air:port', {}), {
163
- 'doc': 'The destination airport of this flight.'}),
393
+ 'deprecated': True,
394
+ 'doc': 'Deprecated. Please use :arrival:place.'}),
395
+
164
396
  ('from:port', ('transport:air:port', {}), {
165
- 'doc': 'The origin airport of this flight.'}),
397
+ 'deprecated': True,
398
+ 'doc': 'Deprecated. Please use :departure:place.'}),
399
+
166
400
  ('stops', ('array', {'type': 'transport:air:port'}), {
167
- 'doc': 'An ordered list of airport codes for stops which occurred during this flight.'}),
168
- ('cancelled', ('bool', {}), {
169
- 'doc': 'Set to true for cancelled flights.'}),
401
+ 'deprecated': True,
402
+ 'doc': 'Deprecated. Please use transport:stop.'}),
403
+
170
404
  )),
171
405
  ('transport:air:telem', {}, (
172
406
  ('flight', ('transport:air:flight', {}), {
@@ -198,34 +432,43 @@ class TransportModule(s_module.CoreModule):
198
432
  )),
199
433
  ('transport:air:occupant', {}, (
200
434
  ('type', ('str', {'lower': True}), {
201
- 'doc': 'The type of occupant such as pilot, crew or passenger.'}),
435
+ 'deprecated': True,
436
+ 'doc': 'Deprecated. Please use transport:occupant.'}),
202
437
  ('flight', ('transport:air:flight', {}), {
203
- 'doc': 'The flight that the occupant was aboard.'}),
438
+ 'deprecated': True,
439
+ 'doc': 'Deprecated. Please use transport:occupant.'}),
204
440
  ('seat', ('str', {'lower': True}), {
205
- 'doc': 'The seat assigned to the occupant'}),
441
+ 'deprecated': True,
442
+ 'doc': 'Deprecated. Please use transport:occupant.'}),
206
443
  ('contact', ('ps:contact', {}), {
207
- 'doc': 'The contact information of the occupant.'}),
444
+ 'deprecated': True,
445
+ 'doc': 'Deprecated. Please use transport:occupant.'}),
208
446
  )),
209
447
  # TODO ais numbers
448
+ ('transport:sea:vessel:type:taxonomy', {}, ()),
210
449
  ('transport:sea:vessel', {}, (
450
+
211
451
  ('imo', ('transport:sea:imo', {}), {
212
452
  'doc': 'The International Maritime Organization number for the vessel.'}),
453
+
454
+ ('type', ('transport:sea:vessel:type:taxonomy', {}), {
455
+ 'doc': 'The type of vessel.'}),
456
+
457
+ # TODO: convert this to an entity:name
213
458
  ('name', ('str', {'lower': True, 'onespace': True}), {
214
459
  'doc': 'The name of the vessel'}),
215
460
  ('length', ('geo:dist', {}), {
216
- 'doc': 'The official overall vessel length'}),
461
+ 'deprecated': True,
462
+ 'doc': 'Deprecated. Please use :phys:length.'}),
217
463
  ('beam', ('geo:dist', {}), {
218
464
  'doc': 'The official overall vessel beam'}),
219
465
  ('flag', ('iso:3166:cc', {}), {
220
466
  'doc': 'The country the vessel is flagged to.'}),
221
467
  ('mmsi', ('transport:sea:mmsi', {}), {
222
468
  'doc': 'The Maritime Mobile Service Identifier assigned to the vessel.'}),
223
- ('built', ('time', {}), {
224
- 'doc': 'The year the vessel was constructed.'}),
225
469
  ('make', ('str', {'lower': True, 'strip': True}), {
226
- 'doc': 'The make of the vessel.'}),
227
- ('model', ('str', {'lower': True, 'strip': True}), {
228
- 'doc': 'The model of the vessel.'}),
470
+ 'deprecated': True,
471
+ 'doc': 'Deprecated. Please use :manufacturer:name.'}),
229
472
  ('operator', ('ps:contact', {}), {
230
473
  'doc': 'The contact information of the operator.'}),
231
474
  # TODO tonnage / gross tonnage?
@@ -260,6 +503,96 @@ class TransportModule(s_module.CoreModule):
260
503
  ('destination:eta', ('time', {}), {
261
504
  'doc': 'The estimated time of arrival that the vessel has declared.'}),
262
505
  )),
506
+
507
+ ('transport:rail:consist', {}, (
508
+
509
+ ('cars', ('array', {'type': 'transport:rail:car', 'uniq': True}), {
510
+ 'doc': 'The rail cars, including locomotives, which compose the consist.'}),
511
+ )),
512
+
513
+ ('transport:rail:train', {}, (
514
+
515
+ ('id', ('str', {'strip': True}), {
516
+ 'doc': 'The ID assigned to the train.'}),
517
+ )),
518
+
519
+ ('transport:rail:car:type:taxonomy', {}, ()),
520
+ ('transport:rail:car', {}, (
521
+ ('type', ('transport:rail:car:type:taxonomy', {}), {
522
+ 'doc': 'The type of rail car.'}),
523
+ )),
524
+
525
+ ('transport:occupant:role:taxonomy', {}, ()),
526
+ ('transport:occupant', {}, (
527
+
528
+ ('role', ('transport:occupant:role:taxonomy', {}), {
529
+ 'doc': 'The role of the occupant such as captain, crew, passenger.'}),
530
+
531
+ ('contact', ('ps:contact', {}), {
532
+ 'doc': 'Contact information of the occupant.'}),
533
+
534
+ ('trip', ('transport:trip', {}), {
535
+ 'doc': 'The trip, such as a flight or train ride, being taken by the occupant.'}),
536
+
537
+ ('vehicle', ('transport:vehicle', {}), {
538
+ 'doc': 'The vehicle that transported the occupant.'}),
539
+
540
+ ('seat', ('str', {'strip': True}), {
541
+ 'doc': 'The seat which the occupant sat in. Likely in a vehicle specific format.'}),
542
+
543
+ ('boarded', ('time', {}), {
544
+ 'doc': 'The time when the occupant boarded the vehicle.'}),
545
+
546
+ ('boarded:place', ('geo:place', {}), {
547
+ 'doc': 'The place where the occupant boarded the vehicle.'}),
548
+
549
+ ('boarded:point', ('transport:point', {}), {
550
+ 'doc': 'The boarding point such as an airport gate or train platform.'}),
551
+
552
+ ('disembarked', ('time', {}), {
553
+ 'doc': 'The time when the occupant disembarked from the vehicle.'}),
554
+
555
+ ('disembarked:place', ('geo:place', {}), {
556
+ 'doc': 'The place where the occupant disembarked the vehicle.'}),
557
+
558
+ ('disembarked:point', ('transport:point', {}), {
559
+ 'doc': 'The disembarkation point such as an airport gate or train platform.'}),
560
+ )),
561
+
562
+ ('transport:cargo', {}, (
563
+
564
+ ('object', ('phys:object', {}), {
565
+ 'doc': 'The physical object being transported.'}),
566
+
567
+ ('trip', ('transport:trip', {}), {
568
+ 'doc': 'The trip being taken by the cargo.'}),
569
+
570
+ ('vehicle', ('transport:vehicle', {}), {
571
+ 'doc': 'The vehicle used to transport the cargo.'}),
572
+
573
+ ('container', ('transport:container', {}), {
574
+ 'doc': 'The container in which the cargo was shipped.'}),
575
+
576
+ ('loaded', ('time', {}), {
577
+ 'doc': 'The time when the cargo was loaded.'}),
578
+
579
+ ('loaded:place', ('geo:place', {}), {
580
+ 'doc': 'The place where the cargo was loaded.'}),
581
+
582
+ ('loaded:point', ('transport:point', {}), {
583
+ 'doc': 'The point where the cargo was loaded such as an airport gate or train platform.'}),
584
+
585
+ ('unloaded', ('time', {}), {
586
+ 'doc': 'The time when the cargo was unloaded.'}),
587
+
588
+ ('unloaded:place', ('geo:place', {}), {
589
+ 'doc': 'The place where the cargo was unloaded.'}),
590
+
591
+ ('unloaded:point', ('transport:point', {}), {
592
+ 'doc': 'The point where the cargo was unloaded such as an airport gate or train platform.'}),
593
+ )),
594
+
595
+ ('transport:shipping:container', {}, ()),
263
596
  ),
264
597
  }
265
598
  return (('transport', modl), )
@@ -990,12 +990,12 @@ bar baz",vv
990
990
  self.isinstance(resp.get('err'), tuple)
991
991
 
992
992
  q = f'''
993
- $fields = $lib.list(
994
- ({{'name':'file', 'sha256':$sha256, 'filename':'file'}}),
995
- ({{'name':'zip_password', 'value':'test'}}),
996
- ({{'name':'dict', 'value':({{'foo':'bar'}}) }}),
997
- ({{'name':'bytes', 'value':$bytes}})
998
- )
993
+ $fields = ([
994
+ {{'name':'file', 'sha256':$sha256, 'filename':'file'}},
995
+ {{'name':'zip_password', 'value':'test'}},
996
+ {{'name':'dict', 'value':{{'foo':'bar'}} }},
997
+ {{'name':'bytes', 'value':$bytes}}
998
+ ])
999
999
  $resp = $lib.inet.http.post("https://127.0.0.1:{port}/api/v1/pushfile",
1000
1000
  fields=$fields, ssl_verify=(0))
1001
1001
  return($resp)