Table 2. OCL rules for the model validation process I.
| Rule 1 | CloudProvider_must_offer_once_each_VM_for_each_SLA_type |
| Rule Description | Cloud service provider must offer each VM only once for each SLA type. |
| Rule OCL Code | context SLA inv self.vmcost->isUnique(vmcost | vmcost.vm) |
| Notification Type | Error |
| MSCC Recommendation | Please, enter each VM only once in each SLA! |
| Rule 2 | User_must_sign_a_VM_SLA_offered_by_the_CloudProvider |
| Rule Description | A User must always sign an SLA offered by the cloud service provider. |
| Rule OCL Code | context User inv uml2cloud::CloudProvider.allInstances() ->collect(cp | cp.sla)->includes(self.sla) |
| Notification Type | Error |
| MSCC Recommendation | Please, sign an SLA! |
| Rule 3 | User_request_a_VM_not_offered_in_the_signed_SLA |
| Rule Description | A user cannot request a VM, which is not offered in the signed SLA. |
| Rule OCL Code | context Request inv uml2cloud::User.allInstances() ->select(user | user.base_Lifeline.coveredBy ->includes(self.sendEvent)) ->collect(user | user.sla.vmcost ->collect(vmcost | vmcost.vm)) ->includes(self.vmInstantation.vmType) |
| Notification Type | Error |
| MSCC Recommendation | Please, one of the following actions must be performed to resolve the error: 1. A user must request another VM that is in the SLA. 2. A user must sign another SLA including that VM type. 3. The cloud service provider must include that type in this SLA signed by the user! |
| Rule 4 | SLA_base_cost_must_be_greater_than_or_equal_to_zero |
| Rule Description | The defined base cost value must be greater or equal to zero. |
| Rule OCL Code | context SLA inv self.vmcost ->forAll(vmcost | vmcost.base.value >= 0) |
| Notification Type | Error |
| MSCC Recommendation | Please, enter a positive value for the base cost value! |
| Rule 5 | SLA_inc-priority_cost_must_be_greater_than_or_equal_to_zero |
| Rule Description | The defined inc-priority cost for high-priority users must be greater or equal to zero. |
| Rule OCL Code | context SLA inv self.vmcost ->forAll(vmcost | vmcost.incpriority >= 0) |
| Notification Type | Error |
| MSCC Recommendation | Please, enter a positive value for the inc-cost cost value! |
| Rule 6 | SLA_discount_must_be_greater_than_or_equal_to_zero |
| Rule Description | The discount offered to regular users must be greater or equal to zero. |
| Rule OCL Code | context SLA inv self.vmcost ->forAll(vmcost | vmcost.discount >= 0) |
| Notification Type | Error |
| MSCC Recommendation | Please, enter a positive value for the discount value! |