Commit baca6346 authored by aureliano sinatra's avatar aureliano sinatra
Browse files

LifecycleOperationGrantingR1

parent c331196b
Loading
Loading
Loading
Loading
+17 −10
Original line number Original line Diff line number Diff line
@@ -9,6 +9,7 @@ Documentation This resource represents grants. The client can use this resour


*** Variables ***
*** Variables ***
${response}    {}
${response}    {}
${wait_time}   2 min   10 sec


*** Test Cases ***
*** Test Cases ***
Requests a grant for a particular VNF lifecycle operation - Synchronous mode
Requests a grant for a particular VNF lifecycle operation - Synchronous mode
@@ -17,12 +18,12 @@ 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
    ...    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: 
    ...    Pre-conditions: 
    ...    Reference: section 9.4.2.3.1 - SOL003 v2.4.1
    ...    Reference: section 9.4.2.3.1 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: The NFVO can decide immediately what to respond to a grant request
    ...    Applicability: The NFVO can decide immediately what to respond to a grant request
    ...    Post-Conditions: The grant information is available to the VNFM.
    ...    Post-Conditions: The grant information is available to the VNFM.
    Send Request Grant Request in Synchronous mode
    Send Request Grant Request in Synchronous mode
    Check HTTP Response Status Code Is    201
    Check HTTP Response Status Code Is    201
    Check HTTP Response Header Contains    Location
    Check Operation Occurrence Id existence 
    Check HTTP Response Body Json Schema Is    grant
    Check HTTP Response Body Json Schema Is    grant




@@ -32,14 +33,14 @@ 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 
    ...    Test objective: The objective is to request a grant for a particular VNF lifecycle operation 
    ...    Pre-conditions: 
    ...    Pre-conditions: 
    ...    Reference: section 9.4.2.3.1 - SOL003 v2.4.1
    ...    Reference: section 9.4.2.3.1 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: The NFVO can not decide immediately what to respond to a grant request
    ...    Applicability: The NFVO can not decide immediately what to respond to a grant request
    ...    Post-Conditions: The grant information is available to the VNFM.
    ...    Post-Conditions: The grant information is available to the VNFM.
    Send Request Grant Request in Asynchronous mode
    Send Request Grant Request in Asynchronous mode
    Check HTTP Response Status Code Is    202
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location
    Check Operation Occurrence Id existence 
    Check HTTP Response Body Json Schema Is    grant
    Check HTTP Response Body Json Schema Is    grant
    Wait Until Keyword Succeeds    2 min   10 sec    Get an individual grant - Successful
    Wait for individual grant successful notification 


Requests a grant for a particular VNF lifecycle operation - Forbidden 
Requests a grant for a particular VNF lifecycle operation - Forbidden 
    [Documentation]    Test ID: 7.3.2.1.3
    [Documentation]    Test ID: 7.3.2.1.3
@@ -47,7 +48,7 @@ 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 check the content of the problem details data structure returned
    ...    Test objective: The objective is to request a grant for a particular VNF lifecycle operation and check the content of the problem details data structure returned
    ...    Pre-conditions: The grant should not be accorded
    ...    Pre-conditions: The grant should not be accorded
    ...    Reference: section 9.4.2.3.2 - SOL003 v2.4.1
    ...    Reference: section 9.4.2.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
    Send Request a new Grant Forbiden
    Send Request a new Grant Forbiden
@@ -60,7 +61,7 @@ GET Grants - Method not implemented
    ...    Test objective: The objective is to test that GET method is not allowed for Life cycle operation granting 
    ...    Test objective: The objective is to test that GET method is not allowed for Life cycle operation granting 
    ...    Pre-conditions: none
    ...    Pre-conditions: none
    ...    Reference: section 9.4.2.3.2 - SOL003 v2.4.1
    ...    Reference: section 9.4.2.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions:   none
    ...    Post-Conditions:   none
    Get Grants
    Get Grants
@@ -72,7 +73,7 @@ PUT Grants - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed for Life cycle operation granting 
    ...    Test objective: The objective is to test that PUT method is not allowed for Life cycle operation granting 
    ...    Pre-conditions: none
    ...    Pre-conditions: none
    ...    Reference: section 9.4.2.3.3 - SOL003 v2.4.1
    ...    Reference: section 9.4.2.3.3 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
    Put Grants
    Put Grants
@@ -84,7 +85,7 @@ PATCH Grants - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed for Life cycle operation granting  
    ...    Test objective: The objective is to test that PATCH method is not allowed for Life cycle operation granting  
    ...    Pre-conditions: none
    ...    Pre-conditions: none
    ...    Reference: section 9.4.2.3.4 - SOL003 v2.4.1
    ...    Reference: section 9.4.2.3.4 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none 
    ...    Post-Conditions: none 
    Patch Grants
    Patch Grants
@@ -96,13 +97,15 @@ DELETE Grants - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed for Life cycle operation granting  
    ...    Test objective: The objective is to test that DELETE method is not allowed for Life cycle operation granting  
    ...    Pre-conditions: none
    ...    Pre-conditions: none
    ...    Reference: section 9.4.2.3.5 - SOL003 v2.4.1
    ...    Reference: section 9.4.2.3.5 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
    Delete Grants
    Delete Grants
    Check HTTP Response Status Code Is    405
    Check HTTP Response Status Code Is    405
    
    
*** Keywords ***
*** Keywords ***
Wait for individual grant successful notification
    Wait Until Keyword Succeeds    ${wait_time}    Get an individual grant - Successful
Send Request Grant Request in Synchronous mode
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}/${apiVersion}/grants
    Pass Execution If    ${SYNC_MODE} == 0    The Granting process is asynchronous mode. Skipping the test
    Pass Execution If    ${SYNC_MODE} == 0    The Granting process is asynchronous mode. Skipping the test
@@ -152,6 +155,10 @@ Check HTTP Response Status Code Is
    Should Be Equal As Strings    ${response['status']}    ${expected_status}
    Should Be Equal As Strings    ${response['status']}    ${expected_status}
    Log    Status code validated
    Log    Status code validated


Check Operation Occurrence Id existence 
    ${occId}=    Get Value From Json    ${response.headers}    $..Location
    Should Not Be Empty    ${occId}

Check HTTP Response Header Contains
Check HTTP Response Header Contains
    [Arguments]    ${CONTENT_TYPE}
    [Arguments]    ${CONTENT_TYPE}
    Should Contain    ${response['headers']}    ${CONTENT_TYPE}
    Should Contain    ${response['headers']}    ${CONTENT_TYPE}
+19 −19
Original line number Original line Diff line number Diff line
@@ -12,55 +12,55 @@ Documentation This resource represents an individual grant. The client can us
${response}    {}
${response}    {}


*** Test Cases ***
*** Test Cases ***
Post Individual Grant - Method not implemented
POST Individual Grant - Method not implemented
    [Documentation]    Test ID: 7.3.2.2.1
    [Documentation]    Test ID: 7.3.2.2.1
    ...    Test title: Post Individual Grant - Method not implemented
    ...    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  
    ...    Test objective: The objective is to test that POST method is not allowed for Life cycle operation granting  
    ...    Pre-conditions: none
    ...    Pre-conditions: none
    ...    Reference: section 9.4.2.3.4 - SOL003 v2.4.1
    ...    Reference: section 9.4.2.3.4 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none 
    ...    Post-Conditions: none 
    Post individual Grant
    Post individual Grant
    Check HTTP Response Status Code Is    405
    Check HTTP Response Status Code Is    405


Get an individual grant - Successful
GET an individual grant - Successful
    [Documentation]    Test ID: 7.3.2.2.2
    [Documentation]    Test ID: 7.3.2.2.2
    ...    Test title: Requests a grant for a particular VNF lifecycle operation - Successful  and perform a JSON schema validation on the returned grant data structure
    ...    Test title: GET an individual grant - Successful
    ...    Test objective: The objective is to request a grant for a particular VNF lifecycle operation 
    ...    Test objective: The objective is to request a grant for a particular VNF lifecycle operation 
    ...    Pre-conditions: The related grant information is available to the VNFM
    ...    Pre-conditions: The  grant information is available to the VNFM
    ...    Reference: section 9.4.3.3.2 - SOL003 v2.4.1
    ...    Reference: section 9.4.3.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
    Get individual grant success
    Get individual grant success
    Check HTTP Response Status Code Is    200
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    grant
    Check HTTP Response Body Json Schema Is    grant
    
    
Get an individual grant - Process ongoing
GET an individual grant - Process ongoing
    [Tags]    no-synchronous-mode
    [Tags]    no-synchronous-mode
    [Documentation]    Test ID: 7.3.2.2.3
    [Documentation]    Test ID: 7.3.2.2.3
    ...    Test title: Requests a grant for a particular VNF lifecycle operation - Process ongoing
    ...    Test title: GET an individual grant - Process ongoing
    ...    Test objective: The objective is to request a grant for a particular VNF lifecycle operation 
    ...    Test objective: The objective is to request a grant for a particular VNF lifecycle operation 
    ...    Pre-conditions: The process of creating the grant is ongoing, no grant is available yet.
    ...    Pre-conditions: The process of creating the grant is ongoing, no grant is available yet.
    ...    Reference: section 9.4.3.3.2 - SOL003 v2.4.1
    ...    Reference: section 9.4.3.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
    Get individual grant on-going
    Get individual grant on-going
    Check HTTP Response Status Code Is    202
    Check HTTP Response Status Code Is    202
    Check HTTP Response Body Json Schema Is    grant
    Check HTTP Response Body Json Schema Is    grant
    
    
Get an individual grant - grant rejected
GET an individual grant - grant rejected
    [Tags]    no-synchronous-mode
    [Tags]    no-synchronous-mode
    [Documentation]    Test ID: 7.3.2.2.4
    [Documentation]    Test ID: 7.3.2.2.4
    ...    Test title: Requests a grant for a particular VNF lifecycle operation - grant rejected
    ...    Test title: GET an individual grant - grant rejected
    ...    Test objective: The objective is to request a grant for a particular VNF lifecycle operation 
    ...    Test objective: The objective is to request a grant for a particular VNF lifecycle operation 
    ...    Pre-conditions: The related grant is rejected
    ...    Pre-conditions: 
    ...    Reference: section 9.4.3.3.2 - SOL003 v2.4.1
    ...    Reference: section 9.4.3.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: The grant is rejected
    Get individual grant rejected
    Get individual grant rejected
    Check HTTP Response Status Code Is    403
    Check HTTP Response Status Code Is    403
	Check HTTP Response Body Json Schema Is    ProblemDetails
	Check HTTP Response Body Json Schema Is    ProblemDetails
@@ -71,7 +71,7 @@ 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  
    ...    Test objective: The objective is to test that PUT method is not allowed to for Life cycle operation granting  
    ...    Pre-conditions: none
    ...    Pre-conditions: none
    ...    Reference: section 9.4.3.3.3 - SOL003 v2.4.1
    ...    Reference: section 9.4.3.3.3 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none 
    ...    Post-Conditions: none 
    PUT individual Grant
    PUT individual Grant
@@ -83,7 +83,7 @@ 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  
    ...    Test objective: The objective is to test that PATCH method is not allowed to for Life cycle operation granting  
    ...    Pre-conditions: none
    ...    Pre-conditions: none
    ...    Reference: section 9.4.3.3.4 - SOL003 v2.4.1
    ...    Reference: section 9.4.3.3.4 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none 
    ...    Post-Conditions: none 
    Patch individual Grant
    Patch individual Grant
@@ -95,9 +95,9 @@ 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  
    ...    Test objective: The objective is to test that DELETE method is not allowed to for Life cycle operation granting  
    ...    Pre-conditions: none
    ...    Pre-conditions: none
    ...    Reference: section 9.4.3.3.5 - SOL003 v2.4.1
    ...    Reference: section 9.4.3.3.5 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none 
    ...    Post-Conditions: grant not deleted
    Delete individual Grant
    Delete individual Grant
    Check HTTP Response Status Code Is    405
    Check HTTP Response Status Code Is    405