Commit 75083919 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

Merge branch '2.7.1-dev-SOL003-VNFLifecycleOperationGranting-API' into '2.7.1-dev'

SOL003 VNF Lifecycle Operation Granting - Implementation of deltas between v2.7.1 and v2.6.1

See merge request nfv/api-tests!122
parents 58383382 88a07486
Loading
Loading
Loading
Loading
+212 −212
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ POST API Version - Method not implemented
    ...    Test title: POST API version - Method not implemented
    ...    Test objective: The objective is to test that POST method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1
    ...    Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none    
@@ -25,7 +25,7 @@ GET API Version
    ...    Test title: GET API Version
    ...    Test objective: The objective is to test that GET method successfully return ApiVersionInformation
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1
    ...    Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -38,7 +38,7 @@ PUT API Version - Method not implemented
    ...    Test title: PUT API Version - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1
    ...    Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -50,7 +50,7 @@ PATCH API Version - Method not implemented
    ...    Test title: PATCH API Version - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1
    ...    Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -62,7 +62,7 @@ DELETE API Version - Method not implemented
    ...    Test title: DELETE API Version - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1
    ...    Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -74,7 +74,7 @@ POST API Version with apiMajorVerion - Method not implemented
    ...    Test title: POST API version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that POST method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1
    ...    Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none    
@@ -86,7 +86,7 @@ GET API Version with apiMajorVerion
    ...    Test title: GET API Version with apiMajorVerion
    ...    Test objective: The objective is to test that GET method successfully return ApiVersionInformation
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1
    ...    Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -99,7 +99,7 @@ PUT API Version with apiMajorVerion - Method not implemented
    ...    Test title: PUT API Version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1
    ...    Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -111,7 +111,7 @@ PATCH API Version with apiMajorVerion - Method not implemented
    ...    Test title: PATCH API Version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1
    ...    Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -123,7 +123,7 @@ DELETE API Version with apiMajorVerion - Method not implemented
    ...    Test title: DELETE API Version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1
    ...    Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -134,70 +134,70 @@ DELETE API Version with apiMajorVerion - Method not implemented
POST API Version
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Post    ${apiRoot}/${apiName}/api_version
    Post    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
GET API Version
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/api_version
    Get    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
PUT API Version
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Put    ${apiRoot}/${apiName}/api_version
    Put    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
PATCH API Version
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Patch    ${apiRoot}/${apiName}/api_version
    Patch    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
DELETE API Version
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Delete    ${apiRoot}/${apiName}/api_version
    Delete    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
POST API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Post    ${apiRoot}/${apiName}/v1/api_version
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
GET API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/v1/api_version
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
PUT API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Put    ${apiRoot}/${apiName}/v1/api_version
    Put    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
PATCH API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Patch    ${apiRoot}/${apiName}/v1/api_version
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
DELETE API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Delete    ${apiRoot}/${apiName}/v1/api_version
    Delete    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
+27 −23
Original line number Diff line number Diff line
*** Settings ***
Library    String
Resource   environment/variables.txt 
Library    REST    ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}    ssl_verify=false
Library    OperatingSystem
@@ -18,7 +19,7 @@ Requests a grant for a particular VNF lifecycle operation - Synchronous mode
    ...    Test title: Requests a grant for a particular VNF lifecycle operation - Synchronous mode
    ...    Test objective: The objective is to request a grant for a particular VNF lifecycle operation and perform a JSON schema validation on the returned grant data structure
    ...    Pre-conditions: 
    ...    Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1
    ...    Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: The NFVO can decide immediately what to respond to a grant request
    ...    Post-Conditions: The grant information is available to the VNFM.
@@ -27,13 +28,12 @@ Requests a grant for a particular VNF lifecycle operation - Synchronous mode
    Check Operation Occurrence Id existence 
    Check HTTP Response Body Json Schema Is    grant


Requests a grant for a particular VNF lifecycle operation - Asynchronous mode
    [Documentation]    Test ID: 7.3.2.1.2
    ...    Test title: Requests a grant for a particular VNF lifecycle operation - Asynchronous mode
    ...    Test objective: The objective is to request a grant for a particular VNF lifecycle operation and perform a JSON schema validation on the returned grant data structure
    ...    Pre-conditions: 
    ...    Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1
    ...    Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: The NFVO can not decide immediately what to respond to a grant request
    ...    Post-Conditions: The grant information is available to the VNFM.
@@ -48,7 +48,7 @@ Requests a grant for a particular VNF lifecycle operation - Forbidden
    ...    Test title: Requests a grant for a particular VNF lifecycle operation - Forbidden 
    ...    Test objective: The objective is to request a grant for a particular VNF lifecycle operation and the grant is rejected
    ...    Pre-conditions: none
    ...    Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1
    ...    Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -61,7 +61,7 @@ GET Grants - Method not implemented
    ...    Test title: GET Grants - Method not implemented
    ...    Test objective: The objective is to test that GET method is not allowed for Life cycle operation granting 
    ...    Pre-conditions: none
    ...    Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
    ...    Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions:   none
@@ -73,7 +73,7 @@ PUT Grants - Method not implemented
    ...    Test title: PUT Grants - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed for Life cycle operation granting 
    ...    Pre-conditions: none
    ...    Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.4.1
    ...    Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -85,7 +85,7 @@ PATCH Grants - Method not implemented
    ...    Test title: PATCH Grants - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed for Life cycle operation granting  
    ...    Pre-conditions: none
    ...    Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.4.1
    ...    Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -97,7 +97,7 @@ DELETE Grants - Method not implemented
    ...    Test title: DELETE Grants - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed for Life cycle operation granting  
    ...    Pre-conditions: none
    ...    Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.4.1
    ...    Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions:  resources are not deleted
@@ -109,35 +109,38 @@ DELETE Grants - Method not implemented
Wait for individual grant successful notification
    Wait Until Keyword Succeeds    ${retry}   ${polling}    Get an individual grant - Successful
Send Request Grant Request in Synchronous mode
    Log    Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants
    Log    Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants
    Pass Execution If    ${SYNC_MODE} == 0    The Granting process is asynchronous mode. Skipping the test
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ${body}=    Get File    jsons/grantRequest.json
    Post    ${apiRoot}/${apiName}/${apiVersion}/grants    ${body}
    ${template}=    Get File    jsons/grantRequest.json
    ${body}=        Format String   ${template}    vnfInstanceId=${vnfInstanceId}   vnfLcmOpOccId=${vnfLcmOpOccId}    vnfdId=${vnfdId}    flavourId=${flavourId}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/grants    ${body}
    ${body}=    Output    response
    Set Suite Variable    ${response}    ${body}
    
Send Request Grant Request in Asynchronous mode
    Log    Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants
    Log    Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants
    Pass Execution If    ${SYNC_MODE} == 1    The Granting process is synchronous mode. Skipping the test
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ${body}=    Get File    jsons/grantRequest.json
    Post    ${apiRoot}/${apiName}/${apiVersion}/grants    ${body}
    ${template}=    Get File    jsons/grantRequest.json
    ${body}=        Format String   ${template}    vnfInstanceId=${vnfInstanceId}   vnfLcmOpOccId=${vnfLcmOpOccId}    vnfdId=${vnfdId}    flavourId=${flavourId}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/grants    ${body}
    ${body}=    Output    response
    Set Suite Variable    ${response}    ${body}
    
Send Request for a new Grant Forbiden Operation   
    Log    Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants
    Log    Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants
    Log    The grant request should be rejected
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ${body}=    Get File    jsons/grantRejectedRequest.json
    Post    ${apiRoot}/${apiName}/${apiVersion}/grants    ${body}
    ${template}=    Get File    jsons/grantRejectedRequest.json
    ${body}=        Format String   ${template}    vnfInstanceId=${vnfInstanceId}   vnfLcmOpOccId=${vnfLcmOpOccId}    vnfdId=${vnfdId}    flavourId=${flavourId}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/grants    ${body}
    ${body}=    Output    response
    Set Suite Variable    ${response}    ${body}
   
@@ -145,8 +148,9 @@ Send Request Grant Request
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ${body}=    Get File    jsons/grantRequest.json
    Post    ${apiRoot}/${apiName}/${apiVersion}/grants    ${body}    allow_redirects=false
    ${template}=    Get File    jsons/grantRequest.json
    ${body}=        Format String   ${template}    vnfInstanceId=${vnfInstanceId}   vnfLcmOpOccId=${vnfLcmOpOccId}    vnfdId=${vnfdId}    flavourId=${flavourId}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/grants    ${body}    allow_redirects=false
    ${resp}    Output    response
    ${result}=    evaluate    json.loads(json.dumps(${resp}))    json
    Log  ${result}
@@ -183,7 +187,7 @@ Get Grants
    Log    Trying to perform a GET. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/${apiVersion}/grants
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/grants
    ${body}=    Output    response
    Set Suite Variable    ${response}    ${body}
    
@@ -191,7 +195,7 @@ Put Grants
    Log    Trying to perform a PUT. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Put    ${apiRoot}/${apiName}/${apiVersion}/grants
    Put    ${apiRoot}/${apiName}/${apiMajorVersion}/grants
    ${body}=    Output    response
    Set Suite Variable    ${response}    ${body}
    
@@ -199,7 +203,7 @@ Patch Grants
    Log    Trying to perform a PATCH. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Patch    ${apiRoot}/${apiName}/${apiVersion}/grants
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/grants
    ${body}=    Output    response
    Set Suite Variable    ${response}    ${body}
    
@@ -208,7 +212,7 @@ Delete Grants
    Log    Trying to perform a DELETE. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Delete    ${apiRoot}/${apiName}/${apiVersion}/grants
    Delete    ${apiRoot}/${apiName}/${apiMajorVersion}/grants
    ${body}=    Output    response
    Set Suite Variable    ${response}    ${body}
    
+13 −16
Original line number Diff line number Diff line
@@ -8,16 +8,13 @@ Documentation This resource represents an individual grant. The client can us
...    It is determined by means outside the scope of the present document, such as configuration or policy,
...    how long an individual grant is available.

*** Variables ***
${response}    {}

*** Test Cases ***
POST Individual Grant - Method not implemented
    [Documentation]    Test ID: 7.3.2.2.1
    ...    Test title: POST Individual Grant - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed for Life cycle operation granting  
    ...    Pre-conditions: none
    ...    Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.4.1
    ...    Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -29,7 +26,7 @@ GET an individual grant - Successful
    ...    Test title: GET an individual grant - Successful
    ...    Test objective: The objective is to retrieve a grant for a particular VNF Lifecycle Operation.
    ...    Pre-conditions: The  grant information is available to the VNFM
    ...    Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
    ...    Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -43,7 +40,7 @@ GET an individual grant - Process ongoing
    ...    Test title: GET an individual grant - Process ongoing
    ...    Test objective: The objective is to retrieve a grant for a particular VNF lifecycle operation when process is ongoing and no grant is available yet.
    ...    Pre-conditions: The process of creating the grant is ongoing, no grant is available yet.
    ...    Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
    ...    Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -57,7 +54,7 @@ GET an individual grant - grant rejected
    ...    Test title: GET an individual grant - grant rejected
    ...    Test objective: The objective is to retrieve a grant for a particular VNF Lifecycle Operation but error returned because grant has been rejected.
    ...    Pre-conditions: none
    ...    Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
    ...    Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -70,7 +67,7 @@ PUT an individual grant - Method not implemented
    ...    Test title: PUT an individual grant - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to for Life cycle operation granting  
    ...    Pre-conditions: none
    ...    Reference: Clause 9.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.4.1
    ...    Reference: Clause 9.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -82,7 +79,7 @@ PATCH an individual grant - Method not implemented
    ...    Test title: PATCH an individual grant - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to for Life cycle operation granting  
    ...    Pre-conditions: none
    ...    Reference: Clause 9.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.4.1
    ...    Reference: Clause 9.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -94,7 +91,7 @@ DELETE an individual grant - Method not implemented
    ...    Test title: DELETE an individual grant - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to for Life cycle operation granting  
    ...    Pre-conditions: none
    ...    Reference: Clause 9.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.4.1
    ...    Reference: Clause 9.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -106,14 +103,14 @@ Get individual grant
    log    Trying to read an individual grant
    Set Headers    {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId}
    ${body}=    Output    response
    Set Suite Variable    ${response}    ${body}
    
Check resource existence
    Set Headers    {"Accept":"${ACCEPT}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} 
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} 
    Integer    response status    200
    
Post individual Grant
@@ -121,7 +118,7 @@ Post individual Grant
    Pass Execution If    ${SYNC_MODE} == 1   Skipping. Synchronous mode is supported    
    Set Headers    {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId}
    ${body}=    Output    response
    Set Suite Variable    ${response}    ${body}
    
@@ -129,7 +126,7 @@ Put individual Grant
    Log    Trying to perform a GET. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Put    ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId}
    Put    ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId}
    ${body}=    Output    response
    Set Suite Variable    ${response}    ${body}
    
@@ -137,7 +134,7 @@ Patch individual Grant
    Log    Trying to perform a GET. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Patch    ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId}
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId}
    ${body}=    Output    response
    Set Suite Variable    ${response}    ${body}
    
@@ -145,7 +142,7 @@ Delete individual Grant
    Log    Trying to perform a GET. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Delete    ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId}
    Delete    ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId}
    ${body}=    Output    response
    Set Suite Variable    ${response}    ${body}
    
+7 −7
Original line number Diff line number Diff line
@@ -10,16 +10,11 @@ ${grantId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d

${apiRoot}        /
${apiName}        grant
${apiVersion}     v1
${apiMajorVersion}     v1

${SYNC_MODE}    1




${response}


${response}    {}

${VNFM_HOST}      localhost    # Hostname of the VNFM
${VNFM_PORT}      8080    # Listening port of the VNFM
@@ -42,3 +37,8 @@ ${sub_filter_invalid} filter_invalid
${subscriptionId}    6fc3539c-e602-4afa-8e13-962fb5a7d81f
${notification_ep}    notification
${VrQuotaAvailNotification}    {}

${vnfInstanceId}    myVnfInstanceId
${vnfLcmOpOccId}    myLcmOccId
${vnfdId}    myVnF
${flavourId}    string
 No newline at end of file
+12 −12

File changed.

Preview size limit exceeded, changes collapsed.

Loading