WRENCH  1.10
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(const std::string &name, double payload);
33  };
34 
38  class CloudComputeServiceGetExecutionHostsRequestMessage : public CloudComputeServiceMessage {
39  public:
40  CloudComputeServiceGetExecutionHostsRequestMessage(const std::string &answer_mailbox, double payload);
41 
43  std::string 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(const std::string &answer_mailbox,
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 
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(const std::string &answer_mailbox,
107  const std::string &vm_name,
108  double payload);
109 
110  public:
112  std::string answer_mailbox;
114  std::string vm_name;
115  };
116 
120  class CloudComputeServiceShutdownVMAnswerMessage : public CloudComputeServiceMessage {
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 
134  class CloudComputeServiceStartVMRequestMessage : public CloudComputeServiceMessage {
135  public:
136  CloudComputeServiceStartVMRequestMessage(const std::string &answer_mailbox,
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 
153  class CloudComputeServiceStartVMAnswerMessage : public CloudComputeServiceMessage {
154  public:
155  CloudComputeServiceStartVMAnswerMessage(bool success,
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 
171  class CloudComputeServiceSuspendVMRequestMessage : public CloudComputeServiceMessage {
172  public:
173  CloudComputeServiceSuspendVMRequestMessage(const std::string &answer_mailbox,
174  const std::string &vm_name,
175  double payload);
176 
177  public:
179  std::string answer_mailbox;
181  std::string vm_name;
182  };
183 
187  class CloudComputeServiceSuspendVMAnswerMessage : public CloudComputeServiceMessage {
188  public:
189  CloudComputeServiceSuspendVMAnswerMessage(bool success,
190  std::shared_ptr<FailureCause> failure_cause,
191  double payload);
192 
194  bool success;
196  std::shared_ptr<FailureCause> failure_cause;
197  };
198 
202  class CloudComputeServiceResumeVMRequestMessage : public CloudComputeServiceMessage {
203  public:
204  CloudComputeServiceResumeVMRequestMessage(const std::string &answer_mailbox,
205  const std::string &vm_name,
206  double payload);
207 
208  public:
210  std::string answer_mailbox;
212  std::string vm_name;
213  };
214 
218  class CloudComputeServiceResumeVMAnswerMessage : public CloudComputeServiceMessage {
219  public:
220  CloudComputeServiceResumeVMAnswerMessage(bool success,
221  std::shared_ptr<FailureCause> failure_cause,
222  double payload);
223 
225  bool success;
227  std::shared_ptr<FailureCause> failure_cause;
228  };
229 
230 
234  class CloudComputeServiceDestroyVMRequestMessage : public CloudComputeServiceMessage {
235  public:
236  CloudComputeServiceDestroyVMRequestMessage(const std::string &answer_mailbox,
237  const std::string &vm_name,
238  double payload);
239 
240  public:
242  std::string answer_mailbox;
244  std::string vm_name;
245  };
246 
250  class CloudComputeServiceDestroyVMAnswerMessage : public CloudComputeServiceMessage {
251  public:
252  CloudComputeServiceDestroyVMAnswerMessage(bool success,
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
wrench
Definition: Alarm.cpp:20