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
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
Package Descriptions {
Import all from Standard
Import all from Objectives
Import all from Config
Import all from generated_from_step3body_json
Import all from generated_from_step2body_json
Import all from HTTP.MessageBased
Annotation Failure
Type ^PICS extends Boolean
^PICS MW_8040
^PICS MW_8345
Boolean TD_SSP_01_Completed
String modules_state_uri
Use "pm.settings.json" as SETTINGS
Map modules_state_uri
to "{{TD_SDN_RESTCONF_PATH}}/data/ietf-yang-library:modules-state"
in SETTINGS
as modules_state_uri_MAPPING
//TODO:to be imported from protocol definition
Structure JSON_modules_state extends Body (
String modules_state,
Modules modules
)
JSON_modules_state JSON_instance_modules_state ()
Collection Modules of Module
Structure Module (
String name,
String revision,
String namespace
)
// ...
//TODO: clean up, align, document, and share
Test Description DomainControllerInitialisation uses TestLanArchitecture
Test Description DomainControllersInitialisation uses TestLanArchitecture
Test Description DevicesUpgrade uses TestLanArchitecture
Test Description BasicConfigurationsSetup uses TestLanArchitecture
Test Description L2DataServicesCreation uses TestLanArchitecture
Test Description ResetDomainControllers uses TestLanArchitecture
Test Description ResetMicrowaveUnits uses TestLanArchitecture
Objective ResponseContainsAllYanModules {
Description: "The response body of the request should contain a list of all YANG modules"
References: "Postman implementation"
}
Test Purpose Description TPD_MDD_01 {
Objective: TD_MDD_01
Configuration: TestLanArchitecture //TREE_CFG?
PICS: (MW_8040 or MW_8345) //etc.
Initial conditions
with {
//initial textual
perform action: "Postman has been correctly initialized earlier, by executing
TD_POSTMAN_INIT"
perform action: "All the Domain Controller instances up and running normally"
perform action: "All the devices are upgraded to correct versions"
perform action: "All basic configurations are completed (e.g., NE_id, OSPF, PCEP, etc.)"
//then gradually formalised, e.g.
execute DomainControllersInitialisation
execute DevicesUpgrade
execute BasicConfigurationsSetup
//!DONE: check constraints above -> fixed
//...
}
Expected behaviour
ensure that {
when {
//initial textual
perform action: "Send GET request via Postman to all domain controllers by
executing Collection TD_MDD_01"
//refine to first structure
//TODO: what happens to all the parentheses?!?! -> make filter optional (or remove?)
pm::mpi sends rGET() to X::mpi
//refine to specific uri inline
pm::mpi sends rGET(
uri = "{{TD_SDN_RESTCONF_PATH}}/data/ietf-yang-library:modules-state"
) to X::mpi
//...or define elsewhere
pm::mpi sends rGET(
uri = modules_state_uri
) to X::mpi
}
then {
//initial textual
perform action: "Check the response body of each request and confirm if all the
Restconf servers are serviceable."
perform action: "The response body of the request should contain a list of all
YANG modules and submodules used by the Restconf server along with
information about name and revision for each module."
perform action: "The response body of each query should contain the specified YANG
module along with its name and revision."
//refinements
// Test 1: Check the response body of the above request and confirm if the Restconf
// server is serviceable.
pm::mpi receives OK() from X::mpi
// Step 2: The response body of the request should contain a list of all YANG modules
//and submodules used by the Restconf server along with information about name and revision
//for each module.
//---
//asserts can be used but probably simpler to use a specification of the expected data
//optionally: explicit objective that can be checked
Objective: ResponseContainsAllYanModules
pm::mpi receives OK(
body = JSON_instance_modules_state(
modules_state = ?,
modules_state = ?,
//TODO: do we need a pattern ? / * for collections? Otherwise we need a loop instead
//TODO: as a side note, is checking for the presence of a property
// equivalent to that property having any value?
modules[*] = (name = ?, revision = ?, namespace = ?)
//...
)) from X::mpi
//asserts can provide fine granular diagnostics though, for individual problems
response = pm::mpi receives OK() from X::mpi
//optionally: explicit objective that can be checked
Objective: ResponseContainsAllYanModules
//optionally: annotations can be used for inline information
@Failure: "The response body of the request should contain a list of all YANG modules"
//TODO: property access for subclasses?
//TODO: do we have matching expressions in assertions as well
//TODO: do we have checking of types
assert ( pm::response.body == JSON_instance_modules_state(
modules_state = ?,
//TODO: do we need a pattern ? / * for collections? Otherwise we need a loop instead
//TODO: as a side note, is checking for the presence of a property
// equivalent to that property having any value?
modules[*] = (name = ?, revision = ?, namespace = ?)
//
))
on pm //may be skipped at first
with {
timeLabel=now
}
//alternatively with a loop
//TODO: do we need counters? integrated in loops? e.g. with state to address collections?
pm::i = 0
repeat 5 times on pm
//[MW_8040]
{
//DONE: fixed constraint with bounded loop behaviour, still not quite there
assert ( pm::response.body == JSON_instance_modules_state(
modules_state = ?,
//TODO: as a side note, is checking for the presence of a property
// equivalent to that property having any value?
modules[pm::i] = (name = ?, revision = ?, namespace = ?)
//
))
on pm //may be skipped at first
//DONE: handle undefined return types -> a bit of a hack, assuming they are the same
pm::i = ( pm::i + 1 )
}
}
}
}
Test Purpose Description TPD_MSP_01 {
Objective: TD_MSP_01
Configuration: TestLanArchitecture //TREE_CFG?
PICS: (MW_8040 or MW_8345) //etc.
Initial conditions
with {
//initial textual
perform action: "Postman has been correctly initialized earlier, by executing TD_POSTMAN_INIT"
perform action: "The Domain Controller instance is up and running normally"
perform action: "All the devices are upgraded to correct versions"
perform action: "All basic configurations are completed (e.g., NE_id, OSPF, PCEP, etc.)"
perform action: "All Restconf servers are serviceable."
perform action: "If TD_SSP_01 has been run before TD_ MSP_01, all Domain Controllers and
microwave units should be reset to the state they were before executing
TD_SSP_01"
//then gradually formalised, e.g.
execute DomainControllerInitialisation
execute DomainControllerInitialisation
execute DevicesUpgrade
execute BasicConfigurationsSetup
if [TD_SSP_01_Completed] {
execute ResetDomainControllers
execute ResetMicrowaveUnits
}
//!TODO: check constraints above
//...
}
Expected behaviour
ensure that {
when {
//initial textual
perform action: "Send POST request via Postman to all domain controllers
by executing Collection TD_ SSP_01"
// //refine to first structure
// pm::mpi sends rPOST() to X::mpi
// //refine to specific body (or define inline)
// pm::mpi sends rPOST(body = JSON_instance) to X::mpi
//
// //provide additional parameter overrides
// pm::mpi sends rPOST(
// body = JSON_instance (
// services[0].adminStatus = "up",
// //..
// //TODO: check constraints
// services[0].ports[1].accessNodeId = node1
// //..
// )
// )
// to X::mpi //....
}
then {
//initial textual
perform action: "Check the TGA if the data start flowing properly."
// pm::mpi receives OK() from X::mpi
// pm::mpi receives OK(body = JSON_instance) from X::mpi
// pm::mpi receives OK(
// body = JSON_instance(
// //..
// services[2] = omit,
// //...
// services[3].ports[1] = omit
// )
// )
// from X::mpi
// //first response definition, then refined, also with overrides
// //!TODO: Why are comments before receive message not OK?
// //... refine further
}
}
}
Test Purpose Description TPD_MSP_04 {
Objective: TD_MSP_04
Configuration: TestLanArchitecture //TREE_CFG?
PICS: (MW_8040 or MW_8345) //etc.
Initial conditions
with {
//initial textual
perform action: "Postman has been correctly initialized earlier, by executing TD_POSTMAN_INIT"
perform action: "All the Domain Controller instances are up and running normally"
perform action: "All the devices are upgraded to correct versions"
perform action: "All basic configurations are completed (e.g., NE_id, OSPF, PCEP, etc.)"
perform action: "All Restconf servers are serviceable."
perform action: "All L2 data services are successfully created."
//then gradually formalised, e.g.
execute DomainControllersInitialisation
execute DevicesUpgrade
execute BasicConfigurationsSetup
execute L2DataServicesCreation
//!TODO: check constraints above
//...
}
Expected behaviour
ensure that {
when {
//initial textual
perform action: "Send GET request via Postman to
all domain controllers by executing
Collection TD_MSP_04"
//refine to first structure
pm::mpi sends rGET() to X::mpi
//refine to specific body (or define inline)
pm::mpi sends rGET(body = JSON_instance) to X::mpi
//provide additional parameter overrides
pm::mpi sends rGET(
body = JSON_instance (
services[0].adminStatus = "up" {JSON_String},
//..
//DONE: check constraints
services[0].ports[1].accessNodeId = node1
//..
)
)
to X::mpi //....
}
then {
//initial textual
perform action: "The response body should no longer contain
information about the L2 service deleted in TD_MSP_03"
//!DONE: Why are comments before receive message not OK? -> fixed
//basic response definition
pm::mpi receives OK() from X::mpi
//refined with reference to body definition
pm::mpi receives OK(body = JSON_instance) from X::mpi
//refined with inline overrides
pm::mpi receives OK(
body = JSON_instance(
//..
//TODO: does an optional collection member imply entire collection is ommitted?
// or also individual items?
//TODO: does special value use conform to everything?
services[2] = omit,
//...
services[3].ports[1] = omit
)
)
from X::mpi
//... refine further
}
}
}
}