Skip to content
Snippets Groups Projects
Commit 774ef476 authored by NGUYEN Do Duc Anh's avatar NGUYEN Do Duc Anh
Browse files

modify location of switch, dhcp unikernel, servers

parent c2d61af1
No related branches found
No related tags found
No related merge requests found
......@@ -225,8 +225,8 @@ if __name__ == "__main__":
array_ubuntu_base = []
array_ubuntu_intermediate = []
router_0 = Node(1, 1, "", ROUTER_TYPE)
ubuntu_server = Node(1, 1, GNS3Manager.create_ubuntu_server(1000, 1200), UBUNTU_TYPE)
ubuntu_vc_server = Node(1, 1, GNS3Manager.create_ubuntu_vc_server(-1200, -1200), UBUNTU_VC_SERVER_TYPE)
ubuntu_server = Node(1, 1, GNS3Manager.create_ubuntu_server(1200, 1000), UBUNTU_TYPE)
ubuntu_vc_server = Node(1, 1, GNS3Manager.create_ubuntu_vc_server(-1600, -800), UBUNTU_VC_SERVER_TYPE)
for exist_node in array_existing_nodes:
if exist_node[1] == "R1":
......@@ -239,12 +239,12 @@ if __name__ == "__main__":
pc_location_lst, ub_location_lst, ui_location_lst = GraphGenerator.generate_location(NUM_HOST, NUM_UBUNTU_BASE, NUM_UBUNTU_INTERMEDIATE, configuration_strings)
# Create switches
x_local = -1000
y_local = -1200
x_local = -1200
y_local = -1000
step = 100
for i in range(NUM_SWITCH):
x_temp = x_local
y_temp = y_local + step
y_temp = y_local + step * i
switch_id = GNS3Manager.create_switch(MAX_SIZE_OF_SWITCH_PORT, x_temp, y_temp, 1)
array_switches.append(Node(MAX_SIZE_OF_SWITCH_PORT, 1, switch_id, SWITCH_TYPE))
......@@ -262,12 +262,12 @@ if __name__ == "__main__":
array_ubuntu_base.append(Node(1, MAX_SIZE_OF_UBUNTU_BASE_PORT, GNS3Manager.create_ubuntu_base(x_temp, y_temp), UBUNTU_BASE_TYPE))
# create dhcp unikernel
x_local = -1000
y_local = -1400
x_local = -1400
y_local = -1000
step = 100
for i in range(NUM_DHCP_UNIKERNEL):
x_temp = x_local + step
y_temp = y_local
x_temp = x_local
y_temp = y_local + step * i
array_dhcp_unikernel.append(
Node(1, 1, GNS3Manager.create_unikernel(x_temp, y_temp, DHCP_UNIKERNEL_TYPE), DHCP_UNIKERNEL_TYPE))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment