Hiroshi Yokoi | 1 Oct 12:17 2014
Picon

[PATCH] bgp: support next_hop_self

Support next_hop_self.
BGPSpeaker can replace a path's next_hop address with its own address
when it sends the path to iBGP peer.

Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@...>
---
 ryu/services/protocols/bgp/bgpspeaker.py       |  8 +++++++-
 ryu/services/protocols/bgp/peer.py             | 25 ++++++++++++++++++-------
 ryu/services/protocols/bgp/rtconf/neighbors.py | 21 ++++++++++++++++++++-
 3 files changed, 45 insertions(+), 9 deletions(-)

diff --git a/ryu/services/protocols/bgp/bgpspeaker.py b/ryu/services/protocols/bgp/bgpspeaker.py
index 59e781c..c969b08 100644
--- a/ryu/services/protocols/bgp/bgpspeaker.py
+++ b/ryu/services/protocols/bgp/bgpspeaker.py
 <at>  <at>  -57,6 +57,7  <at>  <at>  from ryu.services.protocols.bgp.rtconf.neighbors import PASSWORD
 from ryu.services.protocols.bgp.rtconf.neighbors import IN_FILTER
 from ryu.services.protocols.bgp.rtconf.neighbors import OUT_FILTER
 from ryu.services.protocols.bgp.rtconf.neighbors import IS_ROUTE_SERVER_CLIENT
+from ryu.services.protocols.bgp.rtconf.neighbors import IS_NEXT_HOP_SELF
 from ryu.services.protocols.bgp.info_base.base import Filter

 
 <at>  <at>  -179,7 +180,8  <at>  <at>  class BGPSpeaker(object):
                      enable_vpnv4=DEFAULT_CAP_MBGP_VPNV4,
                      enable_vpnv6=DEFAULT_CAP_MBGP_VPNV6,
                      next_hop=None, password=None, multi_exit_disc=None,
-                     site_of_origins=None, is_route_server_client=False):
+                     site_of_origins=None, is_route_server_client=False,
+                     is_next_hop_self=False):
(Continue reading)

Picon

Not able to run "ryu" on Ubuntu 14.04 64bit !

Hi Team,

My Host Environment Setup

OS: $ uname -a
Linux myhost 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Distro: $ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 14.04 LTS
Release:    14.04
Codename:    trusty

$ python --version
Python 2.7.6

I have tried installing ryu in following methods.

pip install ryu

OR

git clone git://github.com/osrg/ryu.git
cd ryu; python ./setup.py install

But while running ryu or ryu-manager producing the following errors


$ ryu
Traceback (most recent call last):
  File "/usr/local/bin/ryu", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2749, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 446, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 459, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 632, in resolve
    raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (six 1.5.2 (/usr/lib/python2.7/dist-packages), Requirement.parse('six>=1.7.0'))

Please advice on this issue. Thanks for your help in advance.


Thanks & Regards
Arun

ஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃ
அன்புடன்
அருண்
நுட்பம் நம்மொழியில் தழைக்கச் செய்வோம்
http://thangamaniarun.wordpress.com
ஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃஃ


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
Ryu-devel@...
https://lists.sourceforge.net/lists/listinfo/ryu-devel
Yusuke Iwase | 30 Sep 04:01 2014
Picon

[PATCH] doc: Add ryu.app.ofctl_rest document


Signed-off-by: IWASE Yusuke <iwase.yusuke0-Re5JQEeQqe8AvxtiuMwx3w <at> public.gmane.org>
---
 doc/source/app.rst            |    1 +
 doc/source/app/ofctl_rest.rst | 1392 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 1393 insertions(+)
 create mode 100644 doc/source/app/ofctl_rest.rst

diff --git a/doc/source/app.rst b/doc/source/app.rst
index c20b0bf..077c890 100644
--- a/doc/source/app.rst
+++ b/doc/source/app.rst
 <at>  <at>  -10,3 +10,4  <at>  <at>  Others provide some functionalities to other Ryu applications.
    :maxdepth: 1
 
    app/ofctl.rst
+   app/ofctl_rest.rst
diff --git a/doc/source/app/ofctl_rest.rst b/doc/source/app/ofctl_rest.rst
new file mode 100644
index 0000000..dc18f40
--- /dev/null
+++ b/doc/source/app/ofctl_rest.rst
 <at>  <at>  -0,0 +1,1392  <at>  <at> 
+******************
+ryu.app.ofctl_rest
+******************
+
+ryu.app.ofctl_rest provides REST APIs for retrieving the switch stats
+and Updating the switch stats.
+This application helps you debug your application and get various statistics.
+
+This application supports OpenFlow version 1.0, 1.2 and 1.3.
+
+
+Retrieve the switch stats
+=========================
+
+Get all switches
+----------------
+
+    Get the list of all switches which connected to the controller.
+
+    Usage:
+
+        ======= ================
+        Method  GET
+        URI     /stats/switches
+        ======= ================
+
+    Response message body:
+
+        ========== =================== ========
+        Attribute  Description         Example
+        ========== =================== ========
+        dpid       Datapath ID         1
+        ========== =================== ========
+
+    Example of use::
+
+        $ curl -X GET http://localhost:8080/stats/switches
+
+    ::
+
+        [
+          1,
+          2,
+          3
+        ]
+
+    .. NOTE::
+
+       The result of the REST command is formatted for easy viewing.
+
+
+Get the desc stats
+------------------
+
+    Get the desc stats of the switch which specified with Datapath ID in URI.
+
+    Usage:
+
+        ======= ===================
+        Method  GET
+        URI     /stats/desc/<dpid>
+        ======= ===================
+
+    Response message body:
+
+        =========== ======================================= ================
+        Attribute   Description                             Example
+        =========== ======================================= ================
+        dpid        Datapath ID                             "1"
+        mfr_desc    Manufacturer description                "Nicira, Inc.",
+        hw_desc     Hardware description                    "Open vSwitch",
+        sw_desc     Software description                    "2.3.90",
+        serial_num  Serial number                           "None",
+        dp_desc     Human readable description of datapath  "None"
+        =========== ======================================= ================
+
+    Example of use::
+
+        $ curl -X GET http://localhost:8080/stats/desc/1
+
+    ::
+
+        {
+          "1": {
+            "mfr_desc": "Nicira, Inc.",
+            "hw_desc": "Open vSwitch",
+            "sw_desc": "2.3.90",
+            "serial_num": "None",
+            "dp_desc": "None"
+          }
+        }
+
+
+.. _get-all-flows-stats:
+
+Get all flows stats
+-------------------
+
+    Get all flows stats of the switch which specified with Datapath ID in URI.
+
+    Usage:
+
+        ======= ===================
+        Method  GET
+        URI     /stats/flow/<dpid>
+        ======= ===================
+
+    Response message body:
+
+        ============== ========================================= ===============
+        Attribute      Description                               Example
+        ============== ========================================= ===============
+        dpid           Datapath ID                               "1"
+        length         Length of this entry                      88
+        table_id       Table ID                                  0
+        duration_sec   Time flow has been alive in seconds       2
+        duration_nsec  Time flow has been alive in nanoseconds   6.76e+08
+        priority       Priority of the entry                     11111
+        idle_timeout   Number of seconds idle before expiration  0
+        hard_timeout   Number of seconds before expiration       0
+        flags          Bitmap of OFPFF_* flags                   1
+        cookie         Opaque controller-issued identifier       1
+        packet_count   Number of packets in flow                 0
+        byte_count     Number of bytes in flow                   0
+        match          Fields to match                           {"in_port": 1}
+        actions        Instruction set                           ["OUTPUT:2"]
+        ============== ========================================= ===============
+
+    Example of use::
+
+        $ curl -X GET http://localhost:8080/stats/flow/1
+
+    ::
+
+        {
+          "1": [
+            {
+              "length": 88,
+              "table_id": 0,
+              "duration_sec": 2,
+              "duration_nsec": 6.76e+08,
+              "priority": 11111,
+              "idle_timeout": 0,
+              "hard_timeout": 0,
+              "flags": 1,
+              "cookie": 1,
+              "packet_count": 0,
+              "byte_count": 0,
+              "match": {
+                "in_port": 1
+              },
+              "actions": [
+                "OUTPUT:2"
+              ]
+            }
+          ]
+        }
+
+
+.. _get-flows-stats-filtered:
+
+Get flows stats filtered by fields
+----------------------------------
+
+    Get flows stats of the switch filtered by the OFPFlowStats fields.
+    This is POST method version of :ref:`get-all-flows-stats`.
+
+    Usage:
+
+        ======= ===================
+        Method  POST
+        URI     /stats/flow/<dpid>
+        ======= ===================
+
+    Request message body:
+
+        ============ ================================================================== =============== ===============
+        Attribute    Description                                                        Example         Default
+        ============ ================================================================== =============== ===============
+        table_id     Table ID (int)                                                     0               OFPTT_ALL
+        out_port     Require matching entries to include this as an output port (int)   2               OFPP_ANY
+        out_group    Require matching entries to include this as an output group (int)  1               OFPG_ANY
+        cookie       Require matching entries to contain this cookie value (int)        1               0
+        cookie_mask  Mask used to restrict the cookie bits that must match (int)        1               0
+        match        Fields to match (dict)                                             {"in_port": 1}  {} #wildcarded
+        ============ ================================================================== =============== ===============
+
+    Response message body:
+        The same as :ref:`get-all-flows-stats`
+
+    Example of use::
+
+        $ curl -X POST -d '{ \
+             "table_id": 0, \
+             "out_port": 2, \
+             "cookie": 1, \
+             "cookie_mask": 1, \
+             "match":{ \
+                 "in_port":1 \
+             } \
+         }' \
+         http://localhost:8080/stats/flow/1
+
+    ::
+
+        {
+          "1": [
+            {
+              "table_id": 0,
+              "duration_sec": 2,
+              "duration_nsec": 6.76e+08,
+              "priority": 11111,
+              "idle_timeout": 0,
+              "hard_timeout": 0,
+              "cookie": 1,
+              "packet_count": 0,
+              "byte_count": 0,
+              "match": {
+                "in_port": 1
+              },
+              "actions": [
+                "OUTPUT:2"
+              ]
+            }
+          ]
+        }
+
+
+Get ports stats
+---------------
+
+    Get ports stats of the switch which specified with Datapath ID in URI.
+
+    Usage:
+
+        ======= ===================
+        Method  GET
+        URI     /stats/port/<dpid>
+        ======= ===================
+
+    Response message body:
+
+        ============== ======================================== =========
+        Attribute      Description                              Example
+        ============== ======================================== =========
+        dpid           Datapath ID                              "1"
+        port_no        Port number                              1
+        rx_packets     Number of received packets               9
+        tx_packets     Number of transmitted packets            6
+        rx_bytes       Number of received bytes                 738
+        tx_bytes       Number of transmitted bytes              252
+        rx_dropped     Number of packets dropped by RX          0
+        tx_dropped     Number of packets dropped by TX          0
+        rx_errors      Number of receive errors                 0
+        tx_errors      Number of transmit errors                0
+        rx_frame_err   Number of frame alignment errors         0
+        rx_over_err    Number of packets with RX overrun        0
+        rx_crc_err     Number of CRC errors                     0
+        collisions     Number of collisions                     0
+        duration_sec   Time port has been alive in seconds      12
+        duration_nsec  Time port has been alive in nanoseconds  9.76e+08
+        ============== ======================================== =========
+
+    Example of use::
+
+        $ curl -X GET http://localhost:8080/stats/port/1
+
+    ::
+
+        {
+          "1": [
+            {
+              "port_no": 1,
+              "rx_packets": 9,
+              "tx_packets": 6,
+              "rx_bytes": 738,
+              "tx_bytes": 252,
+              "rx_dropped": 0,
+              "tx_dropped": 0,
+              "rx_errors": 0,
+              "tx_errors": 0,
+              "rx_frame_err": 0,
+              "rx_over_err": 0,
+              "rx_crc_err": 0,
+              "collisions": 0,
+              "duration_sec": 12,
+              "duration_nsec": 9.76e+08
+            },
+            {
+              :
+              :
+            }
+          ]
+        }
+
+
+.. _get-ports-description:
+
+Get ports description
+---------------------
+
+    Get ports description of the switch which specified with Datapath ID in URI.
+
+    Usage:
+
+        ======= =======================
+        Method  GET
+        URI     /stats/portdesc/<dpid>
+        ======= =======================
+
+    Response message body:
+
+        ============== ====================================== ====================
+        Attribute      Description                            Example
+        ============== ====================================== ====================
+        dpid           Datapath ID                            "1"
+        port_no        Port number                            1
+        hw_addr        Ethernet hardware address              "0a:b6:d0:0c:e1:d7"
+        name           Name of port                           "s1-eth1"
+        config         Bitmap of OFPPC_* flags                0
+        state          Bitmap of OFPPS_* flags                0
+        curr           Current features                       2112
+        advertised     Features being advertised by the port  0
+        supported      Features supported by the port         0
+        peer           Features advertised by peer            0
+        curr_speed     Current port bitrate in kbps           1e+07
+        max_speed      Max port bitrate in kbps               0
+        ============== ====================================== ====================
+
+    Example of use::
+
+        $ curl -X GET http://localhost:8080/stats/portdesc/1
+
+    ::
+
+        {
+          "1": [
+            {
+              "port_no": 1,
+              "hw_addr": "0a:b6:d0:0c:e1:d7",
+              "name": "s1-eth1",
+              "config": 0,
+              "state": 0,
+              "curr": 2112,
+              "advertised": 0,
+              "supported": 0,
+              "peer": 0,
+              "curr_speed": 1e+07,
+              "max_speed": 0
+            },
+            {
+              :
+              :
+            }
+          ]
+        }
+
+
+Get groups stats
+----------------
+
+    Get groups stats of the switch which specified with Datapath ID in URI.
+
+    Usage:
+
+        ======= ====================
+        Method  GET
+        URI     /stats/group/<dpid>
+        ======= ====================
+
+    Response message body:
+
+        ================ ============================================================== =========
+        Attribute        Description                                                    Example
+        ================ ============================================================== =========
+        dpid             Datapath ID                                                    "1"
+        length           Length of this entry                                           56
+        group_id         Group ID                                                       1
+        ref_count        Number of flows or groups that directly forward to this group  1
+        packet_count     Number of packets processed by group                           0
+        byte_count       Number of bytes processed by group                             0
+        duration_sec     Time group has been alive in seconds                           161
+        duration_nsec    Time group has been alive in nanoseconds                       3.03e+08
+        bucket_stats     struct ofp_bucket_counter
+        -- packet_count  Number of packets processed by bucket                          0
+        -- byte_count    Number of bytes processed by bucket                            0
+        ================ ============================================================== =========
+
+    Example of use::
+
+        $ curl -X GET http://localhost:8080/stats/group/1
+
+    ::
+
+        {
+          "1": [
+            {
+              "length": 56,
+              "group_id": 1,
+              "ref_count": 1,
+              "packet_count": 0,
+              "byte_count": 0,
+              "duration_sec": 161,
+              "duration_nsec": 3.03e+08,
+              "bucket_stats": [
+                {
+                  "packet_count": 0,
+                  "byte_count": 0
+                }
+              ]
+            }
+          ]
+        }
+
+
+.. _get-group-description-stats:
+
+Get group description stats
+---------------------------
+
+    Get group description stats of the switch which specified with Datapath ID in URI.
+
+    Usage:
+
+        ======= ========================
+        Method  GET
+        URI     /stats/groupdesc/<dpid>
+        ======= ========================
+
+    Response message body:
+
+        =============== ======================================================= =============
+        Attribute       Description                                             Example
+        =============== ======================================================= =============
+        dpid            Datapath ID                                             "1"
+        type            One of OFPGT_*                                          "ALL"
+        group_id        Group ID                                                1
+        buckets         struct ofp_bucket
+        -- weight       Relative weight of bucket                               0
+                        (Only defined for select groups)
+        -- watch_port   Port whose state affects whether this bucket is live    4294967295
+                        (Only required for fast failover groups)
+        -- watch_group  Group whose state affects whether this bucket is live   4294967295
+                        (Only required for fast failover groups)
+        -- actions      0 or more actions associated with the bucket            ["OUTPUT:1"]
+        =============== ======================================================= =============
+
+    Example of use::
+
+        $ curl -X GET http://localhost:8080/stats/groupdesc/1
+
+    ::
+
+        {
+          "1": [
+            {
+              "type": "ALL",
+              "group_id": 1,
+              "buckets": [
+                {
+                  "weight": 0,
+                  "watch_port": 4294967295,
+                  "watch_group": 4294967295,
+                  "actions": [
+                    "OUTPUT:1"
+                  ]
+                }
+              ]
+            }
+          ]
+        }
+
+
+Get group features stats
+------------------------
+
+    Get group features stats of the switch which specified with Datapath ID in URI.
+
+    Usage:
+
+        ======= ============================
+        Method  GET
+        URI     /stats/groupfeatures/<dpid>
+        ======= ============================
+
+    Response message body:
+
+        ============== =========================================== ===============================================
+        Attribute      Description                                 Example
+        ============== =========================================== ===============================================
+        dpid           Datapath ID                                 "1"
+        types          Bitmap of (1 << OFPGT_*) values supported   []
+        capabilities   Bitmap of OFPGFC_* capability supported     ["SELECT_WEIGHT","SELECT_LIVENESS","CHAINING"]
+        max_groups     Maximum number of groups for each type      [{"ALL": 4294967040},...]
+        actions        Bitmaps of (1 << OFPAT_*) values supported  [{"ALL": ["OUTPUT",...]},...]
+        ============== =========================================== ===============================================
+
+    Example of use::
+
+        $ curl -X GET http://localhost:8080/stats/groupfeatures/1
+
+    ::
+
+        {
+          "1": [
+            {
+              "types": [],
+              "capabilities": [
+                "SELECT_WEIGHT",
+                "SELECT_LIVENESS",
+                "CHAINING"
+              ],
+              "max_groups": [
+                {
+                  "ALL": 4294967040
+                },
+                {
+                  "SELECT": 4294967040
+                },
+                {
+                  "INDIRECT": 4294967040
+                },
+                {
+                  "FF": 4294967040
+                }
+              ],
+              "actions": [
+                {
+                  "ALL": [
+                    "OUTPUT",
+                    "COPY_TTL_OUT",
+                    "COPY_TTL_IN",
+                    "SET_MPLS_TTL",
+                    "DEC_MPLS_TTL",
+                    "PUSH_VLAN",
+                    "POP_VLAN",
+                    "PUSH_MPLS",
+                    "POP_MPLS",
+                    "SET_QUEUE",
+                    "GROUP",
+                    "SET_NW_TTL",
+                    "DEC_NW_TTL",
+                    "SET_FIELD"
+                  ]
+                },
+                {
+                  "SELECT": []
+                },
+                {
+                  "INDIRECT": []
+                },
+                {
+                  "FF": []
+                }
+              ]
+            }
+          ]
+        }
+
+
+Get meters stats
+----------------
+
+    Get meters stats of the switch which specified with Datapath ID in URI.
+
+    Usage:
+
+        ======= =======================
+        Method  GET
+        URI     /stats/meter/<dpid>
+        ======= =======================
+
+    Response message body:
+
+        ===================== ========================================= ========
+        Attribute             Description                               Example
+        ===================== ========================================= ========
+        dpid                  Datapath ID                               "1"
+        meter_id              Meter ID                                  1
+        len                   Length in bytes of this stats             56
+        flow_count            Number of flows bound to meter            0
+        packet_in_count       Number of packets in input                0
+        byte_in_count         Number of bytes in input                  0
+        duration_sec          Time meter has been alive in seconds      37
+        duration_nsec         Time meter has been alive in nanoseconds  988000
+        band_stats            struct ofp_meter_band_stats
+        -- packet_band_count  Number of packets in band                 0
+        -- byte_band_count    Number of bytes in band                   0
+        ===================== ========================================= ========
+
+    Example of use::
+
+        $ curl -X GET http://localhost:8080/stats/meter/1
+
+    ::
+
+        {
+          "1": [
+            {
+              "meter_id": 1,
+              "len": 56,
+              "flow_count": 0,
+              "packet_in_count": 0,
+              "byte_in_count": 0,
+              "duration_sec": 37,
+              "duration_nsec": 988000,
+              "band_stats": [
+                {
+                  "packet_band_count": 0,
+                  "byte_band_count": 0
+                }
+              ]
+            }
+          ]
+        }
+
+
+.. _get-meter-config-stats:
+
+Get meter config stats
+------------------------
+
+    Get meter config stats of the switch which specified with Datapath ID in URI.
+
+    Usage:
+
+        ======= ============================
+        Method  GET
+        URI     /stats/meterconfig/<dpid>
+        ======= ============================
+
+    Response message body:
+
+        ============== ============================================ =========
+        Attribute      Description                                  Example
+        ============== ============================================ =========
+        dpid           Datapath ID                                  "1"
+        flags          All OFPMC_* that apply                       "KBPS"
+        meter_id       Meter ID                                     1
+        bands          struct ofp_meter_band_header
+        -- type        One of OFPMBT_*                              "DROP"
+        -- rate        Rate for this band                           1000
+        -- burst_size  Size of bursts                               0
+        ============== ============================================ =========
+
+    Example of use::
+
+        $ curl -X GET http://localhost:8080/stats/meterconfig/1
+
+    ::
+
+        {
+          "1": [
+            {
+              "flags": [
+                "KBPS"
+              ],
+              "meter_id": 1,
+              "bands": [
+                {
+                  "type": "DROP",
+                  "rate": 1000,
+                  "burst_size": 0
+                }
+              ]
+            }
+          ]
+        }
+
+
+Get meter features stats
+------------------------
+
+    Get meter features stats of the switch which specified with Datapath ID in URI.
+
+    Usage:
+
+        ======= ============================
+        Method  GET
+        URI     /stats/meterfeatures/<dpid>
+        ======= ============================
+
+    Response message body:
+
+        =========== ============================================ =========
+        Attribute   Description                                  Example
+        =========== ============================================ =========
+        dpid        Datapath ID                                  "1"
+        max_meter   Maximum number of meters                     256
+        band_types  Bitmaps of (1 << OFPMBT_*) values supported  ['DROP']
+        max_bands   Maximum bands per meters                     16
+        max_color   Maximum color value                          8
+        =========== ============================================ =========
+
+    Example of use::
+
+        $ curl -X GET http://localhost:8080/stats/meterfeatures/1
+
+    ::
+
+        {
+          "1": [
+            {
+              "max_meter": 256,
+              "band_types": [
+                'DROP'
+              ],
+              "max_bands": 16,
+              "max_color": 8
+            }
+          ]
+        }
+
+
+Update the switch stats
+=======================
+
+Add a flow entry
+----------------
+
+    Add a flow entry to the switch.
+
+    Usage:
+
+        ======= =====================
+        Method  POST
+        URI     /stats/flowentry/add
+        ======= =====================
+
+    Request message body:
+
+        ============= ===================================================== ============================== ===============
+        Attribute     Description                                           Example                        Default
+        ============= ===================================================== ============================== ===============
+        dpid          Datapath ID (int)                                     1                              (Mandatory)
+        cookie        Opaque controller-issued identifier (int)             1                              0
+        cookie_mask   Mask used to restrict the cookie bits (int)           1                              0
+        table_id      Table ID to put the flow in (int)                     0                              0
+        idle_timeout  Idle time before discarding (seconds) (int)           30                             0
+        hard_timeout  Max time before discarding (seconds) (int)            30                             0
+        priority      Priority level of flow entry (int)                    11111                          0
+        buffer_id     Buffered packet to apply to, or OFP_NO_BUFFER (int)   1                              OFP_NO_BUFFER
+        flags         Bitmap of OFPFF_* flags (int)                         1                              0
+        match         Fields to match (dict)                                {"in_port":1}                  {} #wildcarded
+        actions       Instruction set (list of dict)                        [{"type":"OUTPUT", "port":2}]  [] #DROP
+        ============= ===================================================== ============================== ===============
+
+    Example of use::
+
+        $ curl -X POST -d '{ \
+            "dpid": 1, \
+            "cookie": 1, \
+            "cookie_mask": 1, \
+            "table_id": 0, \
+            "idle_timeout": 30, \
+            "hard_timeout": 30, \
+            "priority": 11111, \
+            "flags": 1, \
+            "match":{ \
+                "in_port":1 \
+            }, \
+            "actions":[ \
+                { \
+                    "type":"OUTPUT", \
+                    "port": 2 \
+                } \
+            ] \
+         }' \
+         http://localhost:8080/stats/flowentry/add
+
+    ::
+
+        $ curl -X POST -d '{ \
+            "dpid": 1, \
+            "priority": 22222, \
+            "match":{ \
+                "in_port":1 \
+            }, \
+            "actions":[ \
+                { \
+                    "type":"GOTO_TABLE", \
+                    "table_id": 1 \
+                } \
+            ] \
+         }' \
+         http://localhost:8080/stats/flowentry/add
+
+    ::
+
+        $ curl -X POST -d '{ \
+            "dpid": 1, \
+            "priority": 33333, \
+            "match":{ \
+                "in_port":1 \
+            }, \
+            "actions":[ \
+                { \
+                    "type":"WRITE_METADATA", \
+                    "metadata": 1, \
+                    "metadata_mask": 1 \
+                } \
+            ] \
+         }' \
+         http://localhost:8080/stats/flowentry/add
+
+    ::
+
+        $ curl -X POST -d '{ \
+            "dpid": 1, \
+            "priority": 44444, \
+            "match":{ \
+                "in_port":1 \
+            }, \
+            "actions":[ \
+                { \
+                    "type":"METER", \
+                    "meter_id": 1 \
+                } \
+            ] \
+         }' \
+         http://localhost:8080/stats/flowentry/add
+
+    .. NOTE::
+
+        To confirm flow entry registration, please see :ref:`get-all-flows-stats` or :ref:`get-flows-stats-filtered`.
+
+
+Modify all matching flow entries
+--------------------------------
+
+    Modify all matching flow entries of the switch.
+
+    Usage:
+
+        ======= ========================
+        Method  POST
+        URI     /stats/flowentry/modify
+        ======= ========================
+
+    Request message body:
+
+        ============= ===================================================== ============================== ===============
+        Attribute     Description                                           Example                        Default
+        ============= ===================================================== ============================== ===============
+        dpid          Datapath ID (int)                                     1                              (Mandatory)
+        cookie        Opaque controller-issued identifier (int)             1                              0
+        cookie_mask   Mask used to restrict the cookie bits (int)           1                              0
+        table_id      Table ID to put the flow in (int)                     0                              0
+        idle_timeout  Idle time before discarding (seconds) (int)           30                             0
+        hard_timeout  Max time before discarding (seconds) (int)            30                             0
+        priority      Priority level of flow entry (int)                    11111                          0
+        buffer_id     Buffered packet to apply to, or OFP_NO_BUFFER (int)   1                              OFP_NO_BUFFER
+        flags         Bitmap of OFPFF_* flags (int)                         1                              0
+        match         Fields to match (dict)                                {"in_port":1}                  {} #wildcarded
+        actions       Instruction set (list of dict)                        [{"type":"OUTPUT", "port":2}]  [] #DROP
+        ============= ===================================================== ============================== ===============
+
+    Example of use::
+
+        $ curl -X POST -d '{ \
+            "dpid": 1, \
+            "cookie": 1, \
+            "cookie_mask": 1, \
+            "table_id": 0, \
+            "idle_timeout": 30, \
+            "hard_timeout": 30, \
+            "priority": 11111, \
+            "flags": 1, \
+            "match":{ \
+                "in_port":1 \
+            }, \
+            "actions":[ \
+                { \
+                    "type":"OUTPUT", \
+                    "port": 2 \
+                } \
+            ] \
+         }' \
+         http://localhost:8080/stats/flowentry/modify
+
+
+Modify flow entry strictly
+--------------------------
+
+    Modify flow entry strictly matching wildcards and priority
+
+    Usage:
+
+        ======= ===============================
+        Method  POST
+        URI     /stats/flowentry/modify_strict
+        ======= ===============================
+
+    Request message body:
+
+        ============= ===================================================== ============================== ===============
+        Attribute     Description                                           Example                        Default
+        ============= ===================================================== ============================== ===============
+        dpid          Datapath ID (int)                                     1                              (Mandatory)
+        cookie        Opaque controller-issued identifier (int)             1                              0
+        cookie_mask   Mask used to restrict the cookie bits (int)           1                              0
+        table_id      Table ID to put the flow in (int)                     0                              0
+        idle_timeout  Idle time before discarding (seconds) (int)           30                             0
+        hard_timeout  Max time before discarding (seconds) (int)            30                             0
+        priority      Priority level of flow entry (int)                    11111                          0
+        buffer_id     Buffered packet to apply to, or OFP_NO_BUFFER (int)   1                              OFP_NO_BUFFER
+        flags         Bitmap of OFPFF_* flags (int)                         1                              0
+        match         Fields to match (dict)                                {"in_port":1}                  {} #wildcarded
+        actions       Instruction set (list of dict)                        [{"type":"OUTPUT", "port":2}]  [] #DROP
+        ============= ===================================================== ============================== ===============
+
+    Example of use::
+
+        $ curl -X POST -d '{ \
+            "dpid": 1, \
+            "cookie": 1, \
+            "cookie_mask": 1, \
+            "table_id": 0, \
+            "idle_timeout": 30, \
+            "hard_timeout": 30, \
+            "priority": 11111, \
+            "flags": 1, \
+            "match":{ \
+                "in_port":1 \
+            }, \
+            "actions":[ \
+                { \
+                    "type":"OUTPUT", \
+                    "port": 2 \
+                } \
+            ] \
+         }' \
+         http://localhost:8080/stats/flowentry/modify_strict
+
+
+Delete all matching flow entries
+--------------------------------
+
+    Delete all matching flow entries of the switch.
+
+    Usage:
+
+        ======= ========================
+        Method  POST
+        URI     /stats/flowentry/delete
+        ======= ========================
+
+    Request message body:
+
+        ============= ===================================================== ============================== ===============
+        Attribute     Description                                           Example                        Default
+        ============= ===================================================== ============================== ===============
+        dpid          Datapath ID (int)                                     1                              (Mandatory)
+        cookie        Opaque controller-issued identifier (int)             1                              0
+        cookie_mask   Mask used to restrict the cookie bits (int)           1                              0
+        table_id      Table ID to put the flow in (int)                     0                              0
+        idle_timeout  Idle time before discarding (seconds) (int)           30                             0
+        hard_timeout  Max time before discarding (seconds) (int)            30                             0
+        priority      Priority level of flow entry (int)                    11111                          0
+        buffer_id     Buffered packet to apply to, or OFP_NO_BUFFER (int)   1                              OFP_NO_BUFFER
+        out_port      Output port (int)                                     1                              OFPP_ANY
+        out_group     Output group (int)                                    1                              OFPG_ANY
+        flags         Bitmap of OFPFF_* flags (int)                         1                              0
+        match         Fields to match (dict)                                {"in_port":1}                  {} #wildcarded
+        actions       Instruction set (list of dict)                        [{"type":"OUTPUT", "port":2}]  [] #DROP
+        ============= ===================================================== ============================== ===============
+
+    Example of use::
+
+        $ curl -X POST -d '{ \
+            "dpid": 1, \
+            "cookie": 1, \
+            "cookie_mask": 1, \
+            "table_id": 0, \
+            "idle_timeout": 30, \
+            "hard_timeout": 30, \
+            "priority": 11111, \
+            "flags": 1, \
+            "match":{ \
+                "in_port":1 \
+            }, \
+            "actions":[ \
+                { \
+                    "type":"OUTPUT", \
+                    "port": 2 \
+                } \
+            ] \
+         }' \
+         http://localhost:8080/stats/flowentry/delete
+
+
+Delete flow entry strictly
+--------------------------
+
+    Delete flow entry strictly matching wildcards and priority.
+
+    Usage:
+
+        ======= ===============================
+        Method  POST
+        URI     /stats/flowentry/delete_strict
+        ======= ===============================
+
+    Request message body:
+
+        ============= ===================================================== ============================== ===============
+        Attribute     Description                                           Example                        Default
+        ============= ===================================================== ============================== ===============
+        dpid          Datapath ID (int)                                     1                              (Mandatory)
+        cookie        Opaque controller-issued identifier (int)             1                              0
+        cookie_mask   Mask used to restrict the cookie bits (int)           1                              0
+        table_id      Table ID to put the flow in (int)                     0                              0
+        idle_timeout  Idle time before discarding (seconds) (int)           30                             0
+        hard_timeout  Max time before discarding (seconds) (int)            30                             0
+        priority      Priority level of flow entry (int)                    11111                          0
+        buffer_id     Buffered packet to apply to, or OFP_NO_BUFFER (int)   1                              OFP_NO_BUFFER
+        out_port      Output port (int)                                     1                              OFPP_ANY
+        out_group     Output group (int)                                    1                              OFPG_ANY
+        flags         Bitmap of OFPFF_* flags (int)                         1                              0
+        match         Fields to match (dict)                                {"in_port":1}                  {} #wildcarded
+        actions       Instruction set (list of dict)                        [{"type":"OUTPUT", "port":2}]  [] #DROP
+        ============= ===================================================== ============================== ===============
+
+    Example of use::
+
+        $ curl -X POST -d '{ \
+            "dpid": 1, \
+            "cookie": 1, \
+            "cookie_mask": 1, \
+            "table_id": 0, \
+            "idle_timeout": 30, \
+            "hard_timeout": 30, \
+            "priority": 11111, \
+            "flags": 1, \
+            "match":{ \
+                "in_port":1 \
+            }, \
+            "actions":[ \
+                { \
+                    "type":"OUTPUT", \
+                    "port": 2 \
+                } \
+            ] \
+         }' \
+         http://localhost:8080/stats/flowentry/delete_strict
+
+
+Delete all flow entries
+-----------------------
+
+    Delete all flow entries of the switch which specified with Datapath ID in URI.
+
+    Usage:
+
+        ======= ==============================
+        Method  DELETE
+        URI     /stats/flowentry/clear/<dpid>
+        ======= ==============================
+
+    Example of use::
+
+        $ curl -X DELETE http://localhost:8080/stats/flowentry/clear/1
+
+
+Add a group entry
+-----------------
+
+    Add a group entry to the switch.
+
+    Usage:
+
+        ======= ======================
+        Method  POST
+        URI     /stats/groupentry/add
+        ======= ======================
+
+    Request message body:
+
+        =============== ============================================================ ================================ ============
+        Attribute       Description                                                  Example                          Default
+        =============== ============================================================ ================================ ============
+        dpid            Datapath ID (int)                                            1                                (Mandatory)
+        type            One of OFPGT_* (string)                                      "ALL"                            "ALL"
+        group_id        Group ID (int)                                               1                                0
+        buckets         struct ofp_bucket
+        -- weight       Relative weight of bucket                                    0                                0
+                        (Only defined for select groups)
+        -- watch_port   Port whose state affects whether this bucket is live         4294967295                       OFPP_ANY
+                        (Only required for fast failover groups)
+        -- watch_group  Group whose state affects whether this bucket is live        4294967295                       OFPG_ANY
+                        (Only required for fast failover groups)
+        -- actions      0 or more actions associated with the bucket (list of dict)  [{"type": "OUTPUT", "port": 1}]  [] #DROP
+        =============== ============================================================ ================================ ============
+
+    Example of use::
+
+        $ curl -X POST -d '{ \
+            "dpid": 1, \
+            "type": "ALL", \
+            "group_id": 1, \
+            "buckets": [ \
+                { \
+                    "actions": [ \
+                        { \
+                            "type": "OUTPUT", \
+                            "port": 1 \
+                        } \
+                    ] \
+                } \
+            ] \
+         }' \
+         http://localhost:8080/stats/groupentry/add
+
+    .. NOTE::
+
+        To confirm group entry registration, please see :ref:`get-group-description-stats`.
+
+
+Modify a group entry
+--------------------
+
+    Modify a group entry to the switch.
+
+    Usage:
+
+        ======= =========================
+        Method  POST
+        URI     /stats/groupentry/modify
+        ======= =========================
+
+    Request message body:
+
+        =============== ============================================================ ================================ ============
+        Attribute       Description                                                  Example                          Default
+        =============== ============================================================ ================================ ============
+        dpid            Datapath ID (int)                                            1                                (Mandatory)
+        type            One of OFPGT_* (string)                                      "ALL"                            "ALL"
+        group_id        Group ID (int)                                               1                                0
+        buckets         struct ofp_bucket
+        -- weight       Relative weight of bucket                                    0                                0
+                        (Only defined for select groups)
+        -- watch_port   Port whose state affects whether this bucket is live         4294967295                       OFPP_ANY
+                        (Only required for fast failover groups)
+        -- watch_group  Group whose state affects whether this bucket is live        4294967295                       OFPG_ANY
+                        (Only required for fast failover groups)
+        -- actions      0 or more actions associated with the bucket (list of dict)  [{"type": "OUTPUT", "port": 1}]  [] #DROP
+        =============== ============================================================ ================================ ============
+
+    Example of use::
+
+        $ curl -X POST -d '{ \
+            "dpid": 1, \
+            "type": "ALL", \
+            "group_id": 1, \
+            "buckets": [ \
+                { \
+                    "actions": [ \
+                        { \
+                            "type": "OUTPUT", \
+                            "port": 1 \
+                        } \
+                    ] \
+                } \
+            ] \
+         }' \
+         http://localhost:8080/stats/groupentry/modify
+
+
+Delete a group entry
+--------------------
+
+    Delete a group entry to the switch.
+
+    Usage:
+
+        ======= =========================
+        Method  POST
+        URI     /stats/groupentry/delete
+        ======= =========================
+
+    Request message body:
+
+        =========== ======================== ======== ============
+        Attribute   Description              Example  Default
+        =========== ======================== ======== ============
+        dpid        Datapath ID (int)        1        (Mandatory)
+        group_id    Group ID (int)           1        0
+        =========== ======================== ======== ============
+
+    Example of use::
+
+        $ curl -X POST -d '{ \
+            "dpid": 1, \
+            "group_id": 1 \
+         }' \
+         http://localhost:8080/stats/groupentry/delete
+
+
+Modify the behavior of the port
+-------------------------------
+
+    Modify the behavior of the physical port.
+
+    Usage:
+
+        ======= =======================
+        Method  POST
+        URI     /stats/portdesc/modify
+        ======= =======================
+
+    Request message body:
+
+        =========== ============================================ ======== ============
+        Attribute   Description                                  Example  Default
+        =========== ============================================ ======== ============
+        dpid        Datapath ID (int)                            1        (Mandatory)
+        port_no     Port number (int)                            1        0
+        config      Bitmap of OFPPC_* flags (int)                1        0
+        mask        Bitmap of OFPPC_* flags to be changed (int)  1        0
+        =========== ============================================ ======== ============
+
+    Example of use::
+
+        $ curl -X POST -d '{ \
+            "dpid": 1, \
+            "port_no": 1, \
+            "config": 1, \
+            "mask": 1 \
+            }' \
+         http://localhost:8080/stats/portdesc/modify
+
+    .. NOTE::
+
+        To confirm port description, please see :ref:`get-ports-description`.
+
+
+Add a meter entry
+-----------------
+
+    Add a meter entry to the switch.
+
+    Usage:
+
+        ======= ======================
+        Method  POST
+        URI     /stats/meterentry/add
+        ======= ======================
+
+    Request message body:
+
+        ============== =============================== ========= ============
+        Attribute      Description                     Example   Default
+        ============== =============================== ========= ============
+        dpid           Datapath ID (int)               1         (Mandatory)
+        flags          Bitmap of OFPMF_* flags (list)  ["KBPS"]  [] #Empty
+        meter_id       Meter ID (int)                  1         0
+        bands          struct ofp_meter_band_header
+        -- type        One of OFPMBT_* (string)        "DROP"    None
+        -- rate        Rate for this band (int)        1000      None
+        -- burst_size  Size of bursts (int)            100       None
+        ============== =============================== ========= ============
+
+    Example of use::
+
+        $ curl -X POST -d '{ \
+            "dpid": 1, \
+            "flags": "KBPS", \
+            "meter_id": 1, \
+            "bands": [ \
+                { \
+                    "type": "DROP", \
+                    "rate": 1000 \
+                } \
+            ] \
+         }' \
+         http://localhost:8080/stats/meterentry/add
+
+    .. NOTE::
+
+        To confirm meter entry registration, please see :ref:`get-meter-config-stats`.
+
+
+Modify a meter entry
+--------------------
+
+    Modify a meter entry to the switch.
+
+    Usage:
+
+        ======= =========================
+        Method  POST
+        URI     /stats/meterentry/modify
+        ======= =========================
+
+    Request message body:
+
+        ============== =============================== ========= ============
+        Attribute      Description                     Example   Default
+        ============== =============================== ========= ============
+        dpid           Datapath ID (int)               1         (Mandatory)
+        flags          Bitmap of OFPMF_* flags (list)  ["KBPS"]  [] #Empty
+        meter_id       Meter ID (int)                  1         0
+        bands          struct ofp_meter_band_header
+        -- type        One of OFPMBT_* (string)        "DROP"    None
+        -- rate        Rate for this band (int)        1000      None
+        -- burst_size  Size of bursts (int)            100       None
+        ============== =============================== ========= ============
+
+    Example of use::
+
+        $ curl -X POST -d '{ \
+            "dpid": 1, \
+            "meter_id": 1, \
+            "flags": "KBPS", \
+            "bands": [ \
+                { \
+                    "type": "DROP", \
+                    "rate": 1000 \
+                } \
+            ] \
+         }' \
+         http://localhost:8080/stats/meterentry/modify
+
+
+Delete a meter entry
+--------------------
+
+    Delete a meter entry to the switch.
+
+    Usage:
+
+        ======= =========================
+        Method  POST
+        URI     /stats/meterentry/delete
+        ======= =========================
+
+    Request message body:
+
+        =========== ================== ========= ============
+        Attribute   Description        Example   Default
+        =========== ================== ========= ============
+        dpid        Datapath ID (int)  1         (Mandatory)
+        meter_id    Meter ID (int)     1         0
+        =========== ================== ========= ============
+
+    Example of use::
+
+        $ curl -X POST -d '{ \
+            "dpid": 1, \
+            "meter_id": 1 \
+         }' \
+         http://localhost:8080/stats/meterentry/delete
+
+
+Support for experimenter multipart
+==================================
+
+Send a experimenter message
+---------------------------
+
+    Send a experimenter message to the switch which specified with Datapath ID in URI.
+
+
+    Usage:
+
+        ======= ===========================
+        Method  POST
+        URI     /stats/experimenter/<dpid>
+        ======= ===========================
+
+    Request message body:
+
+        ============= ============================================ ======== ============
+        Attribute     Description                                  Example  Default
+        ============= ============================================ ======== ============
+        dpid          Datapath ID (int)                            1        (Mandatory)
+        experimenter  Experimenter ID (int)                        1        0
+        exp_type      Experimenter defined (int)                   1        0
+        data_type     Data format type ("ascii" or "base64")       "ascii"  "ascii"
+        data          Data to send (string)                        "data"   "" #Empty
+        ============= ============================================ ======== ============
+
+    Example of use::
+
+        $ curl -X POST -d '{ \
+            "dpid": 1, \
+            "experimenter": 1, \
+            "exp_type": 1, \
+            "data_type": "ascii", \
+            "data": "data" \
+            }' \
+         http://localhost:8080/stats/experimenter/1
--

-- 
1.9.1


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Yusuke Iwase | 26 Sep 08:58 2014
Picon

[PATCH] ofctl: Add default value to type field of OFPGroupMod

In OF1.2 and OF1.3 Spec, the group type need not be specified
for the group delete request.
However, an error occurs at mod_group_entry in ofctl_v1_[23].py
without specifying group type to delete a group entry.

This patch adds default value to type field of OFPGroupMod
at mod_group_entry in order to reflect OpenFlow Specification.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@...>
---
 ryu/lib/ofctl_v1_2.py | 2 +-
 ryu/lib/ofctl_v1_3.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ryu/lib/ofctl_v1_2.py b/ryu/lib/ofctl_v1_2.py
index da300f7..21a3e34 100644
--- a/ryu/lib/ofctl_v1_2.py
+++ b/ryu/lib/ofctl_v1_2.py
 <at>  <at>  -822,7 +822,7  <at>  <at>  def mod_group_entry(dp, group, cmd):
                     'INDIRECT': dp.ofproto.OFPGT_INDIRECT,
                     'FF': dp.ofproto.OFPGT_FF}

-    type_ = type_convert.get(group.get('type'))
+    type_ = type_convert.get(group.get('type', 'ALL'))
     if type_ is None:
         LOG.debug('Unknown type: %s', group.get('type'))

diff --git a/ryu/lib/ofctl_v1_3.py b/ryu/lib/ofctl_v1_3.py
index b60c4cc..1167324 100644
--- a/ryu/lib/ofctl_v1_3.py
+++ b/ryu/lib/ofctl_v1_3.py
 <at>  <at>  -1002,7 +1002,7  <at>  <at>  def mod_group_entry(dp, group, cmd):
                     'INDIRECT': dp.ofproto.OFPGT_INDIRECT,
                     'FF': dp.ofproto.OFPGT_FF}

-    type_ = type_convert.get(group.get('type'))
+    type_ = type_convert.get(group.get('type', 'ALL'))
     if type_ is None:
         LOG.debug('Unknown type: %s', group.get('type'))

--

-- 
1.9.1

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Minoru TAKAHASHI | 25 Sep 06:39 2014
Picon

[PATCH] sw test tool: fix an error caused by changing enum name in of1.4

In of1.4 spec, enum name has been changed as follows:

of1.3.4 spec:
     OFPR_NO_MATCH = 0, / * No matching flow (table-miss flow entry). * /

of1.4 spec:
     OFPR_TABLE_MISS = 0, / * No matching flow (table-miss flow entry). * /

Along with this change, AttributeError has occurred in the process of comparison of the received message.
This patch fixes this problem.

Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@...>
---
 ryu/tests/switch/tester.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ryu/tests/switch/tester.py b/ryu/tests/switch/tester.py
index 1f14b89..82120f8 100644
--- a/ryu/tests/switch/tester.py
+++ b/ryu/tests/switch/tester.py
 <at>  <at>  -706,10 +706,15  <at>  <at>  class OfTester(app_manager.RyuApp):
         model_pkt = (pkt[KEY_EGRESS] if KEY_EGRESS in pkt
                      else pkt[KEY_PKT_IN])

+        if hasattr(msg.datapath.ofproto, "OFPR_NO_MATCH"):
+            table_miss_value = msg.datapath.ofproto.OFPR_NO_MATCH
+        else:
+            table_miss_value = msg.datapath.ofproto.OFPR_TABLE_MISS
+
         if msg.datapath.id != pkt_in_src_model.dp.id:
             pkt_type = 'packet-in'
             err_msg = 'SW[dpid=%s]' % dpid_lib.dpid_to_str(msg.datapath.id)
-        elif msg.reason == msg.datapath.ofproto.OFPR_NO_MATCH or \
+        elif msg.reason == table_miss_value or \
                 msg.reason == msg.datapath.ofproto.OFPR_INVALID_TTL:
             pkt_type = 'packet-in'
             err_msg = 'OFPPacketIn[reason=%d]' % msg.reason
--

-- 
1.9.1

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Yusuke Iwase | 24 Sep 06:21 2014
Picon

[PATCH] of: Fix name of class member variables

Fix name of class member variables in OFPMeterFeaturesStats
to reflect OpenFlow Specification version 1.3 and 1.4.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@...>
---
 ryu/ofproto/ofproto_v1_3_parser.py | 6 +++---
 ryu/ofproto/ofproto_v1_4_parser.py | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/ryu/ofproto/ofproto_v1_3_parser.py b/ryu/ofproto/ofproto_v1_3_parser.py
index 3c33556..b4a1b7c 100644
--- a/ryu/ofproto/ofproto_v1_3_parser.py
+++ b/ryu/ofproto/ofproto_v1_3_parser.py
 <at>  <at>  -4732,7 +4732,7  <at>  <at>  class OFPMeterConfigStatsReply(OFPMultipartReply):

 class OFPMeterFeaturesStats(ofproto_parser.namedtuple('OFPMeterFeaturesStats',
                             ('max_meter', 'band_types', 'capabilities',
-                             'max_band', 'max_color'))):
+                             'max_bands', 'max_color'))):
      <at> classmethod
     def parser(cls, buf, offset):
         meter_features = struct.unpack_from(
 <at>  <at>  -4792,10 +4792,10  <at>  <at>  class OFPMeterFeaturesStatsReply(OFPMultipartReply):
             features = []
             for stat in ev.msg.body:
                 features.append('max_meter=%d band_types=0x%08x '
-                                'capabilities=0x%08x max_band=%d '
+                                'capabilities=0x%08x max_bands=%d '
                                 'max_color=%d' %
                                 (stat.max_meter, stat.band_types,
-                                 stat.capabilities, stat.max_band,
+                                 stat.capabilities, stat.max_bands,
                                  stat.max_color))
             self.logger.debug('MeterFeaturesStats: %s', configs)
     """
diff --git a/ryu/ofproto/ofproto_v1_4_parser.py b/ryu/ofproto/ofproto_v1_4_parser.py
index babbcd6..b6432b3 100644
--- a/ryu/ofproto/ofproto_v1_4_parser.py
+++ b/ryu/ofproto/ofproto_v1_4_parser.py
 <at>  <at>  -3347,7 +3347,7  <at>  <at>  class OFPMeterConfigStatsReply(OFPMultipartReply):

 class OFPMeterFeaturesStats(ofproto_parser.namedtuple('OFPMeterFeaturesStats',
                             ('max_meter', 'band_types', 'capabilities',
-                             'max_band', 'max_color'))):
+                             'max_bands', 'max_color'))):
      <at> classmethod
     def parser(cls, buf, offset):
         meter_features = struct.unpack_from(
 <at>  <at>  -3407,10 +3407,10  <at>  <at>  class OFPMeterFeaturesStatsReply(OFPMultipartReply):
             features = []
             for stat in ev.msg.body:
                 features.append('max_meter=%d band_types=0x%08x '
-                                'capabilities=0x%08x max_band=%d '
+                                'capabilities=0x%08x max_bands=%d '
                                 'max_color=%d' %
                                 (stat.max_meter, stat.band_types,
-                                 stat.capabilities, stat.max_band,
+                                 stat.capabilities, stat.max_bands,
                                  stat.max_color))
             self.logger.debug('MeterFeaturesStats: %s', configs)
     """
--

-- 
1.9.1

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Bryan | 23 Sep 18:56 2014
Picon

Incorrect link on ryu resources page

Greetings,

I was on the Ryu resources page 
(http://osrg.github.io/ryu/resources.html) and I noticed the link to the 
English edition of the Ryu SDN Framework pdf points to the Japanese 
edition instead. I just wanted to bring that to your attention.

Thanks,
Bryan

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Yoshiharu Yamashita | 23 Sep 16:07 2014
Picon

[PATCH] gui_topology: fix to work using WebSocket

Hello All.

I midified ryu.topology.js to dinamicaly add or remove switch
using WebSocket on Ryu Topology Viewer.
Sorry, I had sent a pull request but it was closed.

Signed-off-by: Yoshiharu Yamashita <dyson.yamashita@...>
---
ryu/app/gui_topology/html/ryu.topology.js | 61 +++++++++++++++++++++++++++++++++++++++-------------
1 file changed, 46 insertions(+), 15 deletions(-)

diff --git a/ryu/app/gui_topology/html/ryu.topology.js b/ryu/app/gui_topology/html/ryu.topology.js
index 9d1102e..c333dce 100644
--- a/ryu/app/gui_topology/html/ryu.topology.js
+++ b/ryu/app/gui_topology/html/ryu.topology.js
 <at>  <at>  -21,8 +21,8  <at>  <at>  ws.onmessage = function(event) {
     this.send(JSON.stringify(ret));
 }

-function trim_zero(s) {
-    return s.replace(/^0+/, "");
+function trim_zero(obj) {
+    return String(obj).replace(/^0+/, "");
 }

 function dpid_to_int(dpid) {
 <at>  <at>  -85,7 +85,7  <at>  <at>  elem.update = function () {
         .attr("class", "link");

     this.node = this.node.data(topo.nodes);
-    // NOTE: Removing node is not supported. 
+    this.node.exit().remove();
     var nodeEnter = this.node.enter().append("g")
         .attr("class", "node")
         .on("dblclick", function(d) { d3.select(this).classed("fixed", d.fixed = false); })
 <at>  <at>  -126,15 +126,11  <at>  <at>  var topo = {
         this.add_nodes(data.switches);
         this.add_links(data.links);
     },
-    add_nodes: function (switches) {
-        for (var i = 0; i < switches.length; i++) {
-            this.nodes[i] = switches[i];
-        }
-
-        this.node_index = {};
-        for (var i = 0; i < this.nodes.length; i++) {
-            this.node_index[this.nodes[i].dpid] = i;
+    add_nodes: function (nodes) {
+        for (var i = 0; i < nodes.length; i++) {
+            this.nodes.push(nodes[i]);
         }
+        this.refresh_node_index();
     },
     add_links: function (links) {
         for (var i = 0; i < links.length; i++) {
 <at>  <at>  -156,6 +152,15  <at>  <at>  var topo = {
             this.links.push(link);
         }
     },
+    delete_nodes: function (nodes) {
+        for (var i = 0; i < nodes.length; i++) {
+            console.log("delete switch: " + JSON.stringify(nodes[i]));
+
+            node_index = this.get_node_index(nodes[i]);
+            this.nodes.splice(node_index, 1);
+        }
+        this.refresh_node_index();
+    },
     delete_links: function (links) {
         for (var i = 0; i < links.length; i++) {
             if (!is_valid_link(links[i])) continue;
 <at>  <at>  -165,6 +170,14  <at>  <at>  var topo = {
             this.links.splice(link_index, 1);
         }
     },
+    get_node_index: function (node) {
+        for (var i = 0; i < this.nodes.length; i++) {
+            if (node.dpid == this.nodes[i].dpid) {
+                return i;
+            }
+        }
+        return null;
+    },
     get_link_index: function (link) {
         for (var i = 0; i < this.links.length; i++) {
             if (link.src.dpid == this.links[i].port.src.dpid &&
 <at>  <at>  -181,7 +194,7  <at>  <at>  var topo = {
         var pushed = {};
         for (var i = 0; i < this.links.length; i++) {
             function _push(p, dir) {
-                key = p.dpid + ":" + p.port_no
+                key = p.dpid + ":" + p.port_no;
                 if (key in pushed) {
                     return 0;
                 }
 <at>  <at>  -213,14 +226,32  <at>  <at>  var topo = {

         return {x: x, y: y};
     },
+    refresh_node_index: function(){
+        this.node_index = {};
+        for (var i = 0; i < this.nodes.length; i++) {
+            this.node_index[this.nodes[i].dpid] = i;
+        }
+    },
 }

 var rpc = {
     event_switch_enter: function (params) {
-        console.log("Not Implemented: event_switch_enter, " + JSON.stringify(params));
+        var switches = [];
+        for(var i=0; i < params.length; i++){
+            switches.push({"dpid":params[i].dpid,"ports":params[i].ports});
+        }
+        topo.add_nodes(switches);
+        elem.update();
+        return "";
     },
     event_switch_leave: function (params) {
-        console.log("Not Implemented: event_switch_leave, " + JSON.stringify(params));
+        var switches = [];
+        for(var i=0; i < params.length; i++){
+            switches.push({"dpid":params[i].dpid,"ports":params[i].ports});
+        }
+        topo.delete_nodes(switches);
+        elem.update();
+        return "";
     },
     event_link_add: function (links) {
         topo.add_links(links);
 <at>  <at>  -247,4 +278,4  <at>  <at>  function main() {
     initialize_topology();
 }

-main()
+main();
--
1.9.1
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Chandra Satriana | 23 Sep 15:26 2014
Picon

Routing in Fat Tree Network

Hi,

Can you tell me  if there's an existing multipath routing module in Ryu for a Fat Tree Network, to utilize all the available routes instead of using STP ?

Also, is it possible to know the location of the hosts, without firstly sending ARP requests? such as by taking it from the topology information ?

Best regards,
Chandra





------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
Ryu-devel@...
https://lists.sourceforge.net/lists/listinfo/ryu-devel
Mounir Azizi | 23 Sep 11:02 2014
Picon

Malformed Packet: MPLS

Dear Ryu Experts,

I'm trying to inject an "echo" mpls packet using ryu, so I created an MPLS packet using this code :

        f = EchoRyu()
        f.timestamp = int(time.time()*1000 - start_time)
        eth_MPLS = ether.ETH_TYPE_MPLS
        parser = datapath.ofproto_parser
        ofproto = datapath.ofproto
        actions = [parser.OFPActionPushMpls(eth_MPLS)]
        src = "00:00:00:00:00:01"
        dst = "00:01:00:00:00:01"
        in_port = ofproto.OFPP_CONTROLLER
        pkt = packet.Packet()
        pkt.add_protocol(ethernet.ethernet(ethertype=ether.ETH_TYPE_MPLS, dst=dst, src=src))
        pkt.add_protocol(mpls.mpls(label=50, exp=0, bsb=1, ttl=255))
        pkt.payload = f
        pkt.serialize()
        out = parser.OFPPacketOut(datapath=datapath, buffer_id=0xffffffff, in_port=in_port, actions=actions, data=pkt.data)
        datapath.send_msg(out)

but my packet seems to be malformed accordind to wireshark trace:

No.     Time           Source                Destination           Protocol Length Info
     64 7.006662000    192.168.1.200         192.168.1.200         OpenFlow 118    51241

Frame 64: 118 bytes on wire (944 bits), 118 bytes captured (944 bits) on interface 0
Linux cooked capture
Internet Protocol Version 4, Src: 192.168.1.200 (192.168.1.200), Dst: 192.168.1.200 (192.168.1.200)
Transmission Control Protocol, Src Port: 6633 (6633), Dst Port: 51241 (51241), Seq: 99, Ack: 705, Len: 50
OpenFlow 1.3
    Version: 1.3 (0x04)
    Type: OFPT_PACKET_OUT (13)
    Length: 50
    Transaction ID: 2770032434
    Buffer ID: OFP_NO_BUFFER (0xffffffff)
    In port: OFPP_CONTROLLER (0xfffffffd)
    Actions length: 8
    Pad: 000000000000
    Action
        Type: OFPAT_PUSH_MPLS (19)
        Length: 8
        Ethertype: MPLS label switched packet (0x8847)
        Pad: 0000
    Data
        Ethernet II, Src: 00:00:00_00:00:01 (00:00:00:00:00:01), Dst: EquipTra_00:00:01 (00:01:00:00:00:01)
            Destination: EquipTra_00:00:01 (00:01:00:00:00:01)
            Source: 00:00:00_00:00:01 (00:00:00:00:00:01)
            Type: MPLS label switched packet (0x8847)
        MultiProtocol Label Switching Header, Label: 50, Exp: 0, S: 1, TTL: 255
        [Malformed Packet: MPLS]
            [Expert Info (Error/Malformed): Malformed Packet (Exception occurred)]
                [Malformed Packet (Exception occurred)]
                [Severity level: Error]
                [Group: Malformed]

Can someone please firgure out if I'm missing something here ?

Thanks,

Mounir
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
Ryu-devel@...
https://lists.sourceforge.net/lists/listinfo/ryu-devel
Sriram | 22 Sep 04:35 2014
Picon

RYU Patches

Hi,

Attached are 2patches:

0001-Fix-spell-check-in-group-feature-message.patch:

The above patch fixes some spell check and improves consistency when calling DSCP_REMARK meter type

0001-Improve-debug-messages-for-unsupported-request.patch

This patch improves the debug messages for unsupported request. Previously, when a request is not supported in that OF protocol version, it logs as "Unsupported OF protocol" which is incorrect. The switch might still support that OF protocol. So this patch improves the debug message to log as "Request not supported in this OF protocol version"

Hope this helps.

Thanks,
Sriram
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
Ryu-devel@...
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Gmane