Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cleanups: there is no random in the platforms since a while
[simgrid.git] / src / msg / msg_vm.cpp
index 34abb09..cbfb739 100644 (file)
@@ -46,7 +46,7 @@ const char *MSG_vm_get_property_value(msg_vm_t vm, const char *name)
 xbt_dict_t MSG_vm_get_properties(msg_vm_t vm)
 {
   xbt_assert((vm != NULL), "Invalid parameters (vm is NULL)");
-  return vm->getProperties();
+  return vm->properties();
 }
 
 /** \ingroup m_host_management
@@ -164,6 +164,9 @@ int MSG_vm_is_restoring(msg_vm_t vm)
 /** @brief Create a new VM with specified parameters.
  *  @ingroup msg_VMs*
  *  @param pm        Physical machine that will host the VM
+ *  @param name      [TODO]
+ *  @param ncpus     [TODO]
+ *  @param ramsize   [TODO]
  *  @param net_cap   Maximal bandwidth that the VM can consume (in MByte/s)
  *  @param disk_path (unused) Path to the image that boots
  *  @param disksize  (unused) will represent the size of the VM (will be used during migrations)
@@ -194,7 +197,7 @@ msg_vm_t MSG_vm_create(msg_host_t pm, const char *name,
   params.mig_speed = (double)mig_netspeed * 1024 * 1024; // mig_speed
 
   //XBT_INFO("dp rate %f migspeed : %f intensity mem : %d, updatespeed %f, hostspeed %f",params.dp_rate, params.mig_speed, dp_intensity, update_speed, host_speed);
-  vm->setParams(&params);
+  vm->set_parameters(&params);
 
   return vm;
 }
@@ -209,8 +212,8 @@ msg_vm_t MSG_vm_create_core(msg_host_t ind_pm, const char *name)
 {
   /* make sure the VM of the same name does not exit */
   {
-    simgrid::Host* ind_host_tmp =
-      (simgrid::Host*) xbt_dict_get_or_null(host_list, name);
+    simgrid::s4u::Host* ind_host_tmp =
+      (simgrid::s4u::Host*) xbt_dict_get_or_null(host_list, name);
     if (ind_host_tmp != nullptr && sg_host_simix(ind_host_tmp) != nullptr) {
       XBT_ERROR("host %s already exits", name);
       return nullptr;
@@ -251,8 +254,6 @@ void MSG_vm_destroy(msg_vm_t vm)
   /* Then, destroy the VM object */
   simcall_vm_destroy(vm);
 
-  __MSG_host_destroy(vm);
-
   TRACE_msg_vm_end(vm);
 }
 
@@ -359,7 +360,7 @@ static int migration_rx_fun(int argc, char *argv[])
   struct migration_session *ms = (migration_session *) MSG_process_get_data(MSG_process_self());
 
   s_vm_params_t params;
-  ms->vm->getParams(&params);
+  ms->vm->get_parameters(&params);
 
   int need_exit = 0;
 
@@ -688,7 +689,7 @@ static int migration_tx_fun(int argc, char *argv[])
     (migration_session *) MSG_process_get_data(MSG_process_self());
 
   s_vm_params_t params;
-  ms->vm->getParams(&params);
+  ms->vm->get_parameters(&params);
   const sg_size_t ramsize   = params.ramsize;
   const sg_size_t devsize   = params.devsize;
   const int skip_stage1     = params.skip_stage1;