Fix gates for Zed and update Django
* Zuul deprecated (and now removed) declaring shared queues at a pipeline level [1]. This patch fixes the syntax to make the gate work for adjutant. * Update TOX_CONSTRAINTS_FILE for stable/zed * Updates Django version to allow upper-constraints version * Fix Django 3.2 warnings * Fix flake8 errors * Remove support for Python 3.6, Python 3.7 [1] https://lists.openstack.org/pipermail/openstack-discuss/2022-May/028603.html Change-Id: I9d61eec5da5b27a40241192fb9258d58067f6d35
This commit is contained in:
parent
b305d7285f
commit
aec9077dcf
@ -11,15 +11,15 @@
|
||||
|
||||
|
||||
- project:
|
||||
queue: adjutant
|
||||
templates:
|
||||
- publish-openstack-docs-pti
|
||||
- build-release-notes-jobs-python3
|
||||
- openstack-cover-jobs
|
||||
- openstack-python3-yoga-jobs
|
||||
- openstack-python3-zed-jobs
|
||||
check:
|
||||
jobs:
|
||||
- adjutant-black-style-check
|
||||
gate:
|
||||
queue: adjutant
|
||||
jobs:
|
||||
- adjutant-black-style-check
|
||||
- adjutant-black-style-check
|
||||
|
@ -23,10 +23,9 @@ to external systems as needed.
|
||||
|
||||
Useful for automating generic admin tasks that users might request but
|
||||
otherwise can't do without the admin role. Also allows automating the
|
||||
signup and creation of new users, but also allows such requests to
|
||||
require approval first if wanted. Due to issuing of uri+tokens for
|
||||
final steps of some actions, allows for a password submit/reset system
|
||||
as well.
|
||||
signup and creation of new users, and allows such requests to require
|
||||
approval first if wanted. Due to issuing of uri+tokens for final steps
|
||||
of some actions, allows for a password submit/reset system as well.
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.2.16 on 2022-12-07 00:13
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("actions", "0004_auto_20190610_0209"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="action",
|
||||
name="auto_approve",
|
||||
field=models.BooleanField(default=None, null=True),
|
||||
),
|
||||
]
|
@ -40,7 +40,7 @@ class Action(models.Model):
|
||||
# Can be thought of in terms of priority, None has the
|
||||
# lowest priority, then True with False having the
|
||||
# highest priority
|
||||
auto_approve = models.NullBooleanField(default=None)
|
||||
auto_approve = models.BooleanField(default=None, null=True)
|
||||
order = models.IntegerField()
|
||||
created = models.DateTimeField(default=timezone.now)
|
||||
|
||||
|
@ -211,10 +211,10 @@ class ResetUserPasswordAction(UserNameAction, UserMixin):
|
||||
def _validate_user_roles(self):
|
||||
id_manager = user_store.IdentityManager()
|
||||
|
||||
roles = id_manager.get_all_roles(self.user)
|
||||
all_roles = id_manager.get_all_roles(self.user)
|
||||
|
||||
user_roles = []
|
||||
for roles in roles.values():
|
||||
for roles in all_roles.values():
|
||||
user_roles.extend(role.name for role in roles)
|
||||
|
||||
if set(self.config.blacklisted_roles) & set(user_roles):
|
||||
|
@ -1,10 +1,10 @@
|
||||
pbr>=5.2.0
|
||||
|
||||
Django>=2.2,<2.3
|
||||
Django>=3.2.12
|
||||
Babel>=2.6.0
|
||||
decorator>=4.4.0
|
||||
django-rest-swagger>=2.2.0
|
||||
djangorestframework>=3.9.4
|
||||
djangorestframework>=3.14.0
|
||||
jsonfield>=2.0.2
|
||||
keystoneauth1>=3.14.0
|
||||
keystonemiddleware>=6.0.0
|
||||
|
@ -16,10 +16,8 @@ classifier =
|
||||
Intended Audience :: Developers
|
||||
Intended Audience :: System Administrators
|
||||
License :: OSI Approved :: Apache Software License
|
||||
Framework :: Django :: 2.2
|
||||
Framework :: Django :: 3.2
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3.6
|
||||
Programming Language :: Python :: 3.7
|
||||
Programming Language :: Python :: 3.8
|
||||
Environment :: OpenStack
|
||||
|
||||
|
8
tox.ini
8
tox.ini
@ -8,7 +8,7 @@ ignore_basepython_conflict = True
|
||||
usedevelop = True
|
||||
basepython = python3
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/zed}
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands =
|
||||
@ -39,7 +39,7 @@ commands = {posargs}
|
||||
|
||||
[testenv:docs]
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/zed}
|
||||
-r{toxinidir}/doc/requirements.txt
|
||||
commands =
|
||||
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
|
||||
@ -67,8 +67,8 @@ extension=.txt,.rst,.inc
|
||||
|
||||
[testenv:black]
|
||||
commands =
|
||||
black -t py36 .
|
||||
black -t py38 --exclude /(\.tox|\.venv|.*venv.*|build|dist)/ .
|
||||
|
||||
[testenv:black_check]
|
||||
commands =
|
||||
black -t py36 --check .
|
||||
black -t py38 --exclude /(\.tox|\.venv|.*venv.*|build|dist)/ --check .
|
||||
|
Loading…
x
Reference in New Issue
Block a user