Commit a45eeff0 authored by piscione's avatar piscione
Browse files

Added TPs for tenant and quota management for MEC048 v3.1.1 specification.

parent 452db48f
Loading
Loading
Loading
Loading
+611 −1
Original line number Diff line number Diff line
@@ -283,5 +283,615 @@ Package MEC_MEC040_MEO_CSE {
            }
    } // End of TP_MEC_MEC040_MEO_CSE_002_BR
    
  Test Purpose {
    TP Id "TP_MEC_MEC040_MEO_CSE_003_OK"

        Test objective
            "Check that the IUT responds with a specific tenantInfo when requested by a MEC Consumer"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.3.3.4, clause 6.2.2"

        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
           ;
        }

        // MEC 048 Clause 6.2.2  Type: TenantInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vGET containing
                        uri indicating value "/cse/v1/tenants/TENANT_ID"
                    	;
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.4.3.1
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "200 OK",
                        body containing
                            tenantInfo containing
                                customerId indicating value CUSTOMER_ID_1,
                                customerName indicating value CUSTOMER_NAME_1,
                                tenantName indicating value "tenantX"
                                ;
                          ;
                     ;
                    to the MEC_CONSUMER entity
                }
            }
     } // End of TP_MEC_MEC040_MEO_CSE_003_OK
    
    
    

   Test Purpose {
    TP Id "TP_MEC_MEC040_MEO_CSE_003_NF"

        Test objective
            "Check that the IUT returns an error when requesting a not existing tenantInfo by a MEC Consumer"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.3.3.4, clause 6.2.2"

        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
           ;
        }

        // MEC 048 Clause 6.2.2  Type: TenantInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vGET containing
                        uri indicating value "/cse/v1/tenants/TENANT_ID"
                    	;
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.4.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_003_NF
     
     
     //////////////////
       Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_004_OK"

        Test objective
              "Check that the IUT updates an existing tenantInfo when requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.4.3.2, clause 6.2.2"

        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
           ;
        }

        // MEC 048 Clause 6.2.2   Type: TenantInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vPUT containing
                        uri indicating value "/cse/v1/tenant/TENANT_ID",
                        body containing
                            tenantInfo containing
                                customerId indicating value NEW_CUSTOMER_ID,
                                customerName indicating value NEW_CUSTOMER_NAME_1,
                                tenantName indicating value NEW_TENANT_NAME
                            ;
                    	;
                    ;
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.3.3.4
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "200 Created",
                        Location indicating value "/cse/v1/tenants/TENANT_ID",
                        body containing
                            tenantInfo containing
                                customerId indicating value NEW_CUSTOMER_ID, 
                                customerName indicating value NEW_CUSTOMER_NAME_1,
                                tenantName indicating value NEW_TENANT_NAME
                            ;
                        ;
                    ;
                    to the MEC_CONSUMER entity
                }
            }
    } // End of TP_MEC_MEC040_MEO_CSE_004_OK
     
      
       Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_004_NF"

        Test objective
              "Check that the IUT returns an error on updating a not existing tenantInfo requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.4.3.2, clause 6.2.2"

        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
           ;
        }

        // MEC 048 Clause 6.2.2   Type: TenantInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vPUT containing
                        uri indicating value "/cse/v1/tenant/NOT_EXISTING_TENANT_ID",
                        body containing
                            tenantInfo containing
                                customerId indicating value NEW_CUSTOMER_ID,
                                customerName indicating value NEW_CUSTOMER_NAME_1,
                                tenantName indicating value NEW_TENANT_NAME
                            ;
                    	;
                    ;
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.3.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_004_NF
     
     
     

  Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_004_BR"

        Test objective
              "Check that the IUT returns an error on updating with invalid values tenantInfo requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.4.3.2, clause 6.2.2"

        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
           ;
        }

        // MEC 048 Clause 6.2.2   Type: TenantInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vPUT containing
                        uri indicating value "/cse/v1/tenant/NOT_EXISTING_TENANT_ID",
                        body containing
                            tenantInfo containing
                                customerId indicating value NEW_CUSTOMER_ID,
                                customerName indicating value NEW_CUSTOMER_NAME_1,
                                tenantName indicating value NEW_TENANT_NAME,
                                siteList indicating value SOME_SITE_INFO //Either resourceUseInfo or siteList or none of them shall be present.
                            ;
                    	;
                    ;
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.3.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_004_BR
     
     
     
     
     
 Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_005_OK"

        Test objective
              "Check that the IUT removes a tenantInfo when requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.4.3.5"

        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
           ;
        }

        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vDELETE containing
                        uri indicating value "/cse/v1/tenant/TENANT_ID"
                    	;
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.3.3.4
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "204 No Content"
                    ;
                    to the MEC_CONSUMER entity
                }
            }
    } // End of TP_MEC_MEC040_MEO_CSE_005_OK
     
     
      Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_005_NF"

        Test objective
              "Check that the IUT returns an error on deleting a not existing tenantInfo when requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.4.3.5"

        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
           ;
        }

        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vDELETE containing
                        uri indicating value "/cse/v1/tenant/NOT_EXISTING_TENANT_ID"
                    	;
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.3.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_005_NF
    
  
Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_006_OK"

        Test objective
              "Check that the IUT returns a resourceQuotaInfo for a specific tenant when requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.5.3.1, clause 6.2.3"

        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 resourceQuotaInfoList containing
              resourceQuotaInfo indicating value TENANT_ID;
        }

        // MEC 048 Clause 6.2.3 Type: ResourceQuotaInfo
        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.5.3.1
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "200 OK",
                        body containing
                            resourceQuotaInfo containing
                                cpuQuota indicating value NUMBER_OF_CPUS, 
                                memoryQuota indicating value MEMORY_IN_MB,
                                diskQuota indicating value AMOUNT_OF_DISK_IN_GB
                            ;
                        ;
                    ;
                    to the MEC_CONSUMER entity
                }
            }
    } // End of TP_MEC_MEC040_MEO_CSE_006_OK
     
     
     
     Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_006_NF"

        Test objective
              "Check that the IUT returns an error on retrieving resourceQuotaInfo for a not existing tenant when requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.5.3.1, clause 6.2.3"

        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 resourceQuotaInfoList containing
              resourceQuotaInfo indicating value NOT_EXISTING_TENANT_ID;
        }

        // MEC 048 Clause 6.2.3 Type: ResourceQuotaInfo
        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.5.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_006_NF
     
     
     
  Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_007_OK"

        Test objective
              "Check that the IUT updates the resourceQuotaInfo for an existing tenant when requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.5.3.2, clause 6.2.3"

        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;
        }

        // MEC 048 Clause 6.2.3 Type: ResourceQuotaInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vPUT containing
                        uri indicating value "/cse/v1/tenants/TENANT_ID/resources/quota_in_system",
                        body containing
                            resourceQuotaInfo containing
                                cpuQuota indicating value NUMBER_OF_CPUS, 
                                memoryQuota indicating value MEMORY_IN_MB,
                                diskQuota indicating value AMOUNT_OF_DISK_IN_GB
                    		;
                    	;	
                    ;	
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.5.3.2
                    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
                            resourceQuotaInfo containing
                                cpuQuota indicating value NUMBER_OF_CPUS, 
                                memoryQuota indicating value MEMORY_IN_MB,
                                diskQuota indicating value AMOUNT_OF_DISK_IN_GB
                    		;
                    	;
                    ;
                    to the MEC_CONSUMER entity
                }
            }
    } // End of TP_MEC_MEC040_MEO_CSE_007_OK
     
     
  Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_007_NF"

        Test objective
              "Check that the IUT returns an error on updating the resourceQuotaInfo for a not existing tenant when requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.5.3.2, clause 6.2.3"

        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 resourceQuotaInfoList containing
              resourceQuotaInfo indicating value NOT_EXISTING_TENANT_ID;
        }

        // MEC 048 Clause 6.2.3 Type: ResourceQuotaInfo
        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",
                        body containing
                            resourceQuotaInfo containing
                                cpuQuota indicating value NUMBER_OF_CPUS, 
                                memoryQuota indicating value MEMORY_IN_MB,
                                diskQuota indicating value AMOUNT_OF_DISK_IN_GB
                    		;
                    	;	
                    ;	
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.5.3.2
                    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_007_NF
     
     
     
  Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_008_OK"

        Test objective
              "Check that the IUT creates the resourceQuotaInfo for an existing tenant when requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.5.3.4, clause 6.2.3"

        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;
        }

        // MEC 048 Clause 6.2.3 Type: ResourceQuotaInfo
        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
                                cpuQuota indicating value NUMBER_OF_CPUS, 
                                memoryQuota indicating value MEMORY_IN_MB,
                                diskQuota indicating value AMOUNT_OF_DISK_IN_GB
                    		;
                    	;	
                    ;	
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.5.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
                                cpuQuota indicating value NUMBER_OF_CPUS, 
                                memoryQuota indicating value MEMORY_IN_MB,
                                diskQuota indicating value AMOUNT_OF_DISK_IN_GB
                    		;
                    	;
                    ;
                    to the MEC_CONSUMER entity
                }
            }
    } // End of TP_MEC_MEC040_MEO_CSE_008_OK
     
     
     
  Test Purpose {
	TP Id "TP_MEC_MEC040_MEO_CSE_008_NF"

        Test objective
              "Check that the IUT returns an error on creating the resourceQuotaInfo for a not existing tenant when requested by a MEC Orchestrator"

        Reference 
            "ETSI GS MEC 048 V3.1.1, clause 7.5.3.4, clause 6.2.3"

        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;
        }

        // MEC 048 Clause 6.2.3 Type: ResourceQuotaInfo
        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vPOST containing
                        uri indicating value "/cse/v1/tenants/NOT_EXISTING_TENANT_ID/resources/quota_in_system",
                        body containing
                            resourceQuotaInfo containing
                                cpuQuota indicating value NUMBER_OF_CPUS, 
                                memoryQuota indicating value MEMORY_IN_MB,
                                diskQuota indicating value AMOUNT_OF_DISK_IN_GB
                    		;
                    	;	
                    ;	
                    from the MEC_CONSUMER entity
                }
                then {
                    // MEC 048 Clause 7.5.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_008_NF     
     
	}