Commit 05e2c170 authored by Elian Kraja's avatar Elian Kraja Committed by Michele Carignani
Browse files

Updating from v2.0.9 to v2.1.1. Cause 8: MEC service management API

parent a431da9b
Pipeline #3590 passed with stage
in 0 seconds
......@@ -18,8 +18,8 @@ TC_MEC_SRV_APPSAQ_001_OK
... 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.0.9, clause 8.2.6.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
... 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
[Tags] PIC_MEC_PLAT PIC_SERVICES
......@@ -33,7 +33,7 @@ TC_MEC_SRV_APPSAQ_001_BR
... 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.0.9, clause 8.2.6.3.1
... Reference ETSI GS MEC 011 V2.1.1, clause 8.2.6.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
......@@ -48,14 +48,14 @@ TC_MEC_SRV_APPSAQ_002_OK
... instances when a new service for a given application instance is registered
...
... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.6.3.4
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
[Tags] PIC_MEC_PLAT PIC_SERVICES
Create new service ServiceInfo ${APP_INSTANCE_ID}
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is ServiceInfo
Check HTTP Response Header Contains Location
# Check Result Contains ${response['body']['ServiceInfo']} serName ${SERVICE_NAME}
Check Result Contains ${response['body']} serName ${NEW_SERVICE_NAME}
TC_MEC_SRV_APPSAQ_002_BR
......@@ -63,8 +63,8 @@ TC_MEC_SRV_APPSAQ_002_BR
... 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.0.9, clause 8.2.6.3.4
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
... Reference ETSI GS MEC 011 V2.1.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
Create new service ServiceInfoError ${APP_INSTANCE_ID}
......@@ -76,8 +76,8 @@ TC_MEC_SRV_APPSAQ_002_NF
... 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.0.9, clause 8.2.6.3.4
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
... Reference ETSI GS MEC 011 V2.1.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
Create new service ServiceInfo ${NON_EXISTENT_APP_INSTANCE_ID}
......@@ -89,14 +89,14 @@ TC_MEC_SRV_APPSAQ_003_OK
... 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.0.9, clause 8.2.7.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
... Reference ETSI GS MEC 011 V2.1.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
Get individual service ${APP_INSTANCE_ID} ${SERVICE_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ServiceInfo
Check Result Contains ${response['body']['ServiceInfo']} serInstanceId ${SERVICE_ID}
Check Result Contains ${response['body']} serInstanceId ${SERVICE_ID}
TC_MEC_SRV_APPSAQ_003_NF
......@@ -104,7 +104,7 @@ TC_MEC_SRV_APPSAQ_003_NF
... 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.0.9, clause 8.2.7.3.1
... Reference ETSI GS MEC 011 V2.1.1, clause 8.2.7.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
Get individual service ${APP_INSTANCE_ID} ${NON_EXISTENT_SERVICE_ID}
......@@ -116,14 +116,14 @@ TC_MEC_SRV_APPSAQ_004_OK
... 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.0.9, clause 8.2.7.3.2
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
... 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 ${APP_INSTANCE_ID} ${SERVICE_ID} ServiceInfoUpdated
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ServiceInfo
#Check Result Contains ${response['body']['ServiceInfo']} version ${SVC_NEW_VERSION}
Check Result Contains ${response['body']} version ${SVC_NEW_VERSION}
TC_MEC_SRV_APPSAQ_004_BR
......@@ -131,8 +131,8 @@ TC_MEC_SRV_APPSAQ_004_BR
... 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.0.9, clause 8.2.7.3.2
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
... 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 ${APP_INSTANCE_ID} ${SERVICE_ID} ServiceInfoUpdatedError
......@@ -144,8 +144,8 @@ TC_MEC_SRV_APPSAQ_004_NF
... 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.0.9, clause 8.2.7.3.2
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
... 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 ${APP_INSTANCE_ID} ${NON_EXISTENT_SERVICE_ID} ServiceInfoUpdated
......@@ -157,14 +157,39 @@ TC_MEC_SRV_APPSAQ_004_PF
... 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.0.9, clause 8.2.7.3.2
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo
... 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
[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
... 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}
Check HTTP Response Status Code Is 204
TC_MEC_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
[Tags] PIC_MEC_PLAT PIC_SERVICES
Remove individual service ${APP_INSTANCE_ID} ${NON_EXISTENT_SERVICE_ID}
Check HTTP Response Status Code Is 404
*** Keywords ***
Get a list of mecService of an application instance with parameters
......@@ -211,7 +236,7 @@ Update service
Set Headers {"Authorization":"${TOKEN}"}
${file}= Catenate SEPARATOR= jsons/ ${content} .json
${body}= Get File ${file}
Post ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services/${serviceId} ${body}
PUT ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services/${serviceId} ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -223,6 +248,15 @@ Update service with invalid etag
Update service ${appInstanceId} ${serviceId} ${content}
Remove individual service
[Arguments] ${appInstanceId} ${serviceName}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services/${serviceName}
${output}= Output response
Set Suite Variable ${response} ${output}
# Check Plaform IUT notifies the MEC Application instances
# [Documentation]
# ...
......
......@@ -18,17 +18,8 @@ ${SERVICE_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3
${NON_EXISTENT_SERVICE_ID} NON_EXISTENT_SERVICE_ID
${INVALID_ETAG} INVALID_ETAG
# ${SUBSCRIPTION_TYPE} MobilityProcedureSubscription
# ${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3
# ${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID
# ${NON_EXISTENT_APP_MOBILITY_SERVICE_ID} NON_EXISTENT_APP_MOBILITY_SERVICE_ID
## this parameter should be the same as in jsons/ServiceInfo.json on param serName
${NEW_SERVICE_NAME} NEW_SERVICE_NAME
# # Notifications variables
# ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar
# ${callback_port} 9091
# ${callback_uri} http://172.22.1.7:${callback_port}
# ${callback_endpoint} /amsi/subscriptions
# ${callback_endpoint_error} /subs_404
# ${total_polling_time} 2 min
# ${polling_interval} 10 sec
\ No newline at end of file
## this parameter should be the same as in jsons/ServiceInfoUpdated.json on param sversion
${SVC_NEW_VERSION} v2.0
\ No newline at end of file
{
"serName": "NEW_SERVICE_NAME",
"version": "reprehenderit Ut non commodo",
"state": "INACTIVE",
"transportInfo": {
"id": "labore ut Excepteur sunt ipsum",
"name": "in minim enim",
"type": "MB_ROUTING",
"protocol": "veniam aliqua cillum in",
"version": "exercitation pariatur",
"endpoint": {
"addresses": [
{
"host": "sint culpa laboris",
"port": 10968
}
]
},
"security": {
"oAuth2Info": {
"grantTypes": [
"OAUTH2_IMPLICIT_GRANT",
"OAUTH2_IMPLICIT_GRANT",
"OAUTH2_CLIENT_CREDENTIALS"
],
"tokenEndpoint": "https://RXjkuoqKaR.nskcJZJsyoIFJ0k86hJdxq.eTHEGqxAybM3DEZlUlYQpZ47s6RR+O9gyFrLbO92,9"
}
},
"description": "dolor occaecat pariatur ex do"
},
"serializer": "XML",
"serInstanceId": "cillum nostrud minim consectetur proident",
"serCategory": {
"href": "http://VWwswcAtAylGx.usasPjZ+bqQIHCMc7FfToVvk2M.SYAWYvSDKGSRL7Z.rxyfC0goFNZtoGJrlFc89,",
"id": "consectetur et eiusmod",
"name": "ea ipsum irure mollit et",
"version": "et"
},
"scopeOfLocality": "ZONE",
"consumedLocalOnly": true,
"isLocal": false
}
\ No newline at end of file
{
"Name": "WRONG_PARAMETER_NAME",
"version": "reprehenderit Ut non commodo",
"state": "INACTIVE",
"transportInfo": {
"id": "labore ut Excepteur sunt ipsum",
"name": "in minim enim",
"type": "MB_ROUTING",
"protocol": "veniam aliqua cillum in",
"version": "exercitation pariatur",
"endpoint": {
"addresses": [
{
"host": "sint culpa laboris",
"port": 10968
}
]
},
"security": {
"oAuth2Info": {
"grantTypes": [
"OAUTH2_IMPLICIT_GRANT",
"OAUTH2_IMPLICIT_GRANT",
"OAUTH2_CLIENT_CREDENTIALS"
],
"tokenEndpoint": "https://RXjkuoqKaR.nskcJZJsyoIFJ0k86hJdxq.eTHEGqxAybM3DEZlUlYQpZ47s6RR+O9gyFrLbO92,9"
}
},
"description": "dolor occaecat pariatur ex do"
},
"serializer": "XML",
"serInstanceId": "cillum nostrud minim consectetur proident",
"serCategory": {
"href": "http://VWwswcAtAylGx.usasPjZ+bqQIHCMc7FfToVvk2M.SYAWYvSDKGSRL7Z.rxyfC0goFNZtoGJrlFc89,",
"id": "consectetur et eiusmod",
"name": "ea ipsum irure mollit et",
"version": "et"
},
"scopeOfLocality": "ZONE",
"consumedLocalOnly": true,
"isLocal": false
}
\ No newline at end of file
{
"serName": "NEW_SERVICE_NAME",
"version": "v2.0",
"state": "INACTIVE",
"transportInfo": {
"id": "labore ut Excepteur sunt ipsum",
"name": "in minim enim",
"type": "MB_ROUTING",
"protocol": "veniam aliqua cillum in",
"version": "exercitation pariatur",
"endpoint": {
"addresses": [
{
"host": "sint culpa laboris",
"port": 10968
}
]
},
"security": {
"oAuth2Info": {
"grantTypes": [
"OAUTH2_IMPLICIT_GRANT",
"OAUTH2_IMPLICIT_GRANT",
"OAUTH2_CLIENT_CREDENTIALS"
],
"tokenEndpoint": "https://RXjkuoqKaR.nskcJZJsyoIFJ0k86hJdxq.eTHEGqxAybM3DEZlUlYQpZ47s6RR+O9gyFrLbO92,9"
}
},
"description": "dolor occaecat pariatur ex do"
},
"serializer": "XML",
"serInstanceId": "cillum nostrud minim consectetur proident",
"serCategory": {
"href": "http://VWwswcAtAylGx.usasPjZ+bqQIHCMc7FfToVvk2M.SYAWYvSDKGSRL7Z.rxyfC0goFNZtoGJrlFc89,",
"id": "consectetur et eiusmod",
"name": "ea ipsum irure mollit et",
"version": "et"
},
"scopeOfLocality": "ZONE",
"consumedLocalOnly": true,
"isLocal": false
}
\ No newline at end of file
{
"serName": "NEW_SERVICE_NAME",
"a_version": "v2.0",
"state": "INACTIVE",
"transportInfo": {
"id": "labore ut Excepteur sunt ipsum",
"name": "in minim enim",
"type": "MB_ROUTING",
"protocol": "veniam aliqua cillum in",
"version": "exercitation pariatur",
"endpoint": {
"addresses": [
{
"host": "sint culpa laboris",
"port": 10968
}
]
},
"security": {
"oAuth2Info": {
"grantTypes": [
"OAUTH2_IMPLICIT_GRANT",
"OAUTH2_IMPLICIT_GRANT",
"OAUTH2_CLIENT_CREDENTIALS"
],
"tokenEndpoint": "https://RXjkuoqKaR.nskcJZJsyoIFJ0k86hJdxq.eTHEGqxAybM3DEZlUlYQpZ47s6RR+O9gyFrLbO92,9"
}
},
"description": "dolor occaecat pariatur ex do"
},
"serializer": "XML",
"serInstanceId": "cillum nostrud minim consectetur proident",
"serCategory": {
"href": "http://VWwswcAtAylGx.usasPjZ+bqQIHCMc7FfToVvk2M.SYAWYvSDKGSRL7Z.rxyfC0goFNZtoGJrlFc89,",
"id": "consectetur et eiusmod",
"name": "ea ipsum irure mollit et",
"version": "et"
},
"scopeOfLocality": "ZONE",
"consumedLocalOnly": true,
"isLocal": false
}
\ No newline at end of file
{
"description": "This type represents the general information of a MEC service.",
"type": "object",
"required": [
"serName",
"version",
"state",
"transportInfo",
"serializer"
],
"properties": {
"serInstanceId": {
"description": "Identifier of the service instance assigned by the MEC platform.",
"type": "string",
"readOnly": true,
"example": "ServiceInstance123"
},
"serName": {
"description": "The name of the service. This is how the service producing MEC application identifies the service instance it produces.",
"type": "string",
"example": "ExampleService"
},
"serCategory": {
"description": "This type represents the category reference",
"type": "object",
"required": [
"href",
"id",
"name",
"version"
],
"properties": {
"href": {
"description": "Reference of the catalogue",
"type": "string",
"format": "uri",
"example": "/example/catalogue1"
},
"id": {
"description": "Unique identifier of the category",
"type": "string",
"example": "id12345"
},
"name": {
"description": "Name of the category, example values include RNI, Location & Bandwidth Management",
"type": "string",
"example": "RNI"
},
"version": {
"description": "Category version",
"type": "string",
"example": "version1"
}
}
},
"version": {
"description": "Service version",
"type": "string",
"example": "ServiceVersion1"
},
"state": {
"description": "This enumeration defines the possible states of a service.",
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
],
"example": "ACTIVE"
},
"transportInfo": {
"description": "This type represents the general information of a MEC service.",
"type": "object",
"required": [
"id",
"name",
"type",
"protocol",
"version",
"endpoint",
"security"
],
"properties": {
"id": {
"description": "The identifier of this transport",
"type": "string",
"example": "TransId12345"
},
"name": {
"description": "The name of this transport",
"type": "string",
"example": "REST"
},
"description": {
"description": "Human-readable description of this transport",
"type": "string",
"example": "REST API"
},
"type": {
"description": "The enumeration TransportType represents types of transports",
"type": "string",
"enum": [
"REST_HTTP",
"MB_TOPIC_BASED",
"MB_ROUTING",
"MB_PUBSUB",
"RPC",
"RPC_STREAMING",
"WEBSOCKET"
],
"example": "REST_HTTP"
},
"protocol": {
"description": "The name of the protocol used. Shall be set to HTTP for a REST API.",
"type": "string",
"example": "HTTP"
},
"version": {
"description": "The version of the protocol used",
"type": "string",
"example": "2.0"
},
"endpoint": {
"description": "This type represents information about a transport endpoint",
"type": "object",
"oneOf": [{
"description": "Entry point information of the service as string, formatted according to URI syntax",
"type": "object",
"required": [
"uris"
],
"properties": {
"uris": {
"type": "array",
"minItems": 0,
"items": {
"description": "Entry point information of the service",
"type": "string",
"format": "uri",
"example": "/mecSerMgmtApi/service/EntryPoint"
}
}
}
},
{
"description": "Entry point information of the service as one or more pairs of IP address and port",
"type": "object",
"required": [
"addresses"
],
"properties": {
"addresses": {
"type": "array",
"minItems": 0,
"items": {
"description": "A IP address and port pair",
"type": "object",
"required": [
"host",
"port"
],
"properties": {
"host": {
"description": "Host portion of the address",
"type": "string",
"example": "192.0.2.0"
},
"port": {
"description": "Port portion of the address",
"type": "integer",
"format": "uint32",
"example": 8080
}
}
}
}
}
},
{
"description": "Entry point information of the service in a format defined by an implementation, or in an external specification.",
"type": "object",
"required": [
"alternative"
],
"properties": {
"alternative": {
"type": "object"
}
}
}
]
},
"security": {
"description": "This type represents security information related to a transport",
"type": "object",
"properties": {
"oAuth2Info": {
"description": "Parameters related to use of OAuth 2.0",
"required": [
"grantTypes",
"tokenEndpoint"
],
"properties": {
"grantTypes": {
"description": "List of supported OAuth 2.0 grant types.",
"type": "array",
"minItems": 1,
"maxItems": 4,
"items": {
"description": "OAuth 2.0 grant type",
"type": "string",
"enum": [
"OAUTH2_AUTHORIZATION_CODE",
"OAUTH2_IMPLICIT_GRANT",