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(
double payload);
38 class CloudComputeServiceGetExecutionHostsRequestMessage :
public CloudComputeServiceMessage {
40 CloudComputeServiceGetExecutionHostsRequestMessage(simgrid::s4u::Mailbox *answer_mailbox,
double payload);
43 simgrid::s4u::Mailbox *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(simgrid::s4u::Mailbox *answer_mailbox,
63 unsigned long num_cores,
65 std::string desired_vm_name,
66 WRENCH_PROPERTY_COLLECTION_TYPE property_list,
67 WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE messagepayload_list,
72 simgrid::s4u::Mailbox *answer_mailbox;
74 unsigned long num_cores;
78 std::string desired_vm_name;
80 WRENCH_PROPERTY_COLLECTION_TYPE property_list;
82 WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE 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(simgrid::s4u::Mailbox *answer_mailbox,
107 const std::string &vm_name,
108 bool send_failure_notifications,
114 simgrid::s4u::Mailbox *answer_mailbox;
118 bool send_failure_notifications;
126 class CloudComputeServiceShutdownVMAnswerMessage :
public CloudComputeServiceMessage {
128 CloudComputeServiceShutdownVMAnswerMessage(
bool success, std::shared_ptr<FailureCause> failure_cause,
134 std::shared_ptr<FailureCause> failure_cause;
140 class CloudComputeServiceStartVMRequestMessage :
public CloudComputeServiceMessage {
142 CloudComputeServiceStartVMRequestMessage(simgrid::s4u::Mailbox *answer_mailbox,
143 const std::string &vm_name,
144 const std::string &pm_name,
149 simgrid::s4u::Mailbox *answer_mailbox;
159 class CloudComputeServiceStartVMAnswerMessage :
public CloudComputeServiceMessage {
161 CloudComputeServiceStartVMAnswerMessage(
bool success,
162 std::shared_ptr<BareMetalComputeService> cs,
163 std::shared_ptr<FailureCause> failure_cause,
169 std::shared_ptr<BareMetalComputeService> cs;
171 std::shared_ptr<FailureCause> failure_cause;
177 class CloudComputeServiceSuspendVMRequestMessage :
public CloudComputeServiceMessage {
179 CloudComputeServiceSuspendVMRequestMessage(simgrid::s4u::Mailbox *answer_mailbox,
180 const std::string &vm_name,
185 simgrid::s4u::Mailbox *answer_mailbox;
193 class CloudComputeServiceSuspendVMAnswerMessage :
public CloudComputeServiceMessage {
195 CloudComputeServiceSuspendVMAnswerMessage(
bool success,
196 std::shared_ptr<FailureCause> failure_cause,
202 std::shared_ptr<FailureCause> failure_cause;
208 class CloudComputeServiceResumeVMRequestMessage :
public CloudComputeServiceMessage {
210 CloudComputeServiceResumeVMRequestMessage(simgrid::s4u::Mailbox *mailbox,
211 const std::string &vm_name,
216 simgrid::s4u::Mailbox *answer_mailbox;
224 class CloudComputeServiceResumeVMAnswerMessage :
public CloudComputeServiceMessage {
226 CloudComputeServiceResumeVMAnswerMessage(
bool success,
227 std::shared_ptr<FailureCause> failure_cause,
233 std::shared_ptr<FailureCause> failure_cause;
240 class CloudComputeServiceDestroyVMRequestMessage :
public CloudComputeServiceMessage {
242 CloudComputeServiceDestroyVMRequestMessage(simgrid::s4u::Mailbox *answer_mailbox,
243 const std::string &vm_name,
248 simgrid::s4u::Mailbox *answer_mailbox;
256 class CloudComputeServiceDestroyVMAnswerMessage :
public CloudComputeServiceMessage {
258 CloudComputeServiceDestroyVMAnswerMessage(
bool success,
259 std::shared_ptr<FailureCause> failure_cause,
265 std::shared_ptr<FailureCause> failure_cause;
273 #endif //WRENCH_CLOUDSERVICEMESSAGE_H