Commit 9a8e46b8 authored by piscione's avatar piscione
Browse files

Added TPs for site quota management for MEC048 v3.1.1 specification.

parent a45eeff0
Loading
Loading
Loading
Loading
+522 −0
Original line number Diff line number Diff line
@@ -894,4 +894,526 @@ Test Purpose {
            }
    } // End of TP_MEC_MEC040_MEO_CSE_008_NF     
     
     
     
   Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_009_OK"

        Test objective
              "Check that the IUT returns the list of per site resource quota for a specific tenant when requested by a MEC Orchestrator - No filter"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.6.3.1, clause 6.2.4"

        Config Id Config_MEC_6

        PICS Selection PIC_SERVICES

        Initial conditions  with {
           the IUT entity being_in idle_state and
           the MEO entity having a tenantInfoList containing
          	tenantInfo indicating value TENANT_ID,
          	SiteResourceQuotaInfo indicating value SITE_ID,
          	SiteResourceQuotaInfo indicating value SITE_ID_2,
          	SiteResourceQuotaInfo indicating value SITE_ID_3;
        }

        // MEC 048 Clause 6.2.4 Type: SiteResourceQuotaInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vGET containing
                        uri indicating value "/cse/v1/tenants/TENANT_ID/resources/quota_in_system"	
                    ;	
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.6.3.1
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "200 OK",
                        Location indicating value "/cse/v1/tenants/TENANT_ID/resources/quota_in_system",
                        body containing
                        	listOfResourceQuotaInfo containing
	                            resourceQuotaInfo containing
	                                siteId indicating value SITE_ID, 
	                                cpuQuota indicating value CPU_QUOTA,
	                                memoryQuota indicating value MEMORY_QUOTA,
	                                diskQuota indicating value DISK_QUOTA
	                    		;,
	                    		resourceQuotaInfo containing
	                                siteId indicating value SITE_ID_2, 
	                                cpuQuota indicating value CPU_QUOTA_2,
	                                memoryQuota indicating value MEMORY_QUOTA_2,
	                                diskQuota indicating value DISK_QUOTA_2
	                    		;,
	                    		resourceQuotaInfo containing
	                                siteId indicating value SITE_ID_3, 
	                                cpuQuota indicating value CPU_QUOTA_2,
	                                memoryQuota indicating value MEMORY_QUOTA_3,
	                                diskQuota indicating value DISK_QUOTA_2
	                    		;
                    		;
                    	;
                    ;
                    to the MEC_CONSUMER entity
                }
            }
    } // End of TP_MEC_MEC040_MEO_CSE_009_OK     
     
     
     
     
  Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_009_OK_01"

        Test objective
              "Check that the IUT returns the list of per site resource quota for a specific tenant when requested by a MEC Orchestrator - siteId filter"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.6.3.1, clause 6.2.4"

        Config Id Config_MEC_6

        PICS Selection PIC_SERVICES

        Initial conditions  with {
           the IUT entity being_in idle_state and
           the MEO entity having a tenantInfoList containing
          	tenantInfo indicating value TENANT_ID,
          	SiteResourceQuotaInfo indicating value SITE_ID,
          	SiteResourceQuotaInfo indicating value SITE_ID_2;
        }

        // MEC 048 Clause 6.2.4 Type: SiteResourceQuotaInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vGET containing
                        uri indicating value "/cse/v1/tenants/TENANT_ID/resources/quota_in_system"	
                        query_parameters containing
                            siteId indicating value SITE_ID, SITE_ID_2
                    	;
                    ;	
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.6.3.1
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "200 OK",
                        Location indicating value "/cse/v1/tenants/TENANT_ID/resources/quota_in_system",
                        body containing
                        	listOfResourceQuotaInfo containing
	                            resourceQuotaInfo containing
	                                siteId indicating value SITE_ID, 
	                                cpuQuota indicating value CPU_QUOTA,
	                                memoryQuota indicating value MEMORY_QUOTA,
	                                diskQuota indicating value DISK_QUOTA
	                    		;,
	                    		resourceQuotaInfo containing
	                                siteId indicating value SITE_ID_2, 
	                                cpuQuota indicating value CPU_QUOTA_2,
	                                memoryQuota indicating value MEMORY_QUOTA_2,
	                                diskQuota indicating value DISK_QUOTA_3
	                    		;
                    		;
                    	;
                    ;
                    to the MEC_CONSUMER entity
                }
            }
    } // End of TP_MEC_MEC040_MEO_CSE_009_OK_01   
    
   Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_009_NF"

        Test objective
              "Check that the IUT returns an error on requesting site resource quota info on a not existing tenant when requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.6.3.1, clause 6.2.4"

        Config Id Config_MEC_6

        PICS Selection PIC_SERVICES

        Initial conditions  with {
           the IUT entity being_in idle_state and
           the MEO entity not having a tenantInfoList containing
          	tenantInfo indicating value NOT_EXISTING_TENANT_ID,
          	SiteResourceQuotaInfo indicating value SITE_RESOURCE_QUOTA_INFO;
        }

        // MEC 048 Clause 6.2.4 Type: SiteResourceQuotaInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vGET containing
                        uri indicating value "/cse/v1/tenants/NOT_EXISTING_TENANT_ID/resources/quota_in_system"	
                    ;	
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.6.3.1
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "404 Not Found"
                        ;
                    to the MEC_CONSUMER entity
                }
            }
    } // End of TP_MEC_MEC040_MEO_CSE_009_NF    
    
   Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_010_OK"

        Test objective
              "Check that the IUT creates a site resource quota info for a existing tenant when requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.6.3.4, clause 6.2.4"

        Config Id Config_MEC_6

        PICS Selection PIC_SERVICES

        Initial conditions  with {
           the IUT entity being_in idle_state and
           the MEO entity not having a tenantInfoList containing
          	tenantInfo indicating value TENANT_ID,
          	SiteResourceQuotaInfo indicating value QUOTA_INFO;
        }

        // MEC 048 Clause 6.2.4 Type: SiteResourceQuotaInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vPOST containing
                        uri indicating value "/cse/v1/tenants/TENANT_ID/resources/quota_in_system",
                        body containing
                            resourceQuotaInfo containing
                                siteId indicating value SITE_ID, 
                                cpuQuota indicating value CPU_QUOTA,
                                memoryQuota indicating value MEMORY_QUOTA,
                                diskQuota indicating value DISK_QUOTA
                    			;	
                    		;
                    	;
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.6.3.4
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "201 Created",
                        Location indicating value "/cse/v1/tenants/TENANT_ID/resources/quota_in_system",
                        body containing
                             resourceQuotaInfo containing
                                siteId indicating value SITE_ID, 
                                cpuQuota indicating value CPU_QUOTA,
                                memoryQuota indicating value MEMORY_QUOTA,
                                diskQuota indicating value DISK_QUOTA
                    			;	
                        ;
                      ;
                    to the MEC_CONSUMER entity
                }
            }
    } // End of TP_MEC_MEC040_MEO_CSE_010_OK    
    
     
     
     
   Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_010_BR"

        Test objective
              "Check that the IUT returns an error on creating a site resource quota with wrong parameters"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.6.3.4, clause 6.2.4"

        Config Id Config_MEC_6

        PICS Selection PIC_SERVICES

        Initial conditions  with {
           the IUT entity being_in idle_state and
           the MEO entity not having a tenantInfoList containing
          	tenantInfo indicating value TENANT_ID,
          	SiteResourceQuotaInfo indicating value QUOTA_INFO;
        }

        // MEC 048 Clause 6.2.4 Type: SiteResourceQuotaInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vPOST containing
                        uri indicating value "/cse/v1/tenants/TENANT_ID/resources/quota_in_system",
                        body containing
                            resourceQuotaInfo containing
                                siteId indicating value SITE_ID, 
                                cpuQuota indicating value omit,
                                memoryQuota indicating value omit,
                                diskQuota indicating value omit //NOTE: At least one of cpuQuota, memoryQuota and, diskQuota shall be present.
                    			;	
                    		;
                    	;
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.6.3.4
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "400 Bad Request"
                      ;
                    to the MEC_CONSUMER entity
                }
            }
    } // End of TP_MEC_MEC040_MEO_CSE_010_BR   
    
     
     
       
  Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_011_OK"

        Test objective
              "Check that the IUT returns the site resource quota for a specific tenant and site identifier when requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.7.3.1, clause 6.2.4"

        Config Id Config_MEC_6

        PICS Selection PIC_SERVICES

        Initial conditions  with {
           the IUT entity being_in idle_state and
           the MEO entity having a tenantInfoList containing
          	tenantInfo indicating value TENANT_ID,
          	SiteResourceQuotaInfo indicating value SITE_ID,
          	SiteResourceQuotaInfo indicating value SITE_ID_2,
          	SiteResourceQuotaInfo indicating value SITE_ID_3;
        }

        // MEC 048 Clause 6.2.4 Type: SiteResourceQuotaInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vGET containing
                        uri indicating value "/cse/v1/tenants/TENANT_ID/resources/quota_in_system/SITE_ID"	
                    ;	
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.7.3.1
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "200 OK",
                        Location indicating value "/cse/v1/tenants/TENANT_ID/resources/quota_in_system",
	                            resourceQuotaInfo containing
	                                siteId indicating value SITE_ID, 
	                                cpuQuota indicating value CPU_QUOTA,
	                                memoryQuota indicating value MEMORY_QUOTA,
	                                diskQuota indicating value DISK_QUOTA
                    		;
                    	;
                    to the MEC_CONSUMER entity
                }
            }
    } // End of TP_MEC_MEC040_MEO_CSE_011_OK 
     
   Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_011_NF"

        Test objective
              "Check that the IUT returns an error on requesting the site resource quota for a specific tenant and a not existing site identifier when requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.7.3.1, clause 6.2.4"

        Config Id Config_MEC_6

        PICS Selection PIC_SERVICES

        Initial conditions  with {
           the IUT entity being_in idle_state and
           the MEO entity not having a tenantInfoList containing
          	tenantInfo indicating value TENANT_ID,
          	SiteResourceQuotaInfo indicating value NOT_EXISTING_SITE_ID;
        }

        // MEC 048 Clause 6.2.4 Type: SiteResourceQuotaInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vGET containing
                        uri indicating value "/cse/v1/tenants/TENANT_ID/resources/quota_in_system/NOT_EXISTING_SITE_ID"	
                    ;	
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.7.3.1
                    the IUT entity sends a HTTP_RESPONSE containing
                        	status_code set to "404 Not Found"
                    	;
                    to the MEC_CONSUMER entity
                }
            }
    } // End of TP_MEC_MEC040_MEO_CSE_011_NF 
     
     
     
     
   Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_012_OK"

        Test objective
              "Check that the IUT updates a site resource quota info for a existing tenant when requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.7.3.2, clause 6.2.4"

        Config Id Config_MEC_6

        PICS Selection PIC_SERVICES

        Initial conditions  with {
           the IUT entity being_in idle_state and
           the MEO entity having a tenantInfoList containing
          	tenantInfo indicating value TENANT_ID,
          	SiteResourceQuotaInfo indicating value SITE_ID;
        }

        // MEC 048 Clause 6.2.4 Type: SiteResourceQuotaInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vPUT containing
                        uri indicating value "/cse/v1/tenants/TENANT_ID/resources/quota_in_system/SITE_ID",
                        body containing
                            resourceQuotaInfo containing
                                siteId indicating value SITE_ID, 
                                cpuQuota indicating value NEW_CPU_QUOTA,
                                memoryQuota indicating value NEW_MEMORY_QUOTA,
                                diskQuota indicating value NEW_DISK_QUOTA
                    			;	
                    		;
                    	;
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.6.3.4
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "200 OK",
                        Location indicating value "/cse/v1/tenants/TENANT_ID/resources/quota_in_system/SITE_ID",
                        body containing
                             resourceQuotaInfo containing
                                siteId indicating value SITE_ID, 
                                cpuQuota indicating value NEW_CPU_QUOTA,
                                memoryQuota indicating value NEW_MEMORY_QUOTA,
                                diskQuota indicating value NEW_DISK_QUOTA
                    			;	
                        ;
                      ;
                    to the MEC_CONSUMER entity
                }
            }
    } // End of TP_MEC_MEC040_MEO_CSE_012_OK  
     
     
  
  Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_012_BR"

        Test objective
              "Check that the IUT returns an error updating a site resource quota info for a existing tenant when requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.7.3.2, clause 6.2.4"

        Config Id Config_MEC_6

        PICS Selection PIC_SERVICES

        Initial conditions  with {
           the IUT entity being_in idle_state and
           the MEO entity having a tenantInfoList containing
          	tenantInfo indicating value TENANT_ID,
          	SiteResourceQuotaInfo indicating value SITE_ID;
        }

        // MEC 048 Clause 6.2.4 Type: SiteResourceQuotaInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vPUT containing
                        uri indicating value "/cse/v1/tenants/TENANT_ID/resources/quota_in_system/SITE_ID",
                        body containing
                            resourceQuotaInfo containing
                                siteId indicating value SITE_ID, 
                                cpuQuota indicating value omit,
                                memoryQuota indicating value omit,
                                diskQuota indicating value omit //NOTE: At least one of cpuQuota, memoryQuota and, diskQuota shall be present.
                    			;	
                    		;
                    	;
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.6.3.4
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "400 Bad Request"
                      ;
                    to the MEC_CONSUMER entity
                }
            }
    } // End of TP_MEC_MEC040_MEO_CSE_012_BR     
     


  Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_012_NF"

        Test objective
              "Check that the IUT returns an error updating a site resource quota info for a not existing tenant when requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.7.3.2, clause 6.2.4"

        Config Id Config_MEC_6

        PICS Selection PIC_SERVICES

        Initial conditions  with {
           the IUT entity being_in idle_state and
           the MEO entity not having a tenantInfoList containing
          	tenantInfo indicating value NOT_EXISTING_TENANT_ID,
          	SiteResourceQuotaInfo indicating value SITE_ID;
        }

        // MEC 048 Clause 6.2.4 Type: SiteResourceQuotaInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vPUT containing
                        uri indicating value "/cse/v1/tenants/NOT_EXISTING_TENANT_ID/resources/quota_in_system/SITE_ID",
                        body containing
                            resourceQuotaInfo containing
                                siteId indicating value SITE_ID, 
                                cpuQuota indicating value CPU_QUOTA,
                                memoryQuota indicating value MEM_QUOTA,
                                diskQuota indicating value DISK_QUOTA
                    			;	
                    		;
                    	;
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.6.3.4
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "404 Not Found"
                      ;
                    to the MEC_CONSUMER entity
                }
            }
    } // End of TP_MEC_MEC040_MEO_CSE_012_NF     
         
     
	}