fix: change tox.ini
fix: change queries for list_dimension_names and list_dimension_values because of influxdb time filter problem
fix: remove build_sphinx group from setup.cfg
fix: handle hashlib security problem
Change-Id: I0d31a8db5ed71c70e7b878ce5e7940e041d0fa43
Change-Id: I6f7066da10e834550cbf0c053c7bf425ac0ead93
Change-Id: If9575aee73d600bbc84fcdf58deb1c57b508d9c2
Change-Id: If515eaeee7539da3ca49997e88785dc65572b334
Replace removed Binary with LargeBinary import
Remove reflect=True from Alembic MetaData
Replace removed idle_timeout with connection_recycle_time option
- Binary was removed in SQLAlchemy 1.4.x [1]
- SQLAlchemy was updated to 1.4.15 in u-c [2]
- idle_timeout was removed in oslo.db 10.0.0 [3]
- oslo.db was updated to 10.0.0 in u-c [4]
- idle_timeout was already deprecated and renamed as
connection_recycle_time [5]
[1] https://github.com/sqlalchemy/sqlalchemy/issues/6263#issuecomment-819645247
[2] dc86260b28
[3] a857b83c9c
[4] f322cc13d8
[5] 6634218415
Change-Id: I13ec9c2b53174cfb2e3cb990ec773588cf68007c
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found by updated hacking version.
Remove hacking and friends from lower-constraints, they are not needed
there at all.
Change-Id: I35d848e9af297d3561ea2838a4808166d1c36601
The Stein release does away with the concept of built in notifications,
in favour of treating all notification types equally.
This patch fixes an issue with the DB schema migration associated
with this change, which will fail if any notifications using
built-in notification types are configured at the time of the upgrade.
Story: 2006984
Task: 37746
Change-Id: I2e3f08edf1ab6aec526ad93d04effb91ddca600a
SQL schema scripts are replaced with Alembic command line tool.
Notification plugins are enabled in notification engine configuration
file.
The change also fixes the `sub_alarm` table schema. The foreign key must
refer to the field with the same data type, charset and collation.
Otherwise the schema migration fails occasionally with Python 3 with the
IntegrityError[1]:
oslo_db.exception.DBError: (pymysql.err.IntegrityError) (1215, 'Cannot add foreign key constraint')
[1] http://logs.openstack.org/61/622361/8/gate/monasca-tempest-python3-influxdb/26104a3/controller/logs/devstacklog.txt.gz#_2019-01-30_15_52_45_455
Change-Id: I95d7e91e62ff13e84f963fdbb3bca6b7dfd7c310
Story: 2001654
Task: 14421
Add an alembic migration to remove the built-in plugins. Monasca-notification
becomes responsible for creating them, if they are enabled in the
monasca-notification config file. This also adds some very basic tests and
fixes an issue with Python 3 support (highlighted by the tests) where the
schema was stored as unicode which prevented hashing.
Story: 2003801
Task: 26533
Change-Id: I74848bac2137e446c8825f23778f6a16a96a2048
This commit adds a schema management tool for the Monasca
configuration database. Apart from the usual OpenStack schema
management tool subcommands (stamp, upgrade, version) it has
two extra subcommands:
* fingerprint: for computing a SHA1 fingerprint of the
currently currently active database schema.
* detect-revision: for identifiying the Alembic revision
(if any) corresponding to a database
schema that was created with one of the
legacy SQL scripts.
The data provided by the detect-revision subcommand can be
used for stamping the database with Alembic version metadata
when transitioning an existing Monasca configuration database
to Alembic based database migrations.
Story: 2001654
Task: 14341
Change-Id: Ibdd877a23ab5d6d1bbf8d83515c0197554098526
This commit adds
* An alembic environment for running database migrations
* Alembic database migrations for all revisions
of the legacy SQL script currently being used to set up the
Monasca database.
* The get_all_metadata() function for exposing full data model
metadata. This function is needed generating migrations from
the current state of the model and should be kept up to date
as the model is being extended.
Change-Id: I41b4577d8334791f712177348cadfe9b07b62ef1
Story: 2001654
Task: 14339