Commit e1f9a092 authored by Giacomo Bernini's avatar Giacomo Bernini Committed by Giacomo Bernini
Browse files

added new tests 5.3.6.7.x for CCM capacity info, as per NFVSOL(24)000077

parent 1b6b2b8a
Loading
Loading
Loading
Loading
+115 −0
Original line number Diff line number Diff line
*** Settings ***
Resource    NFVICapacityInformationKeywords.robot

*** Test Cases ***
POST Individual CCMs NFVI Capacity Information - Method not implemented
    [Documentation]    Test ID: 5.3.6.7.1
    ...    Test title: POST Individual CCMs NFVI Capacity Information - Method not implemented
    ...    Test objective: The objective is to test that POST method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3a.3.1 - ETSI GS NFV-SOL 005 [3] v5.1.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    POST Individual CCMs NFVI Capacity Information
    Check HTTP Response Status Code Is    405
    
GET Information about an Individual CCMs NFVI Capacity Information
    [Documentation]    Test ID: 5.3.6.7.2
    ...    Test title: GET Information about an Individual CCMs NFVI Capacity Information
    ...    Test objective: The objective is to retrieve information about Individual CCMs NFVI Capacity Information
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3a.3.2 - ETSI GS NFV-SOL 005 [3] v5.1.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual CCMs NFVI Capacity Information
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    NfviCapacityInfo

GET Information about an Individual CCMs NFVI Capacity Information using filter query parameter
    [Documentation]    Test ID: 5.3.6.7.3
    ...    Test title: GET Information about an Individual CCMs NFVI Capacity Information using filter query parameter
    ...    Test objective: The objective is to retrieve information about Individual CCMs NFVI Capacity Information using filter query parameter
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3a.3.2 - ETSI GS NFV-SOL 005 [3] v5.1.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual CCMs NFVI Capacity Information using filter
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    NfviCapacityInfo
        
GET Information about an Individual CCMs NFVI Capacity Information - NOT FOUND
     [Documentation]    Test ID: 5.3.6.7.4
    ...    Test title: GET Information about an Individual CCMs NFVI Capacity Information - NOT FOUND
    ...    Test objective: The objective is to test that the retrieval of Individual CCMs NFVI Capacity Information fails when using an invalid resource identifier.
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3a.3.2 - ETSI GS NFV-SOL 005 [3] v5.1.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual CCMs NFVI Capacity Information with Invalid VIM ID
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is   ProblemDetails

PUT Individual CCMs NFVI Capacity Information - Method not implemented 
     [Documentation]    Test ID: 5.3.6.7.5
    ...    Test title: PUT Individual CCMs NFVI Capacity Information - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3a.3.3 - ETSI GS NFV-SOL 005 [3] v5.1.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: VNF Snapshot Package not modified
    PUT Individual CCMs NFVI Capacity Information
    Check HTTP Response Status Code Is    405

PATCH Individual CCMs NFVI Capacity Information - Method Not implemented
    [Documentation]    Test ID: 5.3.6.7.6
    ...    Test title: PATCH Individual CCMs NFVI Capacity Information
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3a.3.4 - ETSI GS NFV-SOL 005 [3] v5.1.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: VNF Snapshot Package modified
    PATCH Individual CCMs NFVI Capacity Information
    Check HTTP Response Status Code Is    405

DELETE Individual CCMs NFVI Capacity Information - Method Not implemented 
    [Documentation]    Test ID: 5.3.6.7.7
    ...    Test title: DELETE Individual CCMs NFVI Capacity Information - Method Not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3a.3.5 - ETSI GS NFV-SOL 005 [3] v5.1.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: VNF Snapshot Package deleted
    DELETE Individual CCMs NFVI Capacity Information
    Check HTTP Response Status Code Is    405

GET Information about an Individual CCMs NFVI Capacity Information with permitted authorization scope
    [Documentation]    Test ID: 5.3.6.7.8
    ...    Test title: GET Information about an Individual CCMs NFVI Capacity Information with permitted authorization scope
    ...    Test objective: The objective is to retrieve information about Individual CCms NFVI Capacity Information with permitted authorization scope
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3a.3.2 - ETSI GS NFV-SOL 005 [3] v5.1.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual CCMs NFVI Capacity Information with permitted authorization scope
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    NfviCapacityInfo

GET Information about an Individual CCMs NFVI Capacity Information with not permitted authorization scope
    [Documentation]    Test ID: 5.3.6.7.9
    ...    Test title: GET Information about an Individual CCMs NFVI Capacity Information with not permitted authorization scope
    ...    Test objective: The objective is to test that retrieve information about Individual CCMs NFVI Capacity Information fails when using not permitted authorization scope
    ...    Pre-conditions: none
    ...    Reference: Clause 10.4.3a.3.2 - ETSI GS NFV-SOL 005 [3] v5.1.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual CCMs NFVI Capacity Information with not permitted authorization scope
    Check HTTP Response Status Code Is    401
 No newline at end of file
+86 −0
Original line number Diff line number Diff line
@@ -322,6 +322,92 @@ DELETE Individual VIMs NFVI Capacity Information
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 

POST Individual CCMs NFVI Capacity Information
    log    Trying to perform a POST. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/ccm/${ccmId}    
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}        

GET Individual CCMs NFVI Capacity Information
    log    Trying to get information about an Individual CCMs NFVI Capacity Information
    Set Headers    {"Accept":"${ACCEPT_JSON}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/ccm/${ccmId} 		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}   

GET Individual CCMs NFVI Capacity Information with permitted authorization scope
    log    Trying to get information about an Individual VIMs NFVI Capacity Information
    Set Headers    {"Accept":"${ACCEPT_JSON}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${scopeValue}=    Create Dictionary    scope=${INFOS_PERMITTED_SCOPE} 
    ${authorizationToken}=    JWT Encode    payload=${scopeValue}    key=''    algorithm=${OAUTH_ENCRIPTION_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    Log    Authorization Token: ${authorizationToken}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/ccm/${ccmId} 		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}  

GET Individual CCMs NFVI Capacity Information with not permitted authorization scope
    log    Trying to get information about an Individual CCMs NFVI Capacity Information
    Set Headers    {"Accept":"${ACCEPT_JSON}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${scopeValue}=    Create Dictionary    scope=${NOT_PERMITTED_SCOPE} 
    ${authorizationToken}=    JWT Encode    payload=${scopeValue}    key=''    algorithm=${OAUTH_ENCRIPTION_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    Log    Authorization Token: ${authorizationToken}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/ccm/${ccmId}  		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}   

GET Individual CCMs NFVI Capacity Information using filter
    log    Trying to get information about an Individual CCMs NFVI Capacity Information
    Set Headers    {"Accept":"${ACCEPT_JSON}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/ccm/${ccmId}?${POS_FILTER_info}		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}      

GET Individual CCMs NFVI Capacity Information with Invalid VIM ID
    log    Trying to get information about an Individual CCMs NFVI Capacity Information
    Set Headers    {"Accept":"${ACCEPT_JSON}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/ccm/${invalidCcmId} 		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}      
	
PUT Individual CCMs NFVI Capacity Information
    log    Trying to perform a PUT. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Put    ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/ccm/${ccmId} 		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 

PATCH Individual CCMs NFVI Capacity Information
    log    Trying to perform a PATCH. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/ccm/${ccmId} 		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 

DELETE Individual CCMs NFVI Capacity Information
    log    Trying to perform a DELETE. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/ccm/${ccmId} 		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 

POST Create a Capacity Threshold
    Log    Trying to POST create a new capacity threshold.
    Set Headers  {"Accept":"${ACCEPT_JSON}"}  
+3 −0
Original line number Diff line number Diff line
@@ -43,4 +43,7 @@ ${invalidVimId}
${capacityThreshold}
${invalid_capacityThreshold}

${ccmId}
${invalidCcmId}

${PRODUCER_SUPPORT_COND_REQ}    1
+150 −141
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@
    "description": "This type defines the format of the NFVI capacity information. The type shall comply with the provisions defined\nin Table 10.5.2.4-1.\n",
    "required": [
        "id",
		"vimId",
        "capacityInfoPerZone"
    ],
    "properties": {
@@ -15,6 +14,10 @@
            "description": "An identifier with the intention of being globally unique.\n",
            "type": "string"
        },
        "ccmId": {
            "description": "Identifies the CCM to which the NFVI capacity information is associated. \n",
            "type": "string"
        },
        "capacityInfoPerZone": {
            "description": "Capacity information on a per resource zone basis under control by the associated VIM.\n",
            "type": "array",
@@ -29,12 +32,16 @@
                        "description": "An identifier with the intention of being globally unique.\n",
                        "type": "string"
                    },
                    "cisClusterId": {
                        "description": "Identifies the CIS cluster of the applicable NFVI capacity information.\n",
                        "type": "string"
                    },
                    "capacityMeasurements": {
                        "description": "Capacity measurement on a per resource type basis.\n",
                        "type": "array",
                        "items": {
                            "type": "object",
							"description": "This type defines the format of the NFVI capacity information on a per resource type basis.\nThe type shall comply with the provisions defined in table 10.5.2.6-1.\n",
                            "description": "This type defines the format of the NFVI capacity information on a per resource type basis.\nThe type shall comply with the provisions defined in table 10.5.2.6-1.\nNOTE: The present document and referred documents do not specify the capacity measurements,\nthus the capacity measurement names are not specified in the present document version.\n",
                            "required": [
                                "resourceType",
                                "capacityMeasurementName",
@@ -54,7 +61,7 @@
                                    ]
                                },
                                "capacityMeasurementName": {
									"description": "Name of the capacity measurement. Different resource types can have different associated capacity measurements,\ntypically associated to different sub-types of the resource type.\nThe present document and referred documents do not specify the capacity measurements, thus the capacity\nmeasurement names are not specified in the present document version.\n",
                                    "description": "Name of the capacity measurement. Different resource types can have different associated capacity measurements,\ntypically associated to different sub-types of the resource type.\nSee note.\n",
                                    "type": "string"
                                },
                                "totalCapacity": {
@@ -81,7 +88,7 @@
        },
        "totalCapacityInfo": {
            "type": "object",
			"description": "This type defines the format of the NFVI capacity information on a per resource type basis.\nThe type shall comply with the provisions defined in table 10.5.2.6-1.\n",
            "description": "This type defines the format of the NFVI capacity information on a per resource type basis.\nThe type shall comply with the provisions defined in table 10.5.2.6-1.\nNOTE: The present document and referred documents do not specify the capacity measurements,\nthus the capacity measurement names are not specified in the present document version.\n",
            "required": [
                "resourceType",
                "capacityMeasurementName",
@@ -101,7 +108,7 @@
                    ]
                },
                "capacityMeasurementName": {
					"description": "Name of the capacity measurement. Different resource types can have different associated capacity measurements,\ntypically associated to different sub-types of the resource type.\nThe present document and referred documents do not specify the capacity measurements, thus the capacity\nmeasurement names are not specified in the present document version.\n",
                    "description": "Name of the capacity measurement. Different resource types can have different associated capacity measurements,\ntypically associated to different sub-types of the resource type.\nSee note.\n",
                    "type": "string"
                },
                "totalCapacity": {
@@ -124,17 +131,19 @@
        },
        "timeInterval": {
            "type": "object",
			"description": "This type defines the format of a time interval. The type shall comply with the provisions defined in table 10.5.2.7-1.\n",
            "description": "This type defines the format of a time interval. The type shall comply with the provisions defined in table 10.5.2.7-1.\nNOTE: When only the aTime is present, there is no time interval being defined, and therefore the provided timing\ninformation refers to a specific point in time.\n",
            "required": [
                "aTime"
            ],
            "properties": {
                "aTime": {
                    "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n",
                    "type": "string",
                    "format": "date-time"
                },
                "bTime": {
                    "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n",
                    "type": "string",
                    "format": "date-time"
                }
            }
+154 −146
Original line number Diff line number Diff line
{
    "type": "array",
  "items":
  {
    "items": {
        "type": "object",
        "description": "This type defines the format of the NFVI capacity information. The type shall comply with the provisions defined\nin Table 10.5.2.4-1.\n",
        "required": [
            "id",
		"vimId",
            "capacityInfoPerZone"
        ],
        "properties": {
@@ -17,6 +15,10 @@
            "vimId": {
                "description": "An identifier with the intention of being globally unique.\n",
                "type": "string"
            },
			"ccmId": {
                "description": "Identifies the CCM to which the NFVI capacity information is associated. \n",
                "type": "string"
            },
            "capacityInfoPerZone": {
                "description": "Capacity information on a per resource zone basis under control by the associated VIM.\n",
@@ -31,13 +33,17 @@
                        "resourceZoneId": {
                            "description": "An identifier with the intention of being globally unique.\n",
                            "type": "string"
                        },
						"cisClusterId": {
                            "description": "Identifies the CIS cluster of the applicable NFVI capacity information.\n",
                            "type": "string"
                        },
                        "capacityMeasurements": {
                            "description": "Capacity measurement on a per resource type basis.\n",
                            "type": "array",
                            "items": {
                                "type": "object",
							"description": "This type defines the format of the NFVI capacity information on a per resource type basis.\nThe type shall comply with the provisions defined in table 10.5.2.6-1.\n",
                                "description": "This type defines the format of the NFVI capacity information on a per resource type basis.\nThe type shall comply with the provisions defined in table 10.5.2.6-1.\nNOTE: The present document and referred documents do not specify the capacity measurements,\nthus the capacity measurement names are not specified in the present document version.\n",
                                "required": [
                                    "resourceType",
                                    "capacityMeasurementName",
@@ -57,7 +63,7 @@
                                        ]
                                    },
                                    "capacityMeasurementName": {
									"description": "Name of the capacity measurement. Different resource types can have different associated capacity measurements,\ntypically associated to different sub-types of the resource type.\nThe present document and referred documents do not specify the capacity measurements, thus the capacity\nmeasurement names are not specified in the present document version.\n",
                                        "description": "Name of the capacity measurement. Different resource types can have different associated capacity measurements,\ntypically associated to different sub-types of the resource type.\nSee note.\n",
                                        "type": "string"
                                    },
                                    "totalCapacity": {
@@ -84,7 +90,7 @@
            },
            "totalCapacityInfo": {
                "type": "object",
			"description": "This type defines the format of the NFVI capacity information on a per resource type basis.\nThe type shall comply with the provisions defined in table 10.5.2.6-1.\n",
                "description": "This type defines the format of the NFVI capacity information on a per resource type basis.\nThe type shall comply with the provisions defined in table 10.5.2.6-1.\nNOTE: The present document and referred documents do not specify the capacity measurements,\nthus the capacity measurement names are not specified in the present document version.\n",
                "required": [
                    "resourceType",
                    "capacityMeasurementName",
@@ -104,7 +110,7 @@
                        ]
                    },
                    "capacityMeasurementName": {
					"description": "Name of the capacity measurement. Different resource types can have different associated capacity measurements,\ntypically associated to different sub-types of the resource type.\nThe present document and referred documents do not specify the capacity measurements, thus the capacity\nmeasurement names are not specified in the present document version.\n",
                        "description": "Name of the capacity measurement. Different resource types can have different associated capacity measurements,\ntypically associated to different sub-types of the resource type.\nSee note.\n",
                        "type": "string"
                    },
                    "totalCapacity": {
@@ -127,17 +133,19 @@
            },
            "timeInterval": {
                "type": "object",
			"description": "This type defines the format of a time interval. The type shall comply with the provisions defined in table 10.5.2.7-1.\n",
                "description": "This type defines the format of a time interval. The type shall comply with the provisions defined in table 10.5.2.7-1.\nNOTE: When only the aTime is present, there is no time interval being defined, and therefore the provided timing\ninformation refers to a specific point in time.\n",
                "required": [
                    "aTime"
                ],
                "properties": {
                    "aTime": {
                        "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n",
                        "type": "string",
                        "format": "date-time"
                    },
                    "bTime": {
                        "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n",
                        "type": "string",
                        "format": "date-time"
                    }
                }