Commit 9abf762a authored by piscione's avatar piscione
Browse files

Fixes on MEC015 and MEC030 test cases.

parent 1180172a
Loading
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -27,7 +27,8 @@ TP_MEC_MEC015_SRV_MTS_002_OK
    ...  Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
    ...  ETSI GS MEC 015 V2.1.1, clause 9.5.3.1
    ...  https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.yaml
    Retrieve MTS session list information
    #Retrieve MTS session list information
    Retrieve MTS session list information using filter  ${CORRECT_FILTER}   ${SESSION_ID}   
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   MtsSessionInfo
    FOR    ${mstSessionInfo}    IN    @{response['body']}
@@ -119,7 +120,7 @@ TP_MEC_MEC015_SRV_MTS_004_OK
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   MtsSessionInfo
    Should Be Equal As Strings  ${response['body']['appInsId']}                   ${APP_INSTANCE_ID}
    Should Be Equal As Strings  ${response['body']['requestType']}             ${REQUEST_TYPE_SESSION}     
    Should Be Equal As Strings  ${response['body']['requestType']}             ${REQUEST_TYPE_APPLICATION}     
    Should Be Equal As Strings  ${response['body']['mtsMode']}                   ${MTS_LOW_MODE_COST} 
    Should Be Equal As Strings  ${response['body']['trafficDirection']}         ${TRAFFIC_DIRECTION_DL}   

@@ -189,9 +190,6 @@ TP_MEC_MEC015_SRV_MTS_006_OK
    Unregister from the MTS Service   ${SESSION_ID}
    Check HTTP Response Status Code Is    204

##TP_MEC_MEC015_SRV_MTS_006_BR missing. 
#See issues https://forge.etsi.org/rep/mec/gs032p2-test-purposes/issues/11 for further details.

TP_MEC_MEC015_SRV_MTS_006_NF
    [Documentation]
    ...  Check that the IUT deregisters a MTS session when commanded by a MEC Application
+1 −1
Original line number Diff line number Diff line
@@ -19,6 +19,6 @@ ${SESSION_ID} 1
${WRONG_SESSION_ID}					WRONG_SESSION_ID
${NOT_EXISTING_SESSION_ID}			NOT_EXISTING_SESSION_ID

${REQUEST_TYPE_SESSION}				0
${REQUEST_TYPE_APPLICATION}			1
${MTS_LOW_MODE_COST}				0
${TRAFFIC_DIRECTION_DL}				00
+2 −16
Original line number Diff line number Diff line
@@ -170,12 +170,12 @@ TP_MEC_MEC015_SRV_TM_006_OK
    # Preamble
    Register Bandwidth Management Service Application specific   BwInfoApplicationSpecific
    # Test body
    ${path}    Catenate    SEPARATOR=      jsons/     BwInfoUpdate.json
    ${path}    Catenate    SEPARATOR=      jsons/     BwInfoDeltas.json
    ${body}    Get File    ${path}
    ${json_object}=	Evaluate  json.loads('''${body}''')  json
    Request a deltas changes    ${ALLOCATION_ID}    ${body}
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   BwInfo
    Check HTTP Response Body Json Schema Is   BwInfoDelta
        Should Be Equal As Strings  ${response['body']['appInsId']}    ${json_object['appInsId']}  
    Should Be Equal As Strings  ${response['body']['fixedAllocation']}    ${json_object['fixedAllocation']}  
    Should Be Equal As Strings  ${response['body']['allocationDirection']}    ${json_object['allocationDirection']}   
@@ -311,20 +311,6 @@ Request a deltas changes
    Set Suite Variable    ${response}    ${output}


Request a deltas changes with invalid ETAG
    [Arguments]    ${allocation_id}    ${content}
    Should Be True    ${PIC_MEC_PLAT} == 1
    Should Be True    ${PIC_SERVICES} == 1
    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}
    Patch    ${apiRoot}/${apiName}/${apiVersion}/bw_allocations/${allocation_id}    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}


Register Bandwidth Management Service with incorrect parameters
    [Arguments]    ${content}
    Should Be True    ${PIC_MEC_PLAT} == 1
+1 −1
Original line number Diff line number Diff line
{
"appInsId": "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f",
  "requestType": "0",
  "requestType": 0,
  "fixedAllocation": "32",
  "allocationDirection": "01"
}
 No newline at end of file
+127 −0
Original line number Diff line number Diff line
{
 "items": {
	"properties": {
		"allocationDirection": {
			"description": "The direction of the requested BW allocation: 00 = Downlink (towards the UE) 01 = Uplink (towards the application/session) 10 = Symmetrical",
			"type": "string",
			"x-etsi-mec-cardinality": "1",
			"x-etsi-mec-origin-type": "String"
		},
		"appInsId": {
			"description": "Application instance identifier",
			"type": "string",
			"x-etsi-mec-cardinality": "1",
			"x-etsi-mec-origin-type": "String"
		},
		"fixedAllocation": {
			"description": "Size of requested fixed BW allocation in [bps]",
			"type": "string",
			"x-etsi-mec-cardinality": "1",
			"x-etsi-mec-origin-type": "String"
		},
		"fixedBWPriority": {
			"description": "Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document",
			"enum": [
				"SEE_DESCRIPTION"
			],
			"type": "string",
			"x-etsi-mec-cardinality": "0..1",
			"x-etsi-mec-origin-type": "Enum"
		},
		"requestType": {
			"description": "Numeric value (0 - 255) corresponding to specific type of consumer as following: 0 = APPLICATION_SPECIFIC_BW_ALLOCATION 1 = SESSION_SPECIFIC_BW_ALLOCATION",
			"type": "integer",
			"enum": [
				0,
				1
			],
			"x-etsi-mec-cardinality": "1",
			"x-etsi-mec-origin-type": "Enum_inlined"
		},
		"sessionFilter": {
			"description": "Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected",
			"items": {
				"type": "object",
				"properties": {
					"dstAddress": {
						"description": "Destination address identity of session (including range)",
						"type": "string",
						"x-etsi-mec-cardinality": "0..1",
						"x-etsi-mec-origin-type": "String"
					},
					"dstPort": {
						"description": "Destination port identity of session",
						"items": {
							"type": "string"
						},
						"minItems": 0,
						"type": "array",
						"x-etsi-mec-cardinality": "0..N",
						"x-etsi-mec-origin-type": "String"
					},
					"protocol": {
						"description": "Protocol number",
						"type": "string",
						"x-etsi-mec-cardinality": "0..1",
						"x-etsi-mec-origin-type": "String"
					},
					"sourceIp": {
						"description": "Source address identity of session (including range)",
						"type": "string",
						"x-etsi-mec-cardinality": "0..1",
						"x-etsi-mec-origin-type": "String"
					},
					"sourcePort": {
						"description": "Source port identity of session",
						"items": {
							"type": "string"
						},
						"minItems": 0,
						"type": "array",
						"x-etsi-mec-cardinality": "0..N",
						"x-etsi-mec-origin-type": "String"
					}
				}
			},
			"minItems": 0,
			"type": "array",
			"x-etsi-mec-cardinality": "0..N",
			"x-etsi-mec-origin-type": "Structure (inlined)"
		},
		"timeStamp": {
			"description": "Time stamp to indicate when the corresponding information elements are sent",
			"properties": {
				"nanoSeconds": {
					"description": "The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC",
					"format": "uint32",
					"type": "integer",
					"x-etsi-mec-cardinality": "1",
					"x-etsi-mec-origin-type": "Uint32"
				},
				"seconds": {
					"format": "uint32",
					"type": "integer",
					"description": "The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC",
					"x-etsi-mec-cardinality": "1",
					"x-etsi-mec-origin-type": "Uint32"
				}
			},
			"required": [
				"seconds",
				"nanoSeconds"
			],
			"type": "object",
			"x-etsi-mec-cardinality": "0..1",
			"x-etsi-mec-origin-type": "Structure (inlined)"
		}
	},
	"required": [
		"appInsId",
		"requestType",
		"fixedAllocation",
		"allocationDirection"
	],
	"type": "object",
	"x-etsi-ref": "7.2.2"
}
}
 No newline at end of file
Loading