Newer
Older
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
Package generated_from_step3body_json {
Import all from HTTP.MessageBased
Type String
Type TODO_RESOLVE_REFERENCED
Use "step3body.json" as SOURCE_MAPPING
Type JSON_String
Structure JSON extends Body (
optional Services services
)
Collection Services of Service
Structure Service (
JSON_String ^name,
JSON_String adminStatus,
Ports ports
)
JSON_String p1
JSON_String p2
JSON_String p3
JSON_String p4
JSON_String node1
JSON_String node2
//Option 1: Map to concrete values that shall be substituted using data-mappings
//Import different mappings or resolve dynamically?
Use "companysettings" as Settings
Map p1 to "companySettings.svc['access-port1'][ 'a-link-aggr-id']" in Settings as P1_Map
Map p2 to "companySettings.svc['access-port2'][ 'i-d-link-W-id']" in Settings as P1_Map
//...
//Option 2: Use substitution inline with paths
//Option 3: Apply functions to transform / substitute some parts
//To which extent is that needed? is it dynamic or statically initialised at start?
//-> Defer to adaptation? expose only necessary parts?
Collection Ports of Port
Structure Port (
JSON_String accessNodeId,
JSON_String accessLtpId,
JSON_String tagType,
JSON_String vlanValue,
JSON_String bwprofile
)
//Just use mappings? or replace with variables? (if dynamic)
JSON JSON_instance (
services = [
(
^name = 'S1-local',
adminStatus = 'up',
ports = [
(accessNodeId = node1, accessLtpId = p1, tagType = 's-vlan', vlanValue = '201'),
(accessNodeId = node2, accessLtpId = p3, tagType = 'c-vlan', vlanValue = '101', bwprofile = true)
]
),
(
^name = 'S2-local-1',
adminStatus = 'up',
ports = [
(accessNodeId = node1, accessLtpId = p1, tagType = 's-vlan', vlanValue = '202'),
(accessNodeId = node2, accessLtpId = p2, tagType = 's-vlan', vlanValue = '202')
]
),
(
^name = 'S3-local-1',
adminStatus = 'up',
ports = [
(accessNodeId = node1, accessLtpId = p1, tagType = 's-vlan', vlanValue = '203'),
(accessNodeId = node2, accessLtpId = p4, tagType = 's-vlan', vlanValue = '203')
]
),
(
^name = 'S1-inter-d-1',
adminStatus = 'up',
ports = [
(accessNodeId = node1, accessLtpId = p1, tagType = 's-vlan', vlanValue = '204'),
(accessNodeId = node2, accessLtpId = p2, tagType = 's-vlan', vlanValue = '204')
]
),
(
^name = 'S2-inter-d-1',
adminStatus = 'up',
ports = [
(accessNodeId = node1, accessLtpId = p1, tagType = 's-vlan', vlanValue = '205'),
(accessNodeId = node2, accessLtpId = p2, tagType = 's-vlan', vlanValue = '205')
]
),
(
^name = 'S3-inter-d-1',
adminStatus = 'up',
ports = [
(accessNodeId = node1, accessLtpId = p1, tagType = 's-vlan', vlanValue = '206'),
(accessNodeId = node2, accessLtpId = p4, tagType = 's-vlan', vlanValue = '206')
]
),
(
^name = 'S4-inter-d-1',
adminStatus = 'up',
ports = [
(accessNodeId = node1, accessLtpId = p1, tagType = 's-vlan', vlanValue = '207'),
(accessNodeId = node2, accessLtpId = p4, tagType = 's-vlan', vlanValue = '207')
]
),
(
^name = 'S1-leaf-2',
adminStatus = 'up',
ports = [
(accessNodeId = node2, accessLtpId = p2, tagType = 's-vlan', vlanValue = '208'),
(accessNodeId = node2, accessLtpId = p4, tagType = 's-vlan', vlanValue = '208')
]
),
(
^name = 'S2-leaf-2',
adminStatus = 'up',
ports = [
(accessNodeId = node2, accessLtpId = p2, tagType = 's-vlan', vlanValue = '209'),
(accessNodeId = node2, accessLtpId = p3, tagType = 'c-vlan', vlanValue = '103', bwprofile = true)
]
),
(
^name = 'S3-leaf-1',
adminStatus = 'up',
ports = [
(accessNodeId = node2, accessLtpId = p3, tagType = 'c-vlan', vlanValue = '104', bwprofile = true),
(accessNodeId = node2, accessLtpId = p4, tagType = 's-vlan', vlanValue = '210')
]
)
]
)
}