doc: fix a program name

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
topology/dumper: fix RyuApp.__init__ signature

so that this is at least instantiatable.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
rest_firewall: fix comments

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

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
lib/packet/packet_utils: optimize checksum

builtin function, sum, is much faster than for loop.
The result on my machine is as follows

> def main():
>     from timeit import timeit
>     data = bytearray().zfill(1500)
>     print 'new=', timeit(lambda : checksum(data), number=1000)
>     print 'old=', timeit(lambda : checksum_old(data), number=1000)
>
> new= 0.00800108909607
> old= 0.266770124435

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ryu/lib/packet/packet.py: should use isinstance instead of __class__.__base__

The current implementation doesn't allow inheriting twice from class PacketBase.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
remove openstack related document

Remove OpenStack related documents except using_with_openstack.
README of Quantum Ryu plugin refers to it.

remove:
  doc/source/images/*
  doc/source/openstack.rst
  doc/source/step_by_step.rst
  doc/source/internals_l2_isolation.rst

modified:
  doc/source/index.rst
    remove index of openstack.rst.
  doc/source/using_with_openstack.rst
    replace contents with the pointer to the wiki page.

Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
topology/dumper: use handler.set_ev_cls instead of set_ev_handler

There is no point for dumper.py to use handler.set_ev_cls.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ryu/base/app_manager: pylint unused variables

pylint fix

> W:201,12:AppManager.instantiate_apps: Unused variable 'key'
> W:222,24:AppManager.instantiate_apps: Unused variable 'handler'

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
base/app_manager.py: sort out registering bricks

When registering RyuApps to observers with _EVENTS,
it should applied to @set_ev_cls methods, and dispatchers should be
honored.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ryu/base/app_manager: introduce RyuApp:replay_to_request()

This is a handy method for event request/reply.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ryu/topology/switches: simplify Switches with RyuApp.reply_to_request

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
topology/dumper: define contexts to receive events

Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
nx: make pack string of IPv6 address consistent with OF1.2/1.3

Changed pack string of IPv6 address in NXM from former '!4I' to
'!8H'. Registered IPv6 src/dst field header so we could parse IPv6
addresses now.

Signed-off-by: Can Zhang <can@canx.me>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
nx: match_tuple() function now handles nw src/dst

match_tuple() function now handles nw src/dst correctly. FIX:
match_tuple function now handles the nw src/dst masks correctly. If
the mask is not valid, because there is no NX, it will be ignored.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
setup.py: install xsd files

They are necessary for OF-config support.

Cc: Shivaram Mysore <shivaram.mysore@gmail.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
tests/integrated/test_of_config: disable known host check

This test can fail with unknow hosts as follows.
Since this is a OF-config test/sample, known host check is not essential.
Disable the check to avoid non-essential problem for easy test.

> ryu $ PYTHONPATH=. ./bin/ryu-manager --verbose ryu/tests/integrated/test_of_config.py
> loading app ryu/tests/integrated/test_of_config.py
> loading app ryu.controller.ofp_handler
> instantiating app ryu/tests/integrated/test_of_config.py of OFConfigClient
> <SSHSession(session, initial daemon)> created: client_capabilities=['urn:ietf:params:netconf:capability:writable-running:1.0', 'urn:ietf:params:netconf:capability:rollback-on-error:1.0', 'urn:ietf:params:netconf:capability:validate:1.0', 'urn:ietf:params:netconf:capability:confirmed-commit:1.0', 'urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file,https,sftp', 'urn:ietf:params:netconf:base:1.0', 'urn:liberouter:params:netconf:capability:power-control:1.0', 'urn:ietf:params:netconf:capability:candidate:1.0', 'urn:ietf:params:netconf:capability:xpath:1.0', 'urn:ietf:params:netconf:capability:startup:1.0', 'urn:ietf:params:netconf:capability:interleave:1.0']
> starting thread (client mode): 0x2348650L
> Connected (version 2.0, client Erlang)
> kex algos:['diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-cbc', '3des-cbc'] server encrypt:['aes128-cbc', '3des-cbc'] client mac:['hmac-sha1'] server mac:['hmac-sha1'] client compress:['none', 'zlib'] server compress:['none', 'zlib'] client lang:[''] server lang:[''] kex follows?False
> Ciphers agreed: local=aes128-cbc, remote=aes128-cbc
> using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-cbc, remote aes128-cbc; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
> Switch to new keys ...
> Traceback (most recent call last):
>   File "./bin/ryu-manager", line 87, in <module>
>     main()
>   File "./bin/ryu-manager", line 67, in main
>     app_mgr.instantiate_apps(**contexts)
>   File "/ryu/ryu/base/app_manager.py", line 289, in instantiate_apps
>     self._instantiate(app_name, cls, *args, **kwargs)
>   File "/ryu/ryu/base/app_manager.py", line 275, in _instantiate
>     app = cls(*args, **kwargs)
>   File "/ryu/ryu/tests/integrated/test_of_config.py", line 123, in __init__
>     host=HOST, port=PORT, username=USERNAME, password=PASSWORD)
>   File "/ryu/ryu/lib/of_config/capable_switch.py", line 49, in __init__
>     self.netconf = connect(*self._connect_args, **self._connect_kwargs)
>   File "/ryu/ryu/contrib/ncclient/manager.py", line 67, in connect_ssh
>     session.connect(*args, **kwds)
>   File "/ryu/ryu/contrib/ncclient/transport/ssh.py", line 193, in connect
>     raise SSHUnknownHostError(host, fingerprint)
> ncclient.transport.errors.SSHUnknownHostError: Unknown host key [63:c2:19:95:97:29:84:f6:86:41:1a:15:17:d7:90:0d] for [127.0.0.1]

Cc: Shivaram Mysore <shivaram.mysore@gmail.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
tests/integrated/test_of_config: comment on how to run

Cc: Shivaram Mysore <shivaram.mysore@gmail.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ryu/lib/packet/lldp.py: remove __str__ method from class LLDPBasicTLV and class lldp

Those methods are legacy when lldp.py was written for dpkt.
They don't make sense. remove them.

Cc: "can." <can@canx.me>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
lib/packet/lldp.py: pylint

> W: 78,0:LLDPBasicTLV.__init__: Unused argument 'args'
> W: 78,0:LLDPBasicTLV.__init__: Unused argument 'kwargs'
> W:109,4:lldp.__init__: __init__ method from base class 'PacketBase' is not called

Cc: "can." <can@canx.me>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>