CloudComputeServiceMessage.h
1 
11 #ifndef WRENCH_CLOUDSERVICEMESSAGE_H
12 #define WRENCH_CLOUDSERVICEMESSAGE_H
13 
14 #include <vector>
15 #include <wrench/services/compute/bare_metal/BareMetalComputeService.h>
16 
17 #include "wrench/services/compute/ComputeServiceMessage.h"
18 
19 namespace wrench {
20 
21  class ComputeService;
22 
23  /***********************/
25  /***********************/
26 
31  protected:
32  CloudComputeServiceMessage(const std::string &name, double payload);
33  };
34 
39  public:
41 
43  std::string answer_mailbox;
44  };
45 
50  public:
52 
54  std::vector<std::string> execution_hosts;
55  };
56 
61  public:
63  unsigned long num_cores,
64  double ram_memory,
65  std::string desired_vm_name,
66  std::map<std::string, std::string> property_list,
67  std::map<std::string, double> messagepayload_list,
68  double payload);
69 
70  public:
72  std::string answer_mailbox;
74  unsigned long num_cores;
76  double ram_memory;
78  std::string desired_vm_name;
80  std::map<std::string, std::string> property_list;
82  std::map<std::string, double> messagepayload_list;
83  };
84 
89  public:
91  std::shared_ptr<FailureCause> failure_cause, double payload);
92 
94  bool success;
96  std::string vm_name;
98  std::shared_ptr<FailureCause> failure_cause;
99  };
100 
105  public:
107  const std::string &vm_name,
108  double payload);
109 
110  public:
112  std::string answer_mailbox;
114  std::string vm_name;
115  };
116 
121  public:
122  CloudComputeServiceShutdownVMAnswerMessage(bool success, std::shared_ptr<FailureCause> failure_cause,
123  double payload);
124 
126  bool success;
128  std::shared_ptr<FailureCause> failure_cause;
129  };
130 
135  public:
137  const std::string &vm_name,
138  const std::string &pm_name,
139  double payload);
140 
141  public:
143  std::string answer_mailbox;
145  std::string vm_name;
147  std::string pm_name;
148  };
149 
154  public:
156  std::shared_ptr<BareMetalComputeService> cs,
157  std::shared_ptr<FailureCause> failure_cause,
158  double payload);
159 
161  bool success;
163  std::shared_ptr<BareMetalComputeService> cs;
165  std::shared_ptr<FailureCause> failure_cause;
166  };
167 
172  public:
174  const std::string &vm_name,
175  double payload);
176 
177  public:
179  std::string answer_mailbox;
181  std::string vm_name;
182  };
183 
188  public:
190  std::shared_ptr<FailureCause> failure_cause,
191  double payload);
192 
194  bool success;
196  std::shared_ptr<FailureCause> failure_cause;
197  };
198 
203  public:
205  const std::string &vm_name,
206  double payload);
207 
208  public:
210  std::string answer_mailbox;
212  std::string vm_name;
213  };
214 
219  public:
221  std::shared_ptr<FailureCause> failure_cause,
222  double payload);
223 
225  bool success;
227  std::shared_ptr<FailureCause> failure_cause;
228  };
229 
230 
235  public:
237  const std::string &vm_name,
238  double payload);
239 
240  public:
242  std::string answer_mailbox;
244  std::string vm_name;
245  };
246 
251  public:
253  std::shared_ptr<FailureCause> failure_cause,
254  double payload);
255 
257  bool success;
259  std::shared_ptr<FailureCause> failure_cause;
260  };
261 
262  /***********************/
264  /***********************/
265 }
266 
267 #endif //WRENCH_CLOUDSERVICEMESSAGE_H
A message sent by a CloudComputeService in answer to a VM destroy request.
Definition: CloudComputeServiceMessage.h:250
std::string vm_name
The name of the VM to start.
Definition: CloudComputeServiceMessage.h:145
A message sent to a CloudComputeService to request a VM destruction.
Definition: CloudComputeServiceMessage.h:234
A message sent to a CloudComputeService to request a VM creation.
Definition: CloudComputeServiceMessage.h:60
CloudComputeServiceCreateVMAnswerMessage(bool success, std::string &vm_name, std::shared_ptr< FailureCause > failure_cause, double payload)
Constructor.
Definition: CloudComputeServiceMessage.cpp:100
A message sent by a CloudComputeService in answer to a VM suspend request.
Definition: CloudComputeServiceMessage.h:187
A message sent by a CloudComputeService in answer to a VM creation request.
Definition: CloudComputeServiceMessage.h:88
bool success
Whether the VM start was successful or not.
Definition: CloudComputeServiceMessage.h:161
std::string name
The message name.
Definition: SimulationMessage.h:37
double ram_memory
The VM RAM memory_manager_service capacity (0 means "use all memory_manager_service available on the ...
Definition: CloudComputeServiceMessage.h:76
Top-level class for messages received/sent by a ComputeService.
Definition: ComputeServiceMessage.h:32
std::string vm_name
The VM name if success.
Definition: CloudComputeServiceMessage.h:96
std::string vm_name
The name of the new VM host.
Definition: CloudComputeServiceMessage.h:114
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: CloudComputeServiceMessage.h:143
CloudComputeServiceShutdownVMAnswerMessage(bool success, std::shared_ptr< FailureCause > failure_cause, double payload)
Constructor.
Definition: CloudComputeServiceMessage.cpp:137
std::string desired_vm_name
The desired name for the VM ("" means "pick for me")
Definition: CloudComputeServiceMessage.h:78
std::shared_ptr< FailureCause > failure_cause
The failure cause (or nullptr if success)
Definition: CloudComputeServiceMessage.h:259
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: CloudComputeServiceMessage.h:112
std::map< std::string, std::string > property_list
A property list for the bare_metal that will run on the VM ({} means "use all defaults")
Definition: CloudComputeServiceMessage.h:80
CloudComputeServiceDestroyVMAnswerMessage(bool success, std::shared_ptr< FailureCause > failure_cause, double payload)
Constructor.
Definition: CloudComputeServiceMessage.cpp:284
A message sent to a CloudComputeService to request a VM start.
Definition: CloudComputeServiceMessage.h:134
std::string vm_name
The name of the VM host.
Definition: CloudComputeServiceMessage.h:212
std::string pm_name
The name of the physical host on which to start the VM (or "" if up to the service")
Definition: CloudComputeServiceMessage.h:147
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: CloudComputeServiceMessage.h:210
A message sent to a CloudComputeService to request a VM resume.
Definition: CloudComputeServiceMessage.h:202
CloudComputeServiceSuspendVMRequestMessage(const std::string &answer_mailbox, const std::string &vm_name, double payload)
Constructor.
Definition: CloudComputeServiceMessage.cpp:192
std::shared_ptr< BareMetalComputeService > cs
The VM's compute service.
Definition: CloudComputeServiceMessage.h:163
A message sent by a CloudComputeService in answer to a VM start request.
Definition: CloudComputeServiceMessage.h:153
Definition: Alarm.cpp:20
std::string answer_mailbox
The mailbox to which a reply should be sent.
Definition: CloudComputeServiceMessage.h:43
bool success
Whether the VM suspend was successful or not.
Definition: CloudComputeServiceMessage.h:194
bool success
Whether the VM shutdown was successful or not.
Definition: CloudComputeServiceMessage.h:126
CloudComputeServiceShutdownVMRequestMessage(const std::string &answer_mailbox, const std::string &vm_name, double payload)
Constructor.
Definition: CloudComputeServiceMessage.cpp:116
A message sent by a CloudComputeService in answer to a VM resume request.
Definition: CloudComputeServiceMessage.h:218
bool success
Whether the VM resume was successful or not.
Definition: CloudComputeServiceMessage.h:225
CloudComputeServiceStartVMAnswerMessage(bool success, std::shared_ptr< BareMetalComputeService > cs, std::shared_ptr< FailureCause > failure_cause, double payload)
Constructor.
Definition: CloudComputeServiceMessage.cpp:176
CloudComputeServiceResumeVMRequestMessage(const std::string &answer_mailbox, const std::string &vm_name, double payload)
Constructor.
Definition: CloudComputeServiceMessage.cpp:227
double payload
The message size in bytes.
Definition: SimulationMessage.h:39
A message sent to a CloudComputeService to request a VM suspend.
Definition: CloudComputeServiceMessage.h:171
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: CloudComputeServiceMessage.h:72
A message sent to a CloudComputeService to request a VM shutdown.
Definition: CloudComputeServiceMessage.h:104
CloudComputeServiceGetExecutionHostsRequestMessage(const std::string &answer_mailbox, double payload)
Constructor.
Definition: CloudComputeServiceMessage.cpp:34
std::string vm_name
The name of the new VM host.
Definition: CloudComputeServiceMessage.h:181
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: CloudComputeServiceMessage.h:179
CloudComputeServiceSuspendVMAnswerMessage(bool success, std::shared_ptr< FailureCause > failure_cause, double payload)
Constructor.
Definition: CloudComputeServiceMessage.cpp:213
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, or nullptr on success.
Definition: CloudComputeServiceMessage.h:128
unsigned long num_cores
The number of cores the service can use (0 means "use as many as there are cores on the host")
Definition: CloudComputeServiceMessage.h:74
std::shared_ptr< FailureCause > failure_cause
The failure cause (or nullptr if success)
Definition: CloudComputeServiceMessage.h:227
bool success
Whether the VM suspend was successful or not.
Definition: CloudComputeServiceMessage.h:257
std::shared_ptr< FailureCause > failure_cause
The failure cause (or nullptr if success)
Definition: CloudComputeServiceMessage.h:165
Top-level class for messages received/sent by a CloudComputeService.
Definition: CloudComputeServiceMessage.h:30
CloudComputeServiceStartVMRequestMessage(const std::string &answer_mailbox, const std::string &vm_name, const std::string &pm_name, double payload)
Constructor.
Definition: CloudComputeServiceMessage.cpp:152
CloudComputeServiceResumeVMAnswerMessage(bool success, std::shared_ptr< FailureCause > failure_cause, double payload)
Constructor.
Definition: CloudComputeServiceMessage.cpp:248
CloudComputeServiceDestroyVMRequestMessage(const std::string &answer_mailbox, const std::string &vm_name, double payload)
Constructor.
Definition: CloudComputeServiceMessage.cpp:263
std::shared_ptr< FailureCause > failure_cause
The failure cause (or nullptr if success)
Definition: CloudComputeServiceMessage.h:196
std::vector< std::string > execution_hosts
The list of execution hosts.
Definition: CloudComputeServiceMessage.h:54
A message sent by a CloudComputeService in answer to a VM shutdown request.
Definition: CloudComputeServiceMessage.h:120
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: CloudComputeServiceMessage.h:242
A message sent by a CloudComputeService in answer to a list of execution hosts request.
Definition: CloudComputeServiceMessage.h:49
std::string vm_name
The name of the VM host.
Definition: CloudComputeServiceMessage.h:244
std::map< std::string, double > messagepayload_list
A message payload list for the bare_metal that will run on the VM ({} means "use all defaults")
Definition: CloudComputeServiceMessage.h:82
CloudComputeServiceGetExecutionHostsAnswerMessage(std::vector< std::string > &execution_hosts, double payload)
Constructor.
Definition: CloudComputeServiceMessage.cpp:53
A message sent to a CloudComputeService to request the list of its execution hosts.
Definition: CloudComputeServiceMessage.h:38
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, or nullptr on success.
Definition: CloudComputeServiceMessage.h:98
bool success
Whether the VM creation was successful or not.
Definition: CloudComputeServiceMessage.h:94
CloudComputeServiceMessage(const std::string &name, double payload)
Constructor.
Definition: CloudComputeServiceMessage.cpp:22
CloudComputeServiceCreateVMRequestMessage(const std::string &answer_mailbox, unsigned long num_cores, double ram_memory, std::string desired_vm_name, std::map< std::string, std::string > property_list, std::map< std::string, double > messagepayload_list, double payload)
Constructor.
Definition: CloudComputeServiceMessage.cpp:72