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

Merge branch '2.7.1-dev' into '2.7.1-dev-SOL005-reference-descriptors'

# Conflicts:
#   SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot
parents c92a3ef7 47589eb5
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -206,6 +206,6 @@ Check HTTP Response Status Code Is


Check HTTP Response Body Json Schema Is
Check HTTP Response Body Json Schema Is
    [Arguments]    ${input}
    [Arguments]    ${input}
    ${schema} =    Catenate    ${input}    .schema.json
    ${schema} =    Catenate    SEPARATOR=    ${input}    .schema.json
    Validate Json    ${schema}    ${response['body']}
    Validate Json    ${schema}    ${response['body']}
    Log    Json Schema Validation OK
    Log    Json Schema Validation OK
 No newline at end of file
+1 −1
Original line number Original line Diff line number Diff line
@@ -208,6 +208,6 @@ Check HTTP Response Status Code Is


Check HTTP Response Body Json Schema Is
Check HTTP Response Body Json Schema Is
    [Arguments]    ${input}
    [Arguments]    ${input}
    ${schema} =    Catenate    ${input}    .schema.json
    ${schema} =    Catenate    SEPARATOR=    ${input}    .schema.json
    Validate Json    ${schema}    ${response['body']}
    Validate Json    ${schema}    ${response['body']}
    Log    Json Schema Validation OK
    Log    Json Schema Validation OK
 No newline at end of file
+65 −47
Original line number Original line Diff line number Diff line
@@ -22,33 +22,46 @@ Create a new subscription
    Check HTTP Response Header Contain Link
    Check HTTP Response Header Contain Link
    Check Postcondition resource exists
    Check Postcondition resource exists


Create a new Subscription - DUPLICATION
# Create a new Subscription - DUPLICATION
     [Documentation]    Test ID: 6.3.4.4.2
     # [Documentation]    Test ID: 6.3.4.4.2
    ...    Test title: Create a new Subscription - DUPLICATION
    # ...    Test title: Create a new Subscription - DUPLICATION
    # ...    Test objective: The objective is to create a duplicate subscription.
    # ...    Pre-conditions: subscription with the same filter and callbackUri exists
    # ...    Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1
    # ...    Config ID: Config_prod_VNFM
    # ...    Applicability: the VNFM does not allow creation of a subscription resource if another subscription resource with the same filter and callbackUri already exists
    # ...    Post-Conditions: duplicated subscription is created
    # Post Create subscription - DUPLICATION
    # Check HTTP Response Status Code Is    201
    # Check HTTP Response Body Json Schema Is    FmSubscription
    # Check HTTP Response Header Contain Link
    # Check Postcondition Duplicate Subscription exsist
    
# Create a new Subscription - NO-DUPLICATION
    # [Documentation]    Test ID: 6.3.4.4.3
    # ...    Test title: Create a new Subscription - NO-DUPLICATION
    # ...    Test objective: The objective is to create a subscription in case of not allowed DUPLICATION.
    # ...    Pre-conditions: subscription with the same filter and callbackUri exists
    # ...    Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1
    # ...    Config ID: Config_prod_VNFM
    # ...    Applicability: the VNFM does not allow creation of a duplicate subscription resource 
    # ...    Post-Conditions: duplicated subscription is not created
    # Post Create subscription - DUPLICATION
    # Check HTTP Response Status Code Is    303
    # Check HTTP Response Header Contain Link

Create a duplicated Subscription
     [Documentation]    Test ID: 6.3.4.4.2a
    ...    Test title: Create a duplicated Subscription
    ...    Test objective: The objective is to create a duplicate subscription.
    ...    Test objective: The objective is to create a duplicate subscription.
    ...    Pre-conditions: subscription with the same filter and callbackUri exists
    ...    Pre-conditions: subscription with the same filter and callbackUri exists
    ...    Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: the VNFM does not allow creation of a subscription resource if another subscription resource with the same filter and callbackUri already exists
    ...    Applicability: 
    ...    Post-Conditions: duplicated subscription is created
    ...    Post-Conditions: duplicated subscription is created if the IUT allows duplications, otherwise the duplicated subscription is not created
    Post Create subscription - DUPLICATION
    Post Create subscription
    Check HTTP Response Status Code Is    201
    Check Response for duplicated subscription
    Check HTTP Response Body Json Schema Is    FmSubscription
    Check HTTP Response Header Contain Link
    Check Postcondition Duplicate Subscription exsist


Create a new Subscription - NO-DUPLICATION
    [Documentation]    Test ID: 6.3.4.4.3
    ...    Test title: Create a new Subscription - NO-DUPLICATION
    ...    Test objective: The objective is to create a subscription in case of not allowed DUPLICATION.
    ...    Pre-conditions: subscription with the same filter and callbackUri exists
    ...    Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: the VNFM does not allow creation of a duplicate subscription resource 
    ...    Post-Conditions: duplicated subscription is not created
    Post Create subscription - DUPLICATION
    Check HTTP Response Status Code Is    303
    Check HTTP Response Header Contain Link


GET Subscriptions
GET Subscriptions
    [Documentation]    Test ID: 6.3.4.4.4
    [Documentation]    Test ID: 6.3.4.4.4
@@ -307,32 +320,32 @@ Post Create subscription
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ${template}=    Get File    jsons/fmSubscriptionRequest.json
    ${template}=    Get File    jsons/fmSubscriptionRequest.json
    ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_endpoint=${callback_endpoint}
    ${body}=        Format String   ${template}     callback_uri=${callback_uri}:${callback_port}    callback_endpoint=${callback_endpoint}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions    ${body}
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}				
Post Create subscription - DUPLICATION
    Log    Trying to create a subscription with an already created content
    Pass Execution If    ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0    NVFO is not permitting duplication. Skipping the test
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ${template}=    Get File    jsons/fmSubscriptionRequest.json
    ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_endpoint=${callback_endpoint}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions    ${body}		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}			
Post Create subscription - NO-DUPLICATION	
    Log    Trying to create a subscription with an already created content
    Pass Execution If    ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1    VNFM permits duplication. Skipping the test
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ${template}=    Get File    jsons/fmSubscriptionRequest.json
    ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_endpoint=${callback_endpoint}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions    ${body}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions    ${body}
    ${outputResponse}=    Output    response
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}				
	Set Global Variable    ${response}    ${outputResponse}				
# Post Create subscription - DUPLICATION
    # Log    Trying to create a subscription with an already created content
    # Pass Execution If    ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0    NVFO is not permitting duplication. Skipping the test
    # Set Headers    {"Accept": "${ACCEPT}"}
    # Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    # Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    # ${template}=    Get File    jsons/fmSubscriptionRequest.json
    # ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_endpoint=${callback_endpoint}
    # Post    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions    ${body}		
    # ${outputResponse}=    Output    response
	# Set Global Variable    ${response}    ${outputResponse}			
# Post Create subscription - NO-DUPLICATION	
    # Log    Trying to create a subscription with an already created content
    # Pass Execution If    ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1    VNFM permits duplication. Skipping the test
    # Set Headers    {"Accept": "${ACCEPT}"}
    # Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    # Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    # ${template}=    Get File    jsons/fmSubscriptionRequest.json
    # ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_endpoint=${callback_endpoint}
    # Post    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions    ${body}
    # ${outputResponse}=    Output    response
	# Set Global Variable    ${response}    ${outputResponse}		
Get subscriptions
Get subscriptions
    Log    Get the list of active subscriptions
    Log    Get the list of active subscriptions
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Accept":"${ACCEPT}"}  
@@ -506,3 +519,8 @@ Check Postcondition resource exists


Check Postcondition Duplicate Subscription exsist
Check Postcondition Duplicate Subscription exsist
    Should Not Be Equal As Strings    ${response['body']['callbackUri']}    ${subscriptionId} 
    Should Not Be Equal As Strings    ${response['body']['callbackUri']}    ${subscriptionId} 
   
Check Response for duplicated subscription
    Run Keyword If    ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1    Check HTTP Response Status Code Is    201
    Run Keyword If    ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1    Check HTTP Response Body Json Schema Is    FmSubscription
    Run Keyword If    ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0    Check HTTP Response Status Code Is    303
+1 −1
Original line number Original line Diff line number Diff line
@@ -208,6 +208,6 @@ Check HTTP Response Status Code Is


Check HTTP Response Body Json Schema Is
Check HTTP Response Body Json Schema Is
    [Arguments]    ${input}
    [Arguments]    ${input}
    ${schema} =    Catenate    ${input}    .schema.json
    ${schema} =    Catenate    SEPARATOR=    ${input}    .schema.json
    Validate Json    ${schema}    ${response['body']}
    Validate Json    ${schema}    ${response['body']}
    Log    Json Schema Validation OK
    Log    Json Schema Validation OK
 No newline at end of file
+2 −2
Original line number Original line Diff line number Diff line
@@ -219,7 +219,7 @@ Send Post Request for VNF Indicator Subscription
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${template}=    Get File    jsons/subscriptions.json
    ${template}=    Get File    jsons/subscriptions.json
    ${body}=        Format String    ${template}     callback_uri=${callback_uri}    callback_endpoint=${callback_endpoint}
    ${body}=        Format String    ${template}     callback_uri=${callback_uri}:${callback_port}    callback_endpoint=${callback_endpoint}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    POST    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions    ${body}
    POST    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions    ${body}
    ${output}=    Output    response
    ${output}=    Output    response
Loading