{
"description": "'The data type represents a subscription link list of notification on application package management'",
"type": "object",
"required": [
"_links"
],
"properties": {
"_links": {
"description": "Links to resources related to this resource.",
"type": "object",
"required": [
"self"
],
"properties": {
"self": {
"properties": {
"href": {
"description": "URI referring to a resource",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "URI"
}
},
"required": [
"href"
],
"type": "object",
"x-etsi-ref": "6.5.2"
},
"subscriptions": {
"type": "array",
"items": {
"description": "'The data type represents the input parameters of \"subscription operation\" to notification of application package management for the onboarding, or operational state change of application package.'",
"type": "object",
"required": [
"href",
"subsctiptionType"
],
"properties": {
"href": {
"description": "The URI referring to the subscription.",
"type": "string",
"format": "uri"
},
"subsctiptionType": {
"description": "'Subscribed notification type'",
"type": "string",
"enum": [
"AppPackageOnBoardingSubscription",
"AppPacakgeOperationChangeSubscription",
"AppPackageDeletionSubscription"
]
}
}
}
}
}
}
}
}
\ No newline at end of file
''[Documentation] robot --outputdir ./outputs ./AppInstanceMgmt.robot
... Test Suite to validate App Instance Management operations.
*** Settings ***
Resource environment/variables.txt
Resource ../../../GenericKeywords.robot
Library REST ${MEPM_SCHEMA}://${MEPM_HOST}:${MEPM_PORT} ssl_verify=false
Library BuiltIn
Library OperatingSystem
*** Test Cases ***
TC_MEC_MEC010p2_MEX_LCM_001_OK
[Documentation] TP_MEC_MEC010p2_MEX_LCM_001_OK
... Check that MEC API provider creates a new App Package when requested
... ETSI GS MEC 010-2 2.2.1, clause 7.4.1.3.1
... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.3.2-1 #CreateAppInstanceRequest
... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.4.2-1 #AppInstanceInfo
Create new App Instance CreateAppInstanceRequest
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is AppInstanceInfo
Check HTTP Response Header Contains Location
Should Be Equal As Strings ${response['body']['appDId']} ${APPD_ID}
Should Be Equal As Strings ${response['body']['instantiationState']} NOT_INSTANTIATED
TC_MEC_MEC010p2_MEX_LCM_001_BR
[Documentation] TP_MEC_MEC010p2_MEX_LCM_001_BR
... Check that MEC API provider sends an error when it receives a malformed request for the creation of a new App Instance
... ETSI GS MEC 010-2 2.2.1, clause 7.4.1.3.1
... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.3.2-1 #CreateAppInstanceRequest
... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.4.2-1 #AppInstanceInfo
Create new App Instance CreateAppInstanceRequestBadRequest
Check HTTP Response Status Code Is 400
TC_MEC_MEC010p2_MEX_LCM_002_OK
[Documentation] TP_MEC_MEC010p2_MEX_LCM_002_OK
... Check that MEC API provider retrieves the list of App instances when requested
... ETSI GS MEC 010-2 2.2.1, clause 7.4.1.3.2
... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.4.2-1 #AppInstanceInfo
GET all APP Instances
Check HTTP Response Status Code Is 200
FOR ${appInstance} IN @{response['body']}
Validate Json AppInstanceInfo.schema.json ${appInstance}
Log ${appInstance}
${passed} Run Keyword And Return Status Should Be Equal As Strings ${appInstance}[id] ${APP_INSTANCE_ID}
Exit For Loop If ${passed}
END
Should Be True ${passed}
TC_MEC_MEC010p2_MEX_LCM_003_OK
[Documentation] TP_MEC_MEC010p2_MEX_LCM_003_OK
... Check that MEC API provider retrieves an App Package when requested
... ETSI GS MEC 010-2 2.2.1, clause 7.4.2.3.2
... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.4.2-1 #AppInstanceInfo
GET APP Instance ${APP_INSTANCE_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is AppInstanceInfo
Log ${response['body']}
Should Be Equal As Strings ${response['body']['id']} ${APP_INSTANCE_ID}
TC_MEC_MEC010p2_MEX_LCM_003_NF
[Documentation] TP_MEC_MEC010p2_MEX_LCM_003_NF
... Check that MEC API provider fails on deletion of an App Instance when requested using wrong appInstanceId
... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.4.2-1 #AppInstanceInfo
GET APP Instance ${NOT_EXISTING_APP_INSTANCE_ID}
Check HTTP Response Status Code Is 404
TC_MEC_MEC010p2_MEX_LCM_004_OK
[Documentation] TP_MEC_MEC010p2_MEX_LCM_003_OK
... Check that MEC API provider service deletes an App Instance when requested
... ETSI GS MEC 010-2 2.2.1, clause 7.4.2.3.4
Delete APP Instance ${APP_INSTANCE_ID}
Check HTTP Response Status Code Is 204
TC_MEC_MEC010p2_MEX_LCM_004_NF
[Documentation] TP_MEC_MEC010p2_MEX_LCM_004_NF
... Check that MEC API provider fails on deletion of an App Instance when requested using wrong appInstanceId
... ETSI GS MEC 010-2 2.2.1, clause 7.4.2.3.4
Delete APP Instance ${NOT_EXISTING_APP_INSTANCE_ID}
Check HTTP Response Status Code Is 404
TC_MEC_MEC010p2_MEX_LCM_005_OK
[Documentation] TP_MEC_MEC010p2_MEX_LCM_005_OK
... Check that MEC API provider service instantiates an App Instance when requested
... ETSI GS MEC 010-2 2.2.1, clause 7.4.6.3.1
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.7.2-1 #InstantiateAppRequest
Instantiate App Request ${APP_INSTANCE_ID} InstantiateAppRequest
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
TC_MEC_MEC010p2_MEX_LCM_005_BR
[Documentation] TP_MEC_MEC010p2_MEX_LCM_005_BR
... Check that MEC API provider service fails to instantiate an App Instance when it receives a malformed request
... ETSI GS MEC 010-2 2.2.1, clause 7.4.6.3.1
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.7.2-1 #InstantiateAppRequest
Instantiate App Request ${APP_INSTANCE_ID} InstantiateAppRequestBadRequest
Check HTTP Response Status Code Is 400
TC_MEC_MEC010p2_MEX_LCM_005_NF
[Documentation] TP_MEC_MEC010p2_MEX_LCM_005_NF
... Check that MEC API provider service fails to instantiate an App Instance when it receives a request related to a not existing App Instance
... ETSI GS MEC 010-2 2.2.1, clause 7.4.6.3.1
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.7.2-1 #InstantiateAppRequest
Instantiate App Request ${NOT_EXISTING_APP_INSTANCE_ID} InstantiateAppRequest
Check HTTP Response Status Code Is 404
TC_MEC_MEC010p2_MEX_LCM_006_OK
[Documentation] TP_MEC_MEC010p2_MEX_LCM_006_OK
... Check that MEC API provider service terminates an App Instance when requested
... ETSI GS MEC 010-2 2.2.1, clause 7.4.7.3.1
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.9.2-1 #TerminateAppRequest
Terminate App Request ${APP_INSTANCE_ID} TerminateAppRequest
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
TC_MEC_MEC010p2_MEX_LCM_006_BR
[Documentation] TP_MEC_MEC010p2_MEX_LCM_006_OK
... Check that MEC API provider service fails to terminate an App Instance when it receives a malformed request
... ETSI GS MEC 010-2 2.2.1, clause 7.4.7.3.1
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.9.2-1 #TerminateAppRequest
Terminate App Request ${APP_INSTANCE_ID} TerminateAppRequestBadRequest
Check HTTP Response Status Code Is 400
TC_MEC_MEC010p2_MEX_LCM_006_NF
[Documentation] TP_MEC_MEC010p2_MEX_LCM_006_NF
... Check that MEC API provider service fails to terminate an App Instance when it receives a request related to a not existing App Instance
... ETSI GS MEC 010-2 2.2.1, clause 7.4.7.3.1
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.9.2-1 #TerminateAppRequest
Terminate App Request ${NOT_EXISTING_APP_INSTANCE_ID} TerminateAppRequest
Check HTTP Response Status Code Is 404
TPC_MEC_MEC010p2_MEX_LCM_007_OK
[Documentation] TP_MEC_MEC010p2_MEX_LCM_007_OK
... Check that MEC API provider service changes the status of an App Instance from its INITIAL_STATE to a given FINAL_STATE, when requested.
... The following combinations INITIAL_STATE - FINAL_STATE are supported:
... - STARTED/STOP
... - STOPPED/STARTCheck that MEC API provider service terminates an App Instance when requested
... ETSI GS MEC 010-2 2.2.1, clause 7.4.8.3.1
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.8.2-1 #OperateAppRequest
Operate App Request ${APP_INSTANCE_ID} OperateAppRequest
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
TC_MEC_MEC010p2_MEX_LCM_007_BR
[Documentation] TP_MEC_MEC010p2_MEX_LCM_007_BR
... Check that MEC API provider service fails to operate on an App Instance when it receives a malformed request
... ETSI GS MEC 010-2 2.2.1, clause 7.4.8.3.1
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.8.2-1 #OperateAppRequest
Operate App Request ${APP_INSTANCE_ID} OperateAppRequestBadRequest
Check HTTP Response Status Code Is 400
TC_MEC_MEC010p2_MEX_LCM_007_NF
[Documentation] TP_MEC_MEC010p2_MEX_LCM_007_NF
... Check that MEC API provider service fails to change the status of an App Instance when it receives a request related to a not existing App Instance
... ETSI GS MEC 010-2 2.2.1, clause 7.4.8.3.1
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.8.2-1 #OperateAppRequest
Operate App Request ${NOT_EXISTING_APP_INSTANCE_ID} OperateAppRequest
Check HTTP Response Status Code Is 404
TC_MEC_MEC010p2_MEX_LCM_008_OK
[Documentation] TP_MEC_MEC010p2_MEX_LCM_008_OK
... Check that MEC API provider service retrieves info about LCM Operation Occurrence on App Instances when requested
... ETSI GS MEC 010-2 2.2.1, clause 7.4.9.3.2
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.13.2-1 #AppLcmOpOcc
GET all App LCM op Occs
Check HTTP Response Status Code Is 200
FOR ${appLcmOpOcc} IN @{response['body']}
##The referred JSON schema is in compliance with MEC010p2 v2.1.1 but not with v2.2.1. Some attributes are missing in the older version
Validate Json AppLcmOpOcc.schema.json ${appLcmOpOcc}
${passed} Run Keyword And Return Status Should Be Equal As Strings ${appLcmOpOcc}[id] ${APP_LCM_OP_OCC_ID}
Exit For Loop If ${passed}
END
Should Be True ${passed}
TC_MEC_MEC010p2_MEX_LCM_009_OK
[Documentation] TP_MEC_MEC010p2_MEX_LCM_009_OK
... Check that MEC API provider service retrieves info about LCM Operation Occurrence on an App Instance when requested
... ETSI GS MEC 010-2 2.2.1, clause 7.4.10.3.2
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.13.2-1 #AppLcmOpOcc
GET App LCM op Occ ${APP_LCM_OP_OCC_ID}
Check HTTP Response Status Code Is 200
Validate Json AppLcmOpOcc.schema.json ${response}[body]
Should Be Equal As Strings ${response}[body][id] ${APP_LCM_OP_OCC_ID}
TC_MEC_MEC010p2_MEX_LCM_009_NF
[Documentation] TP_MEC_MEC010p2_MEX_LCM_009_NF
... Check that MEC API provider service sends an error when it receives a query for a not existing LCM Operation Occurence
... ETSI GS MEC 010-2 2.2.1, clause 7.4.10.3.2
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.13.2-1 #AppLcmOpOcc
GET App LCM op Occ ${NOT_EXISTING_APP_LCM_OP_OCC_ID}
Check HTTP Response Status Code Is 404
TC_MEC_MEC010p2_MEX_LCM_010_OK
[Documentation] TP_MEC_MEC010p2_MEX_LCM_010_OK
... Check that MEC API provider service creates a LCM Subscription when requested, where the subscription request can
... have SUBSCRIPTION_TYPE AppInstanceStateChangeSubscription or AppLcmOpOccStateChangeSubscription
... ETSI GS MEC 010-2 2.2.1, clause 7.4.3.3.1,
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.12.2-1 #AppInstSubscriptionRequest
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.14.2-1 #AppLcmOpOccSubscriptionRequest
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.25.2-1 #AppInstIdCreationSubscriptionRequest
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.28.2-1 #AppInstIdDeletionSubscriptionRequest
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.10.2-1 #AppInstSubscriptionInfo
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.15.2-1 #AppLcmOpOccSubscriptionInfo
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.26.2-1 #AppInstIdCreationSubscriptionInfo
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.29.2-1 #AppInstIdDeletionSubscriptionInfo
Send a request for a subscription AppInstSubscriptionRequest
Check HTTP Response Status Code Is 201
Validate Json AppInstSubscriptionRequest.schema.json ${response}[body]
Should Be Equal As Strings ${response['body']['subscriptionType']} ${SUB_TYPE}
Should Be Equal As Strings ${response['body']['callbackUri']} ${CALLBACK_URI}
TC_MEC_MEC010p2_MEX_LCM_010_BR
[Documentation] TP_MEC_MEC010p2_MEX_LCM_010_BR
... Check that MEC API provider service sends an error when it receives a malformed request to create a LCM Subscription
... ETSI GS MEC 010-2 2.2.1, clause 7.4.3.3.1,
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.12.2-1 #AppInstSubscriptionRequest
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.14.2-1 #AppLcmOpOccSubscriptionRequest
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.25.2-1 #AppInstIdCreationSubscriptionRequest
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.28.2-1 #AppInstIdDeletionSubscriptionRequest
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.10.2-1 #AppInstSubscriptionInfo
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.15.2-1 #AppLcmOpOccSubscriptionInfo
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.26.2-1 #AppInstIdCreationSubscriptionInfo
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.29.2-1 #AppInstIdDeletionSubscriptionInfo
Send a request for a subscription AppInstSubscriptionRequestBadRequest
Check HTTP Response Status Code Is 400
TC_MEC_MEC010p2_MEX_LCM_011_OK
[Documentation] TP_MEC_MEC010p2_MEX_LCM_011_OK
... Check that MEC API provider service sends the list of LCM Subscriptions when requested
... ETSI GS MEC 010-2 2.2.1, clause 7.4.3.3.2,
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.12.2-1 #AppInstSubscriptionRequest
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.14.2-1 #AppLcmOpOccSubscriptionRequest
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.25.2-1 #AppInstIdCreationSubscriptionRequest
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.28.2-1 #AppInstIdDeletionSubscriptionRequest
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.10.2-1 #AppInstSubscriptionInfo
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.15.2-1 #AppLcmOpOccSubscriptionInfo
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.26.2-1 #AppInstIdCreationSubscriptionInfo
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.29.2-1 #AppInstIdDeletionSubscriptionInfo
Send a request for retrieving all subscriptions
Check HTTP Response Status Code Is 200
Validate Json AppInstanceSubscriptionLinkList.schema.json ${response}[body]
TC_MEC_MEC010p2_MEX_LCM_012_OK
[Documentation] TP_MEC_MEC010p2_MEX_LCM_012_OK
... Check that MEC API provider service sends the information about an existing LCM subscription when requested
... ETSI GS MEC 010-2 2.2.1, clause 7.4.4.3.2
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.10.2-1 #AppInstSubscriptionInfo
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.15.2-1 #AppLcmOpOccSubscriptionInfo
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.26.2-1 #AppInstIdCreationSubscriptionInfo
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.29.2-1 #AppInstIdDeletionSubscriptionInfo
Send a request for retrieving a subscription ${SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 200
Should Be Equal As Strings ${response['body']['id']} ${SUBSCRIPTION_ID}
TC_MEC_MEC010p2_MEX_LCM_012_NF
[Documentation] TP_MEC_MEC010p2_MEX_LCM_012_NF
... Check that MEC API provider service sends an error when it receives a query for a not existing LCM Subscription
... ETSI GS MEC 010-2 2.2.1, clause 7.4.4.3.2
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.10.2-1 #AppInstSubscriptionInfo
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.15.2-1 #AppLcmOpOccSubscriptionInfo
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.26.2-1 #AppInstIdCreationSubscriptionInfo
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.29.2-1 #AppInstIdDeletionSubscriptionInfo
Send a request for retrieving a subscription ${NOT_EXISTING_SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 404
TC_MEC_MEC010p2_MEX_LCM_013_OK
[Documentation] TP_MEC_MEC010p2_MEX_LCM_013_OK
... Check that MEC API provider service delete an existing LCM Subscription when requested
... ETSI GS MEC 010-2 2.2.1, clause 7.4.3.3.4
Send a request for deleting a subscription ${SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 204
TC_MEC_MEC010p2_MEX_LCM_013_NF
[Documentation] TP_MEC_MEC010p2_MEX_LCM_013_NF
... Check that MEC API provider service sends an error when it receives a deletion request for a not existing LCM Subscription
... ETSI GS MEC 010-2 2.2.1, clause 7.4.3.3.4
Send a request for deleting a subscription ${NOT_EXISTING_SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 404
TC_MEC_MEC010p2_MEX_LCM_014_OK
[Documentation] TP_MEC_MEC010p2_MEX_LCM_014_OK
... Check that MEC API provider service cancels an on going LCM Operation
... ETSI GS MEC 010-2 2.2.1, clause 7.4.11.3.1",
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.32.2-1" #CancelMode
Cancel on going LCM Operation ${APP_LCM_OP_OCC_ID} CancelMode
Check HTTP Response Status Code Is 202
TC_MEC_MEC010p2_MEX_LCM_014_BR
[Documentation] TP_MEC_MEC010p2_MEX_LCM_014_BR
... Check that MEC API provider service fails to cancel an on going LCM Operation when it receives a malformed request
... ETSI GS MEC 010-2 2.2.1, clause 7.4.11.3.1",
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.32.2-1" #CancelMode
Cancel on going LCM Operation ${APP_LCM_OP_OCC_ID} CancelModeBadRequest
Check HTTP Response Status Code Is 400
TC_MEC_MEC010p2_MEX_LCM_014_NF
[Documentation] TP_MEC_MEC010p2_MEX_LCM_014_NF
... Check that MEC API provider service fails to cancel an on going LCM Operation when it receives a request related to a not existing application LCM Operation
... ETSI GS MEC 010-2 2.2.1, clause 7.4.11.3.1",
... ETSI GS MEC 010-2 2.2.1, table 6.2.2.32.2-1" #CancelMode
Cancel on going LCM Operation ${NOT_EXISTING_APP_LCM_OP_OCC_ID} CancelMode
Check HTTP Response Status Code Is 404
TC_MEC_MEC010p2_MEX_LCM_015_OK
[Documentation] TP_MEC_MEC010p2_MEX_LCM_015_OK
... Check that MEC API provider service makes failed an on going LCM Operation
... ETSI GS MEC 010-2 2.2.1, clause 7.4.12.3.1
Fail on going LCM Operation ${APP_LCM_OP_OCC_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is AppLcmOpOcc
TC_MEC_MEC010p2_MEX_LCM_015_NF
[Documentation] TP_MEC_MEC010p2_MEX_LCM_015_NF
... Check that MEC API provider service makes failed an on going LCM Operation
... ETSI GS MEC 010-2 2.2.1, clause 7.4.12.3.1
Fail on going LCM Operation ${NOT_EXISTING_APP_LCM_OP_OCC_ID}
Check HTTP Response Status Code Is 404
TC_MEC_MEC010p2_MEX_LCM_016_OK
[Documentation] TP_MEC_MEC010p2_MEX_LCM_016_OK
... Check that MEC API provider service retries an on going LCM Operation
... ETSI GS MEC 010-2 2.2.1, clause 7.4.13.3.1
Retry on going LCM Operation ${APP_LCM_OP_OCC_ID}
Check HTTP Response Status Code Is 200
TC_MEC_MEC010p2_MEX_LCM_016_NF
[Documentation] TP_MEC_MEC010p2_MEX_LCM_016_NF
... Check that MEC API provider service fails to retry an LCM Operation when it receives a request related to a not existing application LCM Operation
... ETSI GS MEC 010-2 2.2.1, clause 7.4.13.3.1
Retry on going LCM Operation ${NOT_EXISTING_APP_LCM_OP_OCC_ID}
Check HTTP Response Status Code Is 404
*** Keywords ***
Create new App Instance
[Arguments] ${content}
Log Creating a new app package
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}/app_instances ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
GET all APP Instances
Log Get all App Instances
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/app_instances
${output}= Output response
Set Suite Variable ${response} ${output}
GET APP Instance
[Arguments] ${app_instance_id}
Log Get single App Instance
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/app_instances/${app_instance_id}
${output}= Output response
Set Suite Variable ${response} ${output}
Delete APP Instance
[Arguments] ${app_instance_id}
Log Get single App Instance
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/app_instances/${app_instance_id}
${output}= Output response
Set Suite Variable ${response} ${output}
Instantiate App Request
[Arguments] ${appInstanceId} ${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}/app_instances/${appInstanceId}/instantiate ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Terminate App Request
[Arguments] ${appInstanceId} ${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}/app_instances/${appInstanceId}/terminate ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Operate App Request
[Arguments] ${appInstanceId} ${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}/app_instances/${appInstanceId}/operate ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
GET all App LCM op Occs
Log Get all App LCM Operation occurrences
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/app_lcm_op_occs
${output}= Output response
Set Suite Variable ${response} ${output}
GET App LCM op Occ
[Arguments] ${appLcmOpOccsId}
Log Get App LCM Operation occurrence
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/app_lcm_op_occs/${appLcmOpOccsId}
${output}= Output response
Set Suite Variable ${response} ${output}
Send a request for a subscription
[Arguments] ${content}
Log Creating a new subscription
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}
Send a request for retrieving all subscriptions
Log Get all subscriptions
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions
${output}= Output response
Set Suite Variable ${response} ${output}
Send a request for retrieving a subscription
[Arguments] ${subscriptionId}
Log Get all subscriptions
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${output}= Output response
Set Suite Variable ${response} ${output}
Send a request for deleting a subscription
[Arguments] ${subscriptionId}
Log Get all subscriptions
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${output}= Output response
Set Suite Variable ${response} ${output}
Cancel on going LCM Operation
[Arguments] ${appLcmOccOpId} ${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}/app_lcm_op_occs/${appLcmOccOpId}/cancel ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Fail on going LCM Operation
[Arguments] ${appLcmOccOpId}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
Post ${apiRoot}/${apiName}/${apiVersion}/app_lcm_op_occs/${appLcmOccOpId}/fail
${output}= Output response
Set Suite Variable ${response} ${output}
Retry on going LCM Operation
[Arguments] ${appLcmOccOpId}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
Post ${apiRoot}/${apiName}/${apiVersion}/app_lcm_op_occs/${appLcmOccOpId}/retry
${output}= Output response
Set Suite Variable ${response} ${output}
*** Variables ***
# Generic variables
${MEPM_SCHEMA} http
${MEPM_HOST} 127.0.0.1
${MEPM_PORT} 8081
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot}
${apiName} app_lcm
${apiVersion} v1
# Specific variables
${NOT_EXISTING_APP_INSTANCE_ID} NOT_EXISTING_APP_INSTANCE_ID
${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f
${APPD_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3
${APP_LCM_OP_OCC_ID} abceee2b-6e50-4f33-ab09-8bf05850abcd
${NOT_EXISTING_APP_LCM_OP_OCC_ID} NOT_EXISTING_APP_LCM_OP_OCC_ID
${NON_EXISTENT_APP_PKG_ID} NON_EXISTENT_APP_PKG_ID
${OPERATION_VALUE} DISABLE
${CALLBACK_URI} https://callback.uri/path
${SUB_TYPE} AppInstanceStateChangeSubscription
${SUBSCRIPTION_ID} 01234e2b-6e50-4f33-ab09-8bf05850890
${NOT_EXISTING_SUBSCRIPTION_ID} NOT_EXISTING_SUBSCRIPTION_ID
\ No newline at end of file
{
"subscriptionType": "AppInstanceStateChangeSubscription",
"callbackUri": "https://callback.uri/path"
}
\ No newline at end of file
{
"callbackERRORUri": "AppInstanceStateChangeSubscription",
"callbackUri": "https://callback.uri/path"
}
\ No newline at end of file
{
"CancelMode": "GRACEFUL"
}
\ No newline at end of file
{
"CancelMode": "GRACEFULLL"
}
\ No newline at end of file
{
"appDId": "e0deee2b-6e50-4f33-ab09-8bf0585025d3",
"appInstanceDescription": "description",
"appInstanceName": "name"
}
\ No newline at end of file
{
"appDDDId": "e0deee2b-6e50-4f33-ab09-8bf0585025d3",
"appInstanceDescription": "description",
"appInstanceName": "name"
}
\ No newline at end of file
{
"selectedMECHostInfo": [{
"hostId": {
"key1": 123,
"key2": 456
},
"hostName": "hostname"
}]
}
\ No newline at end of file
{
"appERRORId": "1234",
"selectedMECHostInfo": [{
"hostId": {
"key1": 123,
"key2": 456
},
"hostName": "hostname"
}]
}
\ No newline at end of file
{
"changeStateTo": "STARTED"
}
\ No newline at end of file
{
"changeERRORStateTo": "STARTED"
}
\ No newline at end of file
{
"terminationType": "FORCEFUL",
"gracefulTerminationTimeout": 0
}
\ No newline at end of file
{
"terminationERRORType": "FORCEFUL",
"gracefulTerminationTimeout": 0
}
\ No newline at end of file
{
"type": "object",
"required": [
"subscriptionType",
"callbackUri"
],
"properties": {
"subscriptionType": {
"description": "Shall be set to AppInstanceStateChange.",
"type": "string"
},
"callbackUri": {
"description": "The URI of the endpoint for the notification to be sent to.",
"type": "string",
"format": "uri"
},
"appInstanceState": {
"description": "Only send notifications for application instances that are in one of the states listed in this attribute. If this attribute is absent, match all states.",
"type": "string",
"format": "enum",
"enum": [
"NOT_INSTANTIATED",
"STARTED",
"STOPPED"
]
},
"appInstanceSubscriptionFilter": {
"description": "'This data type represents subscription filter criteria to match application instances. '",
"type": "object",
"required": [
"appInstSelectorType"
],
"properties": {
"appInstSelectorType": {
"description": "0 = void",
"type": "string",
"enum": [
"VOID",
"APP_IDENTITY",
"APP_NAME",
"APP_D_ID",
"APP_FROM_PROVIDER"
]
},
"appInstances": {
"type": "array",
"items": {
"description": "If appInstIdSelector = APP_IDENTITY match existing application instances with an application instance identifier listed in this attribute.",
"type": "string"
}
},
"appsFromProviders": {
"type": "array",
"items": {
"description": "'Present only if appInstIdSelector = APP_FROM_PROVIDER. Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers.'",
"type": "object",
"required": [
"appProvider"
],
"properties": {
"appProvider": {
"description": "Provider of the application and of the AppD.",
"type": "string"
},
"appProducts": {
"description": "'If present, match application instances that belong to application products with certain product names, from one particular provider.'",
"type": "object",
"required": [
"appName"
],
"properties": {
"appName": {
"description": "Name to identify the MEC application.",
"type": "string"
},
"versions": {
"description": "'If present, match application instances that belong to application products with certain versions and a certain product name, from one particular provider.'",
"type": "object",
"required": [
"appSoftVersion"
],
"properties": {
"appSoftVersion": {
"description": "Identifies the version of software of the MEC application.",
"type": "string"
},
"appDVersion": {
"type": "array",
"items": {
"description": "Identifies the version of the application descriptor.",
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
}
}
\ No newline at end of file
{
"description": "'The data type of AppInstanceInfo represents the parameters of instantiated application instance resources.'",
"type": "object",
"required": [
"id",
"appDId",
"appProvider",
"appName",
"appSoftVersion",
"appDVersion",
"appPkgId",
"instantiationState",
"_links"
],
"properties": {
"id": {
"description": "Identifier of application instance.",
"type": "string"
},
"appInstanceName": {
"description": "Name of the application instance.",
"type": "string"
},
"appInstanceDescription": {
"description": "Human-readable description of the application instance to be created.",
"type": "string"
},
"appDId": {
"description": "Identifier of this MEC application descriptor. This attribute shall be globally unique.",
"type": "string"
},
"appProvider": {
"description": "Provider of the application and of the AppD.",
"type": "string"
},
"appName": {
"description": "Name to identify the MEC application.",
"type": "string"
},
"appSoftVersion": {
"description": "Identifies the version of software of the MEC application.",
"type": "string"
},
"appDVersion": {
"description": "Identifies the version of the application descriptor.",
"type": "string"
},
"appPkgId": {
"description": "Identifier of the onboarded application package.",
"type": "string"
},
"vimConnectionInfo": {
"type": "array",
"items": {
"properties": {
"accessInfo": {
"description": "'This data type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key-value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259'",
"type": "object",
"additionalProperties": true
},
"extra": {
"description": "'This data type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key-value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259'",
"type": "object",
"additionalProperties": true
},
"id": {
"description": "The identifier of the VIM Connection. This identifier is managed by the MEO.",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
},
"interfaceInfo": {
"description": "'This data type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key-value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259'",
"type": "object",
"additionalProperties": true
},
"vimId": {
"description": "The identifier of the VIM instance. This identifier is managed by the MEO.Shall be present to address additional information about the VIM if such information has been configured into the MEPM by means outside the scope of the present document, and should be absent otherwise.",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"vimType": {
"description": "Discriminator for the different types of the VIM information.The value of this attribute determines the structure of the \"interfaceInfo\" and \"accessInfo\" attributes, based on the type of the VIM.The set of permitted values is expected to change over time as new types or versions of VIMs become available. ",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
}
},
"required": [
"id",
"vimType"
],
"type": "object",
"x-etsi-ref": "6.2.2.18"
}
},
"instantiationState": {
"description": "Instantiation state of the application instance",
"type": "string",
"enum": [
"NOT_INSTANTIATED",
"INSTANTIATED"
]
},
"instantiatedAppState": {
"description": "'Information specific to an instantiated application. This attribute shall be present if the instantiationState attribute value is INSTANTIATED.'",
"type": "object",
"required": [
"operationalState"
],
"properties": {
"operationalState": {
"description": "Operational state is applicable in the instantiation state INSTANTIATED",
"type": "string",
"enum": [
"STARTED",
"STOPPED"
]
}
}
},
"_links": {
"description": "Links to resources related to this resource.",
"type": "object",
"required": [
"self"
],
"properties": {
"self": {
"properties": {
"href": {
"description": "URI referring to a resource",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "URI"
}
},
"required": [
"href"
],
"type": "object",
"x-etsi-ref": "6.5.2"
},
"instantiate": {
"properties": {
"href": {
"description": "URI referring to a resource",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "URI"
}
},
"required": [
"href"
],
"type": "object",
"x-etsi-ref": "6.5.2"
},
"terminate": {
"properties": {
"href": {
"description": "URI referring to a resource",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "URI"
}
},
"required": [
"href"
],
"type": "object",
"x-etsi-ref": "6.5.2"
},
"operate": {
"properties": {
"href": {
"description": "URI referring to a resource",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "URI"
}
},
"required": [
"href"
],
"type": "object",
"x-etsi-ref": "6.5.2"
}
}
}
}
}
\ No newline at end of file
{
"description": "'The data type represents a subscription link list of notification on application package management'",
"type": "object",
"required": [
"_links"
],
"properties": {
"_links": {
"description": "Links to resources related to this resource.",
"type": "object",
"required": [
"self"
],
"properties": {
"self": {
"properties": {
"href": {
"description": "URI referring to a resource",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "URI"
}
},
"required": [
"href"
],
"type": "object",
"x-etsi-ref": "6.5.2"
},
"subscriptions": {
"type": "array",
"items": {
"description": "'The data type represents the input parameters of \"subscription operation\" to notification of application package management for the onboarding, or operational state change of application package.'",
"type": "object",
"required": [
"href",
"subsctiptionType"
],
"properties": {
"href": {
"description": "The URI referring to the subscription.",
"type": "string",
"format": "uri"
},
"subsctiptionType": {
"description": "'Subscribed notification type'",
"type": "string",
"enum": [
"AppPackageOnBoardingSubscription",
"AppPacakgeOperationChangeSubscription",
"AppPackageDeletionSubscription"
]
}
}
}
}
}
}
}
}
\ No newline at end of file
{
"description": "'This data type represents an application lifecycle management operation occurrence'",
"type": "object",
"required": [
"id",
"operationState",
"stateEnteredTime",
"startTime",
"lcmOperation",
"_links"
],
"properties": {
"id": {
"description": "'Identifier of the subscription to application LCM operation occurrence notification'",
"type": "string"
},
"operationState": {
"description": "Operation state",
"type": "string",
"format": "enum",
"enum": [
"STARTING",
"PROCESSING",
"COMPLETED",
"FAILED"
]
},
"stateEnteredTime": {
"properties": {
"nanoSeconds": {
"description": "The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.",
"format": "Uint32",
"type": "integer",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uint32"
},
"seconds": {
"description": "The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.",
"format": "Uint32",
"type": "integer",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uint32"
}
},
"required": [
"seconds",
"nanoSeconds"
],
"type": "object",
"x-etsi-ref": "6.2.5.4"
},
"startTime": {
"properties": {
"nanoSeconds": {
"description": "The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.",
"format": "Uint32",
"type": "integer",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uint32"
},
"seconds": {
"description": "The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.",
"format": "Uint32",
"type": "integer",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uint32"
}
},
"required": [
"seconds",
"nanoSeconds"
],
"type": "object",
"x-etsi-ref": "6.2.5.4"
},
"lcmOperation": {
"description": "Type of the actual LCM operation represented by this application instance LCM operation occurrence",
"type": "string",
"format": "enum",
"enum": [
"INSTATIATE",
"OPERATE",
"TERMINATE"
]
},
"operationParams": {
"description": "'Input parameters of the LCM operation. This attribute shall be formatted according to the request data type of the related LCM operation.'",
"type": "string",
"enum": [
"INSTANTIATE",
"OPERATE",
"TERMINATE"
]
},
"_links": {
"description": "Links to resources related to this resource.",
"type": "object",
"required": [
"self",
"appInstance"
],
"properties": {
"self": {
"properties": {
"href": {
"description": "URI referring to a resource",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "URI"
}
},
"required": [
"href"
],
"type": "object",
"x-etsi-ref": "6.5.2"
},
"appInstance": {
"properties": {
"href": {
"description": "URI referring to a resource",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "URI"
}
},
"required": [
"href"
],
"type": "object",
"x-etsi-ref": "6.5.2"
}
}
}
}
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
Documentation
... A test suite for validating Application Service Availability Query (APPSAQ) operations.
Resource ../../GenericKeywords.robot
Resource ../../../GenericKeywords.robot
Resource environment/variables.txt
Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false
......@@ -13,13 +13,13 @@ Default Tags TC_MEC_SRV_APPSAQ
*** Test Cases ***
TC_MEC_SRV_APPSAQ_001_OK
TP_MEC_MEC011_SRV_APPSAQ_001_OK
[Documentation]
... Check that the IUT responds with a list of available MEC services
... for a given application instance when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.1.1, clause 8.2.6.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
... Reference ETSI GS MEC 011 V2.2.1, clause 8.2.6.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
[Tags] PIC_MEC_PLAT PIC_SERVICES
......@@ -28,12 +28,12 @@ TC_MEC_SRV_APPSAQ_001_OK
Check HTTP Response Body Json Schema Is ServiceInfoList
TC_MEC_SRV_APPSAQ_001_BR
TP_MEC_MEC011_SRV_APPSAQ_001_BR
[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 011 V2.1.1, clause 8.2.6.3.1
... Reference ETSI GS MEC 011 V2.2.1, clause 8.2.6.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
......@@ -42,12 +42,12 @@ TC_MEC_SRV_APPSAQ_001_BR
Check HTTP Response Status Code Is 400
TC_MEC_SRV_APPSAQ_002_OK
TP_MEC_MEC011_SRV_APPSAQ_002_OK
[Documentation]
... Check that the IUT notifies the authorised relevant (subscribed) application
... instances when a new service for a given application instance is registered
...
... Reference ETSI GS MEC 011 V2.1.1, clause 8.2.6.3.4
... Reference ETSI GS MEC 011 V2.2.1, clause 8.2.6.3.4
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
[Tags] PIC_MEC_PLAT PIC_SERVICES
......@@ -58,12 +58,12 @@ TC_MEC_SRV_APPSAQ_002_OK
Check Response Contains ${response['body']} serName ${NEW_SERVICE_NAME}
TC_MEC_SRV_APPSAQ_002_BR
TP_MEC_MEC011_SRV_APPSAQ_002_BR
[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 011 V2.1.1, clause 8.2.6.3.4
... Reference ETSI GS MEC 011 V2.2.1, clause 8.2.6.3.4
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
[Tags] PIC_MEC_PLAT PIC_SERVICES
......@@ -71,12 +71,12 @@ TC_MEC_SRV_APPSAQ_002_BR
Check HTTP Response Status Code Is 400
TC_MEC_SRV_APPSAQ_002_NF
TP_MEC_MEC011_SRV_APPSAQ_002_NF
[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 011 V2.1.1, clause 8.2.6.3.4
... Reference ETSI GS MEC 011 V2.2.1, clause 8.2.6.3.4
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
[Tags] PIC_MEC_PLAT PIC_SERVICES
......@@ -84,12 +84,12 @@ TC_MEC_SRV_APPSAQ_002_NF
Check HTTP Response Status Code Is 404
TC_MEC_SRV_APPSAQ_003_OK
TP_MEC_MEC011_SRV_APPSAQ_003_OK
[Documentation]
... Check that the IUT responds with the information on a specific service
... for a given application instance when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.1.1, clause 8.2.7.3.1
... Reference ETSI GS MEC 011 V2.2.1, clause 8.2.7.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
[Tags] PIC_MEC_PLAT PIC_SERVICES
......@@ -99,24 +99,24 @@ TC_MEC_SRV_APPSAQ_003_OK
Check Response Contains ${response['body']} serInstanceId ${SERVICE_ID}
TC_MEC_SRV_APPSAQ_003_NF
TP_MEC_MEC011_SRV_APPSAQ_003_NF
[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 011 V2.1.1, clause 8.2.7.3.1
... Reference ETSI GS MEC 011 V2.2.1, clause 8.2.7.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Get individual service ${APP_INSTANCE_ID} ${NON_EXISTENT_SERVICE_ID}
Check HTTP Response Status Code Is 404
TC_MEC_SRV_APPSAQ_004_OK
TP_MEC_MEC011_SRV_APPSAQ_004_OK
[Documentation]
... Check that the IUT updates a service information for a given
... application instance when commanded by a MEC Application
...
... Reference ETSI GS MEC 011 V2.1.1, clause 8.2.7.3.2
... Reference ETSI GS MEC 011 V2.2.1, clause 8.2.7.3.2
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
[Tags] PIC_MEC_PLAT PIC_SERVICES
......@@ -126,12 +126,12 @@ TC_MEC_SRV_APPSAQ_004_OK
Check Response Contains ${response['body']} version ${SVC_NEW_VERSION}
TC_MEC_SRV_APPSAQ_004_BR
TP_MEC_MEC011_SRV_APPSAQ_004_BR
[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 011 V2.1.1, clause 8.2.7.3.2
... Reference ETSI GS MEC 011 V2.2.1, clause 8.2.7.3.2
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
[Tags] PIC_MEC_PLAT PIC_SERVICES
......@@ -139,12 +139,12 @@ TC_MEC_SRV_APPSAQ_004_BR
Check HTTP Response Status Code Is 400
TC_MEC_SRV_APPSAQ_004_NF
TP_MEC_MEC011_SRV_APPSAQ_004_NF
[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 011 V2.1.1, clause 8.2.7.3.2
... Reference ETSI GS MEC 011 V2.2.1, clause 8.2.7.3.2
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
[Tags] PIC_MEC_PLAT PIC_SERVICES
......@@ -152,39 +152,25 @@ TC_MEC_SRV_APPSAQ_004_NF
Check HTTP Response Status Code Is 404
TC_MEC_SRV_APPSAQ_004_PF
[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 011 V2.1.1, clause 8.2.7.3.2
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
[Tags] PIC_MEC_PLAT PIC_SERVICES
Update service with invalid etag ${APP_INSTANCE_ID} ${SERVICE_ID} ServiceInfoUpdated
Check HTTP Response Status Code Is 412
TC_MEC_SRV_APPSAQ_005_OK
TP_MEC_MEC011_SRV_APPSAQ_005_OK
[Documentation]
... Check that the IUT executes the deletion of a service
... for a given application instance when requested by a MEC Application
...
... Reference ETSI GS MEC 011 V2.1.1, clause 8.2.7.3.1
... Reference ETSI GS MEC 011 V2.2.1, clause 8.2.7.3.5
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
[Tags] PIC_MEC_PLAT PIC_SERVICES
Remove individual service ${APP_INSTANCE_ID} ${SERVICE_ID}
[Tags] PIC_MEC_PLAT PIC_SERVICES
Remove individual service ${APP_INSTANCE_ID} ${SERVICE_ID}
Check HTTP Response Status Code Is 204
TC_MEC_SRV_APPSAQ_005_NF
TP_MEC_MEC011_SRV_APPSAQ_005_NF
[Documentation]
... Check that the IUT responds with an error when
... a request for deletion of a unknown service is sent by a MEC Application
...
... Reference ETSI GS MEC 011 V2.1.1, clause 8.2.7.3.1
... Reference ETSI GS MEC 011 V2.2.1, clause 8.2.7.3.5
[Tags] PIC_MEC_PLAT PIC_SERVICES
Remove individual service ${APP_INSTANCE_ID} ${NON_EXISTENT_SERVICE_ID}
Check HTTP Response Status Code Is 404
......@@ -196,6 +182,7 @@ Get a list of mecService of an application instance with parameters
[Arguments] ${appInstanceId} ${key}=None ${value}=None
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Type":"*/*"}
Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services?${key}=${value}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -203,6 +190,7 @@ Get a list of mecService of an application instance with parameters
Get a list of mecService of an application instance
[Arguments] ${appInstanceId}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services
${output}= Output response
......@@ -213,9 +201,11 @@ Create new service
[Arguments] ${content} ${appInstanceId}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
#Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
${file}= Catenate SEPARATOR= jsons/ ${content} .json
${body}= Get File ${file}
Log ${appInstanceId}
Post ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -225,6 +215,7 @@ Get individual service
[Arguments] ${appInstanceId} ${serviceName}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Type":"*/*"}
Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services/${serviceName}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -234,6 +225,7 @@ Update service
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
#Set Headers {"Content-Type":"*/*"}
${file}= Catenate SEPARATOR= jsons/ ${content} .json
${body}= Get File ${file}
PUT ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services/${serviceId} ${body}
......@@ -241,17 +233,11 @@ Update service
Set Suite Variable ${response} ${output}
Update service with invalid etag
[Arguments] ${appInstanceId} ${serviceId} ${content}
Set Headers {"If-Match": ${INVALID_ETAG}}
Update service ${appInstanceId} ${serviceId} ${content}
Remove individual service
[Arguments] ${appInstanceId} ${serviceName}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Type":"*/*"}
Delete ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services/${serviceName}
${output}= Output response
Set Suite Variable ${response} ${output}
......