Commit 10e26138 authored by Mubeena Ishaq's avatar Mubeena Ishaq Committed by Giacomo Bernini
Browse files

resolve minor issues in SOL002 LCM API

parent 04c920b0
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2,4 +2,4 @@


This folder includes the NFV API conformance test descriptions for NFV SOL002 APIs.
This folder includes the NFV API conformance test descriptions for NFV SOL002 APIs.


The reference spec version is v3.5.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.06.01_60/gs_NFV-SOL002v030601p.pdf
The reference spec version is v4.3.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/04.03.01_60/gs_NFV-SOL002v040301p.pdf
+27 −26
Original line number Original line Diff line number Diff line
@@ -23,31 +23,6 @@ POST Instantiate a vnfInstance
    Check HTTP Response Status Code Is    202
    Check HTTP Response Status Code Is    202
    Check Operation Occurrence Id
    Check Operation Occurrence Id
   
   
POST Instantiate a vnfInstance with TaretScaleLevelId
    [Documentation]    Test ID: 6.3.5.3.1
    ...    Test title: POST Instantiate a vnfInstance
    ...    Test objective: The objective is to instantiate a VNF instance
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.3.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
    ...    Post-Conditions: none
    POST instantiate individual vnfInstance with TargetScaleLevelId
    Check HTTP Response Status Code Is    202
    Check Operation Occurrence Id    

POST Instantiate individual vnfInstance with instantiationLevelId
    [Documentation]    Test ID: 6.3.5.3.1
    ...    Test title: POST Instantiate a vnfInstance
    ...    Test objective: The objective is to instantiate a VNF instance
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.3.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
    ...    Post-Conditions: none
    POST instantiate individual vnfInstance with instantiationLevelId
    Check HTTP Response Status Code Is    202
    Check Operation Occurrence Id    
POST Instantiate a vnfInstance Conflict
POST Instantiate a vnfInstance Conflict
    [Documentation]    Test ID: 6.3.5.3.2
    [Documentation]    Test ID: 6.3.5.3.2
    ...    Test title: POST Instantiate a vnfInstance Conflict
    ...    Test title: POST Instantiate a vnfInstance Conflict
@@ -109,6 +84,32 @@ DELETE Instantiate VNFInstance - Method not implemented
    DELETE instantiate individual vnfInstance   
    DELETE instantiate individual vnfInstance   
    Check HTTP Response Status Code Is    405
    Check HTTP Response Status Code Is    405


POST Instantiate a vnfInstance with TaretScaleLevelId
    [Documentation]    Test ID: 6.3.5.3.7
    ...    Test title: POST Instantiate a vnfInstance with TaretScaleLevelId attribute
    ...    Test objective: The objective is to instantiate a VNF instance
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.3.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
    ...    Post-Conditions: none
    POST instantiate individual vnfInstance with TargetScaleLevelId
    Check HTTP Response Status Code Is    202
    Check Operation Occurrence Id    

POST Instantiate individual vnfInstance with instantiationLevelId
    [Documentation]    Test ID: 6.3.5.3.8
    ...    Test title: POST Instantiate a vnfInstance with instantiationLevelId attribute
    ...    Test objective: The objective is to instantiate a VNF instance
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.3.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
    ...    Post-Conditions: none
    POST instantiate individual vnfInstance with instantiationLevelId
    Check HTTP Response Status Code Is    202
    Check Operation Occurrence Id 

*** Keywords ***
*** Keywords ***
Check resource existence
Check resource existence
    Set Headers    {"Accept":"${ACCEPT}"}  
    Set Headers    {"Accept":"${ACCEPT}"}  
+1 −1
Original line number Original line Diff line number Diff line
@@ -9,7 +9,7 @@ Library JSONSchemaLibrary schemas/
*** Test Cases ***
*** Test Cases ***
POST Scale a vnfInstance to level with Attribute instantiationLevelId
POST Scale a vnfInstance to level with Attribute instantiationLevelId
    [Documentation]    Test ID: 6.3.5.5.1
    [Documentation]    Test ID: 6.3.5.5.1
    ...    Test title: POST Scale a vnfInstance to level
    ...    Test title: POST Scale a vnfInstance to level with instantiationLevelId attribute
    ...    Test objective: The objective is to scale a VNF instance to a target level.
    ...    Test objective: The objective is to scale a VNF instance to a target level.
    ...    Pre-conditions: none
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v4.3.1
    ...    Reference: Clause 5.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v4.3.1
+24 −22
Original line number Original line Diff line number Diff line
@@ -431,27 +431,6 @@ POST instantiate individual vnfInstance
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate    ${body}	
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate    ${body}	
    ${outputResponse}=    Output    response
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 	
	Set Global Variable    ${response}    ${outputResponse} 	
POST Instantiate individual vnfInstance with instantiationLevelId
    Log    Trying to Instantiate a vnf Instance with instantiationLevelId
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template}=    Get File    jsons/instantiateVnfRequestWithInstantiationLevelId.json
    ${body}=        Format String   ${template}     flavourId=${flavourId}     instantiationLevelId=${instantiationLevelId} 
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate    ${body}	
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 	

POST instantiate individual vnfInstance with targetScaleLevelId
    Log    Trying to Instantiate a vnf Instance with targetScaleLevelId
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template}=    Get File    jsons/instantiateVnfRequestWithTargetScaleLevelInfo.json
    ${body}=        Format String   ${template}     flavourId=${flavourId}    aspectId=${scaleVnfRequestAspect}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate    ${body}	
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}     
	
	
GET instantiate individual vnfInstance
GET instantiate individual vnfInstance
    log    Trying to perform a GET. This method should not be implemented
    log    Trying to perform a GET. This method should not be implemented
@@ -709,7 +688,8 @@ POST Change External VNF Connectivity
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${body}=    Get File    jsons/changeExtVnfConnectivityRequest.json
    ${template}=    Get File    jsons/changeExtVnfConnectivityRequest.json
    ${body}=        Format String   ${template}     CPD_IDs=${CPD_IDs}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn    ${body}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn    ${body}
    ${outputResponse}=    Output    response
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}  
	Set Global Variable    ${response}    ${outputResponse}  
@@ -1654,3 +1634,25 @@ Match the VNF LCM Operation Occurence Response Attributes with Descriptors
    List Should Contain Value    ${VDU_IDs}    ${response['body']['resourceChanges']['affectedVnfcs'][0]['vduId']}    
    List Should Contain Value    ${VDU_IDs}    ${response['body']['resourceChanges']['affectedVnfcs'][0]['vduId']}    
    List Should Contain value    ${Storage_IDs}    ${response['body']['resourceChanges']['affectedVirtualStorages'][0]['virtualStorageDescId']}
    List Should Contain value    ${Storage_IDs}    ${response['body']['resourceChanges']['affectedVirtualStorages'][0]['virtualStorageDescId']}
    List Should Contain Value    ${VirtualLink_IDs}    ${response['body']['resourceChanges']['affectedVirtualLinks'][0]['vnfVirtualLinkDescId']}
    List Should Contain Value    ${VirtualLink_IDs}    ${response['body']['resourceChanges']['affectedVirtualLinks'][0]['vnfVirtualLinkDescId']}

POST Instantiate individual vnfInstance with instantiationLevelId
    Log    Trying to Instantiate a vnf Instance with instantiationLevelId
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template}=    Get File    jsons/instantiateVnfRequestWithInstantiationLevelId.json
    ${body}=        Format String   ${template}     flavourId=${flavourId}     instantiationLevelId=${instantiationLevelId} 
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate    ${body}	
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 	

POST instantiate individual vnfInstance with targetScaleLevelId
    Log    Trying to Instantiate a vnf Instance with targetScaleLevelId
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template}=    Get File    jsons/instantiateVnfRequestWithTargetScaleLevelInfo.json
    ${body}=        Format String   ${template}     flavourId=${flavourId}    scaleVnfRequestAspect=${scaleVnfRequestAspect}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate    ${body}	
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}     
 No newline at end of file