add simple learning switch app for OF1.2

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
MANIFEST.in: exclude packet_data_generator

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of10: use text address for OFPPhyPort.hw_addr and OFPPortMod.hw_addr

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of12: use text address for OFPPort.hw_addr and OFPPortMod.hw_addr

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of13: use text address for OFPPort.hw_addr and OFPPortMod.hw_addr

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
stringify: allow user classes to annotate type of their attributes

allow user classes to annotate type of their attributes using
_TYPE class attribute.

an example:

    class Foo(StringifyMixin):
        _TYPE = {'ascii': ['attr1', 'attr2']}
        def __init__(self):
            self.attr1 = 'hoge'
            self.attr2 = 'fuga'

currently handles only 'ascii' type, for which just convert from/to
unicode.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of10: fix json representation of OFPPhyPort.hw_addr and OFPPortMod.hw_addr

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

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of12: fix json representation of OFPPort.hw_addr and OFPPortMod.hw_addr

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

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of13: fix json representation of OFPPort.hw_addr and OFPPortMod.hw_addr

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

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
topology.switches: fix bin vs text address problem

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
a simple script to plot rest_topology's output

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

looks like a regression in commit db40bc0f98abc84dcdbd3fa4d19aa573d94188d9.
(rest_router: follow packet lib api change)

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
rest_router: update after ofproto hw_addr changes

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of10: make OFPDescStats more human readable

- when parsing, remove zero padding.
- stop base64 encoding for json representation because these fields
  are ASCII strings per OF spec.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of12: make OFPDescStats more human readable

- when parsing, remove zero padding.
- stop base64 encoding for json representation because these fields
  are ASCII strings per OF spec.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of12: update expected *.json after OFPDescStats changes

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of13: make OFPDescStats more human readable

- when parsing, remove zero padding.
- stop base64 encoding for json representation because these fields
  are ASCII strings per OF spec.

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