Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename the plugins from the command line, and document it
[simgrid.git] / src / plugins / vm / VirtualMachineImpl.cpp
index c8fd8c3..350e3f4 100644 (file)
@@ -46,7 +46,7 @@ const double virt_overhead = 1; // 0.95
 
 static void hostStateChange(s4u::Host& host)
 {
-  if (host.isOff()) { // just turned off.
+  if (host.is_off()) { // just turned off.
     std::vector<s4u::VirtualMachine*> trash;
     /* Find all VMs living on that host */
     for (s4u::VirtualMachine* const& vm : VirtualMachineImpl::allVms_)
@@ -58,7 +58,7 @@ static void hostStateChange(s4u::Host& host)
 }
 VMModel::VMModel()
 {
-  s4u::Host::onStateChange.connect(hostStateChange);
+  s4u::Host::on_state_change.connect(hostStateChange);
 }
 
 double VMModel::next_occuring_event(double now)
@@ -90,16 +90,15 @@ double VMModel::next_occuring_event(double now)
   /* iterate for all virtual machines */
   for (s4u::VirtualMachine* const& ws_vm : VirtualMachineImpl::allVms_) {
     surf::Cpu* cpu = ws_vm->pimpl_cpu;
-    xbt_assert(cpu, "cpu-less host");
 
     double solved_value =
         ws_vm->getImpl()->action_->get_variable()->get_value(); // this is X1 in comment above, what
                                                                 // this VM got in the sharing on the PM
     XBT_DEBUG("assign %f to vm %s @ pm %s", solved_value, ws_vm->get_cname(), ws_vm->getPm()->get_cname());
 
-    xbt_assert(cpu->model() == surf_cpu_model_vm);
-    kernel::lmm::System* vcpu_system = cpu->model()->get_maxmin_system();
-    vcpu_system->update_constraint_bound(cpu->constraint(), virt_overhead * solved_value);
+    xbt_assert(cpu->get_model() == surf_cpu_model_vm);
+    kernel::lmm::System* vcpu_system = cpu->get_model()->get_maxmin_system();
+    vcpu_system->update_constraint_bound(cpu->get_constraint(), virt_overhead * solved_value);
   }
 
   /* 2. Calculate resource share at the virtual machine layer. */