diff --git a/bindep.txt b/bindep.txt index 19ab91d09..acdab5ff1 100644 --- a/bindep.txt +++ b/bindep.txt @@ -10,5 +10,7 @@ redis-server [platform:dpkg] dev-db/redis [platform:gentoo] default-libmysqlclient-dev [platform:dpkg] libmysqlclient-devel [platform:suse] -mysql-client [platform:dpkg] -mysql-server [platform:dpkg] +mysql-client [platform:dpkg !platform:debian] +mysql-server [platform:dpkg !platform:debian] +mariadb-client [platform:debian] +mariadb-server [platform:debian] diff --git a/tools/test-setup.sh b/tools/test-setup.sh index 1144c9af2..6bd194e1e 100755 --- a/tools/test-setup.sh +++ b/tools/test-setup.sh @@ -44,11 +44,20 @@ if [[ $ubuntu_version == '22.04' ]]; then sudo apt install -y mongodb-org sudo systemctl restart mongod sudo systemctl status mongod +elif [[ $ubuntu_version == '12' ]]; then + wget -qO - https://www.mongodb.org/static/pgp/server-7.0.asc | sudo apt-key add - + echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list + echo "deb http://security.ubuntu.com/ubuntu bionic-security main" | sudo tee /etc/apt/sources.list.d/bionic-security.list + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 + sudo apt update + sudo apt install -y libssl1.1 + sudo apt install -y mongodb-org + sudo systemctl restart mongod + sudo systemctl status mongod else sudo apt-get install -y mongodb sudo systemctl restart mongodb fi -sudo apt install -y pip -pip install setuptools +sudo apt install -y pip python3-setuptools sudo python3 setup.py install diff --git a/zaqar/tests/unit/storage/sqlalchemy_migration/test_migrations.py b/zaqar/tests/unit/storage/sqlalchemy_migration/test_migrations.py index 138becccf..cf315189d 100644 --- a/zaqar/tests/unit/storage/sqlalchemy_migration/test_migrations.py +++ b/zaqar/tests/unit/storage/sqlalchemy_migration/test_migrations.py @@ -30,7 +30,6 @@ postgres=# create database openstack_citest with owner openstack_citest; """ -from oslo_db.sqlalchemy import test_base from oslo_db.sqlalchemy import utils as db_utils from zaqar.tests.unit.storage.sqlalchemy_migration import \ @@ -168,6 +167,5 @@ class ZaqarMigrationsCheckers(object): class TestMigrationsMySQL(ZaqarMigrationsCheckers, - base.BaseWalkMigrationTestCase, - test_base.MySQLOpportunisticTestCase): + base.BaseWalkMigrationTestCase): pass diff --git a/zaqar/transport/wsgi/v2_0/flavors.py b/zaqar/transport/wsgi/v2_0/flavors.py index c27f2b140..6a9a0d50d 100644 --- a/zaqar/transport/wsgi/v2_0/flavors.py +++ b/zaqar/transport/wsgi/v2_0/flavors.py @@ -95,8 +95,7 @@ class Listing(object): entry['pool_list'] = pool_name_list if detailed: caps = self._pools_ctrl.capabilities(flavor=entry) - entry['capabilities'] = [str(cap).split('.')[-1] - for cap in caps] + entry['capabilities'] = [cap.name for cap in caps] if detailed is not None: store['detailed'] = detailed @@ -149,8 +148,7 @@ class Resource(object): try: data = self._ctrl.get(flavor, project=project_id) capabilities = self._pools_ctrl.capabilities(flavor=data) - data['capabilities'] = [str(cap).split('.')[-1] - for cap in capabilities] + data['capabilities'] = [cap.name for cap in capabilities] pool_list =\ list(self._pools_ctrl.get_pools_by_flavor(flavor=data)) pool_name_list = [] @@ -307,8 +305,7 @@ class Resource(object): self._ctrl.update(flavor, project=project_id, capabilities=capabilities) resp_data = self._ctrl.get(flavor, project=project_id) - resp_data['capabilities'] = [str(cap).split('.')[-1] - for cap in capabilities] + resp_data['capabilities'] = [cap.name for cap in capabilities] except errors.FlavorDoesNotExist as ex: LOG.exception('Flavor "%s" does not exist', flavor) raise wsgi_errors.HTTPNotFound(str(ex))