Fix inconsistency in requirements

The latest pip resolver started to check requirements strictly
and it detects many inconsistencies in neutron-vpnaas requirements.
Also applies the practices discussed in the mailing list [1][2].

* Drop pyflakes from requirements.txt as it is not used.
* Move document dependencies to doc/requirements.txt [1]
  and drop them from lower-constriants.txt.
* Bump MarkupSafe lower-constraint to 1.1.1
  to make it work with newer setuptools.
* Bump the minimum neutron requirement to 17.0.0 (victoria release)
  as the previous min version 13.0.0.0b2 is too old.
  Wallaby and Victoria neutron are not different much, so I think
  it is no problem to use the latest released version here.
* Dependenicy related to neutron min version bump are updated
  in requirements and lower-constraints.
  Note that eventlet 0.22.0 is used as lower-constraints as 0.21.0
  (the min requirement in neutron 17.0.0) is blocked in several libs.
* Move linter dependencies to tox.ini and drop them from
  lower-constraints.txt (pylint, pyflakes, astroid, isort)
* Drop psutil from neutron_vpnaas/tests/functional/requirements.txt
  as the specified version of psutil is too old and psutil is a dependency
  of neutron so we don't need to install it explicitly here.

In addition, hacking version is updated as hacking 0.12.0 is not compatible
with python 3.8. W504 and I202 are ignored as we do in the neutron repo.
Other new flake8 violations are fixed.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019611.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019362.html

Change-Id: I47f6d39379b68c4d71fc4d85ebb06d97cb5a6ce2
This commit is contained in:
Akihiro Motoki 2021-01-07 00:03:12 +09:00
parent fd4eb472ae
commit 7c8262cf50
10 changed files with 73 additions and 83 deletions

3
doc/requirements.txt Normal file
View File

@ -0,0 +1,3 @@
sphinx>=2.0.0,!=2.1.0 # BSD
openstackdocstheme>=2.2.1 # Apache-2.0
reno>=3.1.0 # Apache-2.0

View File

@ -1,9 +1,8 @@
alabaster==0.7.10
alembic==0.8.10
amqp==2.1.1
alembic==0.9.6
amqp==2.5.0
appdirs==1.4.3
asn1crypto==0.23.0
astroid==1.3.8
beautifulsoup4==4.6.0
cachetools==2.0.0
cffi==1.14.0
@ -12,82 +11,74 @@ cmd2==0.8.0
contextlib2==0.4.0
coverage==4.0
cryptography==2.7
debtcollector==1.2.0
debtcollector==1.19.0
decorator==3.4.0
deprecation==1.0
docutils==0.11
dogpile.cache==0.6.5
dulwich==0.15.0
eventlet==0.25.1
eventlet==0.22.0
extras==1.0.0
fasteners==0.7.0
fixtures==3.0.0
flake8==2.5.5
flake8-import-order==0.12
future==0.16.0
futurist==1.2.0
greenlet==0.4.15
hacking==0.12.0
httplib2==0.9.1
idna==2.6
imagesize==0.7.1
iso8601==0.1.11
isort==4.3.21
Jinja2==2.10
jmespath==0.9.0
jsonpatch==1.16
jsonpointer==1.13
jsonschema==2.6.0
keystoneauth1==3.4.0
keystoneauth1==3.14.0
keystonemiddleware==4.17.0
kombu==4.6.1
linecache2==1.0.0
logilab-common==1.4.1
logutils==0.3.5
Mako==0.4.0
MarkupSafe==1.0
mccabe==0.2.1
MarkupSafe==1.1.1
mock==2.0.0
monotonic==0.6
monotonic==1.4
mox3==0.20.0
msgpack-python==0.5.6
munch==2.1.0
netaddr==0.7.18
netifaces==0.10.4
neutron-lib==2.2.0
openstackdocstheme==2.2.1
openstacksdk==0.11.2
neutron-lib==2.6.0
openstacksdk==0.31.2
os-client-config==1.28.0
os-service-types==1.2.0
os-xenapi==0.3.1
os-service-types==1.7.0
os-xenapi==0.3.4
osc-lib==1.8.0
oslo.cache==1.26.0
oslo.concurrency==3.26.0
oslo.config==5.2.0
oslo.context==2.19.2
oslo.context==2.20.0
oslo.db==4.44.0
oslo.i18n==3.15.3
oslo.log==3.36.0
oslo.i18n==3.20.0
oslo.log==4.2.1
oslo.messaging==7.0.0
oslo.middleware==3.31.0
oslo.policy==1.30.0
oslo.privsep==1.23.0
oslo.privsep==2.3.0
oslo.reports==1.18.0
oslo.rootwrap==5.8.0
oslo.serialization==2.18.0
oslo.service==1.24.0
oslo.utils==3.33.0
oslo.versionedobjects==1.31.2
oslo.serialization==2.25.0
oslo.service==1.31.0
oslo.utils==4.4.0
oslo.versionedobjects==1.35.1
oslotest==3.2.0
osprofiler==2.4.0
ovs==2.8.0
ovsdbapp==0.10.0
ovsdbapp==1.3.0
paramiko==2.0.0
Paste==2.0.2
PasteDeploy==1.5.0
pbr==2.0.0
pbr==4.0.0
pecan==1.3.2
pep8==1.5.7
pika==0.10.0
pika-pool==0.1.3
positional==1.2.1
@ -95,16 +86,12 @@ prettytable==0.7.2
psutil==3.2.2
pyasn1==0.1.8
pycadf==1.1.0
pycodestyle==2.3.1
pycparser==2.18
pyflakes==2.1.1
Pygments==2.2.0
pyinotify==0.9.6
pylint==1.4.5
pyparsing==2.1.0
pyperclip==1.5.27
pyroute2==0.5.13
python-dateutil==2.5.3
python-dateutil==2.7.0
python-designateclient==2.7.0
python-editor==1.0.3
python-keystoneclient==3.8.0
@ -114,7 +101,6 @@ python-novaclient==9.1.0
python-subunit==1.0.0
pytz==2015.7
PyYAML==3.12
reno==3.1.0
repoze.lru==0.7
requests==2.14.2
requests-mock==1.2.0
@ -124,7 +110,6 @@ Routes==2.3.1
ryu==4.24
simplejson==3.5.1
snowballstemmer==1.2.1
Sphinx==2.0.0
sphinxcontrib-websupport==1.0.1
SQLAlchemy==1.2.0
sqlalchemy-migrate==0.11.0
@ -134,7 +119,7 @@ stestr==1.0.0
stevedore==1.20.0
tempest==17.1.0
Tempita==0.5.2
tenacity==3.2.1
tenacity==6.0.0
testrepository==0.0.18
testresources==2.0.0
testscenarios==0.4
@ -145,6 +130,6 @@ unittest2==1.1.0
urllib3==1.21.1
vine==1.1.4
waitress==1.1.0
WebOb==1.7.1
WebOb==1.8.2
WebTest==2.0.27
wrapt==1.7.0
wrapt==1.12.0

View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""add_aggressive_negotiation_modes
Revision ID: 5f884db48ba9
@ -25,10 +28,6 @@ Create Date: 2020-05-12 14:37:46.320070
revision = '5f884db48ba9'
down_revision = '95601446dbcc'
from alembic import op
import sqlalchemy as sa
phase1_negotiation_modes = sa.Enum('main', 'aggressive',
name='ike_phase1_mode')

View File

@ -177,8 +177,9 @@ def _validate_subnet_list_or_none(data, key_specs=None):
if data is not None:
return validators.validate_subnet_list(data, key_specs)
validators.add_validator('type:subnet_list_or_none',
_validate_subnet_list_or_none)
_validate_subnet_list_or_none)
vpn_supported_initiators = ['bi-directional', 'response-only']
vpn_supported_encryption_algorithms = ['3des', 'aes-128',

View File

@ -160,5 +160,6 @@ def execute_with_mount():
def main():
sys.exit(execute_with_mount())
if __name__ == "__main__":
main()

View File

@ -4,7 +4,6 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
psutil>=1.1.1,<2.0.0
psycopg2
PyMySQL>=0.6.2 # MIT License
@ -12,4 +11,3 @@ PyMySQL>=0.6.2 # MIT License
# neutron. This needs to be removed from master as soon as new neutron
# is released from Victoria, as mock is removed in development branch.
mock>=2.0.0 # BSD

View File

@ -324,24 +324,24 @@ def get_server_ip(nova_client, server_id, network_suffix):
def add_floating_ip(nova_client, server):
"""Associates floating-ip to a server
"""Associates floating-ip to a server
:param nova_client: nova client
:param server: nova instance
:return: associated floating ip
"""
:param nova_client: nova client
:param server: nova instance
:return: associated floating ip
"""
fip_list = nova_client.floating_ips.list()
for fip in fip_list:
if fip.instance_id is None:
floating_ip = fip
break
else:
LOG.debug("CREATING NEW FLOATING IP")
floating_ip = nova_client.floating_ips.create()
LOG.debug("ASSOCIATING FLOATING IP %s", floating_ip.ip)
nova_client.servers.add_floating_ip(server.id, floating_ip.ip)
return floating_ip
fip_list = nova_client.floating_ips.list()
for fip in fip_list:
if fip.instance_id is None:
floating_ip = fip
break
else:
LOG.debug("CREATING NEW FLOATING IP")
floating_ip = nova_client.floating_ips.create()
LOG.debug("ASSOCIATING FLOATING IP %s", floating_ip.ip)
nova_client.servers.add_floating_ip(server.id, floating_ip.ip)
return floating_ip
def get_namespace(host, private_key):

View File

@ -1,26 +1,25 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr!=2.1.0,>=2.0.0 # Apache-2.0
pbr>=4.0.0 # Apache-2.0
requests>=2.14.2 # Apache-2.0
Jinja2>=2.10 # BSD License (3 clause)
netaddr>=0.7.18 # BSD
SQLAlchemy>=1.2.0 # MIT
alembic>=0.8.10 # MIT
pyflakes>=2.1.1 # MIT
neutron-lib>=2.2.0 # Apache-2.0
alembic>=0.9.6 # MIT
neutron-lib>=2.6.0 # Apache-2.0
oslo.concurrency>=3.26.0 # Apache-2.0
oslo.config>=5.2.0 # Apache-2.0
oslo.db>=4.44.0 # Apache-2.0
oslo.log>=3.36.0 # Apache-2.0
oslo.log>=4.2.1 # Apache-2.0
oslo.messaging>=7.0.0 # Apache-2.0
oslo.reports>=1.18.0 # Apache-2.0
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
oslo.service!=1.28.1,>=1.24.0 # Apache-2.0
oslo.utils>=3.33.0 # Apache-2.0
oslo.serialization>=2.25.0 # Apache-2.0
oslo.service>=1.31.0 # Apache-2.0
oslo.utils>=4.4.0 # Apache-2.0
neutron>=13.0.0.0b2 # Apache-2.0
neutron>=17.0.0 # Apache-2.0
# The comment below indicates this project repo is current with neutron-lib
# and should receive neutron-lib consumption patches as they are released

View File

@ -1,23 +1,15 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
flake8-import-order==0.12 # LGPLv3
isort==4.3.21 # MIT
mock>=2.0.0 # BSD
pylint==2.3.0 # GPLv2
requests-mock>=1.2.0 # Apache-2.0
sphinx>=2.0.0,!=2.1.0 # BSD
openstackdocstheme>=2.2.1 # Apache-2.0
tempest>=17.1.0 # Apache-2.0
testtools>=2.2.0 # MIT
testresources>=2.0.0 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
WebOb>=1.7.1 # MIT
WebTest>=2.0.27 # MIT
oslotest>=3.2.0 # Apache-2.0
reno>=3.1.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0

18
tox.ini
View File

@ -67,9 +67,17 @@ commands =
stestr run {posargs}
[testenv:releasenotes]
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps}
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:pep8]
deps =
{[testenv]deps}
hacking>=4.0.0,<4.1 # Apache-2.0
flake8-import-order==0.18.1 # LGPLv3
pylint==2.3.0 # GPLv2
isort==4.3.21 # MIT
commands =
flake8
pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron_vpnaas}
@ -81,7 +89,7 @@ whitelist_externals = sh
[testenv:pep8-dev]
deps =
{[testenv]deps}
{[testenv:pep8]deps}
commands =
{[testenv:dev]commands}
{[testenv:pep8]commands}
@ -104,10 +112,13 @@ commands =
commands = {posargs}
[testenv:docs]
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -a -b html doc/source doc/build/html
[testenv:pdf-docs]
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps}
whitelist_externals =
make
commands =
@ -120,17 +131,18 @@ commands =
# E128 continuation line under-indented for visual indent
# E129 visually indented line with same indent as next logical line
# E265 block comment should start with #
# W504 line break after binary operator
# I202 Additional newline in a group of imports
# H404 multi line docstring should start with a summary
# H405 multi line docstring summary not separated with an empty line
# TODO(dougwig) -- uncomment this to test for remaining linkages
# N530 direct neutron imports not allowed
# N531 Log messages require translation hints
ignore = E125,E126,E128,E129,E265,W504,I202,H404,H405,N530,N531
# H106 Don't put vim configuration in source files
# H203 Use assertIs(Not)None to check for None
# H904 Delay string interpolations at logging calls
ignore = E125,E126,E128,E129,E265,H404,H405,N530,N531
enable-extensions=H106,H203,H904
show-source = true
exclude = .venv,.git,.tox,dist,doc,.tmp,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios
import-order-style = pep8