Commit 62570f70 authored by sinatra's avatar sinatra
Browse files

Merge branch 'feature/refactoring' into 'master'

Feature/refactoring

See merge request stf/stf-557/api-tests!5
parents acaebfd8 90004c2b
Loading
Loading
Loading
Loading
+74 −61
Original line number Original line Diff line number Diff line
*** Settings ***
*** Settings ***
Resource    environment/configuration.txt
Resource    environment/configuration.txt
Resource    environment/variables.txt
Resource    environment/variables.txt
Resource    VnfLcmMntOperationKeywords.robot
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} 
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} 
Library    DependencyLibrary
Library    DependencyLibrary
Library    JSONLibrary
Library    JSONLibrary
@@ -10,79 +11,91 @@ Suite Setup Check resource existance


*** Test Cases ***
*** Test Cases ***
Post Cancel operation task
Post Cancel operation task
    [Documentation]    The POST method initiates cancelling an ongoing VNF lifecycle operation while it is being executed or rolled back, i.e.
    [Documentation]    Test ID: 7.3.1.16.1
    ...    the related "VNF LCM operation occurrence" is either in "PROCESSING" or "ROLLING_BACK" state.
    ...    Test title: POST Cancel operation task
    Log    Cancel an ongoing VNF lifecycle operation
    ...    Test objective: The POST method initiates cancelling an ongoing VNF lifecycle operation while it is being executed or rolled back, i.e. the related "VNF LCM operation occurrence" is either in "PROCESSING" or "ROLLING_BACK" state.
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Pre-conditions: none
    Log    Cancel a VNF lifecycle operation
    ...    Reference:  section 5.4.17.3.1 - SOL003 v2.4.1
    Post    ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel    ${CancelMode}
    ...    Config ID: Config_prod_VNFM
    Log    Validate Status code
    ...    Applicability: none
    Integer    response status    202
    ...    Post-Conditions: in response header Location should not be null    
    ${headers}=    Output    response headers
    POST Cancel operation task
    Should Contain    ${headers}    Location
    Check HTTP Response Status Code Is    202
    Log    Validation OK
    
    
Post Cancel operation task Conflict
Post Cancel operation task Conflict
    [Documentation]    Conflict. 
    [Documentation]    Test ID: 7.3.1.16.2
    ...    The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. 
    ...    Test title: POST Cancel operation task
    ...    Typically, this is due to the fact that the VNF instance resource is not in STARTING, PROCESSING or ROLLING_BACK state, 
    ...    Test objective: The POST method is NOT cancelling an ongoing VNF lifecycle operation due to the fact that the VNF instance resource is not in STARTING, PROCESSING or ROLLING_BACK state
    ...    or another error handling action is starting, such as retry or rollback. 
    ...    Pre-conditions: operation is not in STARTING, PROCESSING or ROLLING_BACK state
    ...    The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
    ...    Reference:  section 5.4.17.3.1 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: in response header Location should not be null  
    Depends on test  Check resource FAILED_TEMP
    Depends on test  Check resource FAILED_TEMP
    Log    Cancel an operation
    POST Cancel operation task
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Check HTTP Response Status Code Is    409
    Post    ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail
    Check HTTP Response Body Json Schema Is    ProblemDetails
    Integer    response status    409
    Log    Status code validated
    ${problemDetails}=    Output    response body
    Validate Json    ProblemDetails.schema.json    ${problemDetails}
    Log    Validation OK


Post Cancel operation task Not Found
Post Cancel operation task Not Found
    # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent
    # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent
    [Documentation]    Not Found
     [Documentation]    Test ID: 7.3.1.16.2
    ...    Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists. 
    ...    Test title: POST Cancel operation task
    ...    Specifically in case of this task resource, the response code 404 shall also be returned 
    ...    Test objective: The objective is to test that POST method cannot cancel a VNF lifecycle operation because the operation is not supported
    ...    if the task is not supported for the VNF LCM operation occurrence represented by the parent resource, 
    ...    Pre-conditions: 
    ...    which means that the task resource consequently does not exist. 
    ...    Reference:  section 5.4.17.3.1 - SOL003 v2.4.1
    ...    In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the �detail� attribute shall convey more information about the error.
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: in response header Location should not be null  
    [Setup]    Check Fail not supported
    [Setup]    Check Fail not supported
    log    Final fail an operation
    POST Cancel operation task
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Check HTTP Response Status Code Is    404
    Post    ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel
    Log    Validate Status code
    Integer    response status    409
    ${problemDetails}=    Output    response body
    Validate Json    ProblemDetails.schema.json    ${problemDetails}
    Log    Validation OK

GET Cancel operation task - Method not implemented
GET Cancel operation task - Method not implemented
    log    Trying to perform a GET. This method should not be implemented
    [Documentation]    Test ID: 7.3.1.16.3
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Test title: GET Cancel operation task - Method not implemented
    Get    ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel
    ...    Test objective: The objective is to test that GET method is not implemented
    Log    Validate Status code
    ...    Pre-conditions: none
    Integer    response status    405
    ...    Reference:  section 5.4.17.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    GET Cancel operation task
	Check HTTP Response Status Code Is    405


PUT Cancel operation task - Method not implemented
PUT Cancel operation task - Method not implemented
    log    Trying to perform a PUT. This method should not be implemented
    [Documentation]    Test ID: 7.3.1.16.3
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Test title: PUT Cancel operation task - Method not implemented
    Put    ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel
    ...    Test objective: The objective is to test that PUT method is not implemented
    Log    Validate Status code
    ...    Pre-conditions: none
    Integer    response status    405
    ...    Reference:  section 5.4.17.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PUT Cancel operation task
	Check HTTP Response Status Code Is    405


PATCH Cancel operation task - Method not implemented
PATCH Cancel operation task - Method not implemented
    log    Trying to perform a PATCH. This method should not be implemented
    [Documentation]    Test ID: 7.3.1.16.4
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Test title: PATCH Cancel operation task - Method not implemented
    Patch    ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel
    ...    Test objective: The objective is to test that PATCH method is not implemented
    Log    Validate Status code
    ...    Pre-conditions: none
    Integer    response status    405
    ...    Reference:  section 5.4.17.3.3 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PATCH Cancel operation task
	Check HTTP Response Status Code Is    405
    
    
DELETE Cancel operation task - Method not implemented
DELETE Cancel operation task - Method not implemented
    log    Trying to perform a DELETE. This method should not be implemented
    [Documentation]    Test ID: 7.3.1.16.5
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Test title: DELETE Cancel operation task - Method not implemented
    Delete    ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel
    ...    Test objective: The objective is to test that DELETE method is not implemented
    Log    Validate Status code
    ...    Pre-conditions: none
    Integer    response status    405
    ...    Reference:  section 5.4.17.3.4 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    DELETE Cancel operation task
	Check HTTP Response Status Code Is    405


*** Keywords ***
*** Keywords ***
Check resource existance
Check resource existance
+53 −34
Original line number Original line Diff line number Diff line
@@ -2,54 +2,73 @@
Resource    environment/configuration.txt
Resource    environment/configuration.txt
Resource    environment/variables.txt 
Resource    environment/variables.txt 
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} 
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} 
Resource    VnfLcmMntOperationKeywords.robot
Library    OperatingSystem
Library    OperatingSystem
Library    JSONLibrary
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
Library    JSONSchemaLibrary    schemas/
Suite Setup    Check resource existance
Suite Setup    Check resource existance


*** Test Cases ***
*** Test Cases ***
Change external VNF connectivity 
POST Change external VNF connectivity 
    [Documentation]   The POST method changes the external connectivity of a VNF instance
    [Documentation]    Test ID: 7.3.1.10.1
    Log    Trying to change the external connectivity of a VNF instance.
    ...    Test title: POST Change external VNF connectivity
    Set Headers  {"Accept":"${ACCEPT}"}  
    ...    Test objective: The objective is to test that POST method trigger a change in VNF external connectivity
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    ...    Pre-conditions: none
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Reference:  section 5.4.11.3.1 - SOL003 v2.4.1
    ${body}=    Get File    jsons/changeExtVnfConnectivityRequest.json
    ...    Config ID: Config_prod_VNFM
    Post    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn    ${body}
    ...    Applicability: none
    Integer    response status    202
    ...    Post-Conditions: in response header Location should not be null         
    Log    Status code validated
    POST Change External VNF Connectivity
    ${headers}=    Output    response headers
    Check HTTP Response Status Code Is    202
    Should Contain    ${headers}    Location
    Check Operation Occurrence Id
    Log    Validation OK
       
    
    
GET Change external VNF connectivity - Method not implemented
GET Change external VNF connectivity - Method not implemented
    log    Trying to perform a GET. This method should not be implemented
    [Documentation]    Test ID: 7.3.1.10.2
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Test title: GET Change external VNF connectivity - Method not implemented
    Get    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn    
    ...    Test objective: The objective is to test that GET method is not implemented
    Log    Validate Status code
    ...    Pre-conditions: none
    Integer    response status    405
    ...    Reference:  section 5.4.11.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    GET Change External VNF Connectivity
    Check HTTP Response Status Code Is    405


PUT Change external VNF connectivity - Method not implemented
PUT Change external VNF connectivity - Method not implemented
    log    Trying to perform a PUT. This method should not be implemented
    [Documentation]    Test ID: 7.3.1.10.3
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Test title: PUT Change external VNF connectivity - Method not implemented
    Put    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn    
    ...    Test objective: The objective is to test that PUT method is not implemented
    Log    Validate Status code
    ...    Pre-conditions: none
    Integer    response status    405
    ...    Reference:  section 5.4.11.3.3 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PUT Change External VNF Connectivity
    Check HTTP Response Status Code Is    405


PATCH Change external VNF connectivity - Method not implemented
PATCH Change external VNF connectivity - Method not implemented
    log    Trying to perform a PATCH. This method should not be implemented
    [Documentation]    Test ID: 7.3.1.10.4
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Test title: PATCH Change external VNF connectivity - Method not implemented
    Patch    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn    
    ...    Test objective: The objective is to test that PATCH method is not implemented
    Log    Validate Status code
    ...    Pre-conditions: none
    Integer    response status    405
    ...    Reference:  section 5.4.11.3.4 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PATCH Change External VNF Connectivity
    Check HTTP Response Status Code Is    405
    
    
DELETE Change external VNF connectivity - Method not implemented
DELETE Change external VNF connectivity - Method not implemented
    log    Trying to perform a DELETE. This method should not be implemented
    [Documentation]    Test ID: 7.3.1.10.5
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Test title: DELETE Change external VNF connectivity - Method not implemented
    Delete    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn    
    ...    Test objective: The objective is to test that DELETE method is not implemented
    Log    Validate Status code
    ...    Pre-conditions: none
    Integer    response status    405
    ...    Reference:  section 5.4.11.3.5 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    DELETE Change External VNF Connectivity
    Check HTTP Response Status Code Is    405


*** Keywords ***
*** Keywords ***
Check resource existance
Check resource existance
+83 −69
Original line number Original line Diff line number Diff line
@@ -2,97 +2,104 @@
Resource    environment/configuration.txt
Resource    environment/configuration.txt
Resource    environment/variables.txt 
Resource    environment/variables.txt 
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} 
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} 
Resource    VnfLcmMntOperationKeywords.robot
Library     OperatingSystem
Library     OperatingSystem
Library    JSONLibrary
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
Library    JSONSchemaLibrary    schemas/
Suite Setup    Check resource existance
Suite Setup    Check resource existance


*** Test Cases ***
*** Test Cases ***
Change deployment flavour of a vnfInstance
POST Change deployment flavour of a vnfInstance
    [Documentation]    Changes the deployment flavour of a VNF instance..
    [Documentation]    Test ID: 7.3.1.6.1
    Log    Trying to change the deployment flavour of a VNF instance.
    ...    Test title: POST Change deployment flavour of a vnfInstance
    Set Headers  {"Accept":"${ACCEPT}"}  
    ...    Test objective: The objective is to test that POST method trigger a change in VNF deployment flavour
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    ...    Pre-conditions: none
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Reference:  section 5.4.7.3.1 - SOL003 v2.4.1
    ${body}=    Get File    jsons/changeVnfFlavourRequest.json
    ...    Config ID: Config_prod_VNFM
    Post    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour    ${body}
    ...    Applicability: none
    Integer    response status    202
    ...    Post-Conditions: in response header Location should not be null  
    Log    Status code validated
    POST Change VNF deployment flavour   ${vnfInstanceId}
    ${headers}=    Output    response headers
    Check HTTP Response Status Code Is    202
    Should Contain    ${headers}    Location
    Check Operation Occurrence Id
    Log    Validation OK


Change deployment flavour of a vnfInstance Conflict (Not-Instantiated)
Change deployment flavour of a vnfInstance Conflict (Not-Instantiated)
    # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state
    [Documentation]    Test ID: 7.3.1.6.2
    [Documentation]    Conflict. 
    ...    Test title: POST Change deployment flavour of a vnfInstance
    ...    The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. 
    ...    Test objective: The objective is to test that POST method can't trigger a change in VNF deployment flavour because of a conflict with the state of the VNF instance resource. 
    ...    Typically, this is due to the fact that the VNF instance resource is in NOT-INSTANTIATED state, 
    ...    Pre-conditions: VNF instance resource is not in NOT-INSTANTIATED state
    ...    or that another lifecycle management operation is ongoing. 
    ...    Reference:  section 5.4.7.3.1 - SOL003 v2.4.1
    ...    The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none  
    [Setup]    Check resource not instantiated   
    [Setup]    Check resource not instantiated   
    Log    Trying to change the deployment flavour of a VNF instance.
    POST Change VNF deployment flavour   ${instantiatedVnfInstanceId}
    Set Headers  {"Accept":"${ACCEPT}"}  
    Check HTTP Response Status Code Is    409
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Check HTTP Response Body Json Schema Is    ProblemDetails
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ${body_file}=    Get File    jsons/changeVnfFlavourRequest.json
    ${body}=    evaluate    json.loads('''${body_file}''')    json 
    Post    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour    ${body}
    Integer    response status    409
    Log    Status code validated
    ${problemDetails}=    Output    response body
    Validate Json    ProblemDetails.schema.json    ${problemDetails}
    Log    Validation OK



  
  
Change deployment flavour of a vnfInstance Not Found
Change deployment flavour of a vnfInstance Not Found
    # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent
    # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent
    [Documentation]    Not Found
    [Documentation]    Test ID: 7.3.1.6.3
    ...    Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists. 
    ...    Test title: POST Change deployment flavour of a vnfInstance
    ...    Specifically in case of this task resource, the response code 404 shall also returned if the task is not supported for the VNF instance represented by the parent resource, which means that the task resource consequently does not exist. 
    ...    Test objective: The objective is to test that POST method can't trigger a change in VNF deployment flavour because the VNF instance resource is not found. 
    ...    In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the �detail� attribute shall convey more information about the error.
    ...    Pre-conditions: VNF instance resource is not in NOT-INSTANTIATED state
    ...    Reference:  section 5.4.7.3.1 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none  
    [Setup]    Check change flavour not supported
    [Setup]    Check change flavour not supported
    Log    Trying to change the deployment flavour of a VNF instance, not exist
    POST Change VNF deployment flavour   ${notFoundVnfInstanceId}
    Set Headers  {"Accept":"${ACCEPT}"}  
    Check HTTP Response Status Code Is    404
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Check HTTP Response Body Json Schema Is    ProblemDetails
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ${body_file}=    Get File    jsons/changeVnfFlavourRequest.json
    ${body}=    evaluate    json.loads('''${body_file}''')    json 
    Post    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour    ${body}
    Integer    response status    404
    Log    Status code validated
    ${problemDetails}=    Output    response body
    Validate Json    ProblemDetails.schema.json    ${problemDetails}
    Log    Validation OK
   
   
    
    
GET Change deployment flavour VNFInstance - Method not implemented
GET Change deployment flavour VNFInstance - Method not implemented
    log    Trying to perform a GET. This method should not be implemented
    [Documentation]    Test ID: 7.3.1.16.4
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Test title: GET Cancel operation task - Method not implemented
    Get    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour    
    ...    Test objective: The objective is to test that GET method is not implemented
    Log    Validate Status code
    ...    Pre-conditions: none
    Integer    response status    405
    ...    Reference:  section 5.4.7.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    GET Change VNF deployment flavour   
    Check HTTP Response Status Code Is    405


PUT Change deployment flavour VNFInstance - Method not implemented
PUT Change deployment flavour VNFInstance - Method not implemented
    log    Trying to perform a PUT. This method should not be implemented
    [Documentation]    Test ID: 7.3.1.16.5
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Test title: PUT Cancel operation task - Method not implemented
    Put    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour    
    ...    Test objective: The objective is to test that PUT method is not implemented
    Log    Validate Status code
    ...    Pre-conditions: none
    Integer    response status    405
    ...    Reference:  section 5.4.7.3.3 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PUT Change VNF deployment flavour   
    Check HTTP Response Status Code Is    405


PATCH Change deployment flavour VNFInstance - Method not implemented
PATCH Change deployment flavour VNFInstance - Method not implemented
    log    Trying to perform a PATCH. This method should not be implemented
    [Documentation]    Test ID: 7.3.1.16.6
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Test title: PATCH Cancel operation task - Method not implemented
    Patch    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour    
    ...    Test objective: The objective is to test that PATCH method is not implemented
    Log    Validate Status code
    ...    Pre-conditions: none
    Integer    response status    405
    ...    Reference:  section 5.4.7.3.4 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PATCH Change VNF deployment flavour   
    Check HTTP Response Status Code Is    405
    
    
DELETE Change deployment flavour VNFInstance - Method not implemented
DELETE Change deployment flavour VNFInstance - Method not implemented
    log    Trying to perform a DELETE. This method should not be implemented
    [Documentation]    Test ID: 7.3.1.16.7
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ...    Test title: DELETE Cancel operation task - Method not implemented
    Delete    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour    
    ...    Test objective: The objective is to test that DELETE method is not implemented
    Log    Validate Status code
    ...    Pre-conditions: none
    Integer    response status    405
    ...    Reference:  section 5.4.7.3.5 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    DELETE Change VNF deployment flavour   
    Check HTTP Response Status Code Is    405


*** Keywords ***
*** Keywords ***
Check resource existance
Check resource existance
@@ -109,6 +116,13 @@ Check resource not instantiated
    Get    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} 
    Get    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} 
    String    response body instantiationState    NOT_INSTANTIATED
    String    response body instantiationState    NOT_INSTANTIATED


Check resource instantiated
    Set Headers    {"Accept":"${ACCEPT}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instantiatedVnfInstanceId} 
    String    response body instantiationState    INSTANTIATED    

Check change flavour not supported
Check change flavour not supported
    Set Headers    {"Accept":"${ACCEPT}"}  
    Set Headers    {"Accept":"${ACCEPT}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
+74 −58

File changed.

Preview size limit exceeded, changes collapsed.

+76 −64

File changed.

Preview size limit exceeded, changes collapsed.

Loading