wrench::S4U_VirtualMachine Class Reference

A wrapper for the simgrid::s4u::VirtualMachine class. More...

#include <S4U_VirtualMachine.h>

Public Types

enum  State { DOWN, RUNNING, SUSPENDED }
 VM state enum.
 

Public Member Functions

 S4U_VirtualMachine (const std::string &vm_hostname, unsigned long num_cores, double ram_memory, std::map< std::string, std::string > property_list, std::map< std::string, double > messagepayload_list)
 Constructor. More...
 
double getMemory ()
 Get the memory consumption. More...
 
std::map< std::string, double > getMessagePayloadList ()
 Get the message payload list for the BareMetalComputeService that will run on the VM ({} means "use all defaults") More...
 
unsigned long getNumCores ()
 Get the number of cores. More...
 
std::string getPhysicalHostname ()
 Get the physical hostname. More...
 
std::map< std::string, std::string > getPropertyList ()
 Get the property list for the BareMetalComputeService that is to run on the VM ({} means "use all defaults") More...
 
State getState ()
 Get the VM's state. More...
 
std::string getStateAsString ()
 Get the VM's state as a string. More...
 
void migrate (const std::string &dst_pm_name)
 Migrate the VM. More...
 
void resume ()
 Resume the VM.
 
void shutdown ()
 Shutdown the VM.
 
void start (std::string &pm_name)
 Start the VM. More...
 
void suspend ()
 Suspend the VM.
 

Detailed Description

A wrapper for the simgrid::s4u::VirtualMachine class.

Constructor & Destructor Documentation

◆ S4U_VirtualMachine()

wrench::S4U_VirtualMachine::S4U_VirtualMachine ( const std::string &  vm_name,
unsigned long  num_cores,
double  ram_memory,
std::map< std::string, std::string >  property_list,
std::map< std::string, double >  messagepayload_list 
)

Constructor.

Parameters
vm_namethe name of the VM
num_coresthe number of cores the VM can use
ram_memorythe VM RAM memory capacity
property_lista property list ({} means use all defaults)
messagepayload_lista message payload list ({} means use all defaults)

Member Function Documentation

◆ getMemory()

double wrench::S4U_VirtualMachine::getMemory ( )

Get the memory consumption.

Returns
the memory consumption

◆ getMessagePayloadList()

std::map< std::string, double > wrench::S4U_VirtualMachine::getMessagePayloadList ( )

Get the message payload list for the BareMetalComputeService that will run on the VM ({} means "use all defaults")

Returns
a message payload list

◆ getNumCores()

unsigned long wrench::S4U_VirtualMachine::getNumCores ( )

Get the number of cores.

Returns
the number of cores

◆ getPhysicalHostname()

std::string wrench::S4U_VirtualMachine::getPhysicalHostname ( )

Get the physical hostname.

Returns
the physical hostname

◆ getPropertyList()

std::map< std::string, std::string > wrench::S4U_VirtualMachine::getPropertyList ( )

Get the property list for the BareMetalComputeService that is to run on the VM ({} means "use all defaults")

Returns
a property list

◆ getState()

S4U_VirtualMachine::State wrench::S4U_VirtualMachine::getState ( )

Get the VM's state.

Returns
a state

◆ getStateAsString()

std::string wrench::S4U_VirtualMachine::getStateAsString ( )

Get the VM's state as a string.

Returns
a state as a string

◆ migrate()

void wrench::S4U_VirtualMachine::migrate ( const std::string &  dest_pm_name)

Migrate the VM.

Parameters
dest_pm_namethe name of the host to which to migrate the VM

◆ start()

void wrench::S4U_VirtualMachine::start ( std::string &  pm_name)

Start the VM.

Parameters
pm_namethe physical host name

The documentation for this class was generated from the following files: