diff --git a/SRV/APPSUB/PlatAppSubscriptions.robot b/SRV/APPSUB/PlatAppSubscriptions.robot index 0909017cd4a61e9247d44e672f768b8406644b11..3d1534d8684275998860dfe736c4fc3191a46387 100644 --- a/SRV/APPSUB/PlatAppSubscriptions.robot +++ b/SRV/APPSUB/PlatAppSubscriptions.robot @@ -18,8 +18,8 @@ TC_MEC_SRV_APPSUB_001_OK ... Check that the IUT responds with a list of subscriptions for notifications ... on services availability when queried by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.3.3.1 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/MecAppSuptApiSubscriptionLinkList + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.3.3.1 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/MecAppSuptApiSubscriptionLinkList [Tags] PIC_MEC_PLAT PIC_SERVICES Get Subscriptions list ${APP_INSTANCE_ID} @@ -32,7 +32,7 @@ TC_MEC_SRV_APPSUB_001_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 7.2.3.3.1 + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.3.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES Get Subscriptions list ${NON_EXISTENT_APP_INSTANCE_ID} @@ -44,16 +44,16 @@ TC_MEC_SRV_APPSUB_002_OK ... Check that the IUT acknowledges the subscription by a MEC Application ... to notifications on service availability events ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.3.3.4 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/AppTerminationNotificationSubscription + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.3.3.4 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/AppTerminationNotificationSubscription [Tags] PIC_MEC_PLAT PIC_SERVICES Create new subscription ${APP_INSTANCE_ID} AppTerminationNotificationSubscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is AppTerminationNotificationSubscription Check HTTP Response Header Contains Location - Check Result Contains ${response['body']['AppTerminationNotificationSubscription']} subscriptionType "AppTerminationNotificationSubscription" - Check Result Contains ${response['body']['AppTerminationNotificationSubscription']} callbackReference ${APP_TERM_NOTIF_CALLBACK_URI} + Check Result Contains ${response['body']} subscriptionType "AppTerminationNotificationSubscription" + Check Result Contains ${response['body']} callbackReference ${APP_TERM_NOTIF_CALLBACK_URI} TC_MEC_SRV_APPSUB_003_OK @@ -61,14 +61,14 @@ TC_MEC_SRV_APPSUB_003_OK ... Check that the IUT responds with the information on a specific subscription ... when queried by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.4.3.1 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/AppTerminationNotificationSubscription + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.4.3.1 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/AppTerminationNotificationSubscription [Tags] PIC_MEC_PLAT PIC_SERVICES Get individual subscription ${APP_INSTANCE_ID} ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppTerminationNotificationSubscription - Check Result Contains ${response['body']['AppTerminationNotificationSubscription']} subscriptionType "AppTerminationNotificationSubscription" + Check Result Contains ${response['body']} subscriptionType "AppTerminationNotificationSubscription" TC_MEC_SRV_APPSUB_003_NF @@ -76,7 +76,7 @@ TC_MEC_SRV_APPSUB_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 7.2.4.3.1 + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.4.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES Get individual subscription ${APP_INSTANCE_ID} ${NON_EXISTENT_SUBSCRIPTION_ID} @@ -88,7 +88,7 @@ TC_MEC_SRV_APPSUB_004_OK ... Check that the IUT acknowledges the unsubscribe from service availability event notifications ... when commanded by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.4.3.5 + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.4.3.5 [Tags] PIC_MEC_PLAT PIC_SERVICES Remove subscription ${APP_INSTANCE_ID} ${SUBSCRIPTION_ID} diff --git a/SRV/APPSUB/jsons/AppTerminationNotificationSubscription.json b/SRV/APPSUB/jsons/AppTerminationNotificationSubscription.json index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..760b35c7fbfa597f5f792b9e367230579c475fe8 100644 --- a/SRV/APPSUB/jsons/AppTerminationNotificationSubscription.json +++ b/SRV/APPSUB/jsons/AppTerminationNotificationSubscription.json @@ -0,0 +1,10 @@ +{ + "subscriptionType": "AppTerminationNotificationSubscription", + "callbackReference": "https://somewhere.com/mecAppSuptApi/example", + "_links": { + "self": { + "href": "https://somewhere.com/mecAppSuptApi/example" + } + }, + "appInstanceId": "est eiusmod nulla exercitation" +} \ No newline at end of file diff --git a/SRV/APPSUB/schemas/AppTerminationNotificationSubscription.schema.json b/SRV/APPSUB/schemas/AppTerminationNotificationSubscription.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..c3d00dc84b499526db8810bb8468bfc5ad866ee4 --- /dev/null +++ b/SRV/APPSUB/schemas/AppTerminationNotificationSubscription.schema.json @@ -0,0 +1,49 @@ +{ + "description": "This type represents the information that the MEC platform notifies the subscribed application instance about the corresponding application instance termination/stop.", + "type": "object", + "required": [ + "subscriptionType", + "callbackReference", + "_links", + "appInstanceId" + ], + "properties": { + "subscriptionType": { + "description": "Shall be set to AppTerminationNotificationSubscription.", + "type": "string", + "example": "AppTerminationNotificationSubscription" + }, + "callbackReference": { + "description": "URI selected by the MEC application instance to receive notifications on the subscribed MEC application instance management information. This shall be included in both the request and the response.", + "type": "string", + "format": "uri" + }, + "_links": { + "description": "Self-referring URI.", + "type": "object", + "required": [ + "self" + ], + "properties": { + "self": { + "description": "This type represents a type of link and may be referenced from data structures", + "type": "object", + "properties": { + "href": { + "description": "URI referring to a resource", + "type": "string", + "format": "uri", + "example": "/mecAppSuptApi/example" + } + } + } + }, + "readOnly": true + }, + "appInstanceId": { + "description": "It is used as the filtering criterion for the subscribed events.", + "type": "string", + "example": "ID1" + } + } +} \ No newline at end of file diff --git a/SRV/APPSUB/schemas/SubscriptionsLinkList.schema.json b/SRV/APPSUB/schemas/SubscriptionsLinkList.schema.json index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..d2eb1d9ba8d48fb2fb323a793a189c557505b9ad 100644 --- a/SRV/APPSUB/schemas/SubscriptionsLinkList.schema.json +++ b/SRV/APPSUB/schemas/SubscriptionsLinkList.schema.json @@ -0,0 +1,54 @@ +{ + "description": "This type represents a list of links related to currently existing subscriptions for a MEC application instance. This information is returned when sending a request to receive current subscriptions.", + "type": "object", + "required": [ + "_links" + ], + "properties": { + "_links": { + "description": "Self-referring URI.", + "type": "object", + "required": [ + "self" + ], + "properties": { + "self": { + "description": "This type represents a type of link and may be referenced from data structures", + "type": "object", + "properties": { + "href": { + "description": "URI referring to a resource", + "type": "string", + "format": "uri", + "example": "/mecAppSuptApi/example" + } + } + }, + "subscriptions": { + "description": "The MEC application instance's subscriptions", + "type": "array", + "items": { + "description": "A link to a subscription.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "URI referring to a resource", + "type": "string", + "format": "uri", + "example": "/mecAppSuptApi/example" + }, + "rel": { + "description": "The values shall be set to AppTerminationNotificationSubscription.", + "type": "string" + } + } + } + } + } + } + } + } \ No newline at end of file diff --git a/SRV/CONF/PlatConfirmation.robot b/SRV/CONF/PlatConfirmation.robot new file mode 100644 index 0000000000000000000000000000000000000000..c619ff1b9e76e7a942adba0033a659bb6657c90c --- /dev/null +++ b/SRV/CONF/PlatConfirmation.robot @@ -0,0 +1,95 @@ +*** Settings *** + +Documentation +... A test suite for validating DNS rules (DNS) operations. + +Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem + +Default Tags TC_MEC_SRV_CONF + + +*** Variables *** + + +*** Test Cases *** + +TC_MEC_SRV_CONF_001_OK + [Documentation] + ... Check that the IUT responds with an acknowledge + ... when requested graceful termination/stop of a MEC Application instance + ... + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.11.3.4 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/AppTerminationConfirmation + + [Tags] PIC_MEC_PLAT PIC_SERVICES + Request termination of MEC Application ${APP_INSTANCE_ID} AppTerminationConfirmation + Check HTTP Response Status Code Is 204 + + +TC_MEC_SRV_CONF_001_NF + [Documentation] + ... Check that the IUT responds with an error + ... when requested graceful termination/stop of an unknown MEC Application instance + ... + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.11.3.4 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/AppTerminationConfirmation + + [Tags] PIC_MEC_PLAT PIC_SERVICES + Request termination of MEC Application ${NON_ESISTENT_APP_INSTANCE_ID} AppTerminationConfirmation + Check HTTP Response Status Code Is 404 + + + + +TC_MEC_SRV_CONF_002_OK + [Documentation] + ... Check that the IUT responds with an acknowledge + ... when requested readiness status for a MEC Application instance + ... + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.12.3.4 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/AppReadyConfirmation + + [Tags] PIC_MEC_PLAT PIC_SERVICES + Request readiness status of MEC Application ${APP_INSTANCE_ID} AppReadyConfirmation + Check HTTP Response Status Code Is 204 + + +TC_MEC_SRV_CONF_002_NF + [Documentation] + ... Check that the IUT responds with an error + ... when requested readiness status for an unknown MEC Application instance + ... + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.12.3.4 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/AppReadyConfirmation + + [Tags] PIC_MEC_PLAT PIC_SERVICES + Request readiness status of MEC Application ${NON_ESISTENT_APP_INSTANCE_ID} AppReadyConfirmation + Check HTTP Response Status Code Is 404 + + +*** Keywords *** +Request termination of MEC Application + [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} + PUT ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/confirm_termination ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Request readiness status of MEC Application + [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} + PUT ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/confirm_ready ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} diff --git a/SRV/CONF/README.md b/SRV/CONF/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/SRV/CONF/environment/variables.txt b/SRV/CONF/environment/variables.txt new file mode 100644 index 0000000000000000000000000000000000000000..183991b3e8619c680ead1c4b2bc2a854179da8c2 --- /dev/null +++ b/SRV/CONF/environment/variables.txt @@ -0,0 +1,34 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} mec_app_support +${apiVersion} v1 + +# Specific variables +${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${NON_ESISTENT_APP_INSTANCE_ID} NON_ESISTENT_APP_INSTANCE_ID +# ${DNS_RULE_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +# ${NON_ESISTENT_DNS_RULE_ID} NON_ESISTENT_DNS_RULE_ID +# ${INVALID_ETAG} INVALID_ETAG + +# ${SOME_IP_ADDRESS} 146.241.7.3 + +# ${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 + +# # 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 diff --git a/SRV/CONF/jsons/AppReadyConfirmation.json b/SRV/CONF/jsons/AppReadyConfirmation.json new file mode 100644 index 0000000000000000000000000000000000000000..9deacc3d95269f6dda91e700eeb5d4764da193a7 --- /dev/null +++ b/SRV/CONF/jsons/AppReadyConfirmation.json @@ -0,0 +1,3 @@ +{ + "indication": "READY" +} \ No newline at end of file diff --git a/SRV/CONF/jsons/AppTerminationConfirmation.json b/SRV/CONF/jsons/AppTerminationConfirmation.json new file mode 100644 index 0000000000000000000000000000000000000000..4717f09a8bb093a3301487ca8b62efba7ecfaf3b --- /dev/null +++ b/SRV/CONF/jsons/AppTerminationConfirmation.json @@ -0,0 +1,3 @@ +{ + "operationAction": "TERMINATING" +} \ No newline at end of file diff --git a/SRV/CONF/schemas/AppReadyConfirmation.schema.json b/SRV/CONF/schemas/AppReadyConfirmation.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..d2ebd76bf909089156b58c8cae1dc5ea2bc4d128 --- /dev/null +++ b/SRV/CONF/schemas/AppReadyConfirmation.schema.json @@ -0,0 +1,17 @@ +{ + "description": "This type represents the information that the MEC application instance indicates to the MEC platform that it is up and running.", + "type": "object", + "required": [ + "indication" + ], + "properties": { + "indication": { + "description": "Indication about the MEC application instance.", + "type": "string", + "enum": [ + "READY" + ], + "example": "READY" + } + } +} \ No newline at end of file diff --git a/SRV/CONF/schemas/AppTerminationConfirmation.schema.json b/SRV/CONF/schemas/AppTerminationConfirmation.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..553d50ce759551de1ea92d4f261dcbf272d57987 --- /dev/null +++ b/SRV/CONF/schemas/AppTerminationConfirmation.schema.json @@ -0,0 +1,18 @@ +{ + "description": "This type represents the information that the MEC application instance provides to the MEC platform when informing it that the application has completed its application level related terminate/stop actions, e.g. retention of application state in the case of stop.", + "type": "object", + "required": [ + "operationAction" + ], + "properties": { + "operationAction": { + "description": "Operation that is being performed on the MEC application instance.", + "type": "string", + "enum": [ + "STOPPING", + "TERMINATING" + ], + "example": "TERMINATING" + } + } +} \ No newline at end of file diff --git a/SRV/DNS/PlatDnsRules.robot b/SRV/DNS/PlatDnsRules.robot index 1296b6273b1f7496a3dd30b687e7a56a64e40e7a..087e9454ae92360cbcca942cc48391d1807a1e8c 100644 --- a/SRV/DNS/PlatDnsRules.robot +++ b/SRV/DNS/PlatDnsRules.robot @@ -21,8 +21,8 @@ TC_MEC_SRV_DNS_001_OK ... Check that the IUT responds with a list of active DNS rules ... when queried by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.9.3.1 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.9.3.1 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/DnsRule [Tags] PIC_MEC_PLAT PIC_SERVICES Get list of active DNS rules ${APP_INSTANCE_ID} @@ -35,14 +35,14 @@ TC_MEC_SRV_DNS_002_OK ... Check that the IUT responds with the information on a specific DNS rule ... when queried by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.10.3.1 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.10.3.1 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/DnsRule [Tags] PIC_MEC_PLAT PIC_SERVICES Get individual DNS rule ${APP_INSTANCE_ID} ${DNS_RULE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is DnsRule - Check Result Contains ${response['body']['DnsRule']} dnsRuleId ${DNS_RULE_ID} + Check Result Contains ${response['body']} dnsRuleId ${DNS_RULE_ID} TC_MEC_SRV_DNS_002_NF @@ -50,7 +50,7 @@ TC_MEC_SRV_DNS_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 7.2.10.3.1 + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.10.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES Get individual DNS rule ${APP_INSTANCE_ID} ${NON_ESISTENT_DNS_RULE_ID} @@ -62,15 +62,14 @@ TC_MEC_SRV_DNS_003_OK ... Check that the IUT updates a specific DNS rule ... when commanded by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.10.3.2 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.10.3.2 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/DnsRule [Tags] PIC_MEC_PLAT PIC_SERVICES Update a DNS Rule ${APP_INSTANCE_ID} ${DNS_RULE_ID} DnsRuleUpdate Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is DnsRule - # Check Result Contains ${response['body']['DnsRule']} dnsRuleId ${DNS_RULE_NAME} - # Check Result Contains ${response['body']['DnsRule']} ipAddress ${SOME_IP_ADDRESS} + Check Result Contains ${response['body']} ipAddress ${SOME_IP_ADDRESS} TC_MEC_SRV_DNS_003_BR @@ -78,8 +77,8 @@ TC_MEC_SRV_DNS_003_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 7.2.10.3.2 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.10.3.2 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/DnsRule [Tags] PIC_MEC_PLAT PIC_SERVICES Update a DNS Rule ${APP_INSTANCE_ID} ${DNS_RULE_ID} DnsRuleUpdateError @@ -91,8 +90,8 @@ TC_MEC_SRV_DNS_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 7.2.10.3.2 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.10.3.2 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/DnsRule [Tags] PIC_MEC_PLAT PIC_SERVICES Update a DNS Rule ${APP_INSTANCE_ID} ${NON_ESISTENT_DNS_RULE_ID} DnsRuleUpdate @@ -104,8 +103,8 @@ TC_MEC_SRV_DNS_003_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 7.2.10.3.2 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.10.3.2 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/DnsRule [Tags] PIC_MEC_PLAT PIC_SERVICES Update a DNS Rule with invalid etag ${APP_INSTANCE_ID} ${DNS_RULE_ID} DnsRuleUpdate @@ -138,10 +137,11 @@ Update a DNS Rule Set Headers {"Authorization":"${TOKEN}"} ${file}= Catenate SEPARATOR= jsons/ ${content} .json ${body}= Get File ${file} - Post ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/dns_rules/${dnsRuleId} ${body} + PUT ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/dns_rules/${dnsRuleId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} Update a DNS Rule with invalid etag [Arguments] ${appInstanceId} ${dnsRuleId} ${content} - Set Headers {"If-Match": ${INVALID_ETAG}} \ No newline at end of file + Set Headers {"If-Match": ${INVALID_ETAG}} + Update a DNS Rule ${appInstanceId} ${dnsRuleId} ${content} \ No newline at end of file diff --git a/SRV/DNS/environment/variables.txt b/SRV/DNS/environment/variables.txt index bb3a06467622784f671d170e3633a89ab74ee213..1ab92ff9e402bb7a1f3c8005c8cf2cee99795cf2 100644 --- a/SRV/DNS/environment/variables.txt +++ b/SRV/DNS/environment/variables.txt @@ -15,6 +15,8 @@ ${DNS_RULE_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 ${NON_ESISTENT_DNS_RULE_ID} NON_ESISTENT_DNS_RULE_ID ${INVALID_ETAG} INVALID_ETAG +${SOME_IP_ADDRESS} 146.241.7.3 + # ${SUBSCRIPTION_TYPE} MobilityProcedureSubscription # ${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 # ${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID diff --git a/SRV/DNS/jsons/DnsRuleUpdate.json b/SRV/DNS/jsons/DnsRuleUpdate.json index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f30f44ec21be15f7bf740b45f1a7cdbb631bf2d0 100644 --- a/SRV/DNS/jsons/DnsRuleUpdate.json +++ b/SRV/DNS/jsons/DnsRuleUpdate.json @@ -0,0 +1,8 @@ +{ + "dnsRuleId": "DnsRule1", + "domainName": "www.example.com", + "ipAddressType": "IP_V4", + "ipAddress": "146.241.7.3", + "ttl": 300, + "state": "ACTIVE" +} \ No newline at end of file diff --git a/SRV/DNS/jsons/DnsRuleUpdateError.json b/SRV/DNS/jsons/DnsRuleUpdateError.json index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6dda93b75aa89f49d8bda30ddd6723f288f3e732 100644 --- a/SRV/DNS/jsons/DnsRuleUpdateError.json +++ b/SRV/DNS/jsons/DnsRuleUpdateError.json @@ -0,0 +1,8 @@ +{ + "dnsRuleId": "DnsRule1", + "domainName": "www.example.com", + "ipAddressType": "IP_V4", + "ipAddress": "146.241.7.3", + "ttl": 300, + "state": "UNKNOWN_VALUE" +} \ No newline at end of file diff --git a/SRV/DNS/schemas/DnsRule.schema.json b/SRV/DNS/schemas/DnsRule.schema.json index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..9dd4c1a083e401f90db5053b373eb0c7113c940a 100644 --- a/SRV/DNS/schemas/DnsRule.schema.json +++ b/SRV/DNS/schemas/DnsRule.schema.json @@ -0,0 +1,52 @@ +{ + "description": "This type represents the general information of a DNS rule.", + "type": "object", + "required": [ + "dnsRuleId", + "domainName", + "ipAddressType", + "ipAddress", + "state" + ], + "properties": { + "dnsRuleId": { + "description": "Identifies the DNS Rule", + "type": "string", + "example": "dnsRule1" + }, + "domainName": { + "description": "FQDN resolved by the DNS rule", + "type": "string", + "example": "www.example.com" + }, + "ipAddressType": { + "description": "IP address type", + "type": "string", + "enum": [ + "IP_V6", + "IP_V4" + ], + "example": "IP_V6" + }, + "ipAddress": { + "description": "IP address associated with the FQDN resolved by the DNS rule", + "type": "string", + "example": "192.0.2.0" + }, + "ttl": { + "description": "Time to live value", + "type": "integer", + "format": "uint32", + "example": "?" + }, + "state": { + "description": "DNS rule state. This attribute may be updated using HTTP PUT method", + "type": "string", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "example": "ACTIVE" + } + } +} \ No newline at end of file diff --git a/SRV/DNS/schemas/DnsRuleList.schema.json b/SRV/DNS/schemas/DnsRuleList.schema.json index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..02d4d41581b65b8d1c90694a99e6d2f3358fde67 100644 --- a/SRV/DNS/schemas/DnsRuleList.schema.json +++ b/SRV/DNS/schemas/DnsRuleList.schema.json @@ -0,0 +1,55 @@ +{ + "type": "array", + "objects": { + "description": "This type represents the general information of a DNS rule.", + "type": "object", + "required": [ + "dnsRuleId", + "domainName", + "ipAddressType", + "ipAddress", + "state" + ], + "properties": { + "dnsRuleId": { + "description": "Identifies the DNS Rule", + "type": "string", + "example": "dnsRule1" + }, + "domainName": { + "description": "FQDN resolved by the DNS rule", + "type": "string", + "example": "www.example.com" + }, + "ipAddressType": { + "description": "IP address type", + "type": "string", + "enum": [ + "IP_V6", + "IP_V4" + ], + "example": "IP_V6" + }, + "ipAddress": { + "description": "IP address associated with the FQDN resolved by the DNS rule", + "type": "string", + "example": "192.0.2.0" + }, + "ttl": { + "description": "Time to live value", + "type": "integer", + "format": "uint32", + "example": "?" + }, + "state": { + "description": "DNS rule state. This attribute may be updated using HTTP PUT method", + "type": "string", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "example": "ACTIVE" + } + } + } +} \ No newline at end of file diff --git a/SRV/TIME/PlatTiming.robot b/SRV/TIME/PlatTiming.robot index 45a41dde274453cc0b3395564bcd868781db8a08..63c90325352f5c6f5ab62f4f6098797336878896 100644 --- a/SRV/TIME/PlatTiming.robot +++ b/SRV/TIME/PlatTiming.robot @@ -19,8 +19,8 @@ TC_MEC_SRV_TIME_001_OK ... Check that the IUT responds with timing capabilities ... when queried by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.5.3.1 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TimingCaps + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.5.3.1 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/TimingCaps [Tags] PIC_MEC_PLAT PIC_SERVICES Get time capabilities @@ -33,8 +33,8 @@ TC_MEC_SRV_TIME_002_OK ... Check that the IUT responds with current time ... when queried by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.6.3.1 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/CurrentTime + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.6.3.1 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/CurrentTime [Tags] PIC_MEC_PLAT PIC_SERVICES Get current time diff --git a/SRV/TIME/schemas/CurrentTime.schema.json b/SRV/TIME/schemas/CurrentTime.schema.json index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b2eae96436273841556da785f05949b7792dc0a6 100644 --- a/SRV/TIME/schemas/CurrentTime.schema.json +++ b/SRV/TIME/schemas/CurrentTime.schema.json @@ -0,0 +1,32 @@ +{ + "description": "This type represents the information provided by the MEC platform in response to the Get Platform Time Request message.", + "type": "object", + "required": [ + "nanoSeconds", + "seconds", + "timeSourceStatus" + ], + "properties": { + "seconds": { + "type": "integer", + "format": "uint32", + "description": "The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", + "example": 1577836800 + }, + "nanoSeconds": { + "type": "integer", + "format": "uint32", + "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", + "example": 0 + }, + "timeSourceStatus": { + "type": "string", + "enum": [ + "TRACEABLE", + "NONTRACEABLE" + ], + "description": "Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source", + "example": "TRACEABLE" + } + } +} \ No newline at end of file diff --git a/SRV/TIME/schemas/TimingCaps.schema.json b/SRV/TIME/schemas/TimingCaps.schema.json index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..2bca36850a6d7753497072190f3a16de8f187ff0 100644 --- a/SRV/TIME/schemas/TimingCaps.schema.json +++ b/SRV/TIME/schemas/TimingCaps.schema.json @@ -0,0 +1,127 @@ +{ + "description": "This type represents the information provided by the MEC platform in response to the Timing capabilities Query message.", + "type": "object", + "properties": { + "timeStamp": { + "description": "time", + "type": "object", + "required": [ + "nanoSeconds", + "seconds" + ], + "properties": { + "seconds": { + "type": "integer", + "format": "uint32", + "description": "The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", + "example": 1577836800 + }, + "nanoSeconds": { + "type": "integer", + "format": "uint32", + "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", + "example": 0 + } + } + }, + "ntpServers": { + "description": "Available NTP servers", + "type": "array", + "items": { + "description": "NTP server detail.", + "type": "object", + "required": [ + "ntpServerAddrType", + "ntpServerAddr", + "minPollingInterval", + "maxPollingInterval", + "localPriority", + "authenticationOption", + "authenticationKeyNum" + ], + "properties": { + "ntpServerAddrType": { + "description": "Address type of NTP server", + "type": "string", + "enum": [ + "IP_ADDRESS", + "DNS_NAME" + ], + "example": "IP_ADDRESS" + }, + "ntpServerAddr": { + "description": "NTP server address", + "type": "string", + "example": "192.0.2.0" + }, + "minPollingInterval": { + "description": "Minimum poll interval for NTP messages, in seconds as a power of two. Range 3...17", + "type": "integer", + "format": "uint32", + "example": 3 + }, + "maxPollingInterval": { + "description": "Maximum poll interval for NTP messages, in seconds as a power of two. Range 3...17", + "type": "integer", + "format": "uint32", + "example": 17 + }, + "localPriority": { + "description": "NTP server local priority", + "type": "integer", + "format": "uint32", + "example": 1 + }, + "authenticationOption": { + "description": "NTP authentication option", + "type": "string", + "enum": [ + "NONE", + "SYMMETRIC_KEY", + "AUTO_KEY" + ], + "example": "NONE" + }, + "authenticationKeyNum": { + "description": "Authentication key number", + "type": "integer", + "format": "uint32", + "example": 1 + } + } + } + }, + "ptpMasters": { + "description": "Available PTP Masters", + "type": "array", + "items": { + "description": "NTP server detail.", + "type": "object", + "required": [ + "ptpMasterIpAddress", + "ptpMasterLocalPriority", + "delayReqMaxRate" + ], + "properties": { + "ptpMasterIpAddress": { + "description": "PTP Master IP Address", + "type": "string", + "example": "192.0.2.0" + }, + "ptpMasterLocalPriority": { + "description": "PTP Master local priority", + "type": "integer", + "format": "uint32", + "example": 1 + }, + "delayReqMaxRate": { + "description": "Acceptable maximum rate of the Delay_Req messages in packets per second", + "type": "integer", + "format": "uint32", + "example": 10 + } + } + } + } + } + } \ No newline at end of file diff --git a/SRV/TRAF/PlatTrafficRules.robot b/SRV/TRAF/PlatTrafficRules.robot index 1bddcf8b3259dae7e62db5671094358287ac75a8..5001bf0b54bd83eb73314d1f447726b91553534a 100644 --- a/SRV/TRAF/PlatTrafficRules.robot +++ b/SRV/TRAF/PlatTrafficRules.robot @@ -18,8 +18,8 @@ TC_MEC_SRV_TRAF_001_OK ... Check that the IUT responds with a list of available traffic rules ... when queried by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.7.3.1 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.7.3.1 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/TrafficRule [Tags] PIC_MEC_PLAT PIC_SERVICES Get list of traffic rules ${APP_INSTANCE_ID} @@ -44,14 +44,14 @@ TC_MEC_SRV_TRAF_002_OK ... Check that the IUT responds with the information on a specific traffic rule ... when queried by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.8.3.1 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.8.3.1 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/TrafficRule [Tags] PIC_MEC_PLAT PIC_SERVICES Get individual traffic rule ${APP_INSTANCE_ID} ${TRAFFIC_RULE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is TrafficRule - Check Result Contains ${response['body']['TrafficRule']} trafficRuleId ${TRAFFIC_RULE_ID} + Check Result Contains ${response['body']} trafficRuleId ${TRAFFIC_RULE_ID} TC_MEC_SRV_TRAF_003_OK @@ -59,15 +59,15 @@ TC_MEC_SRV_TRAF_003_OK ... Check that the IUT updates a specific traffic rule ... when commanded by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.8.3.2 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.8.3.2 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/TrafficRule [Tags] PIC_MEC_PLAT PIC_SERVICES Update a traffic rule ${APP_INSTANCE_ID} ${TRAFFIC_RULE_ID} TrafficRuleUpdate Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is TrafficRule - Check Result Contains ${response['body']['TrafficRule']} trafficRuleId ${TRAFFIC_RULE_ID} - Check Result Contains ${response['body']['TrafficRule']} action "DROP" + Check Result Contains ${response['body']} trafficRuleId ${TRAFFIC_RULE_ID} + Check Result Contains ${response['body']} action "DROP" TC_MEC_SRV_TRAF_003_BR @@ -75,8 +75,8 @@ TC_MEC_SRV_TRAF_003_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 7.2.8.3.2 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.8.3.2 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/TrafficRule [Tags] PIC_MEC_PLAT PIC_SERVICES Update a traffic rule ${APP_INSTANCE_ID} ${TRAFFIC_RULE_ID} TrafficRuleUpdateError @@ -88,8 +88,8 @@ TC_MEC_SRV_TRAF_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 7.2.8.3.2 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.8.3.2 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/TrafficRule [Tags] PIC_MEC_PLAT PIC_SERVICES Update a traffic rule ${APP_INSTANCE_ID} ${NON_EXISTENT_TRAFFIC_RULE_ID} TrafficRuleUpdate @@ -101,8 +101,8 @@ TC_MEC_SRV_TRAF_003_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 7.2.8.3.2 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule + ... Reference ETSI GS MEC 011 V2.1.1, clause 7.2.8.3.2 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/TrafficRule [Tags] PIC_MEC_PLAT PIC_SERVICES Update a traffic rule with invalid etag ${APP_INSTANCE_ID} ${TRAFFIC_RULE_ID} TrafficRuleUpdate @@ -132,7 +132,7 @@ Update a traffic rule Set Headers {"Authorization":"${TOKEN}"} ${file}= Catenate SEPARATOR= jsons/ ${content} .json ${body}= Get File ${file} - Post ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/traffic_rules/${trafficRuleId} ${body} + PUT ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/traffic_rules/${trafficRuleId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SRV/TRAF/jsons/TrafficRuleUpdate.json b/SRV/TRAF/jsons/TrafficRuleUpdate.json index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5c8a12b032ded698bad1c680bd7692c496029f00 100644 --- a/SRV/TRAF/jsons/TrafficRuleUpdate.json +++ b/SRV/TRAF/jsons/TrafficRuleUpdate.json @@ -0,0 +1,134 @@ +{ + "trafficRuleId": "elit sint id occaecat mollit", + "filterType": "FLOW", + "priority": 1, + "trafficFilter": [ + { + "srcAddress": [ + "magna tempor do", + "nisi reprehenderit veniam adipisicing", + "sed ut tempor voluptate esse", + "consectetur magna culpa" + ], + "dstAddress": [ + "dolor dolore", + "Excepteur ut aliquip" + ], + "srcPort": [ + "et anim", + "nulla in minim ea cillum", + "ipsum sunt quis qui Ut" + ], + "dstPort": [ + "dolore tempor ut voluptate dolor", + "consequat incididunt ad sed mollit", + "in amet aute non" + ], + "protocol": [ + "mollit Duis", + "irure ullamco Lorem ex tempor", + "ullamco in dolor incididunt", + "elit ea ad", + "magna officia et ad" + ], + "token": [ + "occaecat", + "reprehenderit esse", + "enim ipsum Lorem", + "nulla ad sed deserunt", + "irure" + ], + "srcTunnelAddress": [ + "ut exercitation", + "ea", + "magna et" + ], + "tgtTunnelAddress": [ + "et anim aliqua", + "dolor in sint consectetur culpa", + "eu", + "deserunt qui mollit sint commodo" + ], + "srcTunnelPort": [ + "dolore laborum", + "consequat", + "nostrud nulla", + "est id dolore commodo aliquip", + "qui dolor id dolore" + ], + "dstTunnelPort": [ + "Ut nostrud Excepteur", + "dolor culpa", + "in", + "incididunt" + ], + "qCI": 22902321, + "dSCP": -86264428, + "tC": -40655175 + }, + { + "srcAddress": [ + "incididunt sit qui", + "laborum dolore voluptate exercitation", + "ut" + ], + "dstAddress": [ + "pariatur sunt", + "id elit aute ut", + "voluptate", + "irure laboris consectetur ullamco id", + "reprehenderit laborum" + ], + "srcPort": [ + "nisi tempor ut in", + "culpa sed" + ], + "dstPort": [ + "amet laboris exercitation voluptate veniam" + ], + "protocol": [ + "incididunt sint Lorem qui" + ], + "token": [ + "sunt", + "veniam labore quis dolor", + "Ut ex esse deserunt" + ], + "srcTunnelAddress": [ + "cillum irure incididunt adipisicing", + "Duis officia laboris ea dolor" + ], + "tgtTunnelAddress": [ + "eu deserunt et", + "cupidatat proident Excepteur nisi", + "consequat fugiat Lorem adipisicing" + ], + "srcTunnelPort": [ + "velit Lorem cillum ex", + "consectetur in ad", + "officia est adipisicing irure aute" + ], + "dstTunnelPort": [ + "proident velit Lorem labore do", + "magna sit sed ea", + "cillum", + "nostrud" + ], + "qCI": -69609374, + "dSCP": 46042141, + "tC": 67400065 + } + ], + "action": "DROP", + "state": "ACTIVE", + "dstInterface": { + "interfaceType": "TUNNEL", + "tunnelInfo": { + "tunnelType": "GTP_U", + "tunnelDstAddress": "est", + "tunnelSrcAddress": "culpa nostrud amet labore" + }, + "srcMacAddress": "esse", + "dstMacAddress": "ut nostrud voluptate ipsum cupidatat" + } +} \ No newline at end of file diff --git a/SRV/TRAF/jsons/TrafficRuleUpdateError.json b/SRV/TRAF/jsons/TrafficRuleUpdateError.json index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a4af6381a61f2b877caf94db5c425bb1183220ff 100644 --- a/SRV/TRAF/jsons/TrafficRuleUpdateError.json +++ b/SRV/TRAF/jsons/TrafficRuleUpdateError.json @@ -0,0 +1,134 @@ +{ + "trafficRuleId": "elit sint id occaecat mollit", + "filterType": "FLOW", + "priority": 1, + "trafficFilter": [ + { + "srcAddress": [ + "magna tempor do", + "nisi reprehenderit veniam adipisicing", + "sed ut tempor voluptate esse", + "consectetur magna culpa" + ], + "dstAddress": [ + "dolor dolore", + "Excepteur ut aliquip" + ], + "srcPort": [ + "et anim", + "nulla in minim ea cillum", + "ipsum sunt quis qui Ut" + ], + "dstPort": [ + "dolore tempor ut voluptate dolor", + "consequat incididunt ad sed mollit", + "in amet aute non" + ], + "protocol": [ + "mollit Duis", + "irure ullamco Lorem ex tempor", + "ullamco in dolor incididunt", + "elit ea ad", + "magna officia et ad" + ], + "token": [ + "occaecat", + "reprehenderit esse", + "enim ipsum Lorem", + "nulla ad sed deserunt", + "irure" + ], + "srcTunnelAddress": [ + "ut exercitation", + "ea", + "magna et" + ], + "tgtTunnelAddress": [ + "et anim aliqua", + "dolor in sint consectetur culpa", + "eu", + "deserunt qui mollit sint commodo" + ], + "srcTunnelPort": [ + "dolore laborum", + "consequat", + "nostrud nulla", + "est id dolore commodo aliquip", + "qui dolor id dolore" + ], + "dstTunnelPort": [ + "Ut nostrud Excepteur", + "dolor culpa", + "in", + "incididunt" + ], + "qCI": 22902321, + "dSCP": -86264428, + "tC": -40655175 + }, + { + "srcAddress": [ + "incididunt sit qui", + "laborum dolore voluptate exercitation", + "ut" + ], + "dstAddress": [ + "pariatur sunt", + "id elit aute ut", + "voluptate", + "irure laboris consectetur ullamco id", + "reprehenderit laborum" + ], + "srcPort": [ + "nisi tempor ut in", + "culpa sed" + ], + "dstPort": [ + "amet laboris exercitation voluptate veniam" + ], + "protocol": [ + "incididunt sint Lorem qui" + ], + "token": [ + "sunt", + "veniam labore quis dolor", + "Ut ex esse deserunt" + ], + "srcTunnelAddress": [ + "cillum irure incididunt adipisicing", + "Duis officia laboris ea dolor" + ], + "tgtTunnelAddress": [ + "eu deserunt et", + "cupidatat proident Excepteur nisi", + "consequat fugiat Lorem adipisicing" + ], + "srcTunnelPort": [ + "velit Lorem cillum ex", + "consectetur in ad", + "officia est adipisicing irure aute" + ], + "dstTunnelPort": [ + "proident velit Lorem labore do", + "magna sit sed ea", + "cillum", + "nostrud" + ], + "qCI": -69609374, + "dSCP": 46042141, + "tC": 67400065 + } + ], + "action": "UNKNOWN_VALUE", + "state": "ACTIVE", + "dstInterface": { + "interfaceType": "TUNNEL", + "tunnelInfo": { + "tunnelType": "GTP_U", + "tunnelDstAddress": "est", + "tunnelSrcAddress": "culpa nostrud amet labore" + }, + "srcMacAddress": "esse", + "dstMacAddress": "ut nostrud voluptate ipsum cupidatat" + } +} \ No newline at end of file diff --git a/SRV/TRAF/schemas/TrafficRule.schema.json b/SRV/TRAF/schemas/TrafficRule.schema.json index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..13d7f3294de5294e1d705d451d179251dbf87e70 100644 --- a/SRV/TRAF/schemas/TrafficRule.schema.json +++ b/SRV/TRAF/schemas/TrafficRule.schema.json @@ -0,0 +1,235 @@ +{ + "description": "This type represents the general information of a traffic rule.", + "type": "object", + "required": [ + "trafficRuleId", + "filterType", + "priority", + "trafficFilter", + "action", + "state" + ], + "properties": { + "trafficRuleId": { + "description": "Identify the traffic rule.", + "type": "string", + "example": "TrafficRule1" + }, + "filterType": { + "description": "Definition of filter per FLOW or PACKET. If flow the filter match UE->EPC packet and the reverse packet is handled in the same context", + "type": "string", + "enum": [ + "FLOW", + "PACKET" + ], + "example": "FLOW" + }, + "priority": { + "description": "Priority of this traffic rule. If traffic rule conflicts, the one with higher priority take precedence", + "type": "integer", + "format": "uint32", + "example": 1 + }, + "trafficFilter": { + "type": "array", + "items": { + "description": "This type represents the traffic filter.", + "type": "object", + "properties": { + "srcAddress": { + "description": "An IP address or a range of IP address. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes.", + "type": "array", + "items": { + "description": "Identify the traffic ip address.", + "type": "string", + "example": "192.168.1.1" + } + }, + "dstAddress": { + "description": "An IP address or a range of IP address. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes.", + "type": "array", + "items": { + "description": "Identify the traffic ip address.", + "type": "string", + "example": "192.168.1.1" + } + }, + "srcPort": { + "description": "A port or a range of ports", + "type": "array", + "items": { + "description": "A port", + "type": "string", + "example": "8080" + } + }, + "dstPort": { + "description": "A port or a range of ports", + "type": "array", + "items": { + "description": "A port", + "type": "string", + "example": "8080" + } + }, + "protocol": { + "description": "Specify the protocol of the traffic filter", + "type": "array", + "items": { + "description": "Protocol of the traffic filter", + "type": "string", + "example": "?" + } + }, + "token": { + "description": "Used for token based traffic rule", + "type": "array", + "items": { + "description": "Used for token based traffic rule", + "type": "string", + "example": "?" + } + }, + "srcTunnelAddress": { + "description": "Used for GTP tunnel based traffic rule", + "type": "array", + "items": { + "description": "Used for GTP tunnel based traffic rule", + "type": "string", + "example": "?" + } + }, + "tgtTunnelAddress": { + "description": "Used for GTP tunnel based traffic rule", + "type": "array", + "items": { + "description": "Used for GTP tunnel based traffic rule", + "type": "string", + "example": "?" + } + }, + "srcTunnelPort": { + "description": "Used for GTP tunnel based traffic rule", + "type": "array", + "items": { + "description": "Used for GTP tunnel based traffic rule", + "type": "string", + "example": "?" + } + }, + "dstTunnelPort": { + "description": "Used for GTP tunnel based traffic rule", + "type": "array", + "items": { + "description": "Used for GTP tunnel based traffic rule", + "type": "string", + "example": "?" + } + }, + "qCI": { + "description": "Used to match all packets that have the same Quality Class Indicator (QCI).", + "type": "integer", + "format": "uint32", + "example": 1 + }, + "dSCP": { + "description": "Used to match all IPv4 packets that have the same Differentiated Services Code Point (DSCP)", + "type": "integer", + "format": "uint32", + "example": 0 + }, + "tC": { + "description": "Used to match all IPv6 packets that have the same Traffic Class.", + "type": "integer", + "format": "uint32", + "example": 1 + } + } + } + }, + "action": { + "description": "The action of the MEC host data plane when a packet matches the trafficFilter\n ", + "type": "string", + "enum": [ + "DROP", + "FORWARD_DECAPSULATED", + "FORWARD_ENCAPSULATED", + "PASSTHROUGH", + "DUPLICATE_DECAPSULATED", + "DUPLICATE_ENCAPSULATED" + ], + "example": "DROP" + }, + "dstInterface": { + "description": "This type represents the destination interface. If the action is FORWARD_DECAPSULATED, FORWARD_ENCAPSULATED or PASSTHROUGH one value shall be provided. If the action is DUPLICATE_DECAPSULATED or DUPLICATE_ENCAPSULATED, two values shall be provided. If the action is DROP, no value shall be provided.", + "type": "object", + "required": [ + "interfaceType" + ], + "properties": { + "interfaceType": { + "description": "Type of the interface", + "type": "string", + "enum": [ + "TUNNEL", + "MAC", + "IP" + ], + "example": "TUNNEL" + }, + "tunnelInfo": { + "description": "This type represents the tunnel information.", + "type": "object", + "required": [ + "tunnelType" + ], + "properties": { + "tunnelType": { + "description": "This type represents the tunnel information.", + "type": "string", + "enum": [ + "GTP_U", + "GRE" + ], + "example": "GTP_U" + }, + "tunnelDstAddress": { + "description": "Destination address of the tunnel", + "type": "string", + "example": "?" + }, + "tunnelSrcAddress": { + "description": "Source address of the tunnel", + "type": "string", + "example": "?" + } + } + }, + "srcMacAddress": { + "description": "Source address identifies the MAC address of the interface", + "type": "string", + "example": "02-00-00-00-00-00" + }, + "dstMacAddress": { + "description": "Source address identifies the MAC address of the interface", + "type": "string", + "example": "02-00-00-00-00-00" + }, + "dstIpAddress": { + "description": "IP address of the remote destination", + "type": "string", + "example": "192.0.2.0" + } + } + }, + "state": { + "description": "Contains the traffic rule state. This attribute may be updated using HTTP PUT method", + "type": "string", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "example": "ACTIVE" + } + } +} \ No newline at end of file diff --git a/SRV/TRAF/schemas/TrafficRuleList.schema.json b/SRV/TRAF/schemas/TrafficRuleList.schema.json index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c8bfdaa9aab75ab84dc6e5dd9ac036e26fa238f4 100644 --- a/SRV/TRAF/schemas/TrafficRuleList.schema.json +++ b/SRV/TRAF/schemas/TrafficRuleList.schema.json @@ -0,0 +1,238 @@ +{ + "type": "array", + "objects": { + "description": "This type represents the general information of a traffic rule.", + "type": "object", + "required": [ + "trafficRuleId", + "filterType", + "priority", + "trafficFilter", + "action", + "state" + ], + "properties": { + "trafficRuleId": { + "description": "Identify the traffic rule.", + "type": "string", + "example": "TrafficRule1" + }, + "filterType": { + "description": "Definition of filter per FLOW or PACKET. If flow the filter match UE->EPC packet and the reverse packet is handled in the same context", + "type": "string", + "enum": [ + "FLOW", + "PACKET" + ], + "example": "FLOW" + }, + "priority": { + "description": "Priority of this traffic rule. If traffic rule conflicts, the one with higher priority take precedence", + "type": "integer", + "format": "uint32", + "example": 1 + }, + "trafficFilter": { + "type": "array", + "items": { + "description": "This type represents the traffic filter.", + "type": "object", + "properties": { + "srcAddress": { + "description": "An IP address or a range of IP address. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes.", + "type": "array", + "items": { + "description": "Identify the traffic ip address.", + "type": "string", + "example": "192.168.1.1" + } + }, + "dstAddress": { + "description": "An IP address or a range of IP address. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes.", + "type": "array", + "items": { + "description": "Identify the traffic ip address.", + "type": "string", + "example": "192.168.1.1" + } + }, + "srcPort": { + "description": "A port or a range of ports", + "type": "array", + "items": { + "description": "A port", + "type": "string", + "example": "8080" + } + }, + "dstPort": { + "description": "A port or a range of ports", + "type": "array", + "items": { + "description": "A port", + "type": "string", + "example": "8080" + } + }, + "protocol": { + "description": "Specify the protocol of the traffic filter", + "type": "array", + "items": { + "description": "Protocol of the traffic filter", + "type": "string", + "example": "?" + } + }, + "token": { + "description": "Used for token based traffic rule", + "type": "array", + "items": { + "description": "Used for token based traffic rule", + "type": "string", + "example": "?" + } + }, + "srcTunnelAddress": { + "description": "Used for GTP tunnel based traffic rule", + "type": "array", + "items": { + "description": "Used for GTP tunnel based traffic rule", + "type": "string", + "example": "?" + } + }, + "tgtTunnelAddress": { + "description": "Used for GTP tunnel based traffic rule", + "type": "array", + "items": { + "description": "Used for GTP tunnel based traffic rule", + "type": "string", + "example": "?" + } + }, + "srcTunnelPort": { + "description": "Used for GTP tunnel based traffic rule", + "type": "array", + "items": { + "description": "Used for GTP tunnel based traffic rule", + "type": "string", + "example": "?" + } + }, + "dstTunnelPort": { + "description": "Used for GTP tunnel based traffic rule", + "type": "array", + "items": { + "description": "Used for GTP tunnel based traffic rule", + "type": "string", + "example": "?" + } + }, + "qCI": { + "description": "Used to match all packets that have the same Quality Class Indicator (QCI).", + "type": "integer", + "format": "uint32", + "example": 1 + }, + "dSCP": { + "description": "Used to match all IPv4 packets that have the same Differentiated Services Code Point (DSCP)", + "type": "integer", + "format": "uint32", + "example": 0 + }, + "tC": { + "description": "Used to match all IPv6 packets that have the same Traffic Class.", + "type": "integer", + "format": "uint32", + "example": 1 + } + } + } + }, + "action": { + "description": "The action of the MEC host data plane when a packet matches the trafficFilter\n ", + "type": "string", + "enum": [ + "DROP", + "FORWARD_DECAPSULATED", + "FORWARD_ENCAPSULATED", + "PASSTHROUGH", + "DUPLICATE_DECAPSULATED", + "DUPLICATE_ENCAPSULATED" + ], + "example": "DROP" + }, + "dstInterface": { + "description": "This type represents the destination interface. If the action is FORWARD_DECAPSULATED, FORWARD_ENCAPSULATED or PASSTHROUGH one value shall be provided. If the action is DUPLICATE_DECAPSULATED or DUPLICATE_ENCAPSULATED, two values shall be provided. If the action is DROP, no value shall be provided.", + "type": "object", + "required": [ + "interfaceType" + ], + "properties": { + "interfaceType": { + "description": "Type of the interface", + "type": "string", + "enum": [ + "TUNNEL", + "MAC", + "IP" + ], + "example": "TUNNEL" + }, + "tunnelInfo": { + "description": "This type represents the tunnel information.", + "type": "object", + "required": [ + "tunnelType" + ], + "properties": { + "tunnelType": { + "description": "This type represents the tunnel information.", + "type": "string", + "enum": [ + "GTP_U", + "GRE" + ], + "example": "GTP_U" + }, + "tunnelDstAddress": { + "description": "Destination address of the tunnel", + "type": "string", + "example": "?" + }, + "tunnelSrcAddress": { + "description": "Source address of the tunnel", + "type": "string", + "example": "?" + } + } + }, + "srcMacAddress": { + "description": "Source address identifies the MAC address of the interface", + "type": "string", + "example": "02-00-00-00-00-00" + }, + "dstMacAddress": { + "description": "Source address identifies the MAC address of the interface", + "type": "string", + "example": "02-00-00-00-00-00" + }, + "dstIpAddress": { + "description": "IP address of the remote destination", + "type": "string", + "example": "192.0.2.0" + } + } + }, + "state": { + "description": "Contains the traffic rule state. This attribute may be updated using HTTP PUT method", + "type": "string", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "example": "ACTIVE" + } + } + } +} \ No newline at end of file