Table 4. OCL rules for the model validation process III.
| Rule 9 | PriorityUser_has_been_modeled_but_no_machine_has_been_reserved |
| Rule Description | There are no reserved VMs for the high-priority user. |
| Rule OCL Code | context PriorityUser inv uml2cloud::CloudInfrastructure.allInstances() ->collect(ci | ci.datacenterElements) ->collect(de | de.dataCenterType) ->collect(dc | dc.rackElements) ->select(re | re.rackType .oclIsKindOf(uml2cloud::ComputingRack) ->select(re | re.rackType .oclAsType(uml2cloud::ComputingRack) .machineType.type= uml2cloud::MachineType::Reserved) ->collectNested(re | re.numberOfRacks*re.rackType.boards *re.rackType.machinesPerBoard)->sum()>0 |
| Notification Type | Warning |
| MSCC Recommendation | Please, reserve some VMs for the high-priority user! |
| Rule 10 | ResumeTime_is_at_least_twice_as_long_as_the_renting_time |
| Rule Description | The initial request time for a VM should be longer than the Renting Time. |
| Rule OCL Code | context Resume inv uml2cloud::Request.allInstances() ->select(req | uml2cloud::RegularUser.allInstances() ->select(ru | ru.base_Lifeline.coveredBy ->includes(self.base_Message.sendEvent)) ->forAll( ru | ru.base_Lifeline.coveredBy ->includes(req.base_Message.sendEvent))) ->forAll(req | req.vmInstantiation.rentingTime .value*2>self.resumeTime.value) |
| Notification Type | Warning |
| MSCC Recommendation | Please, consider that the initial request time should be longer than the renting time! |