28 Commits

Author SHA1 Message Date
Takashi Kajinami
5d3e036b08 Remove six
The six library was used to keep compatibility with both Python 2 and 3
but Python 3 support was already removed.

Change-Id: I5ab003d024f538469854b771279de6aafea90a16
2025-02-11 00:55:41 +09:00
Dale Smith
b368c65bb9 Removal of django-rest-swagger
The library is end of life and out of date for recent python.

This change completes the removal from Adjutant, as was
started in I102e94c8172f6ea660814dd8fcd44ed8239b2e67

A viable replacement library may be drf-yasg, and may be
implemented in the future.

Co-Authored-By: matthewnorthcott@catalystcloud.nz
Change-Id: Ifd43db86f801bd16aea358245c0e8a5392e66d55
2025-01-20 09:18:01 +13:00
Dale Smith
7cdf620889 Replace pkg_resources with importlib, remove debug docs.
As of Python 3.8, importlib.metadata is the provisional
replacement for pkg_resources which depended on setuptools.

In python 3.10 this is no longer provisional and supersedes
pkg_resources with the same functionality.

Also remove rest_framework_swagger which provides the `/docs/`
endpoint temporarily. The library is end of life and should be
replaced with drf-yasg or similar.

Ref: https://importlib-metadata.readthedocs.io/en/latest/migration.html
Ref: https://docs.python.org/3/library/importlib.metadata.html

Change-Id: I102e94c8172f6ea660814dd8fcd44ed8239b2e67
2024-11-25 13:29:30 +13:00
Dale Smith
96fa3ea6e4 Upgrade to Django4
* Now supports py10, py11. Drop py8
* Update unit test template as per https://review.opendev.org/c/openstack/adjutant/+/904651

Change-Id: I1209cf9b35c42262396bbc0e00898110e3111255
2024-07-11 11:38:40 +12:00
Dale Smith
8ae383f9fe Fix gates for Antelope 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.
* 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: Ic369b59bb062df867d78b006f06e48cf9c98a3ee
2022-12-07 19:52:27 +13:00
Adrian Turjak
ad19ed13b6 remove mysqlclient from requirements
Change-Id: I59fc91858375b5bc3ae1bfd29409a1dcbc8b3e17
2021-03-03 15:28:32 +13:00
Simon Merrick
45160d3378 Add service helper for trove quota management
Change-Id: Ib09692b1451f1493394af755cbcd14cc96a36b02
2021-01-22 13:39:38 +13:00
Adrian Turjak
9dd1f3a302 Update CONFspirator with example and toml support
Example config generation now is in CONFspirator so we can instead
use that.

We now also natively get toml support through the new version of the
library.

Change-Id: Ic3a46d075dd83e11ee3cccc1ad2bbdb81005c60d
2020-08-07 20:28:24 +12:00
Adrian Turjak
ad81fdf706 Update to Django 2.2, drop py2 support
OpenStack is dropping the py2.7 support in Ussuri cycle.

Adjutant is also upgrading to Django 2.2 at the same time
which is the new Django LTS, and only supports python 3.

Complete discussion & schedule can be found in
-
http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I2a429ebd6bc20385e814da03b222a1f61214a683
2020-02-14 10:42:27 +13:00
Adrian Turjak
c750fd6d6c Rework Adjutant's config system to use CONFspirator
CONFspirator was written to just specifically for Adjutant
and it allows us to do oslo.config style config management
and definition with nested groups and for yaml.

This is a major change that touches vast amounts of the
code simply because of how much the config touches.

Actions, Tasks, DelegateAPIs, and Notification Handlers
now can define config in their own class and this will
be added to the config.

All the other config is located in `adjutant.config`,
with everything now registed nicely on the config tree,
and grouped in much saner ways.

CONFspirator will also now allow Adjutant to be entirely
configured via environment variables.

We have removed `modify_dict_settings` because that is
now entirely handled by CONFspirator's test utils.

`NotificationEngine`s are now `NotificationHandler`s.

`test_settings.py` is gone! And we now have better ways
to define test settings and defaults.

Project line length bumped to 88, and bugbear added to enforce
that instead.

Story: 2004488

Change-Id: I1d97d72d06b3a3a5df90355d3a4b4fe414381424
2020-02-05 19:07:04 +13:00
Adrian Turjak
afcf377ccb Update requirements files
Sync up requirement files with global-requirements,
and set tox default envs to be 'py3' over 'py35'

Change-Id: Ic78246a4a75b88027b4896664874d1efc587582c
2019-05-17 10:48:32 +12:00
Adrian Turjak
27ac3ae85b fix mysqlclient imcompatibility with current django LTS
Change-Id: I4fdda102c5927f5e00b96ee847f07be3a8b6a5e4
2019-01-31 14:57:54 +13:00
Amelia Cordwell
6508cc3804 Add Octavia (LBaaS) into quota management
* Turned off by default but can be configured

Change-Id: Ifa5a6e5b7a2c44cea5f799dc291c436eaa13d756
Implements: blueprint octavia-quota-service
2018-02-12 18:48:02 +13:00
Adrian Turjak
96e6291bad Bump keystonemiddleware version due to cache bug
4.19.0 introduced use of oslo.cache which made memcache
a requirement, this broke some things, version 4.20.0
makes that lazy loaded to stop unexpected import
requirements.

Change-Id: I7bdf02307be1ce559b92da1a43b8f02c122193ce
2018-01-10 16:57:21 +13:00
Amelia Cordwell
13cec7cf5e Remove RT Notification code
* Fixes python3 compatability.
* See bug #1699663

Change-Id: I6eab9f3632681c6b765def297d4ad083770ade25
2017-06-22 17:24:40 +12:00
adrian-turjak
cf100fc804 Update requirements file
* Updated to reflect versions currently used
* Updated Django safely to newest LTS (1.11).
  All tests pass, and existing code has been
  maintained with deprecation notices in expectation
  of this upgrade.
* Redid the docs url because of a new version
  causing an odd 500 error and because the schema
  method wasn't being used properly.

Change-Id: I991f825941a240eea7a5e408a540bc38afdd91be
2017-04-21 16:05:45 +12:00
adrian-turjak
16a607a66b Fix pbr to version 2.0.0
* This is to fix a breaking change with the current builds
  that fails when using versions greater than 2.0.0 of pbr.
* We will need to be addressed better in future once openstack
  libraries can work with newer pbr.

Change-Id: I3e8e547af7005ca06fc5bbc6064718b664507d96
2017-04-19 17:58:52 +12:00
Dale Smith
47527734e2 Adding Quota Update Action
* This action can be run for new projects to
  ensure their size matches a set of size templates.
* Changes can be applied separately per region and service.

Change-Id: I3ef0fe0ba1f9d7df6a6f68e30cadbc19bbc0306f
2016-11-01 14:48:04 +00:00
adrian-turjak
73e5018c9e Core library requirements update
Rather than cap libraries at older versions, I'm updating the code
to work with the newest libraries and methods.

Now using KeystoneAuth and Keystone Middleware via a specific auth
plugin and setting domain info.

Also fixing a minor bug in "user_store.py" which cropped up due to
issues when updating libraries.

Change-Id: I3e9e2f4ff3b6a1be94857622f171425ce70de969
2016-08-09 12:02:42 +01:00
adriant
e8ff4a1c40 Error clean up, error catching, require django <1.9
* cleaning up the error format in this function to match
  our standard format.
* Catching an error that can occur if the json is improperly decoded.
* fixing Django to the LTS support version as 1.9.1 breaks our automatic
  api documentation.

Change-Id: Ib3e452427989b376c55710ce33f73fabdc84260d
2016-02-26 09:57:47 +13:00
Dale Smith
6c8a4da2df Adding debian packaging with dh-virtualenv.
* Only installs code+virtualenv, not uwsgi etc
 * Build with: dpkg-buildpackage -us -uc

Change-Id: I18be6107592c065085c6a2cf49cf9bc061a8313f
2016-02-10 16:14:22 +13:00
adriant
068a0f49b3 Addressing 4.8 "Potentially Out Of Date Python Modules"
Change-Id: Ief22090fbb20c32a4157a2d5f0c498ede123d199
2016-02-03 11:22:20 +13:00
adriant
8b7f8d854a notification cleanup, and switch to rtkit
Change-Id: Iafbff0134ccbba9e63aa6a64f37c4e56db65df7e
2016-02-03 02:49:15 +13:00
adriant
95e9eb4ba3 notification changes
Mostly done, but does need proper tests.

* shift actions into their own sub folder structure for clarity
* create new sub folder for notications
* update other code to reflect those changes
* add first basic notification engine
* add RT notification engine
* minor django url and context changes to avoid future deprecation
* getting rid of secondary migration for column rename (as not in prod)

Change-Id: I46932b6d78b93e86580506c887548fd24c0750f5
2015-11-10 14:04:04 +13:00
adriant
f6c49c20d9 adding django rest swagger docs
also removing pointless admin views and models

Change-Id: If1dd178cac9d54f1a81f816b77708482e4d909b1
2015-08-05 14:53:04 +12:00
adriant
572b22a1a8 adding tox file and some changes to test setup
Change-Id: Icd1f3965e4c2617c16c3440e79df17aa4ca0ab0a
2015-07-31 16:44:03 +12:00
adriant
8d8efeeb3c renaming to Stack Task
slightly more friendly temporary name.

Change-Id: Ieeb0f61c8d95d0bb0d33bf50eeae2f51ec8b18f8
2015-03-26 12:03:49 +13:00
adriant
96cea92af0 Near Stable Code commit
Large commit with current existing code base.
The application mostly works, but for ease of
review I'm merging a lot of my commits and will
then do more consistent commits on top of this.

This code base is ready for review as a whole
and is unlikely to change drastically anymore.

Change-Id: Iecf75c44da28d3be14964a205cbe44dc3d9d5619
2015-02-18 12:08:35 +13:00