of1.3: fix OFPMeterStats

len -> length
as the latter seems to be expected by OFPMultipartReply.parser_stats_body.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of1.3: fix OFP_GROUP_DESC_STATS_PACK_STR

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of1.2: OFPGroupFeaturesStats: tuple -> list

tuples are json-unfriendly.

(of1.3 version was completely broken until very recently
and the way i fixed it is consistent with this change.)

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of1.3: fix OFPSetConfig default arguments

The equivalent fix for of1.2 is the commit 3d90147.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
rename ryu-client under ryu/tests

Since it is debugging tool for developer, don't install it.
and move it under ryu/rests directory.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Ryu 2.1

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
lib/packet: make protocol_name property instead of attributes

Because it is read-only and to prevent accidental over-write.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
lib/packet: make packet_base.parser abstract method

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
lib/packet: teach packet library to truncate padding octet

The patch teaches packet library to truncate padding octets.
Change packet_base.parser() to return (header, next_type, rest_of_packet)
The protocol class that knows its payload length should rest_of_packet
where padding octets at the last of packet is truncated.

As bonus,
- fix ipv6 parser as ipv6 header doesn't have options.
  It seems copy-and-paste from ipv4
- improve ipv4, tcp a bit

Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Cc: Shaun Crampton <Shaun.Crampton@metaswitch.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
openstack copyright notice

restore openstack copyright notice for the code taken from them.

> commit f2c6dfe1066aeecb5fdf2fb1cd5ce6476565fd24
> Author: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> Date:   Fri Nov 30 15:54:12 2012 +0900
>
>     set setup.py install_requires properly
>
>     Let's enable pip to solve the dependency.
>
>     The code is taken from OpenStack.
>
>     Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
MANIFEST.in: fix up to address warning

> warning: manifest_maker: MANIFEST.in, line 4: 'recursive-include' expects <dir> <pattern1> <pattern2> ...
> warning: no previously-included files matching '*' found under directory 'doc/build/*/'

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packege: rpmlint warning

ryu.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/ryu/tests/unit/lib/test_hub.py 0644L /usr/bin/env
ryu.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/ryu/lib/hub.py 0644L /usr/bin/env

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
man: remove man page of ryu client

ryu-client isn't installed any more as it has been moved to ryu/tests.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
update the site url

Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ryu/app/conf_switch_key: fix a comment

Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
define OFP_NO_BUFFER

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
use ofproto.OFP_NO_BUFFER in some places

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
base/app_manager: teach event dispatcher state

When independent methods for different dispatchers defined, all methods
are called independent of state. This patch teach event dispatcher state.

The following class

class PacketTesting(app_manager.RyuApp):
@set_ev_cls(ofp_event.EventOFPEchoRequest, MAIN_DISPATCHER)
def _echo_rep_main(self, ev):
    print "DEBUG: In Handler for Echo Request (Main)"

@set_ev_cls(ofp_event.EventOFPEchoRequest, CONFIG_DISPATCHER)
def _echo_rep_conf(self, ev):
    print "DEBUG: In Handler for Echo Request (Config)"

@set_ev_cls(ofp_event.EventOFPEchoRequest, HANDSHAKE_DISPATCHER)
def _echo_rep_hand(self, ev):
    print "DEBUG: In Handler for Echo Request (Handshake)"

output
> EVENT ofp_event->PacketTesting EventOFPEchoRequest
> DEBUG: In Handler for Echo Request (Config)
> DEBUG: In Handler for Echo Request (Dead)
> DEBUG: In Handler for Echo Request (Handshake)
> DEBUG: In Handler for Echo Request (Main)

Reported-by: Alan Barr <alanbarr2002@gmail.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
fix typos (mpls_lable -> mpls_label)

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
fix comment typos (ofprotp -> ofproto)

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>