Commit Graph

78 Commits

Author SHA1 Message Date
Takashi Kajinami 15d41af6d7 Fix python shebang
The current shebang requires /usr/bin/python which is not available in
Ubuntu Jammy by default.

Change-Id: I3765d2b73843db0137fe79065ab4051e1e52eab3
2023-10-17 16:03:54 +00:00
Stephen Finucane c18ac550d5 Remove duplicate requirements files
Change-Id: I26fcfc6742a4434eafb12f96a634c71bc0cf72d6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-09-04 15:52:12 +01:00
Stephen Finucane 3fdfa3b230 Remove unused requirements file
Made me think we were using sphinx_rtd_theme here. We are not.

Change-Id: I16a6cee70f153d95fc0b723e2ca1a39a2ac4398b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-09-04 15:52:09 +01:00
Rodolfo Alonso Hernandez abb436deb3 Remove "six" library
This patch also removes some unneeded imported libraries.

Story: #2010182
Task: #45863
Change-Id: Ife9d349eb9c92f2a39719e76e82fe20c010fe230
2022-07-26 14:53:03 +00:00
Rodolfo Alonso Hernandez 2495ebdff9 Remove "nose" library
The library "nose", used for unit testing, is removed. This library
is in maintenance mode and is not compatible with Python3.10 [1].

Now all checks are implemented using "unittest". The methods are not
loaded in realtime into the test case execution; instead of this, this
patch uses "testscenarios.WithScenarios", that allows to execute the
same test with different defined scenarios.

NOTE: "BgpSpeakerTestBase" tests are disable temporarily. It is needed
to configure "docker" in the system in order to execute them.

[1]https://nose.readthedocs.io/en/latest/

Story: #2010063
Task: #45519

Change-Id: I92e9547a26e9bec6c2a9a011c49a70b82dbb373e
2022-07-21 16:02:02 +02:00
Slawek Kaplonski e70fe7e205 Bump min eventlet version to 0.26.1
That version have fix for the issue with Python 3.7. See
[1] for more details.

It is done instead of backporting ryu workaround
ddb32f678a

[1] https://github.com/eventlet/eventlet/issues/526

Story: #2009283
Task: #43563
Change-Id: I5bb684c75bde1512f379127520b840f55f0e42ab
2021-11-02 21:56:18 +01:00
Manu B 4468605ff6 Msgpack version upgrade to 1.0.0
* Encoding parameter is removed. UTF-8 is used always. [0]
* strict_map_key is changed to False to keep the older behaviour.
  Default is changed to True in 1.0.0

Signed-off-by: Manu B <manu.b@est.tech>

[0]: https://github.com/msgpack/msgpack-python#major-breaking-changes-in-msgpack-10

Change-Id: I0e5902c4b13ab11f45f44bb9d9d9540d9630c9bb
2021-10-28 09:41:10 +00:00
Slawek Kaplonski cd4926b235 Remove os_ken/app and os_ken/services/protocols/bgp/api/jsonrpc modules
The os_ken/services/protocols/bgp/api/jsonrpc.py module was using
os_ken/app and os_ken app is the only one which was using tinyrpc lib.
Modules under os_ken/app except os_ken/app/ofctl are not used in neutron
and neutron-dynamic-routing so lets drop them from the code.

With that we can also drop tinyrpc from the requirements file at all.

Task: #41912
Story: #2008648
Change-Id: Ic35d1f7ee4112bc5cf16fee3d828534ded26ce7f
2021-03-02 08:29:32 +09:00
Akihiro Motoki 28b0341e48 Fix lower-constraints job
The summary of changes in lower-constraints.txt are as below.

* Address version mismatch of eventlet in requirements.txt and
  lower-constraints.txt. eventlet 0.21.0 is blocked in
  global-requirements.txt, so the min version is set to 0.22.0.
* pytz version in l-c is bumped to satisfy Babel requirement.
* Update the min version of msgpack to 0.5.0 as 0.3.0 is not
  available in PyPI. msgpack-python is dropped as it is not used.
* Drop linter-specific entries from lower-constraints.txt
* hacking in l-c is updated to match the version in test-requirements.

I also ran requirements-check script locally and detected
a lot of inconsistencies in requirements related files in os-ken.
Errors detected by the script are fixed in this commit too.

NOTE: The above inconsistencies were not detected mainly because
we don't have requirements-check job in os-ken CI.
Perhaps it is due to 'tinyrpc' which is not included in g-r.
It is better to enable requirements-check job in os-ken CI,
but we need to add tinyrpc to global-requirements.txt or drop
tinyrpc dependencies (for example, by dropping os-ken/app
as tinyrpc is used only in os-ken/app).

Change-Id: I19617aee765f9086fbfdb67fb17839b83d9df48c
2021-02-10 10:56:49 +09:00
Hervé Beraud 778ed750a0 Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Change-Id: I03172d63f61cba012ec4f85b20106744c9c24a1c
2020-06-11 11:02:42 +02:00
Slawek Kaplonski a74bac9100 Add CLI scripts from osken to be installed via setup.cfg
Instead of keeping hardcoded files in bin/ directory it is
more flexible to install such files using setup.cfg file.
It will for example install files with correct shebang for
python2 and python3.

This patch also removes tools/osken-manager.spec file
as it was used by PyInstaller in Ryu and it isn't used
in os-ken.

Change-Id: Ie85c64d81c86f0059528ad4d8e238a4124d4e5b4
2018-12-12 15:04:37 +01:00
Hongbin Lu eb94ee01bc Rename "ryu" to "os_ken" everywhere
Change-Id: Id227a6672fb89cd512b17cddfb1fce7bb22fb0c8
2018-11-27 20:48:02 +00:00
IWAMOTO Toshihiro 6e9fbad22e Bump oslo.config to 2.5.0
Ryu is using item_type since commit f77529036, so oslo.config minimum
version needs to be updated.

Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-08-01 16:00:10 +09:00
IWAMOTO Toshihiro a6bda030d3 pip: Blacklist eventlet 0.23.0
This is to sync with OpenStack requirements.

Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-06-20 11:10:25 +09:00
Joe Mader cda5bc7825 allow versions of eventlet > 0.21.0 2018-05-13 09:40:00 -06:00
Thomas Bechtold e6773539b5 Switch to msgpack in pip-requires
msgpack-python got renamed to msgpack[1] so use the new name.

[1] https://pypi.python.org/pypi/msgpack/0.5.1

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
Acked-By: Iwase Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-20 22:36:04 +09:00
IWASE Yusuke 83650576e4 travis: Introduce autopep8 test
This patch add a new test using "autopep8" to keep codes reformatted
easily by using Python tool.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17 19:27:46 +09:00
IWASE Yusuke bdf3549563 pycodestyle: Replace pep8
pep8 has been renamed to pycodestyle and will be removed in a future
release.

This patch replaces pep8 by pycodestyle and adding some settings for
pycodestyle.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17 19:27:41 +09:00
FUJITA Tomonori a991fed7e4 Revert "tests: Separate test files from Ryu module"
This reverts commit a67ed28584.

The commit breaks OpenStack neutron dynamic routing.
2017-06-30 14:23:03 +09:00
IWASE Yusuke a67ed28584 tests: Separate test files from Ryu module
To prevent redundant files (e.g., pcap files, json files for tests,
packet data generator) to be installed, this patch separates test
directory from Ryu module.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-06-26 15:17:44 +09:00
IWASE Yusuke d9d0588689 pip: OpenStack updated requirements of eventlet again
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-06-22 16:08:35 +09:00
IWASE Yusuke bfcd65744c pip: OpenStack avoids newer eventlet
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-30 17:00:45 +09:00
IWASE Yusuke dc57ff5b47 tools/optional-requires: SQLAlchemy for Zebra service
This patch adds a new optional requirements, SQLAlchemy, for Zebra
protocol service database.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:22:51 +09:00
IWASE Yusuke 6ebf0f7e4a optional-requires: Specify lxml version for OpenStack
OpenStack added "lxml!=3.7.0" into its requirements file, and this
patch adds the same specification for avoiding VersionConflict
error while installing.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:05:50 +09:00
IWASE Yusuke 1453f0f9e2 pip: Add doc requirements for convenience
This patch adds the requirements file for building the Ryu documentation.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 22:01:34 +09:00
IWASE Yusuke 03f77e7279 pip: Separate test-requires
Currently, in addition to "requirements for tests", test-requires
includes "optional requirements".
This makes it unclear to identify which packages are surely required
to use optional features (e.g., OF-Config, NETCONF, BGP speaker) and
causes the redundant installation when building Docker images.

This patch separates test-requires into two files("test requirements"
and "optional requirements").

Also, this patch reverts the version fixation for some packages.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-15 20:58:06 +09:00
IWASE Yusuke b9e4345d5d pip: Move tinyrpc to pip-requires
Because the embedded tinyrpc was removed, tinyrpc is required to
be install for running Ryu application.
This patch moves tinyrpc from test-requires to pip-requires.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-11 12:11:50 +09:00
IWASE Yusuke 7e91a55a56 contrib/ncclient: Remove embedded ncclient, use upstream
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-04 09:51:27 +09:00
FUJITA Tomonori a3ab6c8ab3 use old cryptography version
Looks like that the latest version (1.5.2) doesn't work:

https://s3.amazonaws.com/archive.travis-ci.org/jobs/164527154/log.txt

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-04 07:38:03 +09:00
IWASE Yusuke 51e0abd365 pip-requires: Add ovs>=2.6.0
Now OVS 2.6.0 has been released, which is including
Python 3 compatibility.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01 21:28:52 +09:00
Iwase Yusuke ba1fb5cf06 PyInstaller: Enable to build stand-alone executables
Usage: After installing Ryu (on virtualenv is better), build a
ryu-manager executable as following:
   $ pip install PyInstaller==3.1.1
   $ cd tools/
   $ pyinstaller ryu-manager.spec
   $ ./dist/ryu-manager

Note: PyInstaller==3.2 may have a bug of str encoding, please use
Pyinstaller==3.1.1 instead.
   https://github.com/pyinstaller/pyinstaller/issues/1976

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25 14:25:57 +09:00
IWASE Yusuke 9b57e7bd07 test-requires: Update to use the latest Pylint
Current specified Pylint(==0.25.0) are not enough to support Python 3.
This patch updates test-requires to use the latest one.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-01 20:38:39 +09:00
IWASE Yusuke 4fa85d1e4b test-requires: Add tinyrpc for RPC controller in wsgi
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-01 20:38:27 +09:00
YAMAMOTO Takashi 9e3aaaf2d8 Make ovs optional
Requiring a dev version of ovs here causes version conflict issues
for projects which don't want to use dev versions of libraries. [1]

Make it optional and document it in README instead.

[1] https://bugs.launchpad.net/neutron/+bug/1584858

Signed-off-by: YAMAMOTO Takashi <yamamoto@ovn.org>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-26 23:30:49 +09:00
Victor J. Orlikowski 89b2bf52d5 Bump version requirement for oslo.config, given usage of min parameter to IntOpt
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-13 23:03:52 +09:00
FUJITA Tomonori b8cb2d22aa pip-requires: force ovs>=2.6.0dev0 for everyone
The version of pip on Ubuntu 14.04 can't handle the version
condition. So force ovs>=2.6.0dev0 for python2.7 users too.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Jason Kölker <jason@koelker.net>
2016-03-30 05:02:38 +09:00
Jason Kölker 8d2604ee67 contrib/ovs: Remove embeded ovs, use upstream
Signed-off-by: Jason Kölker <jason@koelker.net>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-03-21 19:28:32 +09:00
FUJITA Tomonori af5e6b5fb7 drop python2.6 support
The Python core team[*1] stopped supporting python 2.6. Some Python
libraries started following the same path and trying to support 2.6
becomes painful...

For example, most of you already noticed, oslo.config dropped 2.6
support. I tried to work around it with the following commit:

2250171098

But this forces users of decent distributions (e.g Ubuntu 14.04) to
upgrade pip (old pip versions can't understand version conditions).

[*1]
http://www.curiousefficiency.org/posts/2015/04/stop-supporting-python26.html

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-02-18 06:54:47 +09:00
IWASE Yusuke 2ae4f884ab tox: Adapt to PyPy interpreter
Note: Though tests may not be enough, as far as running unit test,
this patch makes compatible with PyPy interpreter.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-02-10 13:46:35 +09:00
FUJITA Tomonori 2250171098 cap oslo.config version only in python2.6
https://bugs.launchpad.net/neutron/+bug/1531837

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
2016-01-08 21:07:35 +09:00
FUJITA Tomonori 1ed92b25b5 avoid oslo.config 3.1.0 and later for python2.6 support
oslo.config v3.1.0 dropped python2.6 support:

9470f19eac

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-08 21:48:38 +09:00
IWAMOTO Toshihiro 2749f9d4ed python3: Use formencode instead of xml_compare
The last release of xml_compare is 7 years ago and doesn't support python3.

Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-06-25 12:23:31 +09:00
FUJITA Tomonori f65ecadfaa eventlet has already supported WebSocket(RFC6455) in stable releases (>= 0.15)
Signed-off-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-06-23 14:55:51 +09:00
YAMAMOTO Takashi c73d7303a6 Adapt to namespace-less oslo
oslo packages got away from namespaces while ago.
Update ryu to use the new namespace-less import path.
Bump oslo.config requirement version accordingly.

Reference:
https://blueprints.launchpad.net/oslo-incubator/+spec/drop-namespace-packages
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-05-19 15:39:27 +09:00
YAMAMOTO Takashi ea5f9ff097 Revert "pip-requires: Remove comments"
This reverts commit 8fc25ca6c8.
The workaround is no longer necessary because the relevant fix
in devstack [1] has been merged.

[1] https://review.openstack.org/#/c/165709/

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-04-03 17:51:29 +09:00
YAMAMOTO Takashi 8fc25ca6c8 pip-requires: Remove comments
This partially reverts commit bf58a6dcf3.

devstack (stable/juno) fails to process comments in this file.
While a fix for devstack has been proposed [1], it might take some time
to be merged.  I guess it's best to fix it in ryu, at least for a while.

[1] https://review.openstack.org/#/c/165709/

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-22 15:39:18 +09:00
YAMAMOTO Takashi f39e95043c requirements: Drop some optional requirements
Move some non pure python requirements (namely lxml and paramiko)
from pip-requires to test-requires.  Document it in README.rst.

Motivations:

- Make this pip-installable with pypy
- Less distribution package requirements (deb/rpm/etc) in case
  a user do not actually need the functionality

Note: while paramiko itself is pure python, it requires pycrypto.
Note: msgpack has pure python fallback implementation.

Separating ryu into smaller packages would be a better alternative.
However, it would involve a lot more work than this workaround.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-17 12:20:25 +09:00
YAMAMOTO Takashi bf58a6dcf3 pip-requires: Add comments to say what's required by what
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-17 12:20:23 +09:00
YAMAMOTO Takashi 459baf87d3 pyang_plugins: pep8 style fix
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-10-14 10:54:36 +09:00
Hisaharu Ishii 8051160db1 pip-requires: gui_topology requires webob>=1.2
gui_topology imports webob.static.DirecoryApp
which was added since webob 1.2

Signed-off-by: Hisaharu Ishii <ishii.hisaharu@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-07 22:13:37 +09:00