vHost
The vHost
class is the implementation of simulated Host.
Bases: PhysicalEntity
Source code in PyCloudSim\entity\v_host.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
|
containers: List[Entity]
property
The containers on the vHost.
cpu_reservor: Resource
property
the reservor of the CPU of the vHost.
delay: float
property
the packet processing delay of the vHost.
privisioned: bool
property
return True if the vHost is privisioned, False otherwise.
ram_reservor: Resource
property
the reservor of the RAM of the vHost.
taint: str
property
The taint of the vHost. Used during container scheduling.
volumes: List[Entity]
property
The volumes on the vHost.
__init__(num_cpu_cores, ipc, frequency, ram, rom, delay=0.01, taint=None, switch=None, at=simulation.now, after=None, label=None)
Creat a virtual host.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num_cpu_cores |
int
|
number of cpu cores. |
required |
ipc |
Union[int, float]
|
the instructions per cycle of the CPU. |
required |
frequency |
Union[int, float]
|
the frequency of the CPU. |
required |
ram |
int
|
the size of the RAM in MiB. |
required |
rom |
int
|
the size of the ROM in GiB. |
required |
delay |
float
|
the packet processing delay. Defaults to 0.01. |
0.01
|
taint |
Optional[str]
|
the taint of this vHost, used during container scheduling. Defaults to None. |
None
|
switch |
Optional[vSwitch]
|
the switch this vHost is connected with. Defaults to None. |
None
|
at |
Union[int, float, Callable]
|
same as entity. Defaults to simulation.now. |
now
|
after |
Optional[Entity | List[Entity]]
|
same as entity. Defaults to None. |
None
|
label |
Optional[str]
|
same as entity. Defaults to None. |
None
|
Source code in PyCloudSim\entity\v_host.py
allocate_container(container)
Allocate a container on the vHost.
Source code in PyCloudSim\entity\v_host.py
allocate_volume(volume)
Allocate a volume on the vHost.
Source code in PyCloudSim\entity\v_host.py
cache_packet(packet)
Cache a packet on the vHost.