Re: [nox-dev] nox api development

2012-01-19 Thread edward wilson
hi,
I am still getting the same results after setting wildcards=0xFFF...

On Thu, Jan 19, 2012 at 12:58 PM, Murphy McCauley jam...@nau.edu wrote:

 So my first thought is to wonder what happens if you try with wildcards =
 0x...

 -- Murphy

 On Jan 18, 2012, at 11:19 PM, edward wilson wrote:

  hi,
  Currently im using NOX 0.9.0(zaku)~full~beta (nox_core), compiled Jan  3
 2012 15:21:13
  Compiled with OpenFlow 0x01
 
  Now i have developed this api for getting aggregrate table stats
  1. def aggregate_timer(self, dp):
  flow = ofp_match()
  flow.dl_type=ethernet.ethernet.IP_TYPE
  flow.nw_proto=ipv4.ipv4.ICMP_PROTOCOL
  self.ctxt.send_aggregate_stats_request(dp, flow, 0xff)
  self.post_callback(MONITOR_TABLE_PERIOD, lambda :
 self.aggregate_timer(dp))
 
  Now when i connect nox controller to switch and display the aggregrate
 statistics i get
  Aggregate stats in from datapath 2c:27:d7:1d:08:7d
  packet_count-- 0
  flow_count-- 0
  byte_count-- 0
  however i have a rule with nw_proto=icmp and dl_type=ip, and packets do
 match this rule but still statistics are displayed as zero.
 
 
  2. Even if i use following definition
  def aggregate_timer(self, dp):
  flow = ofp_match()
  flow.wildcards=0x
  self.ctxt.send_aggregate_stats_request(dp, flow, 0xff)
  self.post_callback(MONITOR_TABLE_PERIOD, lambda :
 self.aggregate_timer(dp)
  now in this case statistics should be displayed for all rules but again
 the aggregrate statistics displayed are zero.
  Aggregate stats in from datapath 2c:27:d7:1d:08:7d
  packet_count-- 0
  flow_count-- 0
  byte_count-- 0
 
  Please let me know if am missing something.
 
  regards
 
  ___
  nox-dev mailing list
  nox-dev@noxrepo.org
  http://noxrepo.org/mailman/listinfo/nox-dev


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


[nox-dev] nox api development

2012-01-18 Thread edward wilson
hi,
Currently im using NOX 0.9.0(zaku)~full~beta (nox_core), compiled Jan  3
2012 15:21:13
Compiled with OpenFlow 0x01

Now i have developed this api for getting aggregrate table stats
1. def aggregate_timer(self, dp):
flow = ofp_match()
flow.dl_type=ethernet.ethernet.IP_TYPE
flow.nw_proto=ipv4.ipv4.ICMP_PROTOCOL
self.ctxt.send_aggregate_stats_request(dp, flow, 0xff)
self.post_callback(MONITOR_TABLE_PERIOD, lambda :
self.aggregate_timer(dp))

Now when i connect nox controller to switch and display the aggregrate
statistics i get
Aggregate stats in from datapath 2c:27:d7:1d:08:7d
packet_count-- 0
flow_count-- 0
byte_count-- 0
however i have a rule with nw_proto=icmp and dl_type=ip, and packets do
match this rule but still statistics are displayed as zero.


2. Even if i use following definition
def aggregate_timer(self, dp):
flow = ofp_match()
flow.wildcards=0x
self.ctxt.send_aggregate_stats_request(dp, flow, 0xff)
self.post_callback(MONITOR_TABLE_PERIOD, lambda :
self.aggregate_timer(dp)
now in this case statistics should be displayed for all rules but again the
aggregrate statistics displayed are zero.
Aggregate stats in from datapath 2c:27:d7:1d:08:7d
packet_count-- 0
flow_count-- 0
byte_count-- 0

Please let me know if am missing something.

regards
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


Re: [nox-dev] nox api development

2012-01-18 Thread Murphy McCauley
So my first thought is to wonder what happens if you try with wildcards = 
0x...

-- Murphy

On Jan 18, 2012, at 11:19 PM, edward wilson wrote:

 hi,
 Currently im using NOX 0.9.0(zaku)~full~beta (nox_core), compiled Jan  3 2012 
 15:21:13
 Compiled with OpenFlow 0x01 
 
 Now i have developed this api for getting aggregrate table stats 
 1. def aggregate_timer(self, dp):
 flow = ofp_match()
 flow.dl_type=ethernet.ethernet.IP_TYPE
 flow.nw_proto=ipv4.ipv4.ICMP_PROTOCOL
 self.ctxt.send_aggregate_stats_request(dp, flow, 0xff)
 self.post_callback(MONITOR_TABLE_PERIOD, lambda : 
 self.aggregate_timer(dp))
 
 Now when i connect nox controller to switch and display the aggregrate 
 statistics i get 
 Aggregate stats in from datapath 2c:27:d7:1d:08:7d
 packet_count-- 0 
 flow_count-- 0 
 byte_count-- 0
 however i have a rule with nw_proto=icmp and dl_type=ip, and packets do match 
 this rule but still statistics are displayed as zero.
 
 
 2. Even if i use following definition 
 def aggregate_timer(self, dp):
 flow = ofp_match()
 flow.wildcards=0x
 self.ctxt.send_aggregate_stats_request(dp, flow, 0xff)
 self.post_callback(MONITOR_TABLE_PERIOD, lambda : 
 self.aggregate_timer(dp)
 now in this case statistics should be displayed for all rules but again the 
 aggregrate statistics displayed are zero.
 Aggregate stats in from datapath 2c:27:d7:1d:08:7d
 packet_count-- 0 
 flow_count-- 0 
 byte_count-- 0
 
 Please let me know if am missing something.
 
 regards
 
 ___
 nox-dev mailing list
 nox-dev@noxrepo.org
 http://noxrepo.org/mailman/listinfo/nox-dev

___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


[nox-dev] NOX API development

2012-01-05 Thread Amit Tewari
Hi,

 

I am using NOX as a controller for my openvswitch 1.2.2 with openflow
1.0 .

I have created api for adding flow and deleting flow from controller.

 

I have used lib/core.py  api's install_datapath_flow and
delete_datapath_flow.

 

But core.py do not have api  or command for modifying flow table rules
and obtaining switch flow table statistics.

If I use openflow.OFPFC_MODIFY flag in send_flow_command, it gives me
error-invalid action type

 

Also if I give flag as OFPAT_ENQUEUE it gives me error.

 

 

I wanted to know Are there any other library files in nox whose
functions I can use for developing my api or nox dosent support it ?

 

Regards

Amit Tewari

NHST

 




DISCLAIMER: 
---
 
The contents of this e-mail and any attachment(s) are confidential and
intended 
for the named recipient(s) only.  
It shall not attach any liability on the originator or NECHCL or its 
affiliates. Any views or opinions presented in  
this email are solely those of the author and may not necessarily reflect the 
opinions of NECHCL or its affiliates.  
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of  
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have  
received this email in error please delete it and notify the sender 
immediately. . 
---___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


Re: [nox-dev] NOX API development

2012-01-05 Thread Murphy McCauley
Responses inline.

On Jan 5, 2012, at 5:10 AM, Amit Tewari wrote:
 
 If I use openflow.OFPFC_MODIFY flag in send_flow_command, it gives me 
 error-“invalid action type”

Something like the following should let you modify flows:

from util import set_match
from nox.coreapps.pyrt.pycomponent import UINT32_MAX

self.ctxt.send_flow_command(dpid,
openflow.OFPFC_MODIFY,
set_match(attrs),
idle_timeout, # timeouts only used if flow
hard_timeout, # didn't exist
self.make_action_array(actions),
UINT32_MAX, # No buffer ID
priority)

attrs and actions are as described in install_datapath_flow()'s documentation.

 Also if I give flag as OFPAT_ENQUEUE it gives me error.

Where are you trying to put that?  It belongs in the actions list.

Also, it is one of the newer actions and it won't be available on older 
versions of NOX.  Are you using the destiny branch?

 I wanted to know Are there any other library files in nox whose functions I 
 can use for developing my api or nox dosent support it ?


send_openflow_command() pretty much sends a raw buffer to a datapath, so you 
can craft pretty much any OpenFlow command you want (often using 
pyopenflow.py), and send it.

The monitoring component uses this technique, so you can look at it as an 
example.  Among other things, it uses it to get flow stats.

Hope that helps.

Murphy___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev