Commit 16ed00a7 authored by Muhammad Umair Khan's avatar Muhammad Umair Khan
Browse files

Merge branch 'TTF_T043_T5_xFlow' into 'TTF_T043'

Merge Request for TTF_T043_T5_xFlow into TTF_T043

See merge request !6
parents 4637686d 4ab98dfe
Loading
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ TC_MEC_MEC010p2_MEPM_PKGM_002_02_OK
    [Setup]   Create new App Package        CreateAppPackage.json
    Set Suite Variable    ${APP_PKG_ID}    ${response['body']['id']}
    Set Suite Variable    ${APPD_ID}    ${response['body']['appDId']}
    Get an individual APP Package identified by ID    ${APPD_ID}
    Get an individual onboarded APP Package identified by ID    ${APPD_ID}
    Check HTTP Response Status Code Is    200    
    Validate Json    OnboardedAppPkgInfo.schema.json    ${response['body']}
    Should Contain  ${response['body']['_links']['self']['href']}    ${APP_PKG_ID}       
@@ -417,6 +417,14 @@ Get an individual APP Package identified by ID
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 

Get an individual onboarded APP Package identified by ID
    [Arguments]    ${identifier}    
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Content-Type":"*/*"}
    Set Headers    {"Authorization":"${TOKEN}"}
    Get   ${apiRoot}/${apiName}/${apiVersion}/onboarded_app_packages/${identifier}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 


GET all app Packages content by appPkgId
+22 −14
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ Resource ../../../GenericKeywords.robot
Library     REST    ${SCHEMA}://${HOST}:${PORT}    ssl_verify=false
Library     OperatingSystem    
Library     String
Library    Collections

*** Test Cases ***
TC_MEC_MEC015_SRV_MTS_001_OK
@@ -33,7 +34,7 @@ TC_MEC_MEC015_SRV_MTS_002_OK_01
    ...  ETSI GS MEC 015 v3.1.1, clause 9.3.3.1
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    ${elements} =  Split String    ${response['headers']['Location']}       /
    Set Suite Variable    ${SESSION_ID}    ${elements}[3]
    Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
    Retrieve MTS session list information   
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   MtsSessionInfo
@@ -50,8 +51,8 @@ TC_MEC_MEC015_SRV_MTS_002_OK_02
    ...  ETSI GS MEC 015 v3.1.1, clause 9.5.3.1
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    ${elements} =  Split String    ${response['headers']['Location']}       /
    Set Suite Variable    ${SESSION_ID}    ${elements}[3]
    Retrieve MTS session list information using filter  ${APP_NAME_FILTER}   ${APP_INSTANCE_ID}   
    Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
    Retrieve MTS session list information using filter  ${CORRECT_FILTER}   ${APP_INSTANCE_ID}   
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   MtsSessionInfo
    FOR    ${mstSessionInfo}    IN    @{response['body']}
@@ -70,7 +71,8 @@ TC_MEC_MEC015_SRV_MTS_002_OK_03
     ...  ETSI GS MEC 015 v3.1.1, clause 7.2.5,
     ...  ETSI GS MEC 015 v3.1.1, clause 9.5.3.1
     [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific

     ${elements} =  Split String    ${response['headers']['Location']}       /
     Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
     Retrieve MTS session list information using filter  ${APP_NAME_FILTER}   ${APP_NAME}   
     Check HTTP Response Status Code Is    200
     Check HTTP Response Body Json Schema Is   MtsSessionInfo
@@ -85,6 +87,8 @@ TC_MEC_MEC015_SRV_MTS_002_OK_03
     ...  ETSI GS MEC 015 v3.1.1, clause 7.2.5,
     ...  ETSI GS MEC 015 v3.1.1, clause 9.5.3.1
     [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
     ${elements} =  Split String    ${response['headers']['Location']}       /
     Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
     Retrieve MTS session list information using filter  ${SESSION_ID_FILTER}   ${SESSION_ID}
     Check HTTP Response Status Code Is    200
     Check HTTP Response Body Json Schema Is   MtsSessionInfo
@@ -102,7 +106,7 @@ TC_MEC_MEC015_SRV_MTS_002_BR
    ...  ETSI GS MEC 015 v3.1.1, clause 9.5.3.1 
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    ${elements} =  Split String    ${response['headers']['Location']}       /
    Set Suite Variable    ${SESSION_ID}    ${elements}[3]
    Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
    
    Retrieve MTS session list information using filter  ${BAD_FILTER}   ${APP_INSTANCE_ID}   
    Check HTTP Response Status Code Is    400
@@ -153,8 +157,10 @@ TC_MEC_MEC015_SRV_MTS_003_OK_02
    ...  ETSI GS MEC 015 v3.1.1, clause 6.2.7
    ...  ETSI GS MEC 015 v3.1.1, clause 7.2.5
    ...  ETSI GS MEC 015 v3.1.1, clause 9.5.3.2
    #[Setup]  Create new App Instance   CreateAppInstanceRequest
    [Setup]  Create new App Instance   CreateAppInstanceRequest
    Register MTS session     MtsSessionInfoSessionSpecific
    ${elements} =  Split String    ${response['headers']['Location']}       /
    Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is   MtsSessionInfo
    ${appInsId}    Get value entry from JSON file    MtsSessionInfoSessionSpecific   appInsId
@@ -166,11 +172,13 @@ TC_MEC_MEC015_SRV_MTS_003_OK_02

    Should Be Equal As Strings  ${response['body']['appInsId']}    ${appInsId}
    Should Be Equal As Strings  ${response['body']['requestType']}    ${requestType}
    Should Be Equal As Strings  ${response['body']['flowFilter']}    ${flowFilter}
    Dictionaries Should Be Equal  ${response['body']['flowFilter'][0]}    ${flowFilter}[0]
    Should Be Equal As Strings  ${response['body']['qosD']}    ${qosD}
    Should Be Equal As Strings  ${response['body']['mtsMode']}    ${mtsMode}
    Should Be Equal As Strings  ${response['body']['trafficDirection']}    ${trafficDirection}
    [TearDown]   Delete APP Instance   ${APP_INSTANCE_ID} 
    [TearDown]   Unregister from the MTS Service    ${SESSION_ID} 
    Delete APP Instance   ${APP_INSTANCE_ID}
    

TC_MEC_MEC015_SRV_MTS_003_BR
    [Documentation]
@@ -195,7 +203,7 @@ TC_MEC_MEC015_SRV_MTS_004_OK
    ...  ETSI GS MEC 015 v3.1.1, clause 9.4.3.1
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    ${elements} =  Split String    ${response['headers']['Location']}       /
    Set Suite Variable    ${SESSION_ID}    ${elements}[3]
    Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
    Retrieve single MTS session   ${SESSION_ID}
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   MtsSessionInfo    
@@ -242,7 +250,7 @@ TC_MEC_MEC015_SRV_MTS_005_OK
    ...  ETSI GS MEC 015 v3.1.1, clause 9.4.3.2
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    ${elements} =  Split String    ${response['headers']['Location']}       /
    Set Suite Variable    ${SESSION_ID}    ${elements}[3]
    Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
    Update requested requirements on the MTS Service    ${SESSION_ID}     MtsSessionInfoApplicationSpecificUpdate
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   MtsSessionInfo
@@ -266,7 +274,7 @@ TC_MEC_MEC015_SRV_MTS_005_BR
    ...  https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.yaml
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    ${elements} =  Split String    ${response['headers']['Location']}       /
    Set Suite Variable    ${SESSION_ID}    ${elements}[3]
    Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
    Update requested requirements on the MTS Service    ${SESSION_ID}       MtsSessionInfoApplicationSpecificUpdate_BR
    Check HTTP Response Status Code Is    400
    [TearDown]   Unregister from the MTS Service And Delete APP Instance   ${SESSION_ID}    ${APP_INSTANCE_ID}  
@@ -279,7 +287,7 @@ TC_MEC_MEC015_SRV_MTS_005_NF
    ...  ETSI GS MEC 015 v3.1.1, clause 7.2.5
    ...  ETSI GS MEC 015 v3.1.1, clause 9.4.3.2
    ...  https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.yaml
    #[Setup]  Unregister from the MTS Service  ${NOT_EXISTING_SESSION_ID}
    [Setup]  Unregister from the MTS Service  ${NOT_EXISTING_SESSION_ID}
    Update requested requirements on the MTS Service    ${NOT_EXISTING_SESSION_ID}     MtsSessionInfoApplicationSpecificUpdate
    Check HTTP Response Status Code Is    404
             
@@ -294,7 +302,7 @@ TC_MEC_MEC015_SRV_MTS_006_OK
    ...  ETSI GS MEC 015 v3.1.1, clause 9.4.3.3
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    ${elements} =  Split String    ${response['headers']['Location']}       /
    Set Suite Variable    ${SESSION_ID}    ${elements}[3]
    Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
    Unregister from the MTS Service   ${SESSION_ID}
    Check HTTP Response Status Code Is    204

+7 −7
Original line number Diff line number Diff line
*** Variables ***
# Generic variables
${SCHEMA}                   https
${HOST}                     try-mec.etsi.org
${HOST}                     192.168.40.50
${PORT}                     443
${response}                         {}
${TOKEN}                            Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot}        /<your_token_here>/mep1 
${apiRoot}        sbxme1qzq4/mep1 
${apiName}        mts
${apiVersion}     v1


# Specific variables
${APP_INSTANCE_ID}					81c51643-8c6f-4781-ad45-f8a457ca549b
${APP_INSTANCE_ID}					f1e4d448-e277-496b-bf63-98391cfd20fb
${NOT_EXISTING_APP_INSTANCE_ID}		NOT_EXISTING_APP_INS_ID
${CORRECT_FILTER}					app_instance_id
${APP_NAME_FILTER}					app_name
${SESSION_ID_FILTER}                session_id
${BAD_FILTER}						appInsId
${APP_NAME}							app_name
${APP_NAME}							appName
          
${SESSION_ID}						5
${WRONG_SESSION_ID}					WRONG_SESSION_ID
@@ -29,9 +29,9 @@ ${TRAFFIC_DIRECTION_DL} 00


##Variables for App Instances management
${APP_INST_SCHEMA}                    https
${APP_INST_HOST}                     try-mec.etsi.org
${APP_INST_PORT}                     443
${APP_INST_SCHEMA}                   http
${APP_INST_HOST}                     192.168.40.50
${APP_INST_PORT}                     80
${apiRoot_APP_INST}
${apiName_APP_INST}                  app_lcm
${apiVersion_APP_INST}               v1
+2 −1
Original line number Diff line number Diff line
{
		"appInsId": "81c51643-8c6f-4781-ad45-f8a457ca549b",
		"appInsId": "f1e4d448-e277-496b-bf63-98391cfd20fb",
		"requestType": 0,
		"appName": "appName",
		"qosD": {
			"minTpt": 10
		},
+1 −1
Original line number Diff line number Diff line
{
		"appInsId": "81c51643-8c6f-4781-ad45-f8a457ca549b",
		"appInsId": "f1e4d448-e277-496b-bf63-98391cfd20fb",
		"requestType": 0,
		"mtsMode": 0,
		"trafficDirection": "00"
Loading