Commit Graph

432 Commits

Author SHA1 Message Date
Takashi Kajinami 84ca8a18e0 Use zoneinfo instead of pytz if available
The zoneinfo module was introduced in Python 3.9. We can use that
built-in module instead of the 3rd party library (pytz).

This is based on change I1f88bdadc68bfa726eac1da1c5824c1ed352ad98 in
oslo.utils.

Change-Id: I539120a6bfb850b0c4e384e51caa021761a4f6b8
2024-01-27 19:23:00 +09:00
Takashi Kajinami f5e5aaed8e Remove deprecated wrappertask decorator
The wrappertask decorator was deprecated some cycles ago[1]. This is
internal implementation so could be even removed directly.

[1] 2c58017a14

Change-Id: I0f2e25971201e2a01b3e86bd859e8a4bdb98d371
2023-12-27 09:06:33 +09:00
Takashi Kajinami b08bc694dc Move ddt to test requirements
ddt is only used by test code so is not needed at runtime.

Change-Id: I885ec7fb9c76bc43c7f9eebcef349f660935a9cf
2023-12-26 18:05:21 +09:00
likui 25af99fb2c Remove babel.cfg
Remove babel.cfg and the translation bits from setup.cfg, those are not
needed anymore.

Change-Id: I07ec27dfe78592651e4a250333b8b83b7f1ec730
2023-12-19 22:39:34 +09:00
Takashi Kajinami 6d13e93a37 Enable new defaults and scope checks by default
Based on the agreed steps to implement the SRBAC community goal, this
enables the new policy defaults and scope checks by default.

Change-Id: I315893150549d1174c3270c37c031e6a519f9a28
2023-10-24 13:18:40 +09:00
Zuul 6d6d684c02 Merge "Remove some notes no longer valid" 2023-09-12 18:46:52 +00:00
Stephen Finucane 60fb3cda60 Replace use of distutils.version
Resolve the following warning:

  DeprecationWarning: distutils Version classes are deprecated. Use
  packaging.version instead.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I1db934e673b896834956d680f847687834e18520
2023-06-19 10:45:58 +01:00
Takashi Kajinami 81586711f5 Remove some notes no longer valid
setup.py is no longer maintained by the global sync. Also the note
in requirements.txt does not apply since pip 20.3.

[1] https://lists.openstack.org/pipermail/openstack-discuss/2023-June/034073.html

Change-Id: I8c9fef97e5e62d1024da9231e2cbb96b15edbf80
2023-06-14 04:09:52 +09:00
Stephen Finucane 998d8df420 db: Remove legacy migrations
Unlike Cinder, Nova etc., we haven't had any sqlalchemy-migrate-based
migrations in Heat for some time. That means we don't need a transition
period to handle users that may not have the latest
sqlalchemy-migrate-based migration and we can remove these migrations
immediately. Doing so also means we can also remove sqlalchemy-migrate
from our dependencies. Hurrah!

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I825c58a42e9d430c9d660dae9bb70d1cb6f91079
2023-03-25 03:01:02 +00:00
Stephen Finucane ecad14368e db: Add initial alembic configuration
No migrations yet: this is simply the output of 'alembic init' with some
minor tweaks.

A note about ordering of requirements is removed from requirements.txt:
it is no longer true with the new dependency resolver introduced in pip
20.3.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I7790222ab5eaf6c47dd386fe472275a3037a9898
2023-03-23 11:01:07 +00:00
Zuul d3ce7baf32 Merge "Use new get_rpc_client API from oslo.messaging" 2023-01-27 16:36:59 +00:00
Tobias Urdin 29eaf4ef71 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]

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

Change-Id: Ia48de36e3cb97378785bb4946b1a387c0da1ff81
2023-01-19 20:25:47 +00:00
ramishra af5ffbe019 Replace deprecated Query.as_scalar()
This has been deprecated since SQLAlchemy 1.4.

Change-Id: Id3edcc188bb44d9752fe1bd7625308c5abed4d9c
2022-09-06 10:37:03 +09:00
Przemyslaw Szczerbik 0e70383d08 Add OS::Neutron::QoSMinimumPacketRateRule resource
This patch adds a new resource to support ``minimum_packet_rate_rule``
QoS rule in Neutron.

Related-Bug: #1922237
Story: 2009686
Task: 43997
See-Also: https://review.opendev.org/785236
Change-Id: I29e205979b40e3e0d0746e1c22fa679736c853b7
2022-06-13 14:39:57 +02:00
Ghanshyam Mann 49cbb92ed6 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: I703229320320295b4a90e72c543f8959f85daaa9
2022-04-30 15:41:05 -05:00
bshephar 9af3af156b Bump lower constraints for OSC
In support of the OSC migration, we need
to bump the lower-constraint for the
openstacksdk to allow for feature parity.

Change-Id: Ide69f84a76f06814cf74b73b57729f23dea1062b
2022-01-12 03:17:59 +00:00
Andrii Ostapenko 5d27ba3c8f
Remove python-ceilometerclient from requirements
Component is not used in code base and was recently removed from
global upper constraints [0]

[0] https://review.opendev.org/c/openstack/requirements/+/809975

Change-Id: I1555a3db15c9a560e945c3479b44cd6d3f036d79
2021-10-12 19:42:24 -06:00
Ghanshyam Mann 157f358057 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.

2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.

Also replace policy.json to policy.yaml ref from doc and code.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: I1aa12bcd2638390f25d57ce8abeeec248121dc02
2021-06-17 01:35:45 +08:00
Rico Lin 7230082f87 Fix avoid deprecation warnings from policy
We received huge amount of warnings during service start.
Most about stop using `deprecated_reason` and `deprecated_since` by
`policy.DocumentedRuleDefault` directly. And should use them under
`policy.DeprecatedRule instead.

This patch apply for above suggestion.
Also bump oslo.policy lower-constraints and requirements to `3.7.0` to alias
policy behavior.

Story: 2008707
Task: 42041

Change-Id: Iefcfc30a051fe25ccc5121c7ddb817e8c271fcb6
2021-03-12 20:46:17 +08:00
Lance Bragstad 93594c30ec Implement secure RBAC
This commit updates default policies to account for system scope
and default roles. This is part of a broader change to provide a
consistent and secure authorization experience across OpenStack
projects.

- Introduces basic/reusable check strings in base.py
- Implements secure RBAC for build info API
- Implements secure RBAC for the action API
- Implements secure RBAC for cloud formations
- Implements secure RBAC for events
- Implements secure RBAC for the resource API
- Implements secure RBAC for the service API
- Implements secure RBAC for software configs
- Implements secure RBAC for software deployments
- Implements secure RBAC for stacks
- Adds unit tests for legacy and new secure-rbac policies.

Change-Id: Iff1e39481ea3b1f00bd89dba4a00aed30334ecec
2021-03-02 09:32:41 +05:30
Lance Bragstad 042345703f Bump requirements to support secure RBAC effort
The broader OpenStack community is working towards implementing secure
RBAC, which is a common set of personas (role and scope permutations)
that deliver the most common asks for custom policies. It also addresses
long-standing issues with tenancy and enforce scope checking.

This commit updates the requirements for oslo.log, oslo.context,
oslo.i18n, oslo.policy, oslo.serialization and keystonemiddleware, which
are necessary for implementing this work. Subsequent patches will go
through and update the default policies.

Change-Id: Ib28f1b333f032b8c9f960a2510e4d23487541631
2021-01-11 18:23:23 +05:30
Rabi Mishra 4370af1572 Align lower-constraints for new pip
New pip version is quite strict and does not allow conflicting
minimum version deps in lower-constraints.

Change-Id: Ie524c54e3b982bc6b0786c875d34d177444ec6fc
2020-12-09 10:04:52 +05:30
Emilien Macchi 17a491449f Fix lower-constraints errors
This patch changes the lower-constraint requirements to make them
py3.8 compatible. See https://bugs.launchpad.net/nova/+bug/1886298

Markupsafe==1.1.1
PyMySQL==0.8.0
PyYAML==3.13
cffi==1.14.0
greenlet==0.4.15
kombu==5.0.1
lxml==4.5.0
oslo.db==6.0.0
paramiko==2.7.1
psycopg2==2.8
sqlalchemy-migrate==0.13.0
tenacity==6.1.0

Also update the test-setup.sh to work with recent version of mysql.

Change-Id: Ibe60d1e536f0e887eceea32b7cb4eec6318e96af
Partial-Bug: #1886298
2020-09-10 14:19:03 -04:00
Zuul cf2ed9cd9c Merge "Use correct attribute from entrypoint" 2020-07-16 06:34:37 +00:00
Rabi Mishra 2aea5c9b32 Use correct attribute from entrypoint
The type of the entry point objects returned in stevedore has
been changed from`pkg_resources.EntryPoint` to
`importlib.metadata.EntryPoint`[1] and it does not have module_name
attribute.

It also bumps requirements/lower-constraints as stevedore==3.1.0 is
not backward compatible.

[1] https://review.opendev.org/#/c/740515/
Task: 40355
Change-Id: Icd68f6eab73e44406f2ff5073636dcdd111e00ea
2020-07-15 17:51:57 +05:30
Zuul 9f931119ba Merge "Deprecate wrappertask decorator" 2020-07-06 06:00:17 +00:00
Zane Bitter 2c58017a14 Deprecate wrappertask decorator
Now that we only support Python 3, use the 'yield from' keyword instead
of the @wrappertask decorator for calling co-routines from a co-routine.
This should greatly simplify backtraces when calling nested co-routines.

Change-Id: If9beaff74cf4facbc4aa4b30f31a3a087bdcad8a
2020-04-30 09:56:20 -04:00
Hervé Beraud 8c96a4d856 Remove six and python 2.7 full support
Six is in use to help us to keep support for python 2.7.
Since the ussuri cycle we decide to remove the python 2.7
support so we can go ahead and also remove six usage from
the python code.

Review process and help
-----------------------
Removing six introduce a lot of changes and an huge amount of modified files
To simplify reviews we decided to split changes into several patches to avoid
painful reviews and avoid mistakes.

To review this patch you can use the six documentation [1] to obtain help and
understand choices.

Additional informations
-----------------------
Changes related to 'six.b(data)' [2]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

six.b [2] encode the given datas in latin-1 in python3 so I did the same
things in this patch.

Latin-1 is equal to iso-8859-1 [3].

This encoding is the default encoding [4] of certain descriptive HTTP
headers.

I suggest to keep latin-1 for the moment and to move to another encoding
in a follow-up patch if needed to move to most powerful encoding (utf8).

HTML4 support utf8 charset and utf8 is the default charset for HTML5 [5].

Note that this commit message is autogenerated and not necesserly contains
changes related to 'six.b'

[1] https://six.readthedocs.io/
[2] https://six.readthedocs.io/#six.b
[3] https://docs.python.org/3/library/codecs.html#standard-encodings
[4] https://www.w3schools.com/charsets/ref_html_8859.asp
[5] https://www.w3schools.com/html/html_charset.asp

Patch 28 of a serie of 28 patches
six fully removed now!
Thank you six for the rendered services!

Change-Id: If44ee4b565cc9390fa0422fba4dda080b4f90b98
2020-04-23 14:49:12 +02:00
ricolin 5b35225d16 Add ironic client plugin support
Change-Id: I2f3ee94424c4dab75fbcef6f8b32e565b45684e4
Task: 36285
2020-04-09 14:14:38 +08:00
Zuul a7b554cd80 Merge "New resource OS::Neutron::ExtraRouteSet" 2020-01-22 07:50:45 +00:00
Gregory Thiemonge 68a8219315 Add support for Octavia's Flavor and FlavorProfile resources
Added OS::Octavia::Flavor and OS::Octavia::FlavorProfile support.
Added flavor parameter in OS::Octavia::LoadBalancer.

Flavor and FlavorProfile allow to configure/tune Load Balancer
capabilities (enable/disable HA, etc...)

Story: 2007081
Task: 37993

Change-Id: If31a888e5867ac6941ff0d515d4b88894fb97572
2020-01-20 18:57:37 +01:00
Bence Romsics e0a69202d2 New resource OS::Neutron::ExtraRouteSet
I hope I remembered all the discussion points we had about how to design
this plugin, so:

* Instead of changing OS::Neutron::ExtraRoute we introduce
  OS::Neutron::ExtraRouteSet so we can take advantage of Neutron API's
  ability to add/remove multiple extra routes at once.

* Addition and removal of extra routes is supposed to be atomic with
  Neutron extension 'extraroute-atomic'. An update involves a removal
  and an addition, therefore an update is not atomic operation. However
  unless the responsibility for an extra route is moved from one stack
  to another that should not be a problem.

* Sharing the responsibility for an extra route between stacks (that is
  multiple stacks defining the same extra route) is not supported due
  to the Neutron API not allowing this.

Let me know what did I forget.

Example template:

resources:
  extrarouteset0:
    type: OS::Neutron::ExtraRouteSet
    properties:
      router: { get_resource: router0 }
      routes:
        - destination: 10.0.0.0/24
          nexthop: 10.0.0.10
        - destination: 10.0.1.0/24
          nexthop: 10.0.0.11
  ...

Change-Id: Ic1fe593d9821d844fd124b0212d444f6e3a0015e
Depends-On: https://review.opendev.org/675900
Story: #2005522
Task: #36264
2020-01-17 09:41:00 +00:00
Ifat Afek ab584e500e Added a Vitrage client
Story: 2002684
Task: 23116
Change-Id: If05f0907d8f43f64327c7774170e5b559286fc06
2019-12-19 15:25:30 +00:00
Rabi Mishra 54f1119d69 Use client_retry_limit for keystone connection retry
Use the existing client_retry_limit option.

Change-Id: If3dd260cad088c9783e4c31ba18d7f261f7d68c9
Closes-Bug: #1840235
Task: 36287
2019-12-03 09:35:08 +05:30
Zuul 3e5dc90540 Merge "Bump lower constraint of python-zunclient" 2019-10-05 18:03:43 +00:00
pengyuesheng 140e2175e9 Blacklist eventlet 0.21.0,0.23.0,0.25.0
more details https://review.opendev.org/#/c/678078/

Change-Id: If308e6df439e9e104c67b0bd71cda861ed477332
2019-09-05 17:28:33 +08:00
Hongbin Lu 57680e547c Bump lower constraint of python-zunclient
Projects that depends on python-zunclient should use the latest
version as lower constraint.

Change-Id: I0d90720fab98192a191bb9ce5dae5190f2d23051
2019-09-01 22:33:28 +00:00
Rabi Mishra 87b4a92a62 Fix lower-constraints tox env to use proper constraints
- Bumps some of the lower constraints
- Fixes common/endpoint_utils.py to fallback to use auth_uri.

Change-Id: Ief0868d5feef3ee6b0689c6be27649ff009fbbcc
2019-04-10 09:11:56 +05:30
Kazunori Shinohara 809ac97439 Add a Blazar Lease resource
Add a OS::Blazar::Lease resource plugin to support Blazar which is a
resource reservation services in OpenStack.

Co-author: Asmita Singh <Asmita.Singh@nttdata.com>

Change-Id: I7683599d9e9443372d1f585985cee7c10fd08581
Task: 22882
Story: 2002085
2019-02-18 06:35:05 +00:00
whoami-rajat ba4e54589d Add heat-status upgrade check command framework
This adds basic framework for heat-status upgrade
check commands. For now it has only "check_placeholder"
check implemented.
Real checks can be added to this tool in the future.

Change-Id: I83629184b49a6cf91928df702db23156433d99f6
Story: 2003657
Task: 26131
2018-10-22 14:19:36 +00:00
Pradeep Kilambi 6b821beb4e Drop ceilometerclient requirement
ceilometerclient is dead in queens cycle, lets drop the
integration and remove the requirement.

Change-Id: I5267746e63fd27ad0ce8e36fb843efd4988d6eb7
2018-08-08 16:56:41 +00:00
Zuul 5e52ee706c Merge "Enhancements to CIDR and IP address constraints." 2018-07-27 22:56:55 +00:00
Zuul 1ebf414c73 Merge "zun: use containers.update for renaming" 2018-07-27 19:18:12 +00:00
Zuul 158636e94f Merge "Add Blazar client plugin to Heat" 2018-07-27 05:58:34 +00:00
Nakul Dahiwade 9592bcb591 Enhancements to CIDR and IP address constraints.
Currently the constraints do not reject an ipaddress for ipv4 which have
fewer than 3 dots such as 'a' or 'a.b' or 'a.b.c'.
This enhancement provides an extra check that an ipv4 address has syntax:
'a.b.c.d'

This also applies to CIDR

Change-Id: Ia7ec8bf107abd169b6b6a91d0b8bb913fc3cc7b9
Story: 2002552
Task: 22114
2018-07-25 18:11:10 +00:00
Hongbin Lu de549a931c zun: use containers.update for renaming
The old way of renaming is duplicated [1]. This patch uses the
new way to rename a container. In addition, this patch also
bump the version of python-zunclient to 2.0.0

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

Change-Id: I4ef36a3c4a805b3e041fcb9456c297e59865485c
2018-07-24 17:43:11 +00:00
ricolin e49e53af0e Bump monascaclient to at less 1.12.0
Bump mocascaclient to avoid issue in story 2002978

Change-Id: Ibe5d6469de8d18f08eeb2bfb48dfdd57b63eb62d
2018-07-18 10:22:55 +08:00
kaz_shinohara 64a60dd040 Add Blazar client plugin to Heat
Add a Blazar client plugin which will be used by a couple of Balazar
resources under development.

Change-Id: I0f68fc0525db3ba299d77019a102f24b9d3cea87
Task: 19754
Story: 2002085
2018-07-12 11:43:45 +09:00
Zane Bitter 50c634935d Fix lower-constraints
In the course of switching over to lower-constraints, the lower
constraints got out of sync with the requirements. This change fixes the
constraints using the script mentioned in
http://lists.openstack.org/pipermail/openstack-dev/2018-April/129056.html

Change-Id: Iae317fa745862ebde4115ca8e77a26c6c9be20ac
2018-04-11 14:49:38 -04:00
OpenStack Proposal Bot 8815b65d32 Updated from global requirements
Change-Id: If19195b9d1c28c45d62636ed5078b0e7bc5caefa
2018-03-28 08:56:08 +00:00