11 #ifndef WRENCH_CLOUDSERVICEMESSAGE_H
12 #define WRENCH_CLOUDSERVICEMESSAGE_H
15 #include <wrench/services/compute/bare_metal/BareMetalComputeService.h>
17 #include "wrench/services/compute/ComputeServiceMessage.h"
30 class CloudComputeServiceMessage :
public ComputeServiceMessage {
32 CloudComputeServiceMessage(
const std::string &name,
double payload);
38 class CloudComputeServiceGetExecutionHostsRequestMessage :
public CloudComputeServiceMessage {
40 CloudComputeServiceGetExecutionHostsRequestMessage(
const std::string &answer_mailbox,
double payload);
43 std::string answer_mailbox;
49 class CloudComputeServiceGetExecutionHostsAnswerMessage :
public CloudComputeServiceMessage {
51 CloudComputeServiceGetExecutionHostsAnswerMessage(std::vector<std::string> &execution_hosts,
double payload);
54 std::vector<std::string> execution_hosts;
60 class CloudComputeServiceCreateVMRequestMessage :
public CloudComputeServiceMessage {
62 CloudComputeServiceCreateVMRequestMessage(
const std::string &answer_mailbox,
63 unsigned long num_cores,
65 std::string desired_vm_name,
66 std::map<std::string, std::string> property_list,
67 std::map<std::string, double> messagepayload_list,
72 std::string answer_mailbox;
74 unsigned long num_cores;
78 std::string desired_vm_name;
80 std::map<std::string, std::string> property_list;
82 std::map<std::string, double> messagepayload_list;
88 class CloudComputeServiceCreateVMAnswerMessage :
public CloudComputeServiceMessage {
90 CloudComputeServiceCreateVMAnswerMessage(
bool success, std::string &vm_name,
91 std::shared_ptr<FailureCause> failure_cause,
double payload);
98 std::shared_ptr<FailureCause> failure_cause;
104 class CloudComputeServiceShutdownVMRequestMessage :
public CloudComputeServiceMessage {
106 CloudComputeServiceShutdownVMRequestMessage(
const std::string &answer_mailbox,
107 const std::string &vm_name,
112 std::string answer_mailbox;
120 class CloudComputeServiceShutdownVMAnswerMessage :
public CloudComputeServiceMessage {
122 CloudComputeServiceShutdownVMAnswerMessage(
bool success, std::shared_ptr<FailureCause> failure_cause,
128 std::shared_ptr<FailureCause> failure_cause;
134 class CloudComputeServiceStartVMRequestMessage :
public CloudComputeServiceMessage {
136 CloudComputeServiceStartVMRequestMessage(
const std::string &answer_mailbox,
137 const std::string &vm_name,
138 const std::string &pm_name,
143 std::string answer_mailbox;
153 class CloudComputeServiceStartVMAnswerMessage :
public CloudComputeServiceMessage {
155 CloudComputeServiceStartVMAnswerMessage(
bool success,
156 std::shared_ptr<BareMetalComputeService> cs,
157 std::shared_ptr<FailureCause> failure_cause,
163 std::shared_ptr<BareMetalComputeService> cs;
165 std::shared_ptr<FailureCause> failure_cause;
171 class CloudComputeServiceSuspendVMRequestMessage :
public CloudComputeServiceMessage {
173 CloudComputeServiceSuspendVMRequestMessage(
const std::string &answer_mailbox,
174 const std::string &vm_name,
179 std::string answer_mailbox;
187 class CloudComputeServiceSuspendVMAnswerMessage :
public CloudComputeServiceMessage {
189 CloudComputeServiceSuspendVMAnswerMessage(
bool success,
190 std::shared_ptr<FailureCause> failure_cause,
196 std::shared_ptr<FailureCause> failure_cause;
202 class CloudComputeServiceResumeVMRequestMessage :
public CloudComputeServiceMessage {
204 CloudComputeServiceResumeVMRequestMessage(
const std::string &answer_mailbox,
205 const std::string &vm_name,
210 std::string answer_mailbox;
218 class CloudComputeServiceResumeVMAnswerMessage :
public CloudComputeServiceMessage {
220 CloudComputeServiceResumeVMAnswerMessage(
bool success,
221 std::shared_ptr<FailureCause> failure_cause,
227 std::shared_ptr<FailureCause> failure_cause;
234 class CloudComputeServiceDestroyVMRequestMessage :
public CloudComputeServiceMessage {
236 CloudComputeServiceDestroyVMRequestMessage(
const std::string &answer_mailbox,
237 const std::string &vm_name,
242 std::string answer_mailbox;
250 class CloudComputeServiceDestroyVMAnswerMessage :
public CloudComputeServiceMessage {
252 CloudComputeServiceDestroyVMAnswerMessage(
bool success,
253 std::shared_ptr<FailureCause> failure_cause,
259 std::shared_ptr<FailureCause> failure_cause;
267 #endif //WRENCH_CLOUDSERVICEMESSAGE_H