WRENCH  1.11
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
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 
30  class CloudComputeServiceMessage : public ComputeServiceMessage {
31  protected:
32  CloudComputeServiceMessage( double payload);
33  };
34 
38  class CloudComputeServiceGetExecutionHostsRequestMessage : public CloudComputeServiceMessage {
39  public:
40  CloudComputeServiceGetExecutionHostsRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, double payload);
41 
43  simgrid::s4u::Mailbox *answer_mailbox;
44  };
45 
49  class CloudComputeServiceGetExecutionHostsAnswerMessage : public CloudComputeServiceMessage {
50  public:
51  CloudComputeServiceGetExecutionHostsAnswerMessage(std::vector<std::string> &execution_hosts, double payload);
52 
54  std::vector<std::string> execution_hosts;
55  };
56 
60  class CloudComputeServiceCreateVMRequestMessage : public CloudComputeServiceMessage {
61  public:
62  CloudComputeServiceCreateVMRequestMessage(simgrid::s4u::Mailbox *answer_mailbox,
63  unsigned long num_cores,
64  double ram_memory,
65  std::string desired_vm_name,
66  WRENCH_PROPERTY_COLLECTION_TYPE property_list,
67  WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE messagepayload_list,
68  double payload);
69 
70  public:
72  simgrid::s4u::Mailbox *answer_mailbox;
74  unsigned long num_cores;
76  double ram_memory;
78  std::string desired_vm_name;
80  WRENCH_PROPERTY_COLLECTION_TYPE property_list;
82  WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE messagepayload_list;
83  };
84 
88  class CloudComputeServiceCreateVMAnswerMessage : public CloudComputeServiceMessage {
89  public:
90  CloudComputeServiceCreateVMAnswerMessage(bool success, std::string &vm_name,
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 
104  class CloudComputeServiceShutdownVMRequestMessage : public CloudComputeServiceMessage {
105  public:
106  CloudComputeServiceShutdownVMRequestMessage(simgrid::s4u::Mailbox *answer_mailbox,
107  const std::string &vm_name,
108  bool send_failure_notifications,
109  ComputeService::TerminationCause termination_cause,
110  double payload);
111 
112  public:
114  simgrid::s4u::Mailbox *answer_mailbox;
116  std::string vm_name;
118  bool send_failure_notifications;
120  ComputeService::TerminationCause termination_cause;
121  };
122 
126  class CloudComputeServiceShutdownVMAnswerMessage : public CloudComputeServiceMessage {
127  public:
128  CloudComputeServiceShutdownVMAnswerMessage(bool success, std::shared_ptr<FailureCause> failure_cause,
129  double payload);
130 
132  bool success;
134  std::shared_ptr<FailureCause> failure_cause;
135  };
136 
140  class CloudComputeServiceStartVMRequestMessage : public CloudComputeServiceMessage {
141  public:
142  CloudComputeServiceStartVMRequestMessage(simgrid::s4u::Mailbox *answer_mailbox,
143  const std::string &vm_name,
144  const std::string &pm_name,
145  double payload);
146 
147  public:
149  simgrid::s4u::Mailbox *answer_mailbox;
151  std::string vm_name;
153  std::string pm_name;
154  };
155 
159  class CloudComputeServiceStartVMAnswerMessage : public CloudComputeServiceMessage {
160  public:
161  CloudComputeServiceStartVMAnswerMessage(bool success,
162  std::shared_ptr<BareMetalComputeService> cs,
163  std::shared_ptr<FailureCause> failure_cause,
164  double payload);
165 
167  bool success;
169  std::shared_ptr<BareMetalComputeService> cs;
171  std::shared_ptr<FailureCause> failure_cause;
172  };
173 
177  class CloudComputeServiceSuspendVMRequestMessage : public CloudComputeServiceMessage {
178  public:
179  CloudComputeServiceSuspendVMRequestMessage(simgrid::s4u::Mailbox *answer_mailbox,
180  const std::string &vm_name,
181  double payload);
182 
183  public:
185  simgrid::s4u::Mailbox *answer_mailbox;
187  std::string vm_name;
188  };
189 
193  class CloudComputeServiceSuspendVMAnswerMessage : public CloudComputeServiceMessage {
194  public:
195  CloudComputeServiceSuspendVMAnswerMessage(bool success,
196  std::shared_ptr<FailureCause> failure_cause,
197  double payload);
198 
200  bool success;
202  std::shared_ptr<FailureCause> failure_cause;
203  };
204 
208  class CloudComputeServiceResumeVMRequestMessage : public CloudComputeServiceMessage {
209  public:
210  CloudComputeServiceResumeVMRequestMessage(simgrid::s4u::Mailbox *mailbox,
211  const std::string &vm_name,
212  double payload);
213 
214  public:
216  simgrid::s4u::Mailbox *answer_mailbox;
218  std::string vm_name;
219  };
220 
224  class CloudComputeServiceResumeVMAnswerMessage : public CloudComputeServiceMessage {
225  public:
226  CloudComputeServiceResumeVMAnswerMessage(bool success,
227  std::shared_ptr<FailureCause> failure_cause,
228  double payload);
229 
231  bool success;
233  std::shared_ptr<FailureCause> failure_cause;
234  };
235 
236 
240  class CloudComputeServiceDestroyVMRequestMessage : public CloudComputeServiceMessage {
241  public:
242  CloudComputeServiceDestroyVMRequestMessage(simgrid::s4u::Mailbox *answer_mailbox,
243  const std::string &vm_name,
244  double payload);
245 
246  public:
248  simgrid::s4u::Mailbox *answer_mailbox;
250  std::string vm_name;
251  };
252 
256  class CloudComputeServiceDestroyVMAnswerMessage : public CloudComputeServiceMessage {
257  public:
258  CloudComputeServiceDestroyVMAnswerMessage(bool success,
259  std::shared_ptr<FailureCause> failure_cause,
260  double payload);
261 
263  bool success;
265  std::shared_ptr<FailureCause> failure_cause;
266  };
267 
268  /***********************/
270  /***********************/
271 }
272 
273 #endif //WRENCH_CLOUDSERVICEMESSAGE_H
wrench::ComputeService::TerminationCause
TerminationCause
Job termination cause enum.
Definition: ComputeService.h:67
wrench
Definition: Action.cpp:28