Revision 65c35b65

View differences:

debian/control
9 9
 help2man,
10 10
 python-dev,
11 11
 python-pkg-resources,
12
 python-setuptools,
13
 python-networkx
12
 python-setuptools
14 13
Homepage: http://openflow.org/mininet
15 14

  
16 15
Package: mininet
17 16
Architecture: any
18 17
Depends:
19 18
 openvswitch-switch,
20
 python-networkx,
21 19
 telnet,
22 20
 ${misc:Depends},
23 21
 ${python:Depends},
mininet/topo.py
11 11
setup for testing, and can even be emulated with the Mininet package.
12 12
'''
13 13

  
14
# BL: we may have to fix compatibility here.
15
# networkx is also a fairly heavyweight dependency
16
# from networkx.classes.graph import Graph
17

  
18
from networkx import Graph
19 14
from mininet.util import irange, natural, naturalSeq
20 15

  
16
class Graph(object):
17
    "Utility class to track nodes and edges "
18

  
19
    def __init__(self):
20
        self.data = {}
21

  
22
    def add_node(self,node):
23
        if node not in self.data.keys():
24
            self.data[node] = []
25

  
26
    def add_edge(self,src,dest):
27
        self.add_node(src)
28
        self.add_node(dest)
29
        self.data[src].append(dest)
30

  
31
    def nodes(self):
32
        return self.data.keys()
33

  
34
    def edges(self):
35
        for src in self.data.keys():
36
            for dest in self.data[src]:
37
                yield (src,dest)
38

  
21 39
class Topo(object):
22 40
    "Data center network representation for structured multi-trees."
23 41

  
setup.py
37 37
    keywords='networking emulator protocol Internet OpenFlow SDN',
38 38
    license='BSD',
39 39
    install_requires=[
40
        'setuptools',
41
        'networkx'
40
        'setuptools'
42 41
    ],
43 42
    scripts=scripts,
44 43
)
util/install.sh
123 123
function mn_deps {
124 124
    echo "Installing Mininet dependencies"
125 125
    $install gcc make socat psmisc xterm ssh iperf iproute telnet \
126
        python-setuptools python-networkx cgroup-bin ethtool help2man \
126
        python-setuptools cgroup-bin ethtool help2man \
127 127
        pyflakes pylint pep8
128 128

  
129
    if [ "$DIST" = "Ubuntu" ] && [ "$RELEASE" = "10.04" ]; then
130
        echo "Upgrading networkx to avoid deprecation warning"
131
        sudo easy_install --upgrade networkx
132
    fi
133

  
134 129
    # Add sysctl parameters as noted in the INSTALL file to increase kernel
135 130
    # limits to support larger setups:
136 131
    if ! grep Mininet /etc/sysctl.conf; then

Also available in: Unified diff