commented unused variables
authorFelix Tejada <felix.tejada08@gmail.com>
Mon, 4 May 2020 00:41:04 +0000 (20:41 -0400)
committerFelix Tejada <felix.tejada08@gmail.com>
Mon, 4 May 2020 00:41:04 +0000 (20:41 -0400)
scripts/clusterGRE.py

index 99d0ffe58845159f177a83a5c3d350e61ab43f60..afa483f25c5b3000a47122cb5d2e6132b46533d3 100755 (executable)
@@ -8,34 +8,36 @@ You can start different topology, but by default is starting anything from the p
 If you want to start any other topology, just change the constructor MininetCluster with topology 
 you want.
 """
 If you want to start any other topology, just change the constructor MininetCluster with topology 
 you want.
 """
-"clusterGRE.py: Mininet Raspberry Pi Cluster"
-from mininet.examples.cluster import MininetCluster, SwitchBinPlacer, RemoteGRELink
-from mininet.topolib import TreeTopo
-from mininet.log import setLogLevel
-from mininet.examples.clustercli import ClusterCLI as CLI
-from mininet.node import RemoteController
-from topotest import MiTopo
 from precompiler import TopoFromCompiler
 from precompiler import TopoFromCompiler
+from topotest import MiTopo
+from mininet.node import RemoteController
+from mininet.examples.clustercli import ClusterCLI as CLI
+from mininet.log import setLogLevel
+from mininet.topolib import TreeTopo
+from mininet.examples.cluster import MininetCluster, SwitchBinPlacer, RemoteGRELink
+"clusterGRE.py: Mininet Raspberry Pi Cluster"
+
 
 def inicia():
     IPs = '/home/pi/scripts/iplist'
     c = RemoteController('c1', ip='192.168.25.2', port=6633)
     servers = readIPs(IPs)
     #servers = ['192.168.25.2', '192.168.25.3', '192.168.25.4','192.168.25.5','192.168.25.6']
 
 def inicia():
     IPs = '/home/pi/scripts/iplist'
     c = RemoteController('c1', ip='192.168.25.2', port=6633)
     servers = readIPs(IPs)
     #servers = ['192.168.25.2', '192.168.25.3', '192.168.25.4','192.168.25.5','192.168.25.6']
-    topo1 = TreeTopo(depth=2, fanout=2) # Topologia basica
-    topo2 = MiTopo() # Topologia desde el archivo topotest
-    topo3 = TopoFromCompiler() # Topologia creada a partir del archivo data
-    topo4 = TreeTopo(depth=4, fanout=4) # Topologia GRANDE en arbol
-    net = MininetCluster(topo=topo3, servers=servers, link=RemoteGRELink, placement=SwitchBinPlacer, controller=c)
+    # topo1 = TreeTopo(depth=2, fanout=2) # Topologia basica
+    # topo2 = MiTopo() # Topologia desde el archivo topotest
+    topo3 = TopoFromCompiler()  # Topologia creada a partir del archivo data
+    # topo4 = TreeTopo(depth=4, fanout=4) # Topologia GRANDE en arbol
+    net = MininetCluster(topo=topo3, servers=servers,
+                         link=RemoteGRELink, placement=SwitchBinPlacer, controller=c)
     net.start()
     CLI(net)
     net.stop()
 
 
 def readIPs(path):
     net.start()
     CLI(net)
     net.stop()
 
 
 def readIPs(path):
-    file = open(path, "r") #abre el archivo en read
+    file = open(path, "r")  # abre el archivo en read
     if file.mode == "r":
     if file.mode == "r":
-        servers = file.read().splitlines() #lee el archivo y lo divide por lineas
+        servers = file.read().splitlines()  # lee el archivo y lo divide por lineas
     return servers
 
 
     return servers