1 # ALTO SPCE (Simple Path Computation Engine) User Guide
3 The ALTO SPCE module provides a simple path computation engine for ALTO and other projects. It works in the
4 OpenDaylight(ODL) SDN Controller.
6 ## Step 1. Download alto-spce kar
9 $ wget https://github.com/snlab/alto-spce/releases/download/1.0.0/alto-spce-features-1.0.0-SNAPSHOT.kar
12 ## Step 2. Deploy alto-spce into a running OpenDaylight controller
14 $ DISTRO_DIR=<odl_distribution_directory>
15 $ cp alto-spce-features-1.0.0-SNAPSHOT.kar $DISTRO_DIR/deploy/
17 $ unzip alto-spce-features-1.0.0-SNAPSHOT.kar -d tmp
18 $ cp -r tmp/repository/org $DISTRO_DIR/system/
22 ## Sept 3. Install the newer version of python-odl to include the two alto-spce methods:
24 $ git clone https://github.com/snlab/python-odl
26 $ sudo python setup.py install
29 ## Step 4. Run python-odl
32 >>> import odl.instance
33 >>> import odl.altospce
36 >>> serverURL = "http://140.221.143.143:8080"
37 >>> myodl = odl.instance.ODLInstance(serverURL, ("admin", "admin"))
38 >>> myaltospce = odl.altospce.ALTOSpce(server=serverURL, credentials=("admin", "admin"), odl_instance=myodl)
41 >>> srcIP = "198.188.136.11"
42 >>> dstIP = "198.188.136.21"
43 >>> mypath = myaltospce.path_setup(src=srcIP, dst=dstIP, objective_metrics=["hopcount"], constraint_metric=[{"metric": "hopcount", "min": 1, "max": 3}])
45 # This command should return the path setup. To see it,
46 >>> print mypath['path']
47 # You should see something like ["198.188.136.11|openflow:365545302388672:185|198.188.136.21", "198.168.136.21|openflow:365545302388672:185|198.168.136.11"]
49 # Remove the path setup above, for example, after showing the path on UI,
50 >>> myaltospce.path_remove(mypath['path'])