PeerEntities.robot 10.6 KB
Newer Older
** Settings ***
Library           JSONSchemaLibrary    schemas/
Resource          environment/variables.txt
Library           JSONLibrary
Library           OperatingSystem
Resource          NFVMANOCimKeywords.robot
Library           REST    ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT}    ssl_verify=false
Library           MockServerLibrary

*** Test Cases ***
POST Peer Entity
    [Documentation]    Test ID: 8.3.1.8.1
    ...    Test title: POST Peer Entity
    ...    Test objective: The objective is to creates in the producer NFV-MANO functional entity a new peer entity resource which contains configuration and information with regards to the peer functional entity and perform the JSON schema validation of the returned job data structure.
    ...    Pre-conditions: none
    ...    Reference: clause 5.5.13.3.1 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: Peer Entity is created
    Send Post request for Peer Entity
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is    PeerEntity
    Check HTTP Response Header Contains Location
    Check Postcondition Peer Entity Resource is created
    
GET Peer Entity
    [Documentation]    Test ID: 8.3.1.8.2
    ...    Test title: GET Peer Entity
    ...    Test objective: The objective is to queries information and configuration in the producer NFV-MANO functional entity with regards to multiple peer entities.
    ...    Pre-conditions: At least one Peer Entity is already created.
    ...    Reference: clause 5.5.13.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions:  none
    Get Peer Entity
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    PeerEntities
    
GET Peer Entity - invalid attribute-based filter
    [Documentation]    Test ID: 8.3.1.8.3
    ...    Test title: GET Peer Entity - invalid attribute-based filter
    ...    Test objective:  The objective is to test that the retrieval of information and configuration in the producer NFV-MANO functional entity with regards to multiple peer entities fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response.
    ...    Pre-conditions: At least one Peer Entity is already created. 
    ...    Reference: clause 5.5.13.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get Peer Entity with invalid filter
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails   
    
GET Peer Entity - invalid attribute selector
    [Documentation]    Test ID: 8.3.1.8.4
    ...    Test title: GET Peer Entity - invalid attribute selector
    ...    Test objective: The objective is to test that the retrieval of information and configuration in the producer NFV-MANO functional entity with regards to multiple peer entities fails when using invalid attribute selector, and perform the JSON schema validation of the failed operation HTTP response.
    ...    Pre-conditions: At least one Peer Entity is already created. 
    ...    Reference: clause 5.5.13.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get Peer Entity with invalid selector
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails  
    
GET Peer Entity - Bad Request Response too Big
    [Documentation]    Test ID: 8.3.1.8.5
    ...    Test title: GET Peer Entity - Bad Request Response too Big
    ...    Test objective: The objective is to test that the retrieval of information and configuration in the producer NFV-MANO functional entity with regards to multiple peer entities fails when response is too big, and perform the JSON schema validation of the failed operation HTTP response.
    ...    Pre-conditions: At least one Peer Entity is already created. 
    ...    Reference: clause 5.5.13.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get Peer Entity
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails
    
GET Peer Entity with attribute-based filter
    [Documentation]    Test ID: 8.3.1.8.6
    ...    Test title: GET Peer Entity with attribute-based filter
    ...    Test objective: The objective is to query information and configuration in the producer NFV-MANO functional entity with regards to multiple peer entities with attribute filters
    ...    Pre-conditions: At least one Peer Entity is already created. 
    ...    Reference: clause 5.5.13.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get Peer Entity with filter
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    PeerEntities
    
GET Peer Entity with "all_fields" attribute selector
    [Documentation]    Test ID: 8.3.1.8.7
    ...    Test title: GET Peer Entity with "all_fields" attribute selector
    ...    Test objective: The objective is to retrieve information and configuration in the producer NFV-MANO functional entity with regards to multiple peer entities with "all_fields" attribute selector
    ...    Pre-conditions: At least one Peer Entity is already created. 
    ...    Reference: clause 5.5.13.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get Peer Entity with all_fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    PeerEntities
    
GET Peer Entity with "exclude_default" attribute selector
    [Documentation]    Test ID: 8.3.1.8.8
    ...    Test title: GET Peer Entity with "exclude_default" attribute selector
    ...    Test objective: The objective is to retrieve information and configuration in the producer NFV-MANO functional entity with regards to multiple peer entities with "exclude_default" attribute selector
    ...    Pre-conditions: At least one Peer Entity is already created. 
    ...    Reference: clause 5.5.13.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get Peer Entity with all_fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    PeerEntities

    
GET Peer Entity with "fields" attribute selector
    [Documentation]    Test ID: 8.3.1.8.9
    ...    Test title: GET Peer Entity with "fields" attribute selector
    ...    Test objective: The objective is to retrieve information and configuration in the producer NFV-MANO functional entity with regards to multiple peer entities with fields attribute selector
    ...    Pre-conditions: At least one Peer Entity is already created. 
    ...    Reference: clause 5.5.13.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get Peer Entity with fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    PeerEntities
     
GET Peer Entity with "exclude_fields" attribute selector
    [Documentation]    Test ID: 8.3.1.8.10
    ...    Test title: GET Peer Entity with "exclude_fields" attribute selector
    ...    Test objective: The objective is to retrieve information and configuration in the producer NFV-MANO functional entity with regards to multiple peer entities with "exclude_fields" attribute selector
    ...    Pre-conditions: At least one Peer Entity is already created. 
    ...    Reference: clause 5.5.13.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get Peer Entity with exclude_fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    PeerEntities
    
GET Peer Entity with Paged Response
    [Documentation]    Test ID: 8.3.1.8.11
    ...    Test title: GET Peer Entity with Paged Response
    ...    Test objective: The objective is to query information and configuration in the producer NFV-MANO functional entity with regards to multiple peer entities to get Paged Response.
    ...    Pre-conditions: At least one Peer Entity is already created.  
    ...    Reference: clause 5.5.13.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get Peer Entity
    Check HTTP Response Status Code Is    200
    Check LINK in Header

PUT Peer Entity - Method not implemented
    [Documentation]    Test ID: 8.3.1.8.12
    ...    Test title: PUT Peer Entity - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemeted.
    ...    Pre-conditions: none
    ...    Reference: clause 5.5.13.3.3 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    Send Put request for Peer Entity
    Check HTTP Response Status Code Is    405
    
PATCH Peer Entity - Method not implemented
    [Documentation]    Test ID: 8.3.1.8.13
    ...    Test title: PATCH Peer Entity - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemeted.
    ...    Pre-conditions:none
    ...    Reference: clause 5.5.13.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    Send Patch request for Peer Entity
    Check HTTP Response Status Code Is    405

DELETE Peer Entity - Method not implemented
    [Documentation]    Test ID: 8.3.1.8.14
    ...    Test title: DELETE Peer Entity - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemeted.
    ...    Pre-conditions: none
    ...    Reference: clause 5.5.13.3.5 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    Send Delete request for Peer Entity
    Check HTTP Response Status Code Is    405