CloudServiceMessage.h
1 
11 #ifndef WRENCH_CLOUDSERVICEMESSAGE_H
12 #define WRENCH_CLOUDSERVICEMESSAGE_H
13 
14 #include <vector>
15 
16 #include "wrench/services/compute/ComputeServiceMessage.h"
17 
18 namespace wrench {
19 
20  class ComputeService;
21 
22  /***********************/
24  /***********************/
25 
30  protected:
31  CloudServiceMessage(const std::string &name, double payload);
32  };
33 
38  public:
39  CloudServiceGetExecutionHostsRequestMessage(const std::string &answer_mailbox, double payload);
40 
42  std::string answer_mailbox;
43  };
44 
49  public:
50  CloudServiceGetExecutionHostsAnswerMessage(std::vector<std::string> &execution_hosts, double payload);
51 
53  std::vector<std::string> execution_hosts;
54  };
55 
60  public:
61  CloudServiceCreateVMRequestMessage(const std::string &answer_mailbox,
62  const std::string &pm_hostname,
63  const std::string &vm_hostname,
64  unsigned long num_cores,
65  double ram_memory,
66  std::map<std::string, std::string> &property_list,
67  std::map<std::string, std::string> &messagepayload_list,
68  double payload);
69 
70  public:
72  std::string answer_mailbox;
74  std::string pm_hostname;
76  std::string vm_hostname;
78  unsigned long num_cores;
80  double ram_memory;
82  std::map<std::string, std::string> property_list;
84  std::map<std::string, std::string> messagepayload_list;
85  };
86 
91  public:
92  CloudServiceCreateVMAnswerMessage(bool success, double payload);
93 
95  bool success;
96  };
97 
102  public:
103  CloudServiceShutdownVMRequestMessage(const std::string &answer_mailbox,
104  const std::string &vm_hostname,
105  double payload);
106 
107  public:
109  std::string answer_mailbox;
111  std::string vm_hostname;
112  };
113 
118  public:
119  CloudServiceShutdownVMAnswerMessage(bool success, double payload);
120 
122  bool success;
123  };
124 
129  public:
130  CloudServiceStartVMRequestMessage(const std::string &answer_mailbox,
131  const std::string &vm_hostname,
132  double payload);
133 
134  public:
136  std::string answer_mailbox;
138  std::string vm_hostname;
139  };
140 
145  public:
146  CloudServiceStartVMAnswerMessage(bool success, double payload);
147 
149  bool success;
150  };
151 
156  public:
157  CloudServiceSuspendVMRequestMessage(const std::string &answer_mailbox,
158  const std::string &vm_hostname,
159  double payload);
160 
161  public:
163  std::string answer_mailbox;
165  std::string vm_hostname;
166  };
167 
172  public:
173  CloudServiceSuspendVMAnswerMessage(bool success, double payload);
174 
176  bool success;
177  };
178 
183  public:
184  CloudServiceResumeVMRequestMessage(const std::string &answer_mailbox,
185  const std::string &vm_hostname,
186  double payload);
187 
188  public:
190  std::string answer_mailbox;
192  std::string vm_hostname;
193  };
194 
199  public:
200  CloudServiceResumeVMAnswerMessage(bool success, double payload);
201 
203  bool success;
204  };
205 
206  /***********************/
208  /***********************/
209 }
210 
211 #endif //WRENCH_CLOUDSERVICEMESSAGE_H
std::string vm_hostname
The name of the new VM host.
Definition: CloudServiceMessage.h:76
Top-level class for messages received/sent by a ComputeService.
Definition: ComputeServiceMessage.h:32
std::map< std::string, std::string > property_list
A property list ({} means "use all defaults")
Definition: CloudServiceMessage.h:82
bool success
Whether the VM resume was successful or not.
Definition: CloudServiceMessage.h:203
bool success
Whether the VM creation was successful or not.
Definition: CloudServiceMessage.h:95
std::string pm_hostname
The name of the physical machine host.
Definition: CloudServiceMessage.h:74
double payload
The message size in bytes.
Definition: SimulationMessage.h:39
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: CloudServiceMessage.h:190
std::string vm_hostname
The name of the new VM host.
Definition: CloudServiceMessage.h:111
std::string answer_mailbox
The mailbox to which a reply should be sent.
Definition: CloudServiceMessage.h:42
A message sent by a CloudService in answer to a VM creation request.
Definition: CloudServiceMessage.h:90
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: CloudServiceMessage.h:109
A message sent by a CloudService in answer to a VM resume request.
Definition: CloudServiceMessage.h:198
std::string name
The message name.
Definition: SimulationMessage.h:37
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: CloudServiceMessage.h:78
A message sent to a CloudService to request a VM creation.
Definition: CloudServiceMessage.h:59
std::string vm_hostname
The name of the new VM host.
Definition: CloudServiceMessage.h:192
bool success
Whether the VM shutdown was successful or not.
Definition: CloudServiceMessage.h:122
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: CloudServiceMessage.h:163
std::vector< std::string > execution_hosts
The list of execution hosts.
Definition: CloudServiceMessage.h:53
A message sent by a CloudService in answer to a VM shutdown request.
Definition: CloudServiceMessage.h:117
A message sent by a CloudService in answer to a list of execution hosts request.
Definition: CloudServiceMessage.h:48
bool success
Whether the VM suspend was successful or not.
Definition: CloudServiceMessage.h:176
A message sent to a CloudService to request a VM suspend.
Definition: CloudServiceMessage.h:155
std::string vm_hostname
The name of the new VM host.
Definition: CloudServiceMessage.h:165
A message sent to a CloudService to request a VM start.
Definition: CloudServiceMessage.h:128
bool success
Whether the VM start was successful or not.
Definition: CloudServiceMessage.h:149
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: CloudServiceMessage.h:136
A message sent by a CloudService in answer to a VM start request.
Definition: CloudServiceMessage.h:144
A message sent to a CloudService to request a VM shutdown.
Definition: CloudServiceMessage.h:101
std::map< std::string, std::string > messagepayload_list
A message payload list ({} means "use all defaults")
Definition: CloudServiceMessage.h:84
double ram_memory
The VM RAM memory capacity (0 means "use all memory available on the host", this can be lead to out o...
Definition: CloudServiceMessage.h:80
A message sent to a CloudService to request a VM resume.
Definition: CloudServiceMessage.h:182
std::string vm_hostname
The name of the new VM host.
Definition: CloudServiceMessage.h:138
A message sent by a CloudService in answer to a VM suspend request.
Definition: CloudServiceMessage.h:171
Definition: TerminalOutput.cpp:15
A message sent to a CloudService to request the list of its execution hosts.
Definition: CloudServiceMessage.h:37
CloudServiceMessage(const std::string &name, double payload)
Constructor.
Definition: CloudServiceMessage.cpp:22
Top-level class for messages received/sent by a CloudService.
Definition: CloudServiceMessage.h:29
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: CloudServiceMessage.h:72