From b684e8ae94416fe3b939ca39f4d026db514386cb Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Thu, 19 Sep 2019 18:52:31 +0200 Subject: [PATCH] Added PKG (mm1 and mm3), LCM and generic errors --- GenericKeywords.robot | 8 +- MEO/GRANT/Grant.robot | 8 +- MEO/PKGM/PackageManagement.robot | 358 ++++++++++++++ MEO/PKGM/environment/variables.txt | 44 ++ MEO/PKGM/jsons/AppPkgSubscription.json | 0 MEO/PKGM/jsons/CreateAppPackage.json | 1 + MEO/PKGM/jsons/MalformedAppPkg.json | 0 .../jsons/MalformedAppPkgSubscription.json | 0 MEO/PKGM/schemas/AppPkgSubscriptionInfo.json | 0 .../schemas/AppPkgSubscriptionLinkList.json | 0 MEO/PKGM/schemas/OnboardedAppPkgInfo.json | 0 MEO/PKGM/schemas/OnboardedAppPkgInfos.json | 0 MEPM/PKGM/PackageManagement.robot | 275 +++++++++++ MEPM/PKGM/environment/variables.txt | 44 ++ MEPM/PKGM/jsons/AppPkgSubscription.json | 0 MEPM/PKGM/jsons/CreateAppPackage.json | 1 + MEPM/PKGM/jsons/MalformedAppPkg.json | 0 .../jsons/MalformedAppPkgSubscription.json | 0 MEPM/PKGM/schemas/AppPkgSubscriptionInfo.json | 0 .../schemas/AppPkgSubscriptionLinkList.json | 0 MEPM/PKGM/schemas/OnboardedAppPkgInfo.json | 0 MEPM/PKGM/schemas/OnboardedAppPkgInfos.json | 0 MEX/ANY/ANY.robot | 34 ++ MEX/ANY/environment/variables.txt | 12 + MEX/ANY/jsons/AppPkgSubscription.json | 0 MEX/ANY/jsons/CreateAppPackage.json | 1 + MEX/ANY/jsons/MalformedAppPkg.json | 0 .../jsons/MalformedAppPkgSubscription.json | 0 MEX/ANY/schemas/AppPkgSubscriptionInfo.json | 0 .../schemas/AppPkgSubscriptionLinkList.json | 0 MEX/ANY/schemas/OnboardedAppPkgInfo.json | 0 MEX/ANY/schemas/OnboardedAppPkgInfos.json | 0 MEX/LCM/LifeCycleManagement.robot | 458 ++++++++++++++++++ MEX/LCM/environment/variables.txt | 56 +++ MEX/LCM/jsons/AppInstSubscriptionRequest.json | 0 MEX/LCM/jsons/CreateAppInstanceRequest.json | 0 MEX/LCM/jsons/InstantiateAppRequest.json | 0 .../jsons/MalformedAppInstanceRequest.json | 0 .../jsons/MalformedInstantiateAppRequest.json | 0 MEX/LCM/jsons/OperateAppRequest.json | 0 MEX/LCM/jsons/TerminateAppRequest.json | 0 MEX/LCM/schemas/AppInstanceInfo.json | 0 MEX/LCM/schemas/AppInstanceInfos.json | 0 MEX/LCM/schemas/AppInstanceLcmOpOccs.json | 0 44 files changed, 1294 insertions(+), 6 deletions(-) create mode 100644 MEO/PKGM/PackageManagement.robot create mode 100644 MEO/PKGM/environment/variables.txt create mode 100644 MEO/PKGM/jsons/AppPkgSubscription.json create mode 100644 MEO/PKGM/jsons/CreateAppPackage.json create mode 100644 MEO/PKGM/jsons/MalformedAppPkg.json create mode 100644 MEO/PKGM/jsons/MalformedAppPkgSubscription.json create mode 100644 MEO/PKGM/schemas/AppPkgSubscriptionInfo.json create mode 100644 MEO/PKGM/schemas/AppPkgSubscriptionLinkList.json create mode 100644 MEO/PKGM/schemas/OnboardedAppPkgInfo.json create mode 100644 MEO/PKGM/schemas/OnboardedAppPkgInfos.json create mode 100644 MEPM/PKGM/PackageManagement.robot create mode 100644 MEPM/PKGM/environment/variables.txt create mode 100644 MEPM/PKGM/jsons/AppPkgSubscription.json create mode 100644 MEPM/PKGM/jsons/CreateAppPackage.json create mode 100644 MEPM/PKGM/jsons/MalformedAppPkg.json create mode 100644 MEPM/PKGM/jsons/MalformedAppPkgSubscription.json create mode 100644 MEPM/PKGM/schemas/AppPkgSubscriptionInfo.json create mode 100644 MEPM/PKGM/schemas/AppPkgSubscriptionLinkList.json create mode 100644 MEPM/PKGM/schemas/OnboardedAppPkgInfo.json create mode 100644 MEPM/PKGM/schemas/OnboardedAppPkgInfos.json create mode 100644 MEX/ANY/ANY.robot create mode 100644 MEX/ANY/environment/variables.txt create mode 100644 MEX/ANY/jsons/AppPkgSubscription.json create mode 100644 MEX/ANY/jsons/CreateAppPackage.json create mode 100644 MEX/ANY/jsons/MalformedAppPkg.json create mode 100644 MEX/ANY/jsons/MalformedAppPkgSubscription.json create mode 100644 MEX/ANY/schemas/AppPkgSubscriptionInfo.json create mode 100644 MEX/ANY/schemas/AppPkgSubscriptionLinkList.json create mode 100644 MEX/ANY/schemas/OnboardedAppPkgInfo.json create mode 100644 MEX/ANY/schemas/OnboardedAppPkgInfos.json create mode 100644 MEX/LCM/LifeCycleManagement.robot create mode 100644 MEX/LCM/environment/variables.txt create mode 100644 MEX/LCM/jsons/AppInstSubscriptionRequest.json create mode 100644 MEX/LCM/jsons/CreateAppInstanceRequest.json create mode 100644 MEX/LCM/jsons/InstantiateAppRequest.json create mode 100644 MEX/LCM/jsons/MalformedAppInstanceRequest.json create mode 100644 MEX/LCM/jsons/MalformedInstantiateAppRequest.json create mode 100644 MEX/LCM/jsons/OperateAppRequest.json create mode 100644 MEX/LCM/jsons/TerminateAppRequest.json create mode 100644 MEX/LCM/schemas/AppInstanceInfo.json create mode 100644 MEX/LCM/schemas/AppInstanceInfos.json create mode 100644 MEX/LCM/schemas/AppInstanceLcmOpOccs.json diff --git a/GenericKeywords.robot b/GenericKeywords.robot index 09ffd24..1acb88d 100644 --- a/GenericKeywords.robot +++ b/GenericKeywords.robot @@ -45,4 +45,10 @@ Check HTTP Response Header Contains Check HTTP Response Body is Empty Should Be Empty ${response['body']} - Log Body is empty \ No newline at end of file + Log Body is empty + +Check HTTP Response Contain Header with value + [Arguments] ${HEADER_TOCHECK} ${VALUE} + Check HTTP Response Header Contains ${HEADER_TOCHECK} + Should Be Equal As Strings ${value} ${response['headers']['Content-Type']} + \ No newline at end of file diff --git a/MEO/GRANT/Grant.robot b/MEO/GRANT/Grant.robot index 66b72ab..735841f 100644 --- a/MEO/GRANT/Grant.robot +++ b/MEO/GRANT/Grant.robot @@ -5,9 +5,7 @@ Resource environment/variables.txt Resource ../../GenericKeywords.robot Library REST ${MEO_SCHEMA}://${MEO_HOST}:${MEO_PORT} ssl_verify=false -Library BuiltIn Library OperatingSystem -Library MockServerLibrary @@ -91,9 +89,9 @@ Create a GRANT request Set Headers {"Accept":"application/json"} Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} - ${file}= Catenate SEPARATOR= json/ ${content} .json + ${file}= Catenate SEPARATOR= jsons/ ${content} .json ${body}= Get File ${file} - Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} + Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} allow_redirects=false ${output}= Output response Set Suite Variable ${response} ${output} @@ -103,7 +101,7 @@ Get an individual grant Set Headers {"Accept":"application/json"} Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} - Get ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} + Get ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} allow_redirects=false ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/MEO/PKGM/PackageManagement.robot b/MEO/PKGM/PackageManagement.robot new file mode 100644 index 0000000..f65e148 --- /dev/null +++ b/MEO/PKGM/PackageManagement.robot @@ -0,0 +1,358 @@ +''[Documentation] robot --outputdir ./outputs ./SRV/UETAG/PlatUeIdentity.robot +... Test Suite to validate UE Identity Tag (UETAG) operations. + +*** Settings *** +Resource environment/variables.txt +Resource ../../GenericKeywords.robot +Library REST ${MEO_SCHEMA}://${MEO_HOST}:${MEO_PORT} ssl_verify=false +Library BuiltIn +Library OperatingSystem +Library MockServerLibrary + + +*** Test Cases *** +Create new App Package Resource + [Documentation] TP_MEC_MEO_PKGM_001_OK + ... Check that MEO creates a new App Package when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.1.3.1 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.3.2-1 (OnboardedAppPkgInfo) + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.2.2-1 (AppPkg) + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Post Request to create new App Package Resource AppPkg + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is OnboardedAppPkgInfos + Check HTTP Response Header Contains Location + Check Result Contains ${response} appName ${APP_PKG_NAME} + Check Result Contains ${response} appDVersion ${APP_PKG_VERSION} + Check Result Contains ${response} checksum ${CHECKSUM} + Check Result Contains ${response} operationalState ${OPERATIONAL_STATE} + Check Result Contains ${response} usageState ${USAGE_STATE} + + +Create new App Package Resource using malformed request + [Documentation] TP_MEC_MEO_PKGM_001_BR + ... Check that MEO creates a new App Package when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.1.3.1 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.2.2-1 (AppPkg) + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Post Request to create new App Package Resource MalformedAppPkg + Check HTTP Response Status Code Is 400 + + +Request all APP Packages + [Documentation] TP_MEC_MEO_PKGM_002_OK + ... Check that MEO returns the list of App Packages when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.1.3.2 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.3.2-1 (OnboardedAppPkgInfo) + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + GET all APP Packages + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is OnboardedAppPkgInfos + Check Result Contains ${response} appPkgId ${ON_BOARDED_APP_PKG_ID} + Check Result Contains ${response} appDId ${APPD_ID} + + +Request all APP Packages using bad attribute-based filtering parameter + [Documentation] TP_MEC_MEO_PKGM_002_BR + ... Check that MEO responds with an error when it receives + ... a malformed request for retrieving the list of existing App Packages + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.1.3.2 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + GET all APP Packages with filters ${MALFORMED_FILTER_NAME} ${FILTER_VALUE} + Check HTTP Response Status Code Is 400 + + +Request an individual APP Package + [Documentation] TP_MEC_MEO_PKGM_003_OK + ... Check that MEO returns the list of App Packages when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.1.3.2 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.3.2-1 (OnboardedAppPkgInfo) + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + GET an APP Package identified by ${ON_BOARDED_APP_PKG_ID} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is OnboardedAppPkgInfo + Check Result Contains ${response} appPkgId ${ON_BOARDED_APP_PKG_ID} + Check Result Contains ${response} appDId ${APPD_ID} + + +Request an individual APP Package using wrong identifier + [Documentation] TP_MEC_MEO_PKGM_003_NF + ... Check that MEO responds with an error when it receives + ... a request for retrieving a App Package referred with a wrong ID + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.1.3.2 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.3.2-1 (OnboardedAppPkgInfo) + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + GET an APP Package identified by ${NON_EXISTENT_APP_PKG_ID} + Check HTTP Response Status Code Is 404 + + +Remove an individual APP Package + [Documentation] TP_MEC_MEO_PKGM_004_OK + ... Check that MEO deletes an App Package when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.2.3.4 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Delete an individual APP Package identified by ${ON_BOARDED_APP_PKG_ID} + Check HTTP Response Status Code Is 204 + Check HTTP Response Body is Empty + + +Remove an individual APP Package using wrong identifier + [Documentation] TP_MEC_MEO_PKGM_004_NF + ... Check that MEO responds with an error when it receives + ... a request for deleting an App Package referred with a wrong ID + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.2.3.4 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Delete an individual APP Package identified by ${NON_EXISTENT_APP_PKG_ID} + Check HTTP Response Status Code Is 404 + + +Request a Operational state update on an APP Package + [Documentation] TP_MEC_MEO_PKGM_005_OK + ... Check that MEO changes the status of an App Package from INITIAL_OP_STATE with an operation of type OPERATION_VALUE when requested, with the following possible combinations: + ... - ENABLED, DISABLE + ... - DISABLED, ENABLE + ... - DELETION_PENDING, ABORT + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.2.3.3 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Update Operational State for an APP Package ${ON_BOARDED_APP_PKG_ID} ${OPERATION_VALUE} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body is Empty + + +Request a Operational state update on an APP Package using wrong operation value + [Documentation] TP_MEC_MEO_PKGM_005_BR + ... Check that MEO sends an error when it receives a malformed request to modify the operational state of an application package + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.2.3.3 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Update Operational State for an APP Package ${ON_BOARDED_APP_PKG_ID} WRONG_OP_VALUE + Check HTTP Response Status Code Is 400 + + +Request a Operational state update on a non onboarded APP Package + [Documentation] TP_MEC_MEO_PKGM_005_NF + ... Check that MEO responds with an error when it receives a request for updating an App Package referred with a wrong ID + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.2.3.3 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Update Operational State for an APP Package ${NON_EXISTENT_APP_PKG_ID} ${OPERATION_VALUE} + Check HTTP Response Status Code Is 404 + + +Request the App Descriptor of an App Package + [Documentation] TP_MEC_MEO_PKGM_006_OK + ... Check that MEO returns the Application Descriptor contained on a on-boarded Application Package when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.6.3.2 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Get an AppD from App Package identified by ${ON_BOARDED_APP_PKG_ID} + Check HTTP Response Status Code Is 200 + Check HTTP Response Contain Header with value Content-Type ${ACCEPTED_CONTENT_TYPE} + + +Request the App Descriptor of an App Package using a non onboarded APP Package + [Documentation] TP_MEC_MEO_PKGM_006_NF + ... Check that MEO responds with an error when it receives a request to retrieve an application descriptor referred with a wrong app package ID + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.6.3.2 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Get an AppD from App Package identified by ${NON_EXISTENT_APP_PKG_ID} + Check HTTP Response Status Code Is 404 + + +Create a new App Packages Subscription + [Documentation] TP_MEC_MEO_PKGM_007_OK + ... Check that MEO service sends a Application Package Subscription when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.3.3.1 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.7.2-1 (AppPkgSubscription) + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.4.2-1 (AppPkgSubscriptionInfo) + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for a subscription AppPkgSubscription + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is AppPkgSubscriptionInfo + Check Result Contains ${response} subscriptionType ON_BOARDING + Check Result Contains ${response} callbackUri ${CALLBACK_URI} + + +Create a new App Packages Subscription with malformed parameter + [Documentation] TP_MEC_MEO_PKGM_007_BR + ... Check that MEO service sends an error when it receives a malformed request for creating a new subscription on AppPackages + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.3.3.1 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.7.2-1 (AppPkgSubscription) + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for a subscription MalformedAppPkgSubscription + Check HTTP Response Status Code Is 400 + + +Request all App Package subscriptions + [Documentation] TP_MEC_MEO_PKGM_008_OK + ... Check that MEO service returns the list of Application Package Subscriptions when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.3.3.2 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.4.2-1 (AppPkgSubscriptionLinkList) + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Get all APP Package subscriptions + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is AppPkgSubscriptionLinkList + Check Result Contains ${response} subscriptionId ${SUBSCRIPTION_ID} + + +Request a specific App Package subscription + [Documentation] TP_MEC_MEO_PKGM_009_OK + ... Check that MEO service returns an Application Package Subscription when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.4.3.2 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.4.2-1 (AppPkgSubscriptionInfo) + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Get an individual APP Package subscriptions ${SUBSCRIPTION_ID} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is AppPkgSubscriptionInfo + Check Result Contains ${response} subscriptionId ${SUBSCRIPTION_ID} + + +Request a specific App Package subscription using non existant subscription identifier + [Documentation] TP_MEC_MEO_PKGM_009_NF + ... Check that MEO service sends an error when it receives a query for a subscription + ... on AppPackages with a wrong identifier + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.4.3.2 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Get an individual APP Package subscriptions ${NON_EXISTENT_SUBSCRIPTION_ID} + Check HTTP Response Status Code Is 404 + + +Remove a APP Package subscription + [Documentation] TP_MEC_MEO_PKGM_010_OK + ... Check that MEO service deletes an Application Package Subscription when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.4.3.4 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Delete an App Package Subscription identified by ${SUBSCRIPTION_ID} + Check HTTP Response Status Code Is 204 + Check HTTP Response Body is Empty + + +Remove a APP Package subscription using non existant subscription id + [Documentation] TP_MEC_MEO_PKGM_010_NF + ... Check that MEO service sends an error when it receives a deletion request + ... for a subscription on AppPackages with a wrong identifier + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.4.3.4 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Delete an App Package Subscription identified by ${NON_EXISTENT_SUBSCRIPTION_ID} + Check HTTP Response Status Code Is 404 + + + +*** Keywords *** +Post Request to create new App Package Resource + [Arguments] ${content} + Log Creating a new App Package + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Post ${apiRoot}/${apiName}/${apiVersion}/app_packages ${content} allow_redirects=false + ${output}= Output response + Set Suite Variable ${response} ${output} + + +GET all APP Packages + Log Getting all App Packages + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/app_packages + ${output}= Output response + Set Suite Variable ${response} ${output} + + +GET all APP Packages with filters + [Arguments] ${key} ${value} + Log Getting all App Packages using filtering parameters + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/app_packages?${key}=${value} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +GET an APP Package identified by + [Arguments] ${value} + Log Getting an App Package + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/app_packages/${value} + ${output}= Output response + Set Suite Variable ${response} ${output} + + + +Delete an individual APP Package identified by + [Arguments] ${value} + Log Removing an App Package + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/app_packages/${value} + ${output}= Output response + Set Suite Variable ${response} ${output} + + + +Update Operational State for an APP Package + [Arguments] ${appPkgId} ${operation} + Log Updating an App Package + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiVersion}/app_packages/${appPkgId}?appPkgOperation=${operation} + ${output}= Output response + Set Suite Variable ${response} ${output} + + + +Get an AppD from App Package identified by + [Arguments] ${appPkgId} + Log Getting App descriptor for App Package + Set Headers {"Accept":"${ACCEPTED_CONTENT_TYPE}"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/app_packages/${appPkgId}/addDId + ${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}"} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${content} + ${output}= Output response + Set Suite Variable ${response} ${output} + + + +Get all APP Package subscriptions + Log Getting list of subscriptions + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get an individual APP Package subscriptions + [Arguments] ${subId} + Log Getting an individual subscription + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Delete an App Package Subscription identified by + [Arguments] ${subId} + Log Deleting a subscription + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subId} + ${output}= Output response + Set Suite Variable ${response} ${output} + + \ No newline at end of file diff --git a/MEO/PKGM/environment/variables.txt b/MEO/PKGM/environment/variables.txt new file mode 100644 index 0000000..6fd4c4b --- /dev/null +++ b/MEO/PKGM/environment/variables.txt @@ -0,0 +1,44 @@ +*** Variables *** +# Generic variables +${MEO_SCHEMA} http +${MEO_HOST} 10.192.2.172 +${MEO_PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} apmi +${apiVersion} v1 + +# Specific variables +${APP_PKG_NAME} APP_PKG_NAME // Should be the same as in AppPkg.json +${APP_PKG_VERSION} APP_PKG_VERSION // Should be the same as in AppPkg.json +${CHECKSUM} CHECKSUM // Should be the same as in AppPkg.json +${OPERATIONAL_STATE} OPERATIONAL_STATE // Should be the same as in AppPkg.json +${USAGE_STATE} USAGE_STATE // Should be the same as in AppPkg.json +${ON_BOARDED_APP_PKG_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${APPD_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${MALFORMED_FILTER_NAME} operationalStatus // Should be operationalState +${FILTER_VALUE} NOT_IN_USE +${NON_EXISTENT_APP_PKG_ID} NON_EXISTENT_APP_PKG_ID +${OPERATION_VALUE} DISABLE + +${ACCEPTED_CONTENT_TYPE} text/plain // Should refer to the type of AppD +${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 + + + + +${SUBSCRIPTION_TYPE} MobilityProcedureSubscription +${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_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/MEO/PKGM/jsons/AppPkgSubscription.json b/MEO/PKGM/jsons/AppPkgSubscription.json new file mode 100644 index 0000000..e69de29 diff --git a/MEO/PKGM/jsons/CreateAppPackage.json b/MEO/PKGM/jsons/CreateAppPackage.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/MEO/PKGM/jsons/CreateAppPackage.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/MEO/PKGM/jsons/MalformedAppPkg.json b/MEO/PKGM/jsons/MalformedAppPkg.json new file mode 100644 index 0000000..e69de29 diff --git a/MEO/PKGM/jsons/MalformedAppPkgSubscription.json b/MEO/PKGM/jsons/MalformedAppPkgSubscription.json new file mode 100644 index 0000000..e69de29 diff --git a/MEO/PKGM/schemas/AppPkgSubscriptionInfo.json b/MEO/PKGM/schemas/AppPkgSubscriptionInfo.json new file mode 100644 index 0000000..e69de29 diff --git a/MEO/PKGM/schemas/AppPkgSubscriptionLinkList.json b/MEO/PKGM/schemas/AppPkgSubscriptionLinkList.json new file mode 100644 index 0000000..e69de29 diff --git a/MEO/PKGM/schemas/OnboardedAppPkgInfo.json b/MEO/PKGM/schemas/OnboardedAppPkgInfo.json new file mode 100644 index 0000000..e69de29 diff --git a/MEO/PKGM/schemas/OnboardedAppPkgInfos.json b/MEO/PKGM/schemas/OnboardedAppPkgInfos.json new file mode 100644 index 0000000..e69de29 diff --git a/MEPM/PKGM/PackageManagement.robot b/MEPM/PKGM/PackageManagement.robot new file mode 100644 index 0000000..1e7f422 --- /dev/null +++ b/MEPM/PKGM/PackageManagement.robot @@ -0,0 +1,275 @@ +''[Documentation] robot --outputdir ./outputs ./SRV/UETAG/PlatUeIdentity.robot +... Test Suite to validate UE Identity Tag (UETAG) operations. + +*** Settings *** +Resource environment/variables.txt +Resource ../../GenericKeywords.robot +Library REST ${MEPM_SCHEMA}://${MEPM_HOST}:${MEPM_PORT} ssl_verify=false +Library BuiltIn +Library OperatingSystem +Library MockServerLibrary + + +*** Test Cases *** +Request all APP Packages + [Documentation] TP_MEC_MEPM_PKGM_001_OK + ... Check that MEPM returns the list of App Packages when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.4.1.3.2 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.3.2-1 (OnboardedAppPkgInfo) + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + GET all APP Packages + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is OnboardedAppPkgInfos + Check Result Contains ${response} appPkgId ${ON_BOARDED_APP_PKG_ID} + Check Result Contains ${response} appDId ${APPD_ID} + + +Request all APP Packages using bad attribute-based filtering parameter + [Documentation] TP_MEC_MEPM_PKGM_001_BR + ... Check that MEPM responds with an error when it receives + ... a malformed request for requesting the list of existing App Packages + ... ETSI GS MEC 010-2 2.0.10, clause 7.4.1.3.2 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + GET all APP Packages with filters ${MALFORMED_FILTER_NAME} ${FILTER_VALUE} + Check HTTP Response Status Code Is 400 + + +Request an individual APP Package + [Documentation] TP_MEC_MEPM_PKGM_002_OK + ... Check that MEPM returns the an App Package when requested + ... EETSI GS MEC 010-2 2.0.10, clause 7.4.2.3.2 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.3.2-1 (OnboardedAppPkgInfo) + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + GET an APP Package identified by ${ON_BOARDED_APP_PKG_ID} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is OnboardedAppPkgInfo + Check Result Contains ${response} appPkgId ${ON_BOARDED_APP_PKG_ID} + Check Result Contains ${response} appDId ${APPD_ID} + + + Request an individual APP Package using wrong identifier + [Documentation] TP_MEC_MEPM_PKGM_002_NF + ... Check that MEPM responds with an error when it receives + ... a request for returning a App Package referred with a wrong ID + ... ETSI GS MEC 010-2 2.0.10, clause 7.4.2.3.2 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + GET an APP Package identified by ${NON_EXISTENT_APP_PKG_ID} + Check HTTP Response Status Code Is 404 + + + + Request the App Descriptor of an App Package + [Documentation] TP_MEC_MEPM_PKGM_003_OK + ... Check that MEPM returns the Application Descriptor contained on a on-boarded Application Package when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.4.4.3.2 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Get an AppD from App Package identified by ${ON_BOARDED_APP_PKG_ID} + Check HTTP Response Status Code Is 200 + Check HTTP Response Contain Header with value Content-Type ${ACCEPTED_CONTENT_TYPE} + ##TODO: How to check content returned? + + +Request the App Descriptor of an App Package using a non onboarded APP Package + [Documentation] TP_MEC_MEPM_PKGM_003_NF + ... Check that MEPM responds with an error when it receives + ... a request for returning a App Descriptor referred with a wrong App Package ID + ... ETSI GS MEC 010-2 2.0.10, clause 7.4.4.3.2 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Get an AppD from App Package identified by ${NON_EXISTENT_APP_PKG_ID} + Check HTTP Response Status Code Is 404 + + + Request the Content of an onboarded App Package + [Documentation] TP_MEC_MEPM_PKGM_004_OK + ... Check that MEPM returns the content on a on-boarded Application Package when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.4.3.3.2 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Get the Content from an App Package identified by ${ON_BOARDED_APP_PKG_ID} + Check HTTP Response Status Code Is 200 + ##TODO: How to check content returned? + +Request the Content of an App Package using a non onboarded APP Package identifier + [Documentation] TP_MEC_MEPM_PKGM_004_NF + ... Check that MEPM responds with an error when it receives + ... a request for returning a application package content referred with a wrong App Package ID + ... ETSI GS MEC 010-2 2.0.10, clause 7.4.4.3.2 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Get the Content from an App Package identified by ${NON_EXISTENT_APP_PKG_ID} + Check HTTP Response Status Code Is 404 + + +Create a new App Packages Subscription + [Documentation] TP_MEC_MEPM_PKGM_005_OK + ... Check that MEPM service returns an application package subscription when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.4.5.3.1 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.7.2-1 (AppPkgSubscription) + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.4.2-1 (AppPkgSubscriptionInfo) + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for a subscription AppPkgSubscription + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is AppPkgSubscriptionInfo + Check Result Contains ${response} subscriptionType ON_BOARDING + Check Result Contains ${response} callbackUri ${CALLBACK_URI} + + + +Create a new App Packages Subscription with malformed parameter + [Documentation] TP_MEC_MEPM_PKGM_005_BR + ... Check that MEPM service sends an error when it receives a + ... malformed request for creating a new subscription on AppPackages + ... ETSI GS MEC 010-2 2.0.10, clause 7.4.5.3.1 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.7.2-1 (AppPkgSubscription) + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for a subscription MalformedAppPkgSubscription + Check HTTP Response Status Code Is 400 + + +Request all App Package subscriptions + [Documentation] TP_MEC_MEPM_PKGM_006_OK + ... Check that MEPM service returns the list of Application Package Subscriptions when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.4.5.3.2 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.4.2-1 (AppPkgSubscriptionLinkList) + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Get all APP Package subscriptions + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is AppPkgSubscriptionLinkList + Check Result Contains ${response} subscriptionId ${SUBSCRIPTION_ID} + + +Request a specific App Package subscription + [Documentation] TP_MEC_MEPM_PKGM_007_OK + ... Check that MEPM service returns an Application Package Subscription when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.4.6.3.2 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.3.4.2-1 (AppPkgSubscriptionInfo) + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Get an individual APP Package subscriptions ${SUBSCRIPTION_ID} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is AppPkgSubscriptionInfo + Check Result Contains ${response} subscriptionId ${SUBSCRIPTION_ID} + + +Request a specific App Package subscription using non existant subscription identifier + [Documentation] TP_MEC_MEPM_PKGM_007_NF + ... Check that MEPM service sends an error when it receives a query for a subscription + ... on AppPackages with a wrong identifier + ... ETSI GS MEC 010-2 2.0.10, clause 7.4.6.3.2 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Get an individual APP Package subscriptions ${NON_EXISTENT_SUBSCRIPTION_ID} + Check HTTP Response Status Code Is 404 + + +Remove a APP Package subscription + [Documentation] TP_MEC_MEPM_PKGM_008_OK + ... Check that MEPM service deletes an Application Package Subscription when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.4.6.3.4 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Delete an App Package Subscription identified by ${SUBSCRIPTION_ID} + Check HTTP Response Status Code Is 204 + Check HTTP Response Body is Empty + + +Remove a APP Package subscription using non existant subscription id + [Documentation] TP_MEC_MEPM_PKGM_008_NF + ... Check that MEPM service sends an error when it receives a deletion + ... request for a subscription on AppPackages with a wrong identifier + ... ETSI GS MEC 010-2 2.0.10, clause 7.4.6.3.4 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Delete an App Package Subscription identified by ${NON_EXISTENT_SUBSCRIPTION_ID} + Check HTTP Response Status Code Is 404 + + + + +*** Keywords *** +GET all APP Packages + Log Getting all App Packages + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/app_packages + ${output}= Output response + Set Suite Variable ${response} ${output} + + +GET all APP Packages with filters + [Arguments] ${key} ${value} + Log Getting all App Packages using filtering parameters + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/app_packages?${key}=${value} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +GET an APP Package identified by + [Arguments] ${value} + Log Getting an App Package + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/app_packages/${value} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Get an AppD from App Package identified by + [Arguments] ${appPkgId} + Log Getting App descriptor for App Package + Set Headers {"Accept":"${ACCEPTED_CONTENT_TYPE}"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/app_packages/${appPkgId}/app_descriptor + ${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}"} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${content} + ${output}= Output response + Set Suite Variable ${response} ${output} + + + +Get all APP Package subscriptions + Log Getting list of subscriptions + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get an individual APP Package subscriptions + [Arguments] ${subId} + Log Getting an individual subscription + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Delete an App Package Subscription identified by + [Arguments] ${subId} + Log Deleting a subscription + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subId} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Get the Content from an App Package identified by + [Arguments] ${appPkgId} + Log Getting App descriptor for App Package + Set Headers {"Accept":"${ACCEPTED_CONTENT_TYPE}"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/app_packages/${appPkgId}/appPkgContent + ${output}= Output response + Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/MEPM/PKGM/environment/variables.txt b/MEPM/PKGM/environment/variables.txt new file mode 100644 index 0000000..4685b21 --- /dev/null +++ b/MEPM/PKGM/environment/variables.txt @@ -0,0 +1,44 @@ +*** Variables *** +# Generic variables +${MEPM_SCHEMA} http +${MEPM_HOST} 10.192.2.172 +${MEPM_PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} apmi +${apiVersion} v1 + +# Specific variables +${APP_PKG_NAME} APP_PKG_NAME // Should be the same as in AppPkg.json +${APP_PKG_VERSION} APP_PKG_VERSION // Should be the same as in AppPkg.json +${CHECKSUM} CHECKSUM // Should be the same as in AppPkg.json +${OPERATIONAL_STATE} OPERATIONAL_STATE // Should be the same as in AppPkg.json +${USAGE_STATE} USAGE_STATE // Should be the same as in AppPkg.json +${ON_BOARDED_APP_PKG_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${APPD_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${MALFORMED_FILTER_NAME} operationalStatus // Should be operationalState +${FILTER_VALUE} NOT_IN_USE +${NON_EXISTENT_APP_PKG_ID} NON_EXISTENT_APP_PKG_ID +${OPERATION_VALUE} DISABLE + +${ACCEPTED_CONTENT_TYPE} text/plain // Should refer to the type of AppD +${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID + + + + +${SUBSCRIPTION_TYPE} MobilityProcedureSubscription + + + +# 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/MEPM/PKGM/jsons/AppPkgSubscription.json b/MEPM/PKGM/jsons/AppPkgSubscription.json new file mode 100644 index 0000000..e69de29 diff --git a/MEPM/PKGM/jsons/CreateAppPackage.json b/MEPM/PKGM/jsons/CreateAppPackage.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/MEPM/PKGM/jsons/CreateAppPackage.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/MEPM/PKGM/jsons/MalformedAppPkg.json b/MEPM/PKGM/jsons/MalformedAppPkg.json new file mode 100644 index 0000000..e69de29 diff --git a/MEPM/PKGM/jsons/MalformedAppPkgSubscription.json b/MEPM/PKGM/jsons/MalformedAppPkgSubscription.json new file mode 100644 index 0000000..e69de29 diff --git a/MEPM/PKGM/schemas/AppPkgSubscriptionInfo.json b/MEPM/PKGM/schemas/AppPkgSubscriptionInfo.json new file mode 100644 index 0000000..e69de29 diff --git a/MEPM/PKGM/schemas/AppPkgSubscriptionLinkList.json b/MEPM/PKGM/schemas/AppPkgSubscriptionLinkList.json new file mode 100644 index 0000000..e69de29 diff --git a/MEPM/PKGM/schemas/OnboardedAppPkgInfo.json b/MEPM/PKGM/schemas/OnboardedAppPkgInfo.json new file mode 100644 index 0000000..e69de29 diff --git a/MEPM/PKGM/schemas/OnboardedAppPkgInfos.json b/MEPM/PKGM/schemas/OnboardedAppPkgInfos.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/ANY/ANY.robot b/MEX/ANY/ANY.robot new file mode 100644 index 0000000..8978667 --- /dev/null +++ b/MEX/ANY/ANY.robot @@ -0,0 +1,34 @@ +*** Settings *** +Resource environment/variables.txt +Resource ../../GenericKeywords.robot +Library REST ${PROVIDER_SCHEMA}://${PROVIDER_HOST}:${PROVIDER_PORT} ssl_verify=false +Library BuiltIn +Library OperatingSystem + + +*** Test Cases *** +Request access to a generic resource not using token + [Documentation] TP_MEC_MEX_ANY_001_NT + ... Check that a MEC API provider responds with an error when it + ... receives a request without token + ... ETSI GS MEC 009 1.1.1, clause 6.16.1 + [Tags] GENERIC_TESTS INCLUDE_UNDEFINED_SCHEMAS + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Get ${apiRoot}/${apiName}/${apiVersion}/app_packages + ${output}= Output response + Should Be Equal As Strings 401 ${output['status']} + + +Request access to a generic resource using an invalid token + [Documentation] TP_MEC_MEX_ANY_001_WT + ... Check that a MEC API provider responds with an error + ... when it receives a request with a wrong token + ... ETSI GS MEC 009 1.1.1, clause 6.16.1 + [Tags] GENERIC_TESTS INCLUDE_UNDEFINED_SCHEMAS + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${INVALID_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/app_packages + ${output}= Output response + Should Be Equal As Strings 401 ${output['status']} diff --git a/MEX/ANY/environment/variables.txt b/MEX/ANY/environment/variables.txt new file mode 100644 index 0000000..3167846 --- /dev/null +++ b/MEX/ANY/environment/variables.txt @@ -0,0 +1,12 @@ +*** Variables *** +# Generic variables +${PROVIDER_SCHEMA} http +${PROVIDER_HOST} 10.192.2.172 +${PROVIDER_PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} apmi +${apiVersion} v1 + +${INVALID_TOKEN} INVALID_TOKEN \ No newline at end of file diff --git a/MEX/ANY/jsons/AppPkgSubscription.json b/MEX/ANY/jsons/AppPkgSubscription.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/ANY/jsons/CreateAppPackage.json b/MEX/ANY/jsons/CreateAppPackage.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/MEX/ANY/jsons/CreateAppPackage.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/MEX/ANY/jsons/MalformedAppPkg.json b/MEX/ANY/jsons/MalformedAppPkg.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/ANY/jsons/MalformedAppPkgSubscription.json b/MEX/ANY/jsons/MalformedAppPkgSubscription.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/ANY/schemas/AppPkgSubscriptionInfo.json b/MEX/ANY/schemas/AppPkgSubscriptionInfo.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/ANY/schemas/AppPkgSubscriptionLinkList.json b/MEX/ANY/schemas/AppPkgSubscriptionLinkList.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/ANY/schemas/OnboardedAppPkgInfo.json b/MEX/ANY/schemas/OnboardedAppPkgInfo.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/ANY/schemas/OnboardedAppPkgInfos.json b/MEX/ANY/schemas/OnboardedAppPkgInfos.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/LCM/LifeCycleManagement.robot b/MEX/LCM/LifeCycleManagement.robot new file mode 100644 index 0000000..4db0f15 --- /dev/null +++ b/MEX/LCM/LifeCycleManagement.robot @@ -0,0 +1,458 @@ +*** Settings *** +Resource environment/variables.txt +Resource ../../GenericKeywords.robot +Library REST ${MEX_SCHEMA}://${MEX_HOST}:${MEX_PORT} ssl_verify=false +Library BuiltIn +Library OperatingSystem +Library MockServerLibrary + + +*** Test Cases *** +Create new App Package Resource + [Documentation] TP_MEC_MEX_LCM_001_OK + ... Check that MEC API provider creates a new App Instance when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.5.1.3.1 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.2.3.2-1 (CreateAppInstanceRequest) + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.2.4.2-1 (AppInstanceInfo) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Post Request to 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 + Check Result Contains ${response} appDId ${APPD_ID} + Check Result Contains ${response} instantiationState ${INSTANTIATION_STATE} + + +Create new App Instance using malformed request + [Documentation] TP_MEC_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.0.10, clause 7.5.1.3.1 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.2.3.2-1 (CreateAppInstanceRequest) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Post Request to create new App instance MalformedAppInstanceRequest + Check HTTP Response Status Code Is 400 + + +Request all APP Instances + [Documentation] TP_MEC_MEX_LCM_002_OK + ... Check that MEC API provider retrieves the list of App instances when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.5.1.3.2 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.2.4.2-1 (AppInstanceInfo) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + GET all APP instances + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is AppInstanceInfos + Check Result Contains ${response} appInstanceId ${APP_INSTANCE_ID} + + + +Request an individual APP instance + [Documentation] TP_MEC_MEX_LCM_003_OK + ... Check that MEC API provider retrieves an App Instance when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.5.2.3.2 + ... ETSI GS MEC 010-2 2.0.10, Table 6.2.2.4.2-1 (AppInstanceInfo) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + GET an APP instance identified by ${APP_INSTANCE_ID} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is OnboardedAppPkgInfo + Check Result Contains ${response} appInstanceId ${APP_INSTANCE_ID} + + +Request an individual APP instance using wrong identifier + [Documentation] TP_MEC_MEX_LCM_003_NF + ... Check that MEC API provider fails on retrieving an App Instance when requested using wrong appInstanceId + ... ETSI GS MEC 010-2 2.0.10, clause 7.5.2.3.2 + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + GET an APP instance identified by ${NON_EXISTENT_APP_INSTANCE_ID} + Check HTTP Response Status Code Is 404 + + + +Remove an individual APP instance + [Documentation] TP_MEC_MEX_LCM_004_OK + ... Check that MEC API provider service deletes an App Instance when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.5.2.3.4 + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Delete an individual APP instance identified by ${APP_INSTANCE_ID} + Check HTTP Response Status Code Is 204 + Check HTTP Response Body is Empty + + +Remove an individual APP Package using wrong identifier + [Documentation] TP_MEC_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.0.10, clause 7.5.2.3.2 + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Delete an individual APP instance identified by ${NON_EXISTENT_APP_INSTANCE_ID} + Check HTTP Response Status Code Is 404 + + +Instantiate an APP instance + [Documentation] TP_MEC_MEX_LCM_005_OK + ... Check that MEC API provider service instantiates an App Instance when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.5.6.3.1 + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.7.2-1 (InstantiateAppRequest) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for APP instantiation ${APP_INSTANCE_ID} InstantiateAppRequest + Check HTTP Response Status Code Is 202 + Check HTTP Response Header Contains Location + Check HTTP Response Body is Empty + + +Instantiate an APP instance using malformed parameters + [Documentation] TP_MEC_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.0.10, clause 7.5.6.3.1 + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.7.2-1 (InstantiateAppRequest) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for APP instantiation ${APP_INSTANCE_ID} MalformedInstantiateAppRequest + Check HTTP Response Status Code Is 400 + + + +Instantiate a not existant APP instance + [Documentation] TP_MEC_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.0.10, clause 7.5.6.3.1 + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.7.2-1 (InstantiateAppRequest) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for APP instantiation ${NON_EXISTENT_APP_INSTANCE_ID} InstantiateAppRequest + Check HTTP Response Status Code Is 404 + + +Terminate an APP instance + [Documentation] TP_MEC_MEX_LCM_006_OK + ... Check that MEC API provider service terminates an App Instance when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.5.7.3.1 + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.9.2-1 (TerminateAppRequest) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for APP termination ${APP_INSTANCE_ID} TerminateAppRequest + Check HTTP Response Status Code Is 202 + Check HTTP Response Header Contains Location + Check HTTP Response Body is Empty + + + +Terminate an APP instance using malformed parameters + [Documentation] TP_MEC_MEX_LCM_006_BR + ... Check that MEC API provider service fails to terminate an App Instance + ... when it receives a malformed request + ... ETSI GS MEC 010-2 2.0.10, clause 7.5.7.3.1 + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.9.2-1 (TerminateAppRequest) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for APP termination ${APP_INSTANCE_ID} MalformedTerminateAppRequest + Check HTTP Response Status Code Is 400 + + + +Terminate a not existant APP instance + [Documentation] TP_MEC_MEX_LCM_006_NF + ... heck 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.0.10, clause 7.5.7.3.1 + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.9.2-1 (TerminateAppRequest) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for APP instantiation ${NON_EXISTENT_APP_INSTANCE_ID} TerminateAppRequest + Check HTTP Response Status Code Is 404 + + + +Change status of an APP instance + [Documentation] TP_MEC_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/START + ... ETSI GS MEC 010-2 2.0.10, clause 7.5.8.3.1 + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.8.2-1 (OperateAppRequest) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for APP operation ${APP_INSTANCE_ID} OperateAppRequest + Check HTTP Response Status Code Is 202 + Check HTTP Response Header Contains Location + Check HTTP Response Body is Empty + + + +Change status of an APP instance using malformed parameters + [Documentation] TP_MEC_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.0.10, clause 7.5.8.3.1 + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.8.2-1 (OperateAppRequest) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for APP termination ${APP_INSTANCE_ID} MalformedOperateAppRequest + Check HTTP Response Status Code Is 400 + + + +Change status on a not existant APP instance + [Documentation] TP_MEC_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.0.10, clause 7.5.8.3.1 + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.8.2-1 (OperateAppRequest) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for APP instantiation ${NON_EXISTENT_APP_INSTANCE_ID} OperateAppRequest + Check HTTP Response Status Code Is 404 + + + +Request list of LCM Operation Occurrencies + [Documentation] TP_MEC_MEX_LCM_008_OK + ... Check that MEC API provider service retrieves info about LCM Operation Occurrency on App Instances when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.5.9.1.3.2 + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.14.2-1 (AppInstanceLcmOpOcc) + ... + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for APP instance LCM Operation Occurrencies + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is AppInstanceLcmOpOccs + Check Result Contains ${response} appLcmOpOccId ${APP_LCM_OP_OCC_ID} + + +Request a specific LCM Operation Occurrency + [Documentation] TP_MEC_MEX_LCM_009_OK + ... Check that MEC API provider service retrieves info about LCM Operation Occurrency on an App Instance when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.5.10.1.3.2 + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.14.2-1 (AppInstanceLcmOpOcc) + ... + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for a specific LCM Operation Occurrency ${APP_LCM_OP_OCC_ID} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is AppInstanceLcmOpOcc + Check Result Contains ${response} appLcmOpOccId ${APP_LCM_OP_OCC_ID} + + +Request a specific LCM Operation Occurrency using a non existant identifier + [Documentation] TP_MEC_MEX_LCM_009_NF + ... Check that MEC API provider service sends an error when it receives a query + ... for a not existing LCM Operation Occurrency + ... ETSI GS MEC 010-2 2.0.10, clause 7.5.10.1.3.2 + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for a specific LCM Operation Occurrency ${NON_EXISTANT_APP_LCM_OP_OCC_ID} + Check HTTP Response Status Code Is 404 + + +Create a new LifeCycleManagement Subscription + [Documentation] TP_MEC_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 + ... - AppLcmOpOccStateChangeSubscription + ... ETSI GS MEC 010-2 2.0.10, clause 7.5.3.3.1 + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.13.2-1 (AppInstSubscriptionRequest) + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.10.2-1 (AppInstSubscriptionInfo) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for a subscription AppInstSubscriptionRequest + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is AppPkgSubscriptionInfo + Check Result Contains ${response} subscriptionType AppInstanceStateChangeSubscription + Check Result Contains ${response} callbackUri ${CALLBACK_URI} + + +Create a new LifeCycleManagement Subscription with malformed parameter + [Documentation] TP_MEC_MEO_PKGM_007_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.0.10, clause 7.5.3.3.1 + ... EETSI GS MEC 010-2 2.0.10, table 6.2.2.13.2-1 (AppInstSubscriptionRequest) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Send a request for a subscription MalformedAppInstSubscriptionRequest + Check HTTP Response Status Code Is 400 + + + +Request all LifeCycleManagement Subscriptions + [Documentation] TP_MEC_MEX_LCM_011_OK + ... Check that MEC API provider service sends the list of LCM Subscriptions when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.5.3.3.2 + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.13.2-1 (AppInstSubscriptionRequest) + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.15.2-1 (AppLcmOpOccSubscriptionRequest) + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.10.2-1 (AppInstSubscriptionInfo) + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.16.2-1 (AppLcmOpOccSubscriptionInfo) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + ##TODO: How to handle cases when different types of schemas can be returned? + Get all LifeCycleManagement subscriptions + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is AppInstSubscriptionLinkList + Check Result Contains ${response} subscriptionId ${SUBSCRIPTION_ID} + + +Request a specific LifeCycleManagement subscription + [Documentation] TP_MEC_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.0.10, clause 7.5.4.3.2 + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.10.2-1 (AppInstSubscriptionInfo) + ... ETSI GS MEC 010-2 2.0.10, table 6.2.2.16.2-1 (AppLcmOpOccSubscriptionInfo) + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Get an individual LCM subscription ${SUBSCRIPTION_ID} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is AppInstSubscriptionInfo + Check Result Contains ${response} subscriptionId ${SUBSCRIPTION_ID} + + + + +Request a specific LifeCycleManagement subscription using non existant subscription identifier + [Documentation] TP_MEC_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.0.10, clause 7.5.3.3.2 + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Get an individual LCM subscription ${NON_EXISTENT_SUBSCRIPTION_ID} + Check HTTP Response Status Code Is 404 + + + +Remove a LifeCycleManagement subscription + [Documentation] TP_MEC_MEX_LCM_013_OK + ... Check that MEC API provider service delete an existing LCM Subscription when requested + ... ETSI GS MEC 010-2 2.0.10, clause 7.3.4.3.4 + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Delete an LCM Subscription identified by ${SUBSCRIPTION_ID} + Check HTTP Response Status Code Is 204 + Check HTTP Response Body is Empty + + +Remove a APP Package subscription using non existant subscription id + [Documentation] TP_MEC_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.0.10, clause 7.5.3.3.4 + [Tags] PIC_APP_LCM_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + Delete an LCM Subscription identified by ${NON_EXISTENT_SUBSCRIPTION_ID} + Check HTTP Response Status Code Is 404 + + + +*** Keywords *** +Post Request to create new App instance + [Arguments] ${content} + Log Creating a new App Instance + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Post ${apiRoot}/${apiName}/${apiVersion}/app_instances ${content} allow_redirects=false + ${output}= Output response + Set Suite Variable ${response} ${output} + + +GET all APP instances + Log Getting all App Instances + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/app_instances + ${output}= Output response + Set Suite Variable ${response} ${output} + + +GET an APP instance identified by + [Arguments] ${value} + Log Getting an App Package + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/app_instances/${value} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Delete an individual APP instance identified by + [Arguments] ${value} + Log Removing an App Package + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/app_instances/${value} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send a request for APP instantiation + [Arguments] ${appInstanceId} ${content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + POST ${apiRoot}/${apiName}/${apiVersion}/app_instances/${appInstanceId}/instantiate ${content} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Send a request for APP termination + [Arguments] ${appInstanceId} ${content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + POST ${apiRoot}/${apiName}/${apiVersion}/app_instances/${appInstanceId}/terminate ${content} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Send a request for APP operation + [Arguments] ${appInstanceId} ${content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + POST ${apiRoot}/${apiName}/${apiVersion}/app_instances/${appInstanceId}/operate ${content} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Send a request for APP instance LCM Operation Occurrencies + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + GET ${apiRoot}/${apiName}/${apiVersion}/app_lcm_op_occs + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Send a request for a specific LCM Operation Occurrency + [Arguments] ${appLcmOpOccId} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + GET ${apiRoot}/${apiName}/${apiVersion}/app_lcm_op_occs/${appLcmOpOccId} + ${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}"} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${content} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Get all LifeCycleManagement subscriptions + Log Getting list of subscriptions + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Get an individual LCM subscription + [Arguments] ${subId} + Log Getting an individual subscription + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Delete an LCM Subscription identified by + [Arguments] ${subId} + Log Deleting a subscription + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subId} + ${output}= Output response + Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/MEX/LCM/environment/variables.txt b/MEX/LCM/environment/variables.txt new file mode 100644 index 0000000..5eefdf8 --- /dev/null +++ b/MEX/LCM/environment/variables.txt @@ -0,0 +1,56 @@ +*** Variables *** +# Generic variables +${MEX_SCHEMA} http +${MEX_HOST} 10.192.2.172 +${MEX_PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} alcmi +${apiVersion} v1 + +# Specific variables +${APPD_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${INSTANTIATION_STATE} NOT_INSTANTIATED +${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${NON_EXISTENT_APP_INSTANCE_ID} NON_EXISTENT_APP_INSTANCE_ID +${APP_LCM_OP_OCC_ID} 65c4d1ff-f63b-46ef-bfe3-a6b330b60180 +${NON_EXISTANT_APP_LCM_OP_OCC_ID} NON_EXISTANT_APP_LCM_OP_OCC_ID + + + + + + + +${APP_PKG_NAME} APP_PKG_NAME // Should be the same as in AppPkg.json +${APP_PKG_VERSION} APP_PKG_VERSION // Should be the same as in AppPkg.json +${CHECKSUM} CHECKSUM // Should be the same as in AppPkg.json +${OPERATIONAL_STATE} OPERATIONAL_STATE // Should be the same as in AppPkg.json +${USAGE_STATE} USAGE_STATE // Should be the same as in AppPkg.json +${ON_BOARDED_APP_PKG_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${MALFORMED_FILTER_NAME} operationalStatus // Should be operationalState +${FILTER_VALUE} NOT_IN_USE +${NON_EXISTENT_APP_PKG_ID} NON_EXISTENT_APP_PKG_ID +${OPERATION_VALUE} DISABLE + +${ACCEPTED_CONTENT_TYPE} text/plain // Should refer to the type of AppD +${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 + + + + +${SUBSCRIPTION_TYPE} MobilityProcedureSubscription +${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_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/MEX/LCM/jsons/AppInstSubscriptionRequest.json b/MEX/LCM/jsons/AppInstSubscriptionRequest.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/LCM/jsons/CreateAppInstanceRequest.json b/MEX/LCM/jsons/CreateAppInstanceRequest.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/LCM/jsons/InstantiateAppRequest.json b/MEX/LCM/jsons/InstantiateAppRequest.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/LCM/jsons/MalformedAppInstanceRequest.json b/MEX/LCM/jsons/MalformedAppInstanceRequest.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/LCM/jsons/MalformedInstantiateAppRequest.json b/MEX/LCM/jsons/MalformedInstantiateAppRequest.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/LCM/jsons/OperateAppRequest.json b/MEX/LCM/jsons/OperateAppRequest.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/LCM/jsons/TerminateAppRequest.json b/MEX/LCM/jsons/TerminateAppRequest.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/LCM/schemas/AppInstanceInfo.json b/MEX/LCM/schemas/AppInstanceInfo.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/LCM/schemas/AppInstanceInfos.json b/MEX/LCM/schemas/AppInstanceInfos.json new file mode 100644 index 0000000..e69de29 diff --git a/MEX/LCM/schemas/AppInstanceLcmOpOccs.json b/MEX/LCM/schemas/AppInstanceLcmOpOccs.json new file mode 100644 index 0000000..e69de29 -- GitLab