Thanks Kyriakos, James KK for the inputs. Few more questions down..
Appreciate your help : )
1. I checked the file pytutorial.py and then modified it by simply
adding some print commands and then restarting the nox controller. It did
print my commands. So instead of taking a new file and changing the
xml(json) file, I decided I will make the changes in this code and then test
my code. I want to know is there any limitation of using this approach or I
need to start with the new file and make changes in the configuration files?
2. Like I mentioned in the earlier email, that I would like to parse
the packets based on the IP addresses and port number. By reading the
documentation I have understood that I need to perform following operations,
Would request someone to validate my assumptions:
a. I need to convert the pytutorial.py into a learning switch. The
learning switch example is giving in pyswitch.py file. One approach is to
merge the code of these two files in pytutorial.py for testing. Is this
correct?
b. Once I have this learning switch working, I need to get the packet
information. For this I will be using code present in IPv4.py, tcp.py,
udp.py. Learning switch is layer 2 device as created in step above, how
would I extract layer 3 packet information from the packet received by this
switch. Is the code available in the files in packet folder?
c. Once the packet information is obtained, then I would like to
modify the flow-tables . For this, core.py has functions to install the flow
paths. So I simply call the functions in core.py with my own arguments and I
should be able to set the flowpaths.
d. Since I would be calling the files like pyswitch.py, IPv4.py,
core.py etc which are located in different folders, do I need to modify any
configuration in Pytutorial.py so that they can find all the respective
files when NOX is executed.
e. Also to configure queues in switch and setting buffer etc, I would
require dpctl tool or can I perform all the tasks what dpctl does using the
python code?
Thanks,
Kavitesh.
-Original Message-
From: yap...@gmail.com [mailto:yap...@gmail.com] On Behalf Of kk yap
Sent: Thursday, November 11, 2010 08:06 PM
To: James Murphy McCauley
Cc: Kavitesh Singh; nox-dev@noxrepo.org
Subject: Re: [nox-dev] Information on Python APIs available in NOX
controller.
Just one thing, please use doxygen. Reading code is unfortunately still
necessary at this point, but we are happy to take patches for documentation.
Regards
KK
On 11 November 2010 15:25, James Murphy McCauley mailto:jam...@nau.edu
jam...@nau.edu wrote:
Responses inline.
On Thu, 2010-11-11 at 15:24 -0500, Kavitesh Singh wrote:
Hi,
I have recently started learning Openflow using NOX controller. I
have downloaded the VMware image available on OpenFlow website having
inbuilt NOX controller.
I am following the tutorial available at
http://openflowswitch.org/wk/index.php/HOTITutorial2010
http://openflowswitch.org/wk/index.php/HOTITutorial2010
I require help on following issues, would appreciate if the developer
community assist me this:
1. I am new to Python so it takes a bit of time for me to get
hold of the APIs which are available in NOX controller. I am looking
for some documentation on APIs which I can/would use in programming
of NOX controller. I am not looking for generic tutorial on Python.
Reading the code is probably the best way. A lot of the good stuff is
in src/nox/lib/core.py and is somewhat documented in there. The
example components (like pyswitch) are also useful.
There is also some good content on both the noxrepo and the OpenFlow
wikis. For example:
http://noxrepo.org/noxwiki/index.php/Developing_in_NOX
http://noxrepo.org/noxwiki/index.php/Developing_in_NOX
http://noxrepo.org/noxwiki/index.php/FAQ
http://noxrepo.org/noxwiki/index.php/FAQ
http://www.openflowswitch.org/wk/index.php/Brazil_tutorial#Learning_NO
http://www.openflowswitch.org/wk/index.php/Brazil_tutorial#Learning_NO
X
2. I was able to run the NOX controller using ./nox_core -v -i
ptcp: pytutorial command. In this command the pytutorial is the
pytutorial.py file. Would we not require to provide a full path for
this file(~/noxcore/src/nox/coreapps/tutorial/pytutorial.py) or the
VMware consist of some variables for this particular file? Can I
replace this file with say my test.py and run the command normally by
./nox_core -v -i ptcp: test
Actually, no. The pytutorial in the commandline refers to the
pytutorial *component*. That this particular component happens to be
implemented in a file called pytutorial.py is just happenstance --
it could have been in foo.py.
NOX components are defined in the meta.json files (or meta.xml for
older versions). These are scanned for and parsed when NOX starts up.
They define