| 222 | = Making use of NOX (8/6) = |
| 223 | Writing a controller by tying together the functional code defining !OpenFlow Protocol using Ruby turned out to be a pretty messy task. According to the NOX developers, it would be better to do some Python development on the NOX web-API to expose functionality that can be called using Ruby. |
| 224 | |
| 225 | So enter NOX: http://noxrepo.org |
| 226 | |
| 227 | Install with git: [[BR]] |
| 228 | apt-get install git-core [[BR]] |
| 229 | git clone git://noxrepo.org/noxcore [[BR]] |
| 230 | |
| 231 | |
| 232 | === Installing NOX on the Console === |
| 233 | We tried to use git, but that didn't work due to firewall issues. It did work on the PC, so the package was tarred and scp-d to SB9. |
| 234 | |
| 235 | For it to build properly, the following had to be installed. |
| 236 | * libtool |
| 237 | * libboost1.35-dev |
| 238 | * apache2 |
| 239 | * libxerces-c28 |
| 240 | * libxerces-c2-dev |
| 241 | * libssl-dev |
| 242 | * libsqlite3-dev |
| 243 | * python-simplejson |
| 244 | |
| 245 | As of now, failing a test: |
| 246 | {{{ |
| 247 | make[4]: Entering directory `/root/noxcore/build/src' |
| 248 | echo "#! /bin/bash" >> nox.test.tmp |
| 249 | echo "exec ./nox_core tests" >> nox.test.tmp |
| 250 | chmod a+x nox.test.tmp |
| 251 | mv nox.test.tmp nox.test |
| 252 | NOX 0.5.0~full~beta (nox_core), compiled Aug 6 2009 16:18:54 |
| 253 | Compiled with OpenFlow 0x97 (exp) |
| 254 | 00001|sqlite3-impl|WARN:Transactional storage file not given in the command line; defaulting to 'testing.sqlite' |
| 255 | 00002|nox|ERR:Cannot change the state of 'tests' to INSTALLED: |
| 256 | 'tests' has an unmet dependency: |
| 257 | 'webservice' has an unmet dependency: |
| 258 | 'webauth' has an unmet dependency: |
| 259 | 'webserver' ran into an error: |
| 260 | cannot import a Python module 'nox.webapps.webserver.webserver': |
| 261 | Traceback (most recent call last): |
| 262 | File "./nox/webapps/webserver/webserver.py", line 24, in <module> |
| 263 | from twisted.web import static, server, resource |
| 264 | ImportError: No module named web |
| 265 | |
| 266 | FAIL: nox.test |
| 267 | ==================================== |
| 268 | 1 of 1 test failed |
| 269 | Please report to contact@noxrepo.org |
| 270 | ==================================== |
| 271 | make[4]: *** [check-TESTS] Error 1 |
| 272 | make[4]: Leaving directory `/root/noxcore/build/src' |
| 273 | make[3]: *** [check-am] Error 2 |
| 274 | make[3]: Leaving directory `/root/noxcore/build/src' |
| 275 | make[2]: *** [check-recursive] Error 1 |
| 276 | make[2]: Leaving directory `/root/noxcore/build/src' |
| 277 | make[1]: *** [check] Error 2 |
| 278 | make[1]: Leaving directory `/root/noxcore/build/src' |
| 279 | make: *** [check-recursive] Error 1 |
| 280 | }}} |
| 281 | |
| 282 | |
| 283 | the switch will recognize a controller with the command |
| 284 | |
| 285 | `./nox_core -i ptcp:6633 ` |
| 286 | |
| 287 | ./nox_core -h will give you all the commands available. |
| 288 | |