Example #1
0
def launch_controller():
    CFG.read(cfg.C1_cfg)
    db = TopologyDB(db=cfg.DB_path)
    manager = SouthboundManager(optimizer=OSPFSimple())
    try:
        manager.run()
    except KeyboardInterrupt:
        manager.stop()
Example #2
0
def launch_controller():
    CFG.read(C1_cfg)
    db = TopologyDB(db=DB_path)
    manager = SouthboundManager(optimizer=OSPFSimple())
    manager.simple_path_requirement(db.subnet(R3, D1), [db.routerid(r)
                                                        for r in (R1, R2, R3)])
    manager.simple_path_requirement(db.subnet(R3, D2), [db.routerid(r)
                                                        for r in (R1, R4, R3)])
    try:
        manager.run()
    except KeyboardInterrupt:
        manager.stop()
Example #3
0
def launch_controller():
    CFG.read(C1_cfg)
    db = TopologyDB(db='/tmp/db.topo')
    manager = SouthboundManager(optimizer=OSPFSimple())

    prefix = db.subnet('r2', 'sw1')
    prefix_m = prefix.split('/')[0] + '/25'
    manager.simple_path_requirement(prefix_m, [db.routerid(r) for r in (R1, R3, R2)])
    import ipdb; ipdb.set_trace()

    try:
        manager.run()
    except KeyboardInterrupt:
        manager.stop()
Example #4
0
#!/usr/bin/env python
# encoding: utf-8

from fibbingnode.algorithms.southbound_interface import SouthboundManager
import networkx as nx
from fibbingnode.algorithms.ladder import OSPFSimple

R1 = '1.1.1.1'
R2 = '2.2.2.2'
R3 = '3.3.3.3'
R4 = '4.4.4.4'

requirements = {
    '5.0.2.0/24': nx.DiGraph([(R1, R4), (R4, R3)]),
    '5.0.1.0/24': nx.DiGraph([(R1, R2), (R2, R3)])
}

manager = SouthboundManager(requirements, optimizer=OSPFSimple())
try:
    manager.run()
except KeyboardInterrupt:
    manager.stop()
Example #5
0
#!/usr/bin/env python
# encoding: utf-8

from fibbingnode.algorithms.southbound_interface import SouthboundManager
import networkx as nx
from fibbingnode.algorithms.ladder import OSPFSimple

R1 = '1.1.1.1'
R2 = '2.2.2.2'
R3 = '3.3.3.3'
R4 = '4.4.4.4'

requirements = {
        '5.0.2.0/24': nx.DiGraph([(R1, R4), (R4, R3)]),
        '5.0.1.0/24': nx.DiGraph([(R1, R2), (R2, R3)])
}

manager = SouthboundManager(requirements,
                            optimizer=OSPFSimple())
try:
    manager.run()
except KeyboardInterrupt:
    manager.stop()