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

Reply via email to