-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathservice-shape.ttl
More file actions
94 lines (91 loc) · 5.45 KB
/
Copy pathservice-shape.ttl
File metadata and controls
94 lines (91 loc) · 5.45 KB
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
PREFIX piveau: <https://piveau.eu/ns/voc#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX shacl: <http://www.w3.org/ns/shacl#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <https://schema.org/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX gx: <https://w3id.org/gaia-x/development#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX ac3: <https://ac3-project.eu/#>
ac3:ServiceShape
rdf:type shacl:NodeShape ;
shacl:ignoredProperties ( rdf:type ) ;
shacl:property [ shacl:maxCount 1 ;
piveau:mappingClass "StandardText" ;
piveau:mappingName "id" ] ;
shacl:property [ shacl:datatype xsd:string ;
shacl:description "Human readable title"@en ;
shacl:maxCount 1 ;
shacl:name "Title" ;
shacl:order 1 ;
shacl:path dct:title ;
piveau:mappingClass "StandardText" ;
piveau:mappingName "title" ] ;
shacl:property [ shacl:datatype xsd:string ;
shacl:description "Human readable name"@en ;
shacl:maxCount 1 ;
shacl:minCount 1 ;
shacl:name "Name"@en ;
shacl:order 2 ;
shacl:path schema:name ;
piveau:mappingClass "StandardText" ;
piveau:mappingName "name" ] ;
shacl:property [ shacl:datatype xsd:string ;
shacl:description "Free text description"@en ;
shacl:maxCount 1 ;
shacl:name "Description"@en ;
shacl:order 3 ;
shacl:path schema:description ;
piveau:mappingClass "StandardText" ;
piveau:mappingName "description" ] ;
shacl:property [ shacl:datatype xsd:string ;
shacl:description "The service's image."@en ;
shacl:maxCount 1 ;
shacl:name "Image"@en ;
shacl:order 4 ;
shacl:path ac3:image ;
piveau:mappingClass "StandardText" ;
piveau:mappingName "image" ] ;
shacl:property [ shacl:datatype xsd:string ;
shacl:description "The service's env variables."@en ;
shacl:minCount 0 ;
shacl:order 6 ;
shacl:pattern "^[A-Za-z_][A-Za-z0-9_]*=.+$" ;
shacl:path ac3:EnvironmentVariable ] ;
shacl:property [ shacl:datatype xsd:string ;
shacl:description "The service's exposed ports."@en ;
shacl:minCount 0 ;
shacl:order 7 ;
shacl:pattern "^[0-9]+:[0-9]+$" ;
shacl:path ac3:ExposedPort ] ;
shacl:property [ shacl:datatype xsd:string ;
shacl:description "The service's volumes."@en ;
shacl:minCount 0 ;
shacl:order 8 ;
shacl:path ac3:volumes ] ;
shacl:property [ shacl:description "The service's resource requirements."@en ;
shacl:minCount 0 ;
shacl:maxCount 1 ;
shacl:order 8 ;
shacl:path gx:ContainerResourceLimits ] ; # https://docs.gaia-x.eu/ontology/development/classes/ContainerResourceLimits/
shacl:property [ shacl:description "The service's SLAs."@en ;
shacl:minCount 0 ;
shacl:maxCount 1 ;
shacl:order 8 ;
shacl:path ac3:microservicesSLA ] ;
shacl:targetClass gx:ServiceOffering .
# Define constraints for Microservices SLA
ac3:MicroservicesSLAShape
a shacl:NodeShape ;
shacl:targetClass gx:MicroservicesSLA ;
shacl:property [ shacl:path ac3:serviceAvailability ;
shacl:datatype schema:Number ;
shacl:minInclusive 0 ;
shacl:maxInclusive 100 ;
shacl:message "Service Availability must be between 0 and 100%." ] ;
shacl:property [ shacl:path ac3:maxResponseTime ;
shacl:in ( "Low" "Medium" "High" ) ;
shacl:message "Max Response Time should be 'Low', 'Medium', or 'High'." ] ;
shacl:property [ shacl:path ac3:dataThroughput ;
shacl:in ( "Low" "Medium" "High" ) ;
shacl:message "Data Throughput should be 'Low', 'Medium', or 'High'." ] .