X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=topotest.py;h=3c6de2457e25f240eccc5a78062e2ef7a15ef636;hb=40f74c579b934f1b8540c13daaf80ae4c1e604c1;hp=022207c3c59d9efa74a9ca486c806fea2fc3b3c9;hpb=9f435e1824145d4834563f0b92e3e53b61306b4b;p=vsorcdistro%2F.git diff --git a/topotest.py b/topotest.py index 022207c..3c6de24 100755 --- a/topotest.py +++ b/topotest.py @@ -1,7 +1,7 @@ #!/usr/bin/python from mininet.topo import Topo -from mininet.log import setLogLevel, info +# from mininet.log import setLogLevel, info # from mininet.node import Controller, RemoteController, OVSController # from mininet.node import CPULimitedHost, Host, Node # from mininet.node import OVSKernelSwitch, UserSwitch @@ -14,34 +14,20 @@ from mininet.log import setLogLevel, info class MiTopo(Topo): def build(self): - #Contructor de topologia custom - s4 = self.addSwitch('s4') + # Contructor de topologia custom + s1 = self.addSwitch('s1') s2 = self.addSwitch('s2') s3 = self.addSwitch('s3') - s1 = self.addSwitch('s1') - h8 = self.addHost('h8') - h4 = self.addHost('h4') - h6 = self.addHost('h6') h1 = self.addHost('h1') - h5 = self.addHost('h5') h2 = self.addHost('h2') h3 = self.addHost('h3') - h7 = self.addHost('h7') - h9 = self.addHost('h9') - self.addLink(h1, s2) - self.addLink(h9, s4) - self.addLink(h2, s2) self.addLink(s1, s2) - self.addLink(s1, s3) - self.addLink(s3, s4) - self.addLink(h3, s1) - self.addLink(h4, s1) - self.addLink(h5, s3) - self.addLink(h6, s3) - self.addLink(h7, s4) - self.addLink(h8, s4) - #info('llegue al final de mitopo\n') - + self.addLink(s2, s3) + self.addLink(s3, s1) + self.addLink(s1, h1) + self.addLink(s2, h2) + self.addLink(s3, h3) + # info('llegue al final de mitopo\n') -#topos = { 'TopoMia': ( lambda: MiTopo() ) } +# topos = { 'TopoMia': ( lambda: MiTopo() ) }