Commit 01a6bea9 authored by Elian Kraja's avatar Elian Kraja
Browse files

Fix issue #71

parent 0d00a9b3
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ POST Scale a vnfInstance
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
    ...    Post-Conditions: none
    POST Scale vnfInstance  
    POST Scale vnfInstance    0
    Check HTTP Response Status Code Is    202
    Check Operation Occurrence Id

@@ -30,7 +30,7 @@ POST Scale a vnfInstance Conflict (Not-Instantiated)
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
    ...    Post-Conditions: none
    POST Scale vnfInstance  
    POST Scale vnfInstance    1
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is    ProblemDetails 

@@ -43,7 +43,7 @@ POST Scale a vnfInstance Not Found
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
    ...    Post-Conditions: none
    POST Scale vnfInstance
    POST Scale vnfInstance    2
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is    ProblemDetails 
   
+26 −4
Original line number Diff line number Diff line
@@ -252,16 +252,38 @@ DELETE instantiate individual vnfInstance
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 	
	

POST Scale vnfInstance
    [Arguments]    ${vnf_state}
    [Documentation]    ${vnf_state} differentiate the VNF ID to be used in the different POST requests
    ...    ${vnf_state} == 0 -> VNF in instantiated state
    ...    ${vnf_state} == 1 -> VNF in not_instantiated state
    ...    ${vnf_state} == 2 -> VNF ID not stored
    ...     
    Log    Trying to Instantiate a vnf Instance
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ${template}=    Get File    jsons/scaleVnfRequest.json
    ${body}=        Format String   ${template}     scaleVnfRequesttype=${scaleVnfRequesttype}    scaleVnfRequestAspect=${scaleVnfRequestAspect} 
    ${body}=    Get File    jsons/scaleVnfRequest.json
    Run Keyword If    ${vnf_state} == 0    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${instantiatedVnfInstanceId}/scale    ${body}
    Run Keyword If    ${vnf_state} == 1    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/scale    ${body}
    Run Keyword If    ${vnf_state} == 2    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${NOT_EXISTANT_VNF_INSTANCE_ID}/scale    ${body}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale    ${body}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale    ${body}
	${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 


# POST Scale vnfInstance	
    # Log    Trying to Instantiate a vnf Instance
    # Set Headers  {"Accept":"${ACCEPT}"}  
    # Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    # Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    # ${template}=    Get File    jsons/scaleVnfRequest.json
    # ${body}=        Format String   ${template}     scaleVnfRequesttype=${scaleVnfRequesttype}    scaleVnfRequestAspect=${scaleVnfRequestAspect} 
    # Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale    ${body}
    # ${outputResponse}=    Output    response
	# Set Global Variable    ${response}    ${outputResponse} 
GET Scale vnfInstance				
    Log    Trying to get a scale a vnf Instance
    Set Headers  {"Accept":"${ACCEPT}"}  
+2 −1
Original line number Diff line number Diff line
@@ -38,7 +38,8 @@ ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
${VnfLcmOperationOccurrenceNotification}    {}
${VnfIdentifierCreationNotification}    {}
${VnfIdentifierDeletionNotification}    {}

${notInstantiatedVnfInstanceId}    NOT_INSTANTIATED_VNF_INSTANCE_ID
${NOT_EXISTANT_VNF_INSTANCE_ID}    NOT_EXISTANT_VNF_INSTANCE_ID    
${SYNC_MODE}    0

${callback_uri}    http://localhost