Age | Commit message (Collapse) | Author |
|
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
also, prefix a private method with _.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Since ip case is most often used, introduce a convenience
function for that.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
> $ pep8 --version
> 1.4.5
> ryu/ofproto/nx_match.py:743:20: E128 continuation line under-indented for visual indent
> ofproto_v1_0.NXM_NX_IPV6_SRC_W])
> ^
> ryu/ofproto/nx_match.py:764:20: E128 continuation line under-indented for visual indent
> ofproto_v1_0.NXM_NX_IPV6_DST_W])
> ^
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
This patch add missing group special values of OpenFlow 1.3, added to
the 1.3.1 version.
It is useful to create a flow_mod message with an out_group with no >
group restrictions and for flow_stats messages.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
> 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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Fix the 533fd972519871afe441d365f911a2970fe0875f commit.
This patch fixes the following issue.
Traceback (most recent call last):
File "/opt/stack/ryu/bin/ryu-manager", line 42, in <module>
from ryu.base.app_manager import AppManager
File "/opt/stack/ryu/ryu/base/app_manager.py", line 25, in <module>
from ryu.controller.handler import register_instance
File "/opt/stack/ryu/ryu/controller/handler.py", line 20, in <module>
from ryu.controller import ofp_event
File "/opt/stack/ryu/ryu/controller/ofp_event.py", line 75, in <module>
_create_ofp_msg_ev_from_module(m)
File "/opt/stack/ryu/ryu/controller/ofp_event.py", line 60, in _create_ofp_msg_ev_from_module
mod = utils.import_module(modname)
File "/opt/stack/ryu/ryu/utils.py", line 35, in import_module
__import__(name)
File "/opt/stack/ryu/ryu/ofproto/ofproto_v1_0_parser.py", line 26, in <module>
import utils.round_up
ImportError: No module named utils.round_up
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Can Zhang <can@canx.me>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
As side effect, IPv6 is also supported.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
move byteswap logic into checksum from caller.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
IP checksum needs padding.
Move padding logic into checksum from caller.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
TODO: test doesn't pass yet.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
icmpv6_csum() uses wrong format. It happened to produce correct value
for csum.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
1. run topology/switches and app/rest_topology
$ ./bin/ryu-manager --verbose --observe-links ryu/topology/switches.py ryu/app/rest_topology.py
2. You can get topology json
$ curl http://127.0.0.1:8080/v1.0/topology/links
[{"src": {"hw_addr": "06:96:65:51:f8:ff", "name": "s2-eth3", "port_no": "00000003", "dpid": "0000000000000002"}, "dst": {"hw_addr": "4a:ed:13:ea:b7:e0", "name": "s1-eth1", "port_no": "00000001", "dpid": "0000000000000001"}}, {"src": {"hw_addr": "4a:ed:13:ea:b7:e0", "name": "s1-eth1", "port_no": "00000001", "dpid": "0000000000000001"}, "dst": {"hw_addr": "06:96:65:51:f8:ff", "name": "s2-eth3", "port_no": "00000003", "dpid": "0000000000000002"}}, {"src": {"hw_addr": "1e:7b:0b:fc:0a:2f", "name": "s1-eth2", "port_no": "00000002", "dpid": "0000000000000001"}, "dst": {"hw_addr": "4e:62:98:6f:16:57", "name": "s3-eth3", "port_no": "00000003", "dpid": "0000000000000003"}}, {"src": {"hw_addr": "4e:62:98:6f:16:57", "name": "s3-eth3", "port_no": "00000003", "dpid": "0000000000000003"}, "dst": {"hw_addr": "1e:7b:0b:fc:0a:2f", "name": "s1-eth2", "port_no": "00000002", "dpid": "0000000000000001"}}]
$ curl http://127.0.0.1:8080/v1.0/topology/switches
[{"ports": [{"hw_addr": "4a:ed:13:ea:b7:e0", "name": "s1-eth1", "port_no": "00000001", "dpid": "0000000000000001"}, {"hw_addr": "1e:7b:0b:fc:0a:2f", "name": "s1-eth2", "port_no": "00000002", "dpid": "0000000000000001"}], "dpid": "0000000000000001"}, {"ports": [{"hw_addr": "be:3b:8d:77:14:a5", "name": "s2-eth1", "port_no": "00000001", "dpid": "0000000000000002"}, {"hw_addr": "1e:bf:ec:8b:c2:5b", "name": "s2-eth2", "port_no": "00000002", "dpid": "0000000000000002"}, {"hw_addr": "06:96:65:51:f8:ff", "name": "s2-eth3", "port_no": "00000003", "dpid": "0000000000000002"}], "dpid": "0000000000000002"}, {"ports": [{"hw_addr": "52:a2:9a:7a:a8:a1", "name": "s3-eth1", "port_no": "00000001", "dpid": "0000000000000003"}, {"hw_addr": "62:25:ff:a5:a1:1a", "name": "s3-eth2", "port_no": "00000002", "dpid": "0000000000000003"}, {"hw_addr": "4e:62:98:6f:16:57", "name": "s3-eth3", "port_no": "00000003", "dpid": "0000000000000003"}], "dpid": "0000000000000003"}]
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Can Zhang <can@canx.me>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Commit 366da0 break unittest.
The following error occurs.
$ ./run_tests.sh
(...)
======================================================================
ERROR: test_parser (ryu.tests.unit.ofproto.test_parser_v10.TestOFPVendorStatsReply)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hideki/ryu/ryu/tests/unit/ofproto/test_parser_v10.py", line 4962, in test_parser
eq_(specific_data, body.specific_data)
AttributeError: 'str' object has no attribute 'specific_data'
----------------------------------------------------------------------
Ran 1249 tests in 0.991s
FAILED (errors=1)
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
All subclasses define them as
parser(cls, buf) and serialize(self, payload, prev)
Not parser(cls), serialize(self).
pylint also complains like
> W: 50,4:ipv4.parser: Arguments number differs from overridden method
> W: 65,4:ipv4.serialize: Arguments number differs from overridden method
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|