A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
properly pass the cluster's properties to the created hosts
[simgrid.git]
/
src
/
surf
/
vm_workstation_interface.hpp
diff --git
a/src/surf/vm_workstation_interface.hpp
b/src/surf/vm_workstation_interface.hpp
index
262b288
..
4479a7f
100644
(file)
--- a/
src/surf/vm_workstation_interface.hpp
+++ b/
src/surf/vm_workstation_interface.hpp
@@
-12,8
+12,6
@@
#define GUESTOS_NOISE 100 // This value corresponds to the cost of the global action associated to the VM
// It corresponds to the cost of a VM running no tasks.
#define GUESTOS_NOISE 100 // This value corresponds to the cost of the global action associated to the VM
// It corresponds to the cost of a VM running no tasks.
-void surf_vm_workstation_model_init(void);
-
/***********
* Classes *
***********/
/***********
* Classes *
***********/
@@
-68,16
+66,22
@@
public:
*/
~WorkstationVMModel(){};
*/
~WorkstationVMModel(){};
+ WorkstationPtr createWorkstation(const char *name){DIE_IMPOSSIBLE;}
+
/**
* @brief Create a new WorkstationVM
/**
* @brief Create a new WorkstationVM
- *
+ *
* @param name The name of the new WorkstationVM
* @param ind_phys_workstation The workstation hosting the VM
* @param name The name of the new WorkstationVM
* @param ind_phys_workstation The workstation hosting the VM
- *
+ *
*/
*/
- virtual void createResource(const char *name, void *ind_phys_workstation)=0;
-
+ virtual WorkstationVMPtr createWorkstationVM(const char *name, surf_resource_t ind_phys_workstation)=0;
void adjustWeightOfDummyCpuActions() {};
void adjustWeightOfDummyCpuActions() {};
+
+ typedef boost::intrusive::list<WorkstationVM,
+ boost::intrusive::constant_time_size<false> >
+ vm_list_t;
+ static vm_list_t ws_vms;
};
/************
};
/************
@@
-88,11
+92,12
@@
public:
* @brief SURF workstation VM interface class
* @details A workstation VM represent an virtual machine
*/
* @brief SURF workstation VM interface class
* @details A workstation VM represent an virtual machine
*/
-class WorkstationVM : public Workstation {
+class WorkstationVM : public Workstation,
+ public boost::intrusive::list_base_hook<> {
public:
/**
* @brief WorkstationVM consrtructor
public:
/**
* @brief WorkstationVM consrtructor
- *
+ *
* @param model WorkstationModel associated to this Workstation
* @param name The name of the Workstation
* @param props Dictionary of properties associated to this Workstation
* @param model WorkstationModel associated to this Workstation
* @param name The name of the Workstation
* @param props Dictionary of properties associated to this Workstation
@@
-131,7
+136,7
@@
public:
/**
* @brief Migrate the VM to the destination host
/**
* @brief Migrate the VM to the destination host
- *
+ *
* @param ind_vm_ws_dest The destination host
*/
virtual void migrate(surf_resource_t ind_vm_ws_dest)=0;
* @param ind_vm_ws_dest The destination host
*/
virtual void migrate(surf_resource_t ind_vm_ws_dest)=0;