From: Felix Date: Sat, 23 Nov 2019 21:20:52 +0000 (+0000) Subject: major bir commit not sure 2 X-Git-Url: https://git.josue.xyz/?a=commitdiff_plain;h=ed976c4422af98e88167ca566701fc385fb1b1a8;p=vsorcdistro%2F.git major bir commit not sure 2 --- diff --git a/VSoRC b/VSoRC index 3253f87..0435950 160000 --- a/VSoRC +++ b/VSoRC @@ -1 +1 @@ -Subproject commit 3253f871623a1d1f767923771a593a42b121df0f +Subproject commit 0435950ac163f7cd63ba0bbd3d4882820d9f53fb diff --git a/cleaner.sh b/cleaner.sh deleted file mode 100755 index c19f589..0000000 --- a/cleaner.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -cat $1 | grep -E "[sh]+[0-9]{1,3}:[sh]+[0-9]{1,3}" > $1_clean -cat $1 | grep -vE "[sh]+[0-9]{1,3}:[sh]+[0-9]{1,3}" > $1_dirt - diff --git a/clusterGRE.py b/clusterGRE.py deleted file mode 100755 index 81abb63..0000000 --- a/clusterGRE.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/python -"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 - -def inicia(): - IPs = '/home/pi/iplist' - c = RemoteController('c1', ip='192.168.25.10', 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=3, fanout=3) # 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): - file = open(path, "r") #abre el archivo en read - if file.mode == "r": - servers = file.read().splitlines() #lee el archivo y lo divide por lineas - return servers - - -if __name__ == '__main__': - setLogLevel('info') - inicia() diff --git a/clustersetup.sh b/clustersetup.sh deleted file mode 100755 index e8ad928..0000000 --- a/clustersetup.sh +++ /dev/null @@ -1,182 +0,0 @@ -#!/usr/bin/env bash - -# SSH authentication script for cluster edition -# This script will create a single key pair, which is then -# propagated throughout the entire cluster. -# There are two options for setup; temporary setup -# persistent setup. If no options are specified, and the script -# is only given ip addresses or host names, it will default to -# the temporary setup. An ssh directory is then created in -# /tmp/mn/ssh on each node, and mounted with the keys over the -# user's ssh directory. This setup can easily be torn down by running -# clustersetup with the -c option. -# If the -p option is used, the setup will be persistent. In this -# case, the key pair will be be distributed directly to each node's -# ssh directory, but will be called cluster_key. An option to -# specify this key for use will be added to the config file in each -# user's ssh directory. - - -set -e -num_options=0 -persistent=false -showHelp=false -clean=false -declare -a hosts=() -user=$(whoami) -SSHDIR=/tmp/mn/ssh -USERDIR=$HOME/.ssh -usage="./clustersetup.sh [ -p|h|c ] [ host1 ] [ host2 ] ...\n - Authenticate yourself and other cluster nodes to each other - via ssh for mininet cluster edition. By default, we use a - temporary ssh setup. An ssh directory is mounted over - $USERDIR on each machine in the cluster. - - -h: display this help - -p: create a persistent ssh setup. This will add - new ssh keys and known_hosts to each nodes - $USERDIR directory - -c: method to clean up a temporary ssh setup. - Any hosts taken as arguments will be cleaned - " - -persistentSetup() { - echo "***creating key pair" - ssh-keygen -t rsa -C "Cluster_Edition_Key" -f $USERDIR/cluster_key -N '' # &> /dev/null - cat $USERDIR/cluster_key.pub >> $USERDIR/authorized_keys - echo "***configuring ssh" - echo "IdentityFile $USERDIR/cluster_key" >> $USERDIR/config - echo "IdentityFile $USERDIR/id_rsa" >> $USERDIR/config - - for host in $hosts; do - echo "***copying public key to $host" - ssh-copy-id -i $USERDIR/cluster_key.pub $user@$host &> /dev/null - echo "***copying key pair to remote host" - scp $USERDIR/cluster_key $user@$host:$USERDIR - scp $USERDIR/cluster_key.pub $user@$host:$USERDIR - echo "***configuring remote host" - ssh -o ForwardAgent=yes $user@$host " - echo 'IdentityFile $USERDIR/cluster_key' >> $USERDIR/config - echo 'IdentityFile $USERDIR/id_rsa' >> $USERDIR/config" - done - - for host in $hosts; do - echo "***copying known_hosts to $host" - scp $USERDIR/known_hosts $user@$host:$USERDIR/cluster_known_hosts - ssh $user@$host " - cat $USERDIR/cluster_known_hosts >> $USERDIR/known_hosts - rm $USERDIR/cluster_known_hosts" - done -} - -tempSetup() { - - echo "***creating temporary ssh directory" - mkdir -p $SSHDIR - echo "***creating key pair" - ssh-keygen -t rsa -C "Cluster_Edition_Key" -f $SSHDIR/id_rsa -N '' &> /dev/null - - echo "***mounting temporary ssh directory" - sudo mount --bind $SSHDIR $USERDIR - cp $SSHDIR/id_rsa.pub $SSHDIR/authorized_keys - - for host in $hosts; do - echo "***copying public key to $host" - ssh-copy-id $user@$host &> /dev/null - echo "***mounting remote temporary ssh directory for $host" - ssh -o ForwardAgent=yes $user@$host " - mkdir -p $SSHDIR - cp $USERDIR/authorized_keys $SSHDIR/authorized_keys - sudo mount --bind $SSHDIR $USERDIR" - echo "***copying key pair to $host" - scp $SSHDIR/{id_rsa,id_rsa.pub} $user@$host:$SSHDIR - done - - for host in $hosts; do - echo "***copying known_hosts to $host" - scp $SSHDIR/known_hosts $user@$host:$SSHDIR - done -} - -cleanup() { - - for host in $hosts; do - echo "***cleaning up $host" - ssh $user@$host "sudo umount $USERDIR - sudo rm -rf $SSHDIR" - done - - echo "**unmounting local directories" - sudo umount $USERDIR - echo "***removing temporary ssh directory" - sudo rm -rf $SSHDIR - echo "done!" - -} - - -if [ $# -eq 0 ]; then - echo "ERROR: No Arguments" - echo "$usage" - exit -else - while getopts 'hpc' OPTION - do - ((num_options+=1)) - case $OPTION in - h) showHelp=true;; - p) persistent=true;; - c) clean=true;; - ?) showHelp=true;; - esac - done - shift $(($OPTIND - 1)) -fi - -if [ "$num_options" -gt 1 ]; then - echo "ERROR: Too Many Options" - echo "$usage" - exit -fi - -if $showHelp; then - echo "$usage" - exit -fi - -for i in "$@"; do - output=$(getent ahostsv4 "$i") - if [ -z "$output" ]; then - echo '***WARNING: could not find hostname "$i"' - echo "" - else - hosts+="$i " - fi -done - -if $clean; then - cleanup - exit -fi - -echo "***authenticating to:" -for host in $hosts; do - echo "$host" -done - -echo - -if $persistent; then - echo '***Setting up persistent SSH configuration between all nodes' - persistentSetup - echo $'\n*** Sucessfully set up ssh throughout the cluster!' - -else - echo '*** Setting up temporary SSH configuration between all nodes' - tempSetup - echo $'\n***Finished temporary setup. When you are done with your cluster' - echo $' session, tear down the SSH connections with' - echo $' ./clustersetup.sh -c '$hosts'' -fi - -echo diff --git a/cmdcluster.sh b/cmdcluster.sh deleted file mode 100755 index ff513f1..0000000 --- a/cmdcluster.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -#sudo -E mn --controller=remote,ip=192.168.25.10 --custom ~/topotest.py --topo TopoMia --cluster $(awk 'BEGIN { ORS="" } { print p$0; p="," } END { print "\n" }' iplist) -v debug -sudo -E mn --controller=remote,ip=192.168.25.10 --topo tree,2,2 --cluster $(awk 'BEGIN { ORS="" } { print p$0; p="," } END { print "\n" }' iplist) -v debug - diff --git a/data b/data deleted file mode 100644 index 306bf05..0000000 --- a/data +++ /dev/null @@ -1,7 +0,0 @@ -s1:h1 -s1:h2 -s2:s1 -s2:h3 -s3:s2 -s3:h4 - diff --git a/data_clean b/data_clean deleted file mode 100644 index 4f1fcb6..0000000 --- a/data_clean +++ /dev/null @@ -1,6 +0,0 @@ -s1:h1 -s1:h2 -s2:s1 -s2:h3 -s3:s2 -s3:h4 diff --git a/data_dirt b/data_dirt deleted file mode 100644 index 8b13789..0000000 --- a/data_dirt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/discover.sh b/discover.sh deleted file mode 100755 index e7122db..0000000 --- a/discover.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -#nmap -sn 192.168.18.83/25 | grep 192 > log.txt && awk '{print $5}' log.txt | grep 192 | tee log.txt -#for HOST in $(cat log.txt ) ; do ssh $HOST "uname -a" ; done -nmap -sn $1 > log.txt -grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" log.txt > iplist diff --git a/ejecutarcontroller.sh b/ejecutarcontroller.sh deleted file mode 100755 index 2258687..0000000 --- a/ejecutarcontroller.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -cd ryu -sudo ./bin/ryu-manager --observe-links /home/pi/flowmanager/flowmanager/flowmanager.py ryu/app/simple_switch_13.py -#./ejecutarcontroller.sh > /dev/null 2>&1 & Para ejecutarlo en segundo plano - diff --git a/fromwebstart.sh b/fromwebstart.sh deleted file mode 100755 index 0fcea68..0000000 --- a/fromwebstart.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -sudo ./home/pi/clusterGRE.py > aichivo 2>&1 diff --git a/id.sh b/id.sh deleted file mode 100755 index bde7df4..0000000 --- a/id.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo $(ifconfig | grep inet | grep -v inet6 | grep -v 127.0.0.7) | awk '{print $2}' | awk -F "." '{print $4}' diff --git a/iplist b/iplist deleted file mode 100644 index 7e668cd..0000000 --- a/iplist +++ /dev/null @@ -1,14 +0,0 @@ -192.168.25.2 -192.168.25.3 -192.168.25.4 -192.168.25.5 -192.168.25.6 -192.168.25.7 -192.168.25.8 -192.168.25.9 -192.168.25.11 -192.168.25.12 -192.168.25.13 -192.168.25.14 -192.168.25.15 -192.168.25.16 diff --git a/log.txt b/log.txt deleted file mode 100644 index 3ac7cd3..0000000 --- a/log.txt +++ /dev/null @@ -1,35 +0,0 @@ - -Starting Nmap 7.40 ( https://nmap.org ) at 2019-11-14 23:07 GMT -Nmap scan report for 192.168.25.1 -Host is up (0.0091s latency). -Nmap scan report for 192.168.25.2 -Host is up (0.0030s latency). -Nmap scan report for 192.168.25.3 -Host is up (0.0028s latency). -Nmap scan report for 192.168.25.4 -Host is up (0.0027s latency). -Nmap scan report for 192.168.25.5 -Host is up (0.0026s latency). -Nmap scan report for 192.168.25.6 -Host is up (0.0024s latency). -Nmap scan report for 192.168.25.7 -Host is up (0.0023s latency). -Nmap scan report for 192.168.25.8 -Host is up (0.0058s latency). -Nmap scan report for 192.168.25.9 -Host is up (0.0046s latency). -Nmap scan report for 192.168.25.10 -Host is up (0.00073s latency). -Nmap scan report for 192.168.25.11 -Host is up (0.0021s latency). -Nmap scan report for 192.168.25.12 -Host is up (0.0018s latency). -Nmap scan report for 192.168.25.13 -Host is up (0.0029s latency). -Nmap scan report for 192.168.25.14 -Host is up (0.0027s latency). -Nmap scan report for 192.168.25.15 -Host is up (0.0026s latency). -Nmap scan report for 192.168.25.16 -Host is up (0.0025s latency). -Nmap done: 128 IP addresses (16 hosts up) scanned in 1.93 seconds diff --git a/multiscp.sh b/multiscp.sh deleted file mode 100755 index 9e81bfb..0000000 --- a/multiscp.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -pscp -h iplist -A -l pi "$@" diff --git a/multissh.sh b/multissh.sh deleted file mode 100755 index 037bea5..0000000 --- a/multissh.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -#Ingresar el comando por parametro y se ejecuta abriendo una sesion ssh -#con las Ip del archivo iplist(todas las pi) -pssh -h iplist -i -l pi "$@" diff --git a/precompiler.py b/precompiler.py deleted file mode 100755 index 2b495cb..0000000 --- a/precompiler.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/python -import sys -import os -import time -from mininet.topo import Topo -from mininet.log import setLogLevel, info - -""" -Este precompilador transforma el lenguaje VSORC a la API de topologias de -Mininet -""" -links = [] -devices = [] -hosts = [] -switches = [] -#Lists - -#cmd = './cleaner.sh '+sys.argv[1] -cmd2 = './cleaner.sh data' -os.system(cmd2) -time.sleep(.300) -#document = open(sys.argv[1] + "_clean" ,"r+") -document = open("data" + "_clean" ,"r+") -links = document.readlines() -document.close -#"data" is the file with the topo vsorc script - -#clean the \n in the colected data -a = 0 -for linkline in links: - links[a] = linkline.rstrip() - a+=1 - - -# get a list of non repeating devices -for value in links: - value_split = value.split(':') - devices.append(value_split[0]) - devices.append(value_split[1]) -devices = list(dict.fromkeys(devices)) - - -class TopoFromCompiler(Topo): -#This class is for create the custom topology from the data collected. -#Here we also process the data to make the topo - def build(self): - for device in devices: - if device.startswith("h"): - host = device - host = self.addHost(host) #Create a host with the data collected from the list - hosts.append(host) - - elif device.startswith("s"): - switch = device - switch = self.addSwitch(switch) #Create a switch - switches.append(switch) - - print ("Devices: " + str(devices) + "\n" + "Links: " + str(links) + "\n" + "Hosts: " + str(hosts) + "\n" + "Switches: " + str(switches) + "\n") - - #Create links - for pair in links: - split = pair.split(":") - self.addLink(split[0],split[1]) - diff --git a/precompiler.pyc b/precompiler.pyc deleted file mode 100644 index 3068fd6..0000000 Binary files a/precompiler.pyc and /dev/null differ diff --git a/resetcluster.sh b/resetcluster.sh deleted file mode 100755 index 2cb3e5e..0000000 --- a/resetcluster.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -#Ingresar el comando por parametro y se ejecuta abriendo una sesion ssh -#con las Ip del archivo iplist(todas las pi) -pssh -h iplist -i -l pi "sudo reboot now" -sudo reboot now diff --git a/scripts/basic2.sh b/scripts/basic2.sh deleted file mode 100755 index d16a7fe..0000000 --- a/scripts/basic2.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/bash -: ' -Written by: Felix G. Tejada - -This script is applied to a linear 3 topo, just for show the example -' -echo "Cleaning all flows entry switch dpid 2 and 3" -curl -X DELETE http://localhost:8080/stats/flowentry/clear/2 -curl -X DELETE http://localhost:8080/stats/flowentry/clear/3 -echo "adding new flows entry to switches 2 and 3" - -curl -X POST -d '{ - "dpid": 2, - "cookie": 1, - "cookie_mask": 1, - "table_id": 0, - "idle_timeout": 0, - "hard_timeout": 0, - "priority": 11111, - "flags": 1, - "match":{ - "eth_type":0x0800, - "in_port":1 - - }, - "actions":[ - { - "type":"EMPTY" - } - ] - }' http://localhost:8080/stats/flowentry/add - -curl -X POST -d '{ - "dpid": 2, - "cookie": 1, - "cookie_mask": 1, - "table_id": 0, - "idle_timeout": 0, - "hard_timeout": 0, - "priority": 22222, - "flags": 1, - "match":{ - "eth_type":0x0800, - "in_port":2 - - }, - "actions":[ - { - "type":"EMPTY" - } - ] - }' http://localhost:8080/stats/flowentry/add -curl -X POST -d '{ - "dpid": 3, - "cookie": 1, - "cookie_mask": 1, - "table_id": 0, - "idle_timeout": 0, - "hard_timeout": 0, - "priority": 11111, - "flags": 1, - "match":{ - "eth_type":0x0800, - "in_port":1 - - }, - "actions":[ - { - "type":"EMPTY" - } - ] - }' http://localhost:8080/stats/flowentry/add - -curl -X POST -d '{ - "dpid": 3, - "cookie": 1, - "cookie_mask": 1, - "table_id": 0, - "idle_timeout": 0, - "hard_timeout": 0, - "priority": 22222, - "flags": 1, - "match":{ - "eth_type":0x0800, - "in_port":2 - }, - "actions":[ - { - "type":"EMPTY" - } - ] - }' http://localhost:8080/stats/flowentry/add -echo "Connectivity from h2 to h3 droped" -echo "Done" - diff --git a/scripts/clusterGRE.py b/scripts/clusterGRE.py index a04d57b..328c7a1 100755 --- a/scripts/clusterGRE.py +++ b/scripts/clusterGRE.py @@ -17,7 +17,7 @@ from precompiler import TopoFromCompiler def inicia(): IPs = '/home/pi/scripts/iplist' - c = RemoteController('c1', ip='192.168.25.10', port=6633) + 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 diff --git a/scripts/data b/scripts/data index 306bf05..318678c 100644 --- a/scripts/data +++ b/scripts/data @@ -1,7 +1,4 @@ -s1:h1 -s1:h2 -s2:s1 -s2:h3 -s3:s2 -s3:h4 - +h1:s1 +h2:s1 +h3:s2 +s1:s2 diff --git a/scripts/data_clean b/scripts/data_clean index 4f1fcb6..318678c 100644 --- a/scripts/data_clean +++ b/scripts/data_clean @@ -1,6 +1,4 @@ -s1:h1 -s1:h2 -s2:s1 -s2:h3 -s3:s2 -s3:h4 +h1:s1 +h2:s1 +h3:s2 +s1:s2 diff --git a/scripts/data_dirt b/scripts/data_dirt index 8b13789..e69de29 100644 --- a/scripts/data_dirt +++ b/scripts/data_dirt @@ -1 +0,0 @@ - diff --git a/scripts/iplist b/scripts/iplist index 7e668cd..0e304ab 100644 --- a/scripts/iplist +++ b/scripts/iplist @@ -1,4 +1,3 @@ -192.168.25.2 192.168.25.3 192.168.25.4 192.168.25.5 @@ -6,6 +5,7 @@ 192.168.25.7 192.168.25.8 192.168.25.9 +192.168.25.10 192.168.25.11 192.168.25.12 192.168.25.13 diff --git a/scripts/log.txt b/scripts/log.txt index 3ac7cd3..62fc4e7 100644 --- a/scripts/log.txt +++ b/scripts/log.txt @@ -1,35 +1,35 @@ -Starting Nmap 7.40 ( https://nmap.org ) at 2019-11-14 23:07 GMT +Starting Nmap 7.40 ( https://nmap.org ) at 2019-11-20 21:29 GMT Nmap scan report for 192.168.25.1 -Host is up (0.0091s latency). +Host is up (0.0096s latency). Nmap scan report for 192.168.25.2 -Host is up (0.0030s latency). +Host is up (0.0011s latency). Nmap scan report for 192.168.25.3 -Host is up (0.0028s latency). +Host is up (0.0020s latency). Nmap scan report for 192.168.25.4 -Host is up (0.0027s latency). +Host is up (0.0019s latency). Nmap scan report for 192.168.25.5 -Host is up (0.0026s latency). +Host is up (0.0027s latency). Nmap scan report for 192.168.25.6 -Host is up (0.0024s latency). +Host is up (0.0026s latency). Nmap scan report for 192.168.25.7 -Host is up (0.0023s latency). +Host is up (0.0025s latency). Nmap scan report for 192.168.25.8 -Host is up (0.0058s latency). +Host is up (0.0024s latency). Nmap scan report for 192.168.25.9 -Host is up (0.0046s latency). +Host is up (0.0023s latency). Nmap scan report for 192.168.25.10 -Host is up (0.00073s latency). +Host is up (0.0022s latency). Nmap scan report for 192.168.25.11 -Host is up (0.0021s latency). +Host is up (0.0020s latency). Nmap scan report for 192.168.25.12 -Host is up (0.0018s latency). -Nmap scan report for 192.168.25.13 Host is up (0.0029s latency). +Nmap scan report for 192.168.25.13 +Host is up (0.0034s latency). Nmap scan report for 192.168.25.14 -Host is up (0.0027s latency). +Host is up (0.0032s latency). Nmap scan report for 192.168.25.15 -Host is up (0.0026s latency). +Host is up (0.0028s latency). Nmap scan report for 192.168.25.16 Host is up (0.0025s latency). -Nmap done: 128 IP addresses (16 hosts up) scanned in 1.93 seconds +Nmap done: 128 IP addresses (16 hosts up) scanned in 1.83 seconds diff --git a/scripts/showtemp.sh b/scripts/showtemp.sh index b40fb99..f294b1f 100755 --- a/scripts/showtemp.sh +++ b/scripts/showtemp.sh @@ -1,2 +1,2 @@ -watch -n 5 "(vcgencmd measure_temp && ./multissh.sh vcgencmd measure_temp) | grep temp" +watch -n 2 "(vcgencmd measure_temp && ./multissh.sh vcgencmd measure_temp) | grep temp" diff --git a/showtemp.sh b/showtemp.sh deleted file mode 100755 index b40fb99..0000000 --- a/showtemp.sh +++ /dev/null @@ -1,2 +0,0 @@ -watch -n 5 "(vcgencmd measure_temp && ./multissh.sh vcgencmd measure_temp) | grep temp" - diff --git a/startvsorc.sh b/startvsorc.sh deleted file mode 100755 index cc8bd27..0000000 --- a/startvsorc.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -cd /home/pi && mkfifo fifo && touch aichivo -cd /home/pi && cat fifo | sudo ./clusterGRE.py > aichivo 2>&1 & -exec 3>fifo - - diff --git a/topotest.py b/topotest.py deleted file mode 100755 index 3c6de24..0000000 --- a/topotest.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/python - -from mininet.topo import Topo -# 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 -# from mininet.node import IVSSwitch -# from mininet.cli import CLI -# from mininet.link import TCLink, Intf -# from subprocess import call - - -class MiTopo(Topo): - - def build(self): - # Contructor de topologia custom - s1 = self.addSwitch('s1') - s2 = self.addSwitch('s2') - s3 = self.addSwitch('s3') - h1 = self.addHost('h1') - h2 = self.addHost('h2') - h3 = self.addHost('h3') - - self.addLink(s1, s2) - 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() ) } diff --git a/topotest.pyc b/topotest.pyc deleted file mode 100644 index 169cc86..0000000 Binary files a/topotest.pyc and /dev/null differ