CloudService.h
102 void submitStandardJob(StandardJob *job, std::map<std::string, std::string> &service_specific_args) override;
104 void submitPilotJob(PilotJob *job, std::map<std::string, std::string> &service_specific_args) override;
126 std::unique_ptr<SimulationMessage> sendRequest(std::string &answer_mailbox, ComputeServiceMessage *message);
142 virtual void processShutdownVM(const std::string &answer_mailbox, const std::string &vm_hostname);
146 virtual void processSuspendVM(const std::string &answer_mailbox, const std::string &vm_hostname);
148 virtual void processResumeVM(const std::string &answer_mailbox, const std::string &vm_hostname);
169 std::map<std::string, std::tuple<std::shared_ptr<S4U_VirtualMachine>, std::shared_ptr<ComputeService>, unsigned long, unsigned long>> vm_list;
static const std::string START_VM_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the service in answer to a VM start request...
Definition: CloudServiceMessagePayload.h:38
virtual bool startVM(const std::string &vm_hostname)
Start a VM.
Definition: CloudService.cpp:192
static const std::string SUSPEND_VM_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the service in answer to a VM suspend request...
Definition: CloudServiceMessagePayload.h:42
static const std::string STOP_DAEMON_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the daemon to terminate it.
Definition: ServiceMessagePayload.h:31
static const std::string SUBMIT_PILOT_JOB_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent from the daemon to acknowledge a pilot job submission...
Definition: ComputeServiceMessagePayload.h:40
static const std::string CREATE_VM_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the service to request a VM creation.
Definition: CloudServiceMessagePayload.h:28
static const std::string SUBMIT_STANDARD_JOB_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the daemon to acknowledge a standard job submissio...
Definition: ComputeServiceMessagePayload.h:28
std::map< std::string, unsigned long > used_cores_per_execution_host
A map of the number of used cores (per VM) per execution host.
Definition: CloudService.h:172
std::vector< std::string > getExecutionHosts()
Get the list of execution hosts available to run VMs.
Definition: CloudService.cpp:78
static constexpr double ALL_RAM
A convenient constant to mean "use all ram of a physical host" whenever a ram capacity is needed when...
Definition: ComputeService.h:59
CloudService(const std::string &hostname, std::vector< std::string > &execution_hosts, double scratch_space_size, std::map< std::string, std::string > property_list={}, std::map< std::string, std::string > messagepayload_list={})
Constructor.
Definition: CloudService.cpp:39
static const std::string GET_EXECUTION_HOSTS_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the service to request a get execution hosts...
Definition: CloudServiceMessagePayload.h:24
static const std::string SHUTDOWN_VM_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the service to request a VM shutdown.
Definition: CloudServiceMessagePayload.h:32
std::map< std::string, std::tuple< std::shared_ptr< S4U_VirtualMachine >, std::shared_ptr< ComputeService >, unsigned long, unsigned long > > vm_list
A map of VMs described by the VM actor, the actual compute service, the total number of cores...
Definition: CloudService.h:169
std::map< std::string, double > cs_available_ram
Map of available RAM at hosts.
Definition: CloudService.h:166
A pilot (i.e., non-standard) workflow job that can be submitted to a ComputeService by a WMS (via a J...
Definition: PilotJob.h:29
A standard (i.e., non-pilot) workflow job that can be submitted to a ComputeService by a WMS (via a J...
Definition: StandardJob.h:38
static constexpr unsigned long ALL_CORES
A convenient constant to mean "use all cores of a physical host" whenever a number of cores is needed...
Definition: ComputeService.h:54
static const std::string RESUME_VM_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the service to request a VM resume.
Definition: CloudServiceMessagePayload.h:44
virtual bool suspendVM(const std::string &vm_hostname)
Suspend a running VM.
Definition: CloudService.cpp:220
static const std::string CREATE_VM_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the service in answer to a VM creation request...
Definition: CloudServiceMessagePayload.h:30
static const std::string SUBMIT_PILOT_JOB_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the daemon to submit a pilot job.
Definition: ComputeServiceMessagePayload.h:38
static const std::string RESUME_VM_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the service in answer to a VM resume request...
Definition: CloudServiceMessagePayload.h:46
A cloud-based compute service that manages a set of physical hosts and controls access to their resou...
Definition: CloudService.h:37
static const std::string SUPPORTS_PILOT_JOBS
Whether the compute service supports pilot jobs (true or false)
Definition: ComputeServiceProperty.h:26
virtual bool resumeVM(const std::string &vm_hostname)
Resume a suspended VM.
Definition: CloudService.cpp:248
virtual std::string createVM(unsigned long num_cores=ComputeService::ALL_CORES, double ram_memory=ComputeService::ALL_RAM, std::map< std::string, std::string > property_list={}, std::map< std::string, std::string > messagepayload_list={})
Create a BareMetalComputeService VM (balances load on execution hosts)
Definition: CloudService.cpp:112
static const std::string SUSPEND_VM_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the service to request a VM suspend.
Definition: CloudServiceMessagePayload.h:40
static const std::string RESOURCE_DESCRIPTION_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the daemon to ask it for information on its resour...
Definition: ComputeServiceMessagePayload.h:56
static const std::string SUPPORTS_STANDARD_JOBS
Whether the compute service supports standard jobs (true or false)
Definition: ComputeServiceProperty.h:24
static const std::string VM_BOOT_OVERHEAD_IN_SECONDS
The overhead, in seconds, to boot a VM.
Definition: CloudServiceProperty.h:24
static const std::string SHUTDOWN_VM_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the service in answer to a VM shutdown request...
Definition: CloudServiceMessagePayload.h:34
static const std::string START_VM_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the service to request a VM start.
Definition: CloudServiceMessagePayload.h:36
static const std::string SUBMIT_STANDARD_JOB_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the daemon to submit a standard job...
Definition: ComputeServiceMessagePayload.h:26
std::vector< std::string > execution_hosts
List of execution host names.
Definition: CloudService.h:163
static const std::string GET_EXECUTION_HOSTS_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the service in answer to a get execution hosts req...
Definition: CloudServiceMessagePayload.h:26
static const std::string DAEMON_STOPPED_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the daemon to confirm it has terminated.
Definition: ServiceMessagePayload.h:33
virtual bool shutdownVM(const std::string &vm_hostname)
Shutdown an active VM.
Definition: CloudService.cpp:164
static const std::string RESOURCE_DESCRIPTION_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the daemon to state information on its resources...
Definition: ComputeServiceMessagePayload.h:58
Definition: TerminalOutput.cpp:15