[nox-dev] how to get individual flows

2012-03-05 Thread Baraki Halefom
Hi every one,

Apart from aggregate statistics I want to retrieve flows from switches.
To do that I am running my component along with monitoring component in the
command line.
In my component I have the following code:

# to send flow stats request
 def send_flow_stats_request():
global xid
flow = of.ofp_match()
flow.wildcards = of.OFPFW_ALL
flow.dl_source = NONE
flow.dl_type = ethernet.IP_TYPE
inst.Monitoring.send_flow_stats_request(dpid,flows,0xff,xid)
xid +=1
# to handle flow stats in
def flow_stats_in_handler(dpid, flows, more, xid):
 print\n^^ Flow statistics report
^
 print from  %s: size %s: % dpid,str(flows)
 print number of flow %s:  % flows['flow_count']
 #data =0;
 #ELEPHANT_FLOW_THRESHOLD = 500
 for i, flw in flows:
num_bytes = flw['byte_count']
num_packets = flw['packet_count']
print Byte -size: %s , pakcet size: %s %
longlong_to_octstr(num_byte)
if num_bytes  ELEPHANT_FLOW_THRESHOLD:
inport = flows[i]['match']['in_port']
flow = flows[i]['match']
actions = []
#do sth with the flow here
I have also set appropriate call back timers.

So the question is I am not getting the flows. I am able to get aggregate
flow stats and port stats with the same approach.
can any one please tell me where I did the mistake.

Also which component is printing the following message:
[(XEROX CORPORATION):00:00:0c01:23:20:00:00:01:LLDP]chassis
ID:64:70:69:64:3a:63port ID:00:06ttl:120tlv end
when I run my component a bunch of this text is displayed in the screen.

Sincerely,



-- 


Baraki H. Abay
Department of Math and Computer science
North Carolina Central University
Durham, 27707 NC
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


[nox-dev] monitoring usage error

2012-02-26 Thread Baraki Halefom
Hello everyone,

I want use the methods in the Monitoring component to send flow stats
request from my own component.
I did the following two variations to user the monitoringcomponent

 1.  include monitoring component in the dependency list of my
components meta.json file

 import the monitoring component as:  from
nox.netapps.monitoring.monitoring import Monitoring

then inside my component :

  def __init_(self, ctxt):
  global inst
  Component.__init__(self,ctxt)
  inst.Monitoring = ctxt.resolve(Monitoring)

and then use it like,  inst.Monitoring.send_flow_stats_request()

 this gives me Monitoring description not found error.

2. when I tried to use the monitoring component in the command line after
the proper import as follows

  ./nox_core -i ptcp:6633 monitoring mycomponent

it gives me again the following error.
inst.Monitoring = ctxt.resolve(Monitoring)
AttributeError: 'NoneType' object has not attribute 'Monitoring'

please tell me where my mistake is.

thanks


-- 


Baraki H. Abay
Department of Math and Computer science
North Carolina Central University
Durham, 27707 NC
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


[nox-dev] NOX error

2012-02-18 Thread Baraki Halefom
anyone familiar with the following error.

2|pyrt|ERR:Can't load and parse 'nox/coreapps/examples/meta.json

 the meta.json file has all the required dependency lists




-- 


Baraki H. Abay
Department of Math and Computer science
North Carolina Central University
Durham, 27707 NC
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


[nox-dev] monitoring module not available in my nox repository

2012-02-16 Thread Baraki Halefom
hello every one,

I am trying to gather the flow statistics info from switches in my network
through my Component.
I tried to import the 'monitoring' module to use it send flow statistics
request as follows.

 from nox.netapps.monitoring.monitoring import Monitoring
and got the following error
ImportError: No module named monitoring.monitoring

isn't the monitoring module available in the zaku version? what else could
it be? similarly it gives me similar error when i import the pyopenflow
(import nox.lib.pyopenflow as of) model. when i check the directory list
both modules are not available.


Moreover,

inst.register_for_flow_stats_in(my_flow_in_handler)
gives me the following error
Attribute erro: myswitch instance has no attribute
'register_for_flow_stats_in' where 'myswitch' is my custom component

thanks in advance

-- 


Baraki H. Abay
Department of Math and Computer science
North Carolina Central University
Durham, 27707 NC
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


[nox-dev] I can't run nox after checking out to destiny

2012-02-16 Thread Baraki Halefom
please help me. after checking out to destiny branch I can not even run nox
controller

the command  ./nox_core -i ptcp:6633
displays a bunch of information with a last info  Caught signal 6 
Aborted.

what am I supposed to do after checkout.
I have done the following after checking out.

./boot.sh
   mkdir build/
   cd build/
   ../configure
   make -j 5

thanks

-- 


Baraki H. Abay
Department of Math and Computer science
North Carolina Central University
Durham, 27707 NC
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


[nox-dev] how to use own controller in custom topology

2012-01-31 Thread Baraki Halefom
Dear all,
I have built a simple custom topology network in mininet. and want to use a
my own controller in the topology. as
follows;

 net = Mininet(controller= lambda name: NOX(name ,'myswitch'))  # where
'myswitch' is a learning switch component

  also to add multiple controllers to the topology I did the following
additions

 c1 = net.addController('c1', port = 6633)
 c2 = net.addController('c2', port = 6634)

when I run the topology  I got the following error
controller_new = controller(name,**kwargs)
TypeError:lambda() got an unexpected key word argument 'port'

in addition pinging between hosts attached to different switches is not
working. How can I resolve this?

Sincerely,


-- 


Baraki H. Abay
Department of Math and Computer science
North Carolina Central University
Durham, 27707 NC
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


[nox-dev] help need

2012-01-13 Thread Baraki Halefom
Hi dear nox developers,

I am new to NOX development. I am trying to create my own component under a
new directory.
for testing purpose I did the following things (in the virtual machine):

 1. made directory under the coreapps directory
 2. I copy the files in the examples directory and renamed the pyswitch.py
file to myswitch.py
 3. also made all possible changes in the Makefile.ac, meta.json files
 4. now i want to run the new component in the command line as: ./nox_core
-v pctp:2525 myswitch

it gave me the following error after displaying some verbose descriptions:
  00042|nox|ERR: Application myswitch description not found

1. is it possible to create a new directory and create new component under
it?
2. if possible  how can I compile the component in the new directory? i did
./boot.sh
3. what else did I forget?

what other things did I forget?

I appreciate your cooperation in advance.


-- 


Baraki H. Abay
Department of Math and Computer science
North Carolina Central University
Durham, 27707 NC
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev