1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
|
# First attempt at microservice definitions in tosca-yaml.
# Ted Johnson, Dec. 2015
## Ralph Knag, config additions , Feb. 2016
tosca_definitions_version: tosca_simple_yaml_1_0_0
metadata:
template_version: 1.0.2
data_types:
########################################################
### data types related to schemas
baseFieldDefinition:
description: base class for field definitions
properties:
name:
required: true
type: string
type:
required: true
type: string
constraints:
- valid_values: [ string, int, float, ipv4, ipv6, date, date_time, list, map, other]
format:
required: false
type: string
default_value:
required: false
type: string
comment:
required: false
type: string
constraints:
description: Properties that the field must satisfy
required: false
type: list
entry_schema:
type: string
constraints:
list_delimiter:
description: delimiter when list data packed into a string type.
required: false
type: string
# subtype can be used for policy override allowed?
subType:
required: false
type : string
constraints:
- valid_values: [ policyOveride, noPolicyOverride ]
positionalFieldDefinition:
derived_from: baseFieldDefinition
description: fields with a fixed-position schema
properties:
position:
required: true
type: integer
constraints:
- greater_or_equal: 0
pathFieldDefinition:
derived_from: baseFieldDefinition
description: fields accessed via navigation
properties:
path:
required: true
type: string
fieldDefinition:
derived_from: baseFieldDefinition
description: positional or path field
properties:
path:
required: false
type: string
position:
required: false
type: integer
constraints:
- greater_or_equal: 0
comment:
required: false
type: string
length:
required: false
type: integer
constraints:
- greater_than: 0
fieldList:
description: fields in a schema
properties:
fieldList:
required: true
type: list
entry_schema:
type: fieldDefinition
########################################################
### data types related to data properties
sortedBy:
description: sorting properties of a data set
properties:
fields:
required: true
type: list
entry_schema:
type: fieldDefinition
sorting:
required: true
type: string
default: fullySorted
constraints:
- valid_values: [ fullySorted, partiallySorted ]
lag:
description: maximum disorder in a partially sorted
required: false
type: integer
constraints:
- greater_or_equal: 0
keyFields:
description: key fields of a data set
properties:
fields:
required: true
type: list
entry_schema:
type: fieldDefinition
timestamp:
required: false
type: integer
###############################################################
###############################################################
node_types:
dcaeCatalogNodes:
derived_from: tosca.nodes.Root
properties:
UUID:
required: true
type: string
name:
required: true
type: string
version:
required: true
type: string
constraints:
- pattern: \d+[.]\d+[.]\d+
schemaVersion:
required: false
type: integer
default: 1
########################################################
### node types related to schemas
baseDataFormat:
description: base data format
derived_from: dcaeCatalogNodes
properties:
fieldList:
required: true
type: list
entry_schema:
type: fieldDefinition
formatType:
type: string
required: true
constraints:
- valid_values: [ fixed_format, variable_format, json ]
formatSubType:
required: true
type: string
fullList:
type: string
required: true
constraints:
- valid_values: [ yes, no ]
default: yes
capabilities:
dataProperties:
type: dcaeCatalog.capabilities.dataFormat
baseVariableDataFormat:
derived_from: baseDataFormat
description: base class for fixed-position data formats
properties:
formatType:
type: string
required: true
constraints:
- equal: variable_format
# probably more needed here - not sure baseDataFormat is sufficient...rhk
jsonDataFormat:
derived_from: baseVariableDataFormat
description: JSON format
properties:
formatSubType:
required: true
type: string
default: json
constraints:
- equal: json
endOfRecord:
required: false
type: string
numFields:
required: false
type: integer
baseFixedDataFormat:
derived_from: baseDataFormat
description: base class for fixed-position data formats
properties:
formatType:
type: string
required: true
constraints:
- equal: fixed_format
delimitedAsciiDataFormat:
derived_from: baseFixedDataFormat
description: delimited ascii format
properties:
formatSubType:
required: true
type: string
default: delimitedAscii
constraints:
- equal: delimitedAscii
delimiter:
required: true
type: string
default: |
endOfRecord:
required: false
type: string
numFields:
required: false
type: integer
fixedWidthAsciiDataFormat:
derived_from: baseFixedDataFormat
description: delimited ascii format
properties:
formatSubType:
required: true
type: string
default: fixedWidthAscii
constraints:
- equal: fixedWidthAscii
endOfRecord:
required: false
type: string
numFields:
required: false
type: integer
fixedBinaryDataFormat:
derived_from: baseFixedDataFormat
description: binary data, e.g. thrift messages, protocol buffers
properties:
formatSubType:
required: true
type: string
default: fixedBinaryData
constraints:
- equal: fixedBinaryData
binaryFormat:
required: true
type: string
###############################################
### Node types related to data properties
dataProperties:
description: Essential non-schema information about a data set
derived_from: dcaeCatalogNodes
properties:
sort:
required: false
type: sortedBy
keys:
required: false
type: keyFields
timestamp:
description: the field indicating the time when corresponding event occurred
required: false
type: string
duration:
description: the field indicating the length of the described measurement
required: false
type: string
period:
description: how often the data is generated. 0 means continuously.
required: true
type: integer
default: 0
constraints:
- greater_or_equal: 0
capabilities:
dataProperties:
type: dcaeCatalog.capabilities.dataProperties
keyedDataProperties:
derived_from: dataProperties
description: Data sets that are required to hav a key
properties:
keys:
required: true
type: keyFields
referenceDataProperties:
derived_from: dataProperties
description: data set from external source that is joined against streaming data
properties:
updateType:
description: how the reference data is refreshed - snapshots, incremental, or both
required: true
type: string
keyedReferenceDataProperties:
derived_from: referenceDataProperties
description: reference data that maps a key to a value, generally with a valid time interval
properties:
keys:
required: true
type: keyFields
startTimeField:
description: the time when the key --> value mapping became valid
required: false
type: string
endTimeField:
description: time when the key --> value mapping ceased to be valid
required: false
type: string
#######################################################################
#### Things which describe how a data source can be accessed
dataDelivery:
description: the means of connecting to a data source. very incomplete.
derived_from: dcaeCatalogNodes
properties:
deliveryMechanism:
description: the general method by which data is delivered from a source.
required: true
type: string
constraints:
- valid_values: [stream, file, database, table ]
polling:
description: push vs. pull
required: true
type: string
constraints:
- valid_values: [ push, pull]
capabilities:
dataDelivery:
type: dcaeCatalog.capabilities.dataDelivery
streamDataDelivery:
description: a data source that is a streaming source.
derived_from: dataDelivery
properties:
deliveryMechanism:
description: the general method by which data is delivered from a source.
required: true
type: string
constraints:
- equal: stream
polling:
description: push vs. pull
required: true
type: string
constraints:
- equal: push
genericCDAPDelivery:
description: a streaming data source delivered via the CDAP generic
derived_from: streamDataDelivery
# A UEB stream is kafka plus security TBD
dmaapMessageDelivery:
description: a streaming data source delivered via a kafka queue
derived_from: streamDataDelivery
properties:
servers:
description: the servers to contact to access the kafka queue.
required: true
type: list
entry_schema:
type: string
constraints:
topic:
description: the stream identifier (topic in kafka terminology)
required: true
type: string
numPartitions:
description: the number of partitions for the kafka topic
required: false
default: 1
type: integer
PartitioningMethod:
description: the mechanism that assigns records to partitions
required: false
type: string
partitionSubscriptions:
description: if specified, the set of partitions that contain a particular substream
required: false
type: list
entry_schema:
type: integer
dmaapDataRouterDelivery:
description: a data source that is delivered via files.
derived_from: dataDelivery
properties:
deliveryMechanism:
description: the general method by which data is delivered from a source.
required: true
type: string
constraints:
- valid_values: [file]
fileName:
description: a name (or naming scheme) of the file
required: true
type: string
fileDataDelivery:
description: a data source that is delivered via files.
derived_from: dataDelivery
properties:
deliveryMechanism:
description: the general method by which data is delivered from a source.
required: true
type: string
constraints:
- valid_values: [file]
fileName:
description: a name (or naming scheme) of the file
required: true
type: string
pulledFileDelivery:
description: a data source that is delivered via files pulled from an external source
derived_from: fileDataDelivery
properties:
uri:
description: the thing to access to get a new file
required: true
type: string
trigger:
description: a description of the thing that triggers pulling a new file.
required: true
type: string
####################################
### Description of a data source (data output)
dataSource:
description: a generic data source description, link to schema, properties, delivery
derived_from: dcaeCatalogNodes
# properties:
requirements:
- dataFormat:
capability: dcaeCatalog.capabilities.dataFormat
- dataDelivery:
capability: dcaeCatalog.capabilities.dataDelivery
- dataProperties:
capability: dcaeCatalog.capabilities.dataProperties
capabilities:
dataSource:
type: dcaeCatalog.capabilities.dataSource
occurrences: [0, UNBOUNDED]
##########################
### Description of a data requirement (data input)
dataRequirement:
description: a generic data source description, link to schema, properties, delivery
derived_from: dcaeCatalogNodes
# properties:
requirements:
- dataFormat:
capability: dcaeCatalog.capabilities.dataFormat
occurrences: [1, UNBOUNDED]
- dataProperties:
capability: dcaeCatalog.capabilities.dataProperties
- dataDelivery:
capability: dcaeCatalog.capabilities.dataDelivery
capabilities:
dataRequirement:
type: dcaeCatalog.capabilities.dataRequirement
occurrences: [0, UNBOUNDED]
####################################
### Description of a processingModuleParameters (module parameters excluding input/output descriptions
### allows any baseDataFormat derived input
processingModuleParameters:
description:
derived_from: baseDataFormat
properties:
dataType:
required: true
type: string
capabilities:
moduleParameters:
type: dcaeCatalog.capabilities.processingModuleParameters
################################
### Module Dependencies
instantiationDependency:
description: code dependencies (possible transitive)
derived_from: dcaeCatalogNodes
properties:
dependencyType:
required: false
type: string
constraints:
- valid_values: [R, Python, CDAP]
dependencyValue:
required: true
type: string
capabilities:
dataProperties:
type: dcaeCatalog.capabilities.instantiationDependency
occurrences: [0, UNBOUNDED]
requirements:
- dependencies:
capability: dcaeCatalog.capabilities.instantiationDependency
occurrences: [0, UNBOUNDED]
####################################
### Description of a processingModuleDeployment - deployment attributes
processingModuleDeployment:
description: deployment attributes
derived_from: dcaeCatalogNodes
properties:
language:
required: true
type: string
version:
type: string
required: true
deploymentType:
required: true
type: string
capabilities:
moduleDeployment:
type: dcaeCatalog.capabilities.processingModuleDeployment
occurrences: [0, UNBOUNDED]
requirements:
- dependencies:
capability: dcaeCatalog.capabilities.instantiationDependency
occurrences: [0, UNBOUNDED]
####################################
### Description of a processingModuleMetaData - search tags
processingModuleMetadata:
description: metadata tags
derived_from: dcaeCatalogNodes
properties:
metaDataList:
required: true
type: list
entry_schema:
type: string
constraints:
capabilities:
metadata:
type: dcaeCatalog.capabilities.processingModuleMetadata
occurrences: [0, UNBOUNDED]
####################################
### Description of a processingModule
processingModule:
description: full processing module description
derived_from: dcaeCatalogNodes
properties:
moduleDescription:
required: true
type: string
requirements:
- processingModuleparameters:
capability: dcaeCatalog.capabilities.processingModuleParameters
occurrences: [0, UNBOUNDED]
- processingModuleDeployment:
capability: dcaeCatalog.capabilities.processingModuleDeployment
occurrences: [1, UNBOUNDED]
- processingModuleMetadata:
capability: dcaeCatalog.capabilities.processingModuleMetadata
occurrences: [1, UNBOUNDED]
- dataRequirementsList:
capability: dcaeCatalog.capabilities.dataRequirement
occurrences: [1, UNBOUNDED]
- dataSourcesList:
capability: dcaeCatalog.capabilities.dataSource
occurrences: [1, UNBOUNDED]
capability_types:
dcaeCatalog.capabilities.dataFormat:
derived_from: tosca.capabilities.Root
dcaeCatalog.capabilities.dataProperties:
derived_from: tosca.capabilities.Root
dcaeCatalog.capabilities.dataDelivery:
derived_from: tosca.capabilities.Root
dcaeCatalog.capabilities.instantiationDependency:
derived_from: tosca.capabilities.Root
dcaeCatalog.capabilities.processingModuleMetadata:
derived_from: tosca.capabilities.Root
dcaeCatalog.capabilities.processingModuleParameters:
derived_from: tosca.capabilities.Root
dcaeCatalog.capabilities.processingModuleDeployment:
derived_from: tosca.capabilities.Root
dcaeCatalog.capabilities.dataRequirement:
derived_from: tosca.capabilities.Root
dcaeCatalog.capabilities.dataSource:
derived_from: tosca.capabilities.Root
|