Commit Graph

80 Commits

Author SHA1 Message Date
Rodolfo Alonso Hernandez f0724e9cf1 Skip the enforcer undefined rule check
That will avoid unnecessary warning messages in the logs. The
role enforcer only loads the following 3 rules:
* _ADMIN_CTX_POLICY = 'context_is_admin'
* _ADVSVC_CTX_POLICY = 'context_is_advsvc'
* _SERVICE_ROLE = 'service_api'

This functionality was implemented in [1]. oslo.policy library
is bumped to version 4.3.0 that contains this patch.

[1]https://review.opendev.org/c/openstack/oslo.policy/+/907196

Closes-Bug: #2048198
Change-Id: I1581b95035c4afebf63518b64c35bc0c61c292e9
2024-02-23 00:52:29 +00:00
Thomas Goirand c8754d1e5d Python-3.12: do not use datetime.datetime.utcnow()
This is deprecated in the favor of:
oslo_utils.timeutils.utcnow()

Change-Id: Iaf95c602b4ead7128850625140b7b3bde132ebf6
2024-01-25 06:46:44 +00:00
Takashi Kajinami c69701eb73 Bump hacking
hacking 3.0.x is really old. Let's bump it to the latest version
available.

This also fixes some errors detected but some rules are excluded now.
See the comments in tox.ini for further details.

Change-Id: I2565e5f5e791dfdd9bbc1890b35c413965d83626
2024-01-16 16:56:54 +00:00
Takashi Kajinami 27689c9ce5 Cleanup setup.py and requirements
- Python 2 is no longer supported
- setup.py is no longer managed by the global tooling
- Recent pip does not require appropriate order in requirement files

Change-Id: I29e2375b68dc01f6e042717a6da3861cc0bd8f88
2024-01-12 17:46:28 +09:00
Rodolfo Alonso Hernandez 72cd6f33d4 Drop "__autocommit=False" from context manager
This parameter was dropped in oslo.db 12.1.0 [1][2]. This patch
is consequently bumping the oslo.db minimum version to 12.1.0.

[1]https://review.opendev.org/c/openstack/oslo.db/+/804775
[2]a530cbfcf2

Change-Id: Iadb56c88e45fbb2db00fff564bff443292025f66
2023-04-24 11:41:44 +02:00
Tobias Urdin 12380e9304 Use new get_rpc_client API from oslo.messaging
Use the new API that is consistent with
the existing API instead of instantiating the client
class directly.

This was introduced in release 14.1.0 here [1] and
added into oslo.messaging here [2]. But neutron-lib
needs the 14.2.0 [3] version to override the client class.

[1] https://review.opendev.org/c/openstack/requirements/+/869340
[2] https://review.opendev.org/c/openstack/oslo.messaging/+/862419
[3] https://review.opendev.org/c/openstack/releases/+/872383

Depends-On: https://review.opendev.org/c/openstack/oslo.messaging/+/869899
Depends-On: https://review.opendev.org/c/openstack/releases/+/872383
Change-Id: I591c366df99e371659ee46d45c1c77dd3f6c74a1
2023-02-02 22:44:00 +01:00
Ghanshyam Mann daaa1e79b5 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: I67453b5a0e6d41d5cb4ef0cbb47f955a448005eb
2022-04-30 20:09:08 -05:00
Slawek Kaplonski 90ac6aeb58 Make neutron-lib aware about system scope tokens
To implement properly new secure personas like system-reader or
system-admin we need to make neutron and neutron-lib to be aware about
system scope tokens.
Such token don't have is_admin set to True but model_query build by
such token shouldn't filter resources on the project_id as it don't even
have project_id provider.

This patch also bumps minimum required version of some packages to be
able to use oslo_policy 3.6.2 (the same as Neutron really requires in fact)
as old lower constraint version 1.3.0 didn't had "system_scope"
attribute in Context class.
That change of oslo_policy minimum version requires also changes in some
other dependencies. But all are aligned with what is actually in Neutro
so what effectively was tested by all neutron jobs already.

Closes-Bug: #1918506
Change-Id: Ic1795045ac755e4b941791d6695c25c4f30574ef
2021-03-12 14:47:37 +01:00
elajkat 18129456d8 Fix lower-constraints job for focal
Change-Id: Ic5f1364240341d7f4c1d530073b803272663590f
2020-09-10 15:41:10 +00:00
Rodolfo Alonso Hernandez 478502b3df Remove library "six"
Now Python2 is not supported, this compatibility library for both
versions is not needed anymore.

Change-Id: Ic6da328a6219c8a00d38602f6b539a2ff5be1b2e
2020-01-22 13:16:45 +00:00
zhanghao d9a0ce5d72 Stop testing Python 2
This change removes the requirement for python 2 and removes testing for
it, but tries to leave the code compatible with python2 where possible.

Co-Authored-By: Nate Johnston <nate.johnston@redhat.com>
Change-Id: I711ae939b5eaa1816af15b22527c38858507127f
2020-01-09 11:12:06 -05:00
Nate Johnston 24aef1398b Ensure that extended ethertypes still work by name
When the change to add support for extended ethertypes was introduced,
one scenario for backwards compatibility was not addressed in the
validator: using the canonical string names for ethertypes.  This was
previously supported in the original implementation, using 'IPv4' or
'IPv6' for example.

Since the list of canonical ethertype names is available from os-ken we
consume it from there, which adds an additional dependency for
neutron-lib.

Related-Bug: #1838473
Change-Id: I53c6538dfbeea9691d95c6c555f0c56ae13d1a33
2019-07-30 17:29:08 -04:00
Boden R 02233a9871 rehome neutron.objects.common_types
This patch rehomes neutron.objects.common_types into
neutron_lib.objects.common_types and includes the test_common_types
from neutron as well. In addition some supporting logic is rehomed
including some utils. For full details on the rehomed code please see
the release note included herein.

Also see: https://bugs.launchpad.net/neutron/+bug/1815827

Change-Id: Ic4f1240fceea1e372e6cb68e747169f7236b9f08
2019-03-28 08:17:21 -06:00
Zuul 66c415280a Merge "Add setproctitle support to the workers module" 2019-02-20 10:03:26 +00:00
Doug Wiegley 2c1e09bfd5
Add setproctitle support to the workers module
- Set the process name of child neutron-servers to be something more
  readily identifiable than today.
- Enable by default for all users of the workers module, neutron will
  have a conf setting for its workers.

Matching neutron change:
https://review.openstack.org/637019

Partial-Bug: #1816485
Depends-On: https://review.openstack.org/637024
Change-Id: Ic6eca08f2ccacb3f8bf741c47a45e88cd3877b29
2019-02-18 13:38:48 -07:00
Doug Wiegley 77357d3ffe
Bump lower version of oslo.db to one that includes jitter argument
Change-Id: I2f85c495a47b740823e19c60a3ae3ac5762d0297
2019-02-16 20:36:08 -07:00
Boden R 14bc0d9408 rehome db api orm event listener functions
The rehome/consumption of the db api caused some errors in consumer
projects related to the ORM event listeners no longer getting
initialized [1]. While the short term fix [1] was to import neutron's
db api elsewhere, this doesn't work longer term as consumers need to
decouple from neutron, thus not importing neutron modules.

This patch rehomes the db api ORM event listeners into neutron-lib and
initializes them upon import of neutron_lib (top-level). This change
will allow consumers to load the event listeners by importing anything
from neutron-lib, thus breaking the dependency on neutron.

This patch also bumps the requirement for SQLAlchemy to match neutrons.

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

Related-Bug: 1802369

Change-Id: I3e702b99fd5084e8090f93c384aa1f704edceaff
2018-12-31 10:28:49 -07:00
Bence Romsics 579e0ccabb Placement: utils
* to generate Placement trait names,
* to generate Placement resource provider UUIDs, and
* to uniformly parse and validate Placement-related config options in
  all agents.

Change-Id: I192d99673feba97a95af995923b266e2f8b58c6d
Needed-By: https://review.openstack.org/577223
Partial-Bug: #1578989
See-Also: https://review.openstack.org/502306 (nova spec)
See-Also: https://review.openstack.org/508149 (neutron spec)
2018-08-21 16:52:30 +02:00
Boden R 108a598252 rehome model_query and its dependencies
This patch rehomes neutron.db._model_query into neutron-lib. While
our longer term goal is to use OVO rather than queries and tables, this
module is provided as a stepping stone (as mentioned in release note
herein). The patch also includes a few other APIs that are required for
the rehome including some utils and an exception class.

For more details see the spec on [1].

Also a sample consumption patch can be found on [2]. While it won't work
as-is with the depends on approach (it needs to be rebased on multiple
other DNMs in neutron) I tested it locally. In addition this change
was tested locally with a sample vmware-nsx consumption patch [3].

[1] https://review.openstack.org/#/c/473531/
[2] https://review.openstack.org/#/c/557786/
[3] https://review.openstack.org/#/c/557788/

Change-Id: I3e4b38aa3b6460ce916091c020adedd4ed2c4d26
2018-04-20 06:18:11 -06:00
Boden R edab0eb770 rehome db api
This patch rehomes neutron.db.api into neutron-lib. In addition to the
public API's, some internal plumbing such as _add_to_rel_load_list and
_load_one_to_manys are also needed in order to bootstrap the database
environment for SQLA.

For a sample consumption patch see:
https://review.openstack.org/#/c/557037/

Change-Id: I753a58cd04a6b881415fbc1bf3e876da72f3da3e
2018-04-16 09:57:10 -06:00
Boden R 4d29122f0d remove debtcollector from requirements
Once we clean-up our debt with the patches under this one, there's no
need for the debtcollector in neutron-lib.

This patch removes debtcollector from our requirements and lower
constraints.

Change-Id: I6161fe44fb6f7cb2271620235bd87fe80ce26127
2018-04-13 07:12:59 -06:00
Boden R 6f94faf64e versioned object plugin registry
This patch implements the plumbing to support dynamically loadable
plugins for neutron versioned objects as per the spec [1]. Specifically
a utility class is introduced as a generic plugin manager for stevedore
based plugins in a given namespace. A global singleton instance of this
plugin manager is then wrapped to provide access to neutron versioned
objects.

Using this implementation:
- Neutron version object classes are registered as entry points. For
example [2].
- Consumers can then use the object registry in neutron_lib to access
them, for example [3].

As-is this change doesn't introduce any breakage risk; it's new
functionality that no one is using.

[1] I079d06502e6e7b1e20aea882979b0ecd9106eaeb
[2] https://review.openstack.org/#/c/553836/
[3] https://review.openstack.org/#/c/553835/

Change-Id: I39d9bab1e24fbcbd5f9b3abf80560da920f1cf26
2018-04-11 22:30:20 +00:00
OpenStack Proposal Bot 1aa8176fcd Updated from global requirements
Change-Id: I3c76063483d662bb09750bca54365005f3c9a65e
2018-03-26 08:13:18 +00:00
OpenStack Proposal Bot d5b3f2d69a Updated from global requirements
Change-Id: I12458fa7acf18d35a5138219052c871245070976
2018-03-15 07:23:41 +00:00
OpenStack Proposal Bot d364ca1deb Updated from global requirements
Change-Id: I0de1b996a9c7ef617f96ab5f202eb0d2fea3452a
2018-02-17 09:49:44 +00:00
OpenStack Proposal Bot 772a62e604 Updated from global requirements
Change-Id: I9807166fb3af666d555b42045da10f064ce2402c
2018-01-16 12:38:22 +00:00
Zuul 46577db43a Merge "Rehome placement client to neutron-lib" 2018-01-08 12:19:37 +00:00
Rodolfo Alonso Hernandez 9ef0860033 Rehome placement client to neutron-lib
The placement client is going to be used by other services aside from
segments; e.g. QoS plugin. It makes sense to move this file to a common
place, like neutron-lib.

Closes-Bug: #1723452
Partial-Bug: #1578989

Change-Id: I2f7d204828a620152ec9e005e057fc7fd77f9126
2018-01-03 10:12:08 +00:00
OpenStack Proposal Bot e462c01dfc Updated from global requirements
Change-Id: I6a597bdcca7b64ca1ea91da81443cd5797c615c2
2017-12-19 01:29:18 +00:00
OpenStack Proposal Bot f3a0ae47fa Updated from global requirements
Change-Id: Ib812bceca93583105df8b0c5331341a4ba3df1fc
2017-11-13 21:27:34 +00:00
OpenStack Proposal Bot 87eb0389ae Updated from global requirements
Change-Id: Iae8c2e5d76dfa2b6c3b9bcc2dcda802ab7b19002
2017-10-14 00:39:36 +00:00
OpenStack Proposal Bot e499b08c01 Updated from global requirements
Change-Id: I4370383f662a5c70f26fab02b201773c2c70c01c
2017-10-05 18:54:58 +00:00
OpenStack Proposal Bot 7302068dfc Updated from global requirements
Change-Id: I5a50b9e287115da6f9c784af75cab5b9dc61b924
2017-08-26 11:36:59 +00:00
Jenkins 51913aaee6 Merge "rehome availability zone API def" 2017-08-23 16:09:55 +00:00
Hirofumi Ichihara e1a3c983ff Add missing library into requirements.txt
Neutron lib uses WebOb library but it's not included in requirements file.

TrivialFix

Change-Id: Ieae980b4fc3575ab29ca1547c8627d51efa820f8
2017-08-07 11:10:12 +09:00
Boden R c9f42f3fa4 rehome availability zone API def
This patch rehomes neutron's availability zone extension into
neutron-libs API definition layout/structure. UTs and a reno are also
included.

Change-Id: Id8513a7a82609808829e3e66827f69f3fd0c3e4d
2017-08-04 10:51:43 -06:00
OpenStack Proposal Bot f642cda79f Updated from global requirements
Change-Id: Ib1b65462dfdf65f2e640c5d71cb42697f0159e88
2017-07-16 21:25:24 +00:00
OpenStack Proposal Bot ecdf8785c9 Updated from global requirements
Change-Id: I6b8fcb73d76a067340af1a5919e913c14cd02202
2017-06-27 12:15:15 +00:00
OpenStack Proposal Bot d082e626b1 Updated from global requirements
Change-Id: I117294aabac060bae8f6d79038c8dab1602c3b87
2017-06-03 13:08:46 +00:00
OpenStack Proposal Bot 1c717716c9 Updated from global requirements
Change-Id: I5f7b8602107f899678e0715828ea1fe2244f9ca3
2017-05-24 23:17:28 +00:00
Boden R 7b4ade3791 rehome utils: synchronized decorator and load_class_by_alias_or_classname
This patch rehomes the neutron common utils:
- load_class_by_alias_or_classname() function.
- synchronized decorator.

These utils are used by subprojects [1] and will
also be used as part of rehoming the logic in neutron's
manager module.

[1] http://codesearch.openstack.org/?q=load_class_by_alias_or_classname

Change-Id: I62958e30695663797d79ed6bd1260edbb46a1bf4
2017-05-22 12:54:17 -06:00
OpenStack Proposal Bot 7bfbb09b62 Updated from global requirements
Change-Id: I7283c6b0e2c8a8c6eeeb2eb4222a6fa47e2d8ad0
2017-04-15 17:46:01 +00:00
OpenStack Proposal Bot 24ea6f3529 Updated from global requirements
Change-Id: I56e88f448f60b006b4ce736c174ed0265b4be924
2017-04-06 12:21:14 +00:00
OpenStack Proposal Bot 8ee998d9c4 Updated from global requirements
Change-Id: I583b879a2b383ee4e213f201161fc880cdfa0885
2017-03-29 13:36:54 +00:00
OpenStack Proposal Bot b5eeebebd6 Updated from global requirements
Change-Id: I9f694e5e248d6db9ea6db820fc8af23fa8dd0cc3
2017-03-16 12:30:48 +00:00
OpenStack Proposal Bot 3af5d11a7e Updated from global requirements
Change-Id: I9754345ea871f1f55622734aaa420fab111426b6
2017-03-02 11:49:11 +00:00
OpenStack Proposal Bot 247956f271 Updated from global requirements
Change-Id: I6324e4bf0823eba1ecd96a203d372467dc25a365
2017-02-10 09:44:28 +00:00
OpenStack Proposal Bot 82eddcd826 Updated from global requirements
Change-Id: Ic1ddefddac656b58b00b5cb63c2711a837be785e
2017-01-09 23:03:50 +00:00
OpenStack Proposal Bot 906e5a1ba1 Updated from global requirements
Change-Id: Ia25fcd0db4565560fd88c27096bad1383d4d5db3
2016-12-08 17:14:37 +00:00
OpenStack Proposal Bot 0c6dfdf2de Updated from global requirements
Change-Id: Ifc8f867dcc363ecfa6783b7270691387e7cc3e84
2016-11-22 13:56:40 +00:00