Newer
Older
*** Settings ***
Documentation
... A test suite for validating Fixed Access Information Service (FAIS) operations.
Resource ../../GenericKeywords.robot
Resource environment/variables.txt
Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false
Library OperatingSystem
Library MockServerLibrary
[Documentation]
... Check that the IUT responds with the current status of the fixed access information
... when queried by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.3.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is FaInfo
[Documentation]
... Check that the IUT responds with an error when
... a request with incorrect parameters is sent by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.3.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Get fixed access information details using query prameters interface ${INTERFACE_ID}
Check HTTP Response Status Code Is 400
[Documentation]
... Check that the IUT responds with an error when
... a request for non-existing data is sent by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.3.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Get fixed access information details using query prameters interfaceType ${NON_EXISTENT_INTERFACE_ID}
Check HTTP Response Status Code Is 404
[Documentation]
... Check that the IUT responds with the current status of the device information
... when queried by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.4.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is DeviceInfo
[Documentation]
... Check that the IUT responds with an error when
... a request with incorrect parameters is sent by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.4.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Get status of device information using query prameters device ${DEVICE_ID}
Check HTTP Response Status Code Is 400
[Documentation]
... Check that the IUT responds with an error when
... a request for non-existing data is sent by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.4.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Get status of device information using query prameters deviceId ${NON_EXISTENT_DEVICE_ID}
Check HTTP Response Status Code Is 404
[Documentation]
... Check that the IUT responds with the current status of the cable line information
... when queried by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.5.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is CableLineInfo
[Documentation]
... Check that the IUT responds with an error when
... a request with incorrect parameters is sent by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.5.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Get status of the cable line information using query parameters cm ${CABLE_MODEM_ID}
Check HTTP Response Status Code Is 400
[Documentation]
... Check that the IUT responds with an error when
... a request for non-existing data is sent by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.5.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Get status of the cable line information using query parameters cmId ${NON_EXISTING_FAI_CM_ID}
Check HTTP Response Status Code Is 404
[Documentation]
... Check that the IUT responds with the current status of the optical network information
... when queried by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.6.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is PonInfo
[Documentation]
... Check that the IUT responds with an error when
... a request with incorrect parameters is sent by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.6.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Get status of the opentical network information using query parameters onu ${ONU_ID}
Check HTTP Response Status Code Is 400
[Documentation]
... Check that the IUT responds with an error when
... a request for non-existing data is sent by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.6.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Get status of the opentical network information using query parameters onuId ${NON_EXISTING_FAI_ONU_ID}
Check HTTP Response Status Code Is 404
[Documentation]
... Check that the IUT responds with the subscriptions for fixed access information notifications
... when queried by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.7.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SubscriptionLinkList
[Documentation]
... Check that the IUT responds with an error when
... a request with incorrect parameters is sent by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.7.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Get list of subscriptions using query parameters subscription ${SUBSCRIPTION_TYPE}
Check HTTP Response Status Code Is 400
[Documentation]
... Check that the IUT responds with an error when
... a request for non-existing data is sent by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.7.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Get list of subscriptions using query parameters subscriptionType ${NON_EXISTENT_SUBSCRIPTION_TYPE}
Check HTTP Response Status Code Is 404
[Documentation]
... Check that the IUT acknowledges the subscription by a MEC Application
... to notifications on Optical Network Unit alarm events
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.7.3.4
[Tags] PIC_MEC_PLAT PIC_SERVICES
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is OnuAlarmSubscription
Check Result Contains ${response['body']['OnuAlarmSubscription']} subscriptionType "OnuAlarmSubscription"
[Documentation]
... Check that the IUT responds with an error when
... a request with incorrect parameters is sent by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.7.3.4
[Tags] PIC_MEC_PLAT PIC_SERVICES
Create a new subscription OnuAlarmSubscriptionError
Check HTTP Response Status Code Is 400
[Documentation]
... Check that the IUT responds with the information on a given subscription
... when queried by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.8.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Get an individual subscription ${ONU_ALARM_SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is OnuAlarmSubscription
Check Result Contains ${response['body']['OnuAlarmSubscription']} subscriptionType "OnuAlarmSubscription"
[Documentation]
... Check that the IUT responds with an error when
... a request for an unknown URI is sent by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.8.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Get an individual subscription ${NON_ESISTENT_SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 404
[Documentation]
... Check that the IUT updates an existing subscription
... when commanded by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.8.3.2
[Tags] PIC_MEC_PLAT PIC_SERVICES
Update subscription ${ONU_ALARM_SUBSCRIPTION_ID} OnuAlarmSubscriptionUpdate
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is OnuAlarmSubscription
Check Result Contains ${response['body']['OnuAlarmSubscription']} subscriptionType "OnuAlarmSubscription"
[Documentation]
... Check that the IUT responds with an error when
... a request with incorrect parameters is sent by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.8.3.2
[Tags] PIC_MEC_PLAT PIC_SERVICES
Update subscription ${ONU_ALARM_SUBSCRIPTION_ID} OnuAlarmSubscriptionUpdateError
Check HTTP Response Status Code Is 400
[Documentation]
... Check that the IUT responds with an error when
... a request for an unknown URI is sent by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.8.3.2
[Tags] PIC_MEC_PLAT PIC_SERVICES
Update subscription ${NON_ESISTENT_SUBSCRIPTION_ID} OnuAlarmSubscriptionUpdate
Check HTTP Response Status Code Is 404
[Documentation]
... Check that the IUT responds with an error when
... a request sent by a MEC Application doesn't comply with a required condition
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.8.3.2
[Tags] PIC_MEC_PLAT PIC_SERVICES
Update subscription using invalid etag ${ONU_ALARM_SUBSCRIPTION_ID} OnuAlarmSubscriptionUpdate
Check HTTP Response Status Code Is 412
[Documentation]
... Check that the IUT cancels an existing subscription
... when commanded by a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.8.3.5
[Tags] PIC_MEC_PLAT PIC_SERVICES
Remove subscription ${ONU_ALARM_SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 204
[Documentation]
... Check that the IUT sends notification on expiry of Fixed Access Information event subscription
... to a MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 7.7.3.4
[Tags] PIC_MEC_PLAT PIC_SERVICES
${json}= Get File schemas/DevInfoSubscription.schema.json
Log Creating mock request and response to handle Device Information Notifications
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${json}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
TC_MEC_SRV_FAIS_011_OK
[Documentation]
... Check that the IUT sends notifications on Fixed Access Information events
... to a subscribed MEC Application
...
... Reference ETSI GS MEC 029 V2.1.1, clause 5.2.7
[Tags] PIC_MEC_PLAT PIC_SERVICES
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
${json}= Get File schemas/OnuAlarmSubscription.schema.json
Log Creating mock request and response to handle Onu Alarm Notifications
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${json}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
*** Keywords ***
Get fixed access information details
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/queries/fa_info
${output}= Output response
Set Suite Variable ${response} ${output}
Get fixed access information details using query prameters
[Arguments] ${key} ${value}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/queries/fa_info?${key}=${value}
${output}= Output response
Set Suite Variable ${response} ${output}
Get status of device information
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/queries/device_info
${output}= Output response
Set Suite Variable ${response} ${output}
Get status of device information using query prameters
[Arguments] ${key} ${value}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/queries/device_info?${key}=${value}
${output}= Output response
Set Suite Variable ${response} ${output}
Get status of the cable line information
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/queries/cable_line_info
${output}= Output response
Set Suite Variable ${response} ${output}
Get status of the cable line information using query parameters
[Arguments] ${key} ${value}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/queries/cable_line_info?${key}=${value}
${output}= Output response
Set Suite Variable ${response} ${output}
Get status of the opentical network information
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/queries/optical_network_info
${output}= Output response
Set Suite Variable ${response} ${output}
Get status of the opentical network information using query parameters
[Arguments] ${key} ${value}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/queries/optical_network_info?${key}=${value}
${output}= Output response
Set Suite Variable ${response} ${output}
Get list of subscriptions
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions
${output}= Output response
Set Suite Variable ${response} ${output}
Get list of subscriptions using query parameters
[Arguments] ${key} ${value}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${key}=${value}
${output}= Output response
Set Suite Variable ${response} ${output}
Create a new subscription
[Arguments] ${content}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
${file}= Catenate SEPARATOR= jsons/ ${content} .json
${body}= Get File ${file}
Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Get an individual subscription
[Arguments] ${subscriptionId}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${output}= Output response
Set Suite Variable ${response} ${output}
Update subscription
[Arguments] ${subscriptionId} ${content}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
${file}= Catenate SEPARATOR= jsons/ ${content} .json
${body}= Get File ${file}
Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Update subscription using invalid etag
[Arguments] ${subscriptionId} ${content}
Set Headers {"If-Match": "${INVALID_ETAG}"}
Remove subscription
[Arguments] ${subscriptionId}
Set Headers {"Authorization":"${TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${output}= Output response
Set Suite Variable ${response} ${output}