vGateway
The class "vGateway" is a unique implementation of the "PhysicalEntity" class. Unlike other entities, the "vGateway" does not possess a "vCPU", RAM, or ROM. Its primary role is to function as the entry point for the cloud environment, serving as the central hub for incoming and outgoing user traffic.
The "vGateway" inherits all the member functions implemented for the "vSwitch" class, allowing it to perform routing and switching operations. However, unlike other entities, the "vGateway" does not create a simulated process for packet decoding upon receiving simulated packets.
Additionally, the "vGateway" is designed to be linked exclusively with "vRouter" instances, facilitating seamless connectivity and routing between the gateway and the routers within the simulated network topology.
Bases: Entity
Source code in PyCloudSim\entity\v_gateway.py
19 20 21 22 23 24 25 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 |
|
NIC: vNIC
property
Return the NIC of this virtual gateway.
cpu
property
Return the CPU of the virtual gateway which is none, created for avoid typing issues.
packet_queue
property
Return the packet queue of the hardware entity
ram: Resource
property
Return the RAM of the virtual gateway which has infinite capacity.
users: List[vUser]
property
Returns the users asscociated with the gateway.
__init__(label=None)
Create a virtual gateway.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
label |
str | None
|
short description of the gateway. Defaults to None. |
None
|
Source code in PyCloudSim\entity\v_gateway.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
receive_packet(packet)
Receive a packet from the NIC.
Source code in PyCloudSim\entity\v_gateway.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
|