Skip to content

Commit 222611d

Browse files
authored
Merge pull request #267 from stackhpc/upstream/master-2026-05-11
Synchronise master with upstream
2 parents b104137 + b212d6e commit 222611d

5 files changed

Lines changed: 128 additions & 66 deletions

File tree

.zuul.d/magnum-cluster-api.yaml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
- job:
2+
name: magnum-cluster-api
3+
parent: devstack
4+
abstract: true
5+
timeout: 7200
6+
override-checkout: master
7+
required-projects:
8+
- name: github.com/vexxhost/magnum-cluster-api
9+
override-checkout: main
10+
- opendev.org/openstack/barbican
11+
- opendev.org/openstack/magnum
12+
- opendev.org/openstack/manila
13+
- opendev.org/openstack/octavia
14+
- opendev.org/openstack/ovn-octavia-provider
15+
- opendev.org/openstack/python-magnumclient
16+
vars:
17+
devstack_plugins:
18+
barbican: https://github.com/openstack/barbican
19+
magnum: https://review.opendev.org/openstack/magnum
20+
manila: https://github.com/openstack/manila
21+
octavia: https://github.com/openstack/octavia
22+
ovn-octavia-provider: https://github.com/openstack/ovn-octavia-provider
23+
magnum-cluster-api: https://github.com/vexxhost/magnum-cluster-api
24+
devstack_localrc:
25+
DISABLE_AMP_IMAGE_BUILD: true
26+
FIXED_RANGE: 10.1.0.0/20
27+
GIT_BASE: https://github.com
28+
MAGNUM_GUEST_IMAGE_URL: "{{ image_url }}"
29+
MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS: snapshot_support=True create_share_from_snapshot_support=True
30+
MANILA_ENABLED_BACKENDS: generic
31+
MANILA_USE_SERVICE_INSTANCE_PASSWORD: true
32+
OCTAVIA_NODE: api
33+
devstack_local_conf:
34+
post-config:
35+
/etc/manila/manila.conf:
36+
generic:
37+
driver_handles_share_servers: true
38+
connect_share_server_to_tenant_network: true
39+
/etc/magnum/magnum.conf:
40+
cluster_template:
41+
kubernetes_allowed_network_drivers: calico,cilium
42+
kubernetes_default_network_driver: calico
43+
nova_client:
44+
api_version: 2.15
45+
devstack_services:
46+
s-account: false
47+
s-container: false
48+
s-object: false
49+
s-proxy: false
50+
octavia: true
51+
o-api: true
52+
o-hk: true
53+
o-da: true
54+
image_url: "https://github.com/vexxhost/capo-image-elements/releases/latest/download/ubuntu-22.04-{{ kube_tag }}.qcow2"
55+
nodeset:
56+
nodes:
57+
- name: controller
58+
label: ubuntu-noble-16GB
59+
groups:
60+
- name: tempest
61+
nodes:
62+
- controller
63+
64+
- job:
65+
name: magnum-cluster-api-v1.35.4
66+
parent: magnum-cluster-api
67+
vars:
68+
kube_tag: v1.35.4
69+
70+
- job:
71+
name: magnum-cluster-api-v1.35.4-calico
72+
parent: magnum-cluster-api-v1.35.4
73+
vars:
74+
network_driver: calico
75+
76+
- job:
77+
name: magnum-cluster-api-v1.35.4-cilium
78+
parent: magnum-cluster-api-v1.35.4
79+
vars:
80+
network_driver: cilium
81+
82+
- project-template:
83+
name: magnum-cluster-api
84+
description: |
85+
magnum-cluster-api jobs
86+
check:
87+
jobs:
88+
- magnum-cluster-api-v1.35.4-calico
89+
- magnum-cluster-api-v1.35.4-cilium
90+
gate:
91+
jobs:
92+
- magnum-cluster-api-v1.35.4-calico
93+
- magnum-cluster-api-v1.35.4-cilium

.zuul.d/project.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
- project:
2+
queue: magnum
3+
templates:
4+
- check-requirements
5+
- magnum-cluster-api
6+
- openstack-cover-jobs
7+
- openstack-python3-jobs
8+
- publish-openstack-docs-pti
9+
- release-notes-jobs-python3
10+
check:
11+
jobs:
12+
- magnum-tempest-plugin-tests-api
13+
gate:
14+
jobs:
15+
- magnum-tempest-plugin-tests-api

.zuul.yaml

Lines changed: 0 additions & 40 deletions
This file was deleted.

magnum/db/sqlalchemy/migration.py

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,19 @@
1616

1717
import os
1818

19-
from oslo_db.sqlalchemy.migration_cli import manager
19+
from alembic import command as alembic_command
20+
from alembic import config as alembic_config
21+
from alembic import migration as alembic_migration
22+
from oslo_db.sqlalchemy import enginefacade
2023

21-
import magnum.conf
2224

23-
CONF = magnum.conf.CONF
24-
_MANAGER = None
25-
26-
27-
def get_manager():
28-
global _MANAGER
29-
if not _MANAGER:
30-
alembic_path = os.path.abspath(
31-
os.path.join(os.path.dirname(__file__), 'alembic.ini'))
32-
migrate_path = os.path.abspath(
33-
os.path.join(os.path.dirname(__file__), 'alembic'))
34-
migration_config = {'alembic_ini_path': alembic_path,
35-
'alembic_repo_path': migrate_path,
36-
'db_url': CONF.database.connection}
37-
_MANAGER = manager.MigrationManager(migration_config)
38-
39-
return _MANAGER
25+
def _get_alembic_config():
26+
ini_path = os.path.join(os.path.dirname(__file__), 'alembic.ini')
27+
cfg = alembic_config.Config(ini_path)
28+
cfg.set_main_option(
29+
'script_location',
30+
os.path.join(os.path.dirname(__file__), 'alembic'))
31+
return cfg
4032

4133

4234
def version():
@@ -45,7 +37,10 @@ def version():
4537
:returns: Database version
4638
:rtype: string
4739
"""
48-
return get_manager().version()
40+
engine = enginefacade.writer.get_engine()
41+
with engine.connect() as conn:
42+
ctx = alembic_migration.MigrationContext.configure(conn)
43+
return ctx.get_current_revision()
4944

5045

5146
def upgrade(version):
@@ -55,8 +50,7 @@ def upgrade(version):
5550
:type version: string
5651
"""
5752
version = version or 'head'
58-
59-
get_manager().upgrade(version)
53+
alembic_command.upgrade(_get_alembic_config(), version)
6054

6155

6256
def stamp(revision):
@@ -68,7 +62,7 @@ def stamp(revision):
6862
database with most recent revision
6963
:type revision: string
7064
"""
71-
get_manager().stamp(revision)
65+
alembic_command.stamp(_get_alembic_config(), revision)
7266

7367

7468
def revision(message=None, autogenerate=False):
@@ -80,4 +74,5 @@ def revision(message=None, autogenerate=False):
8074
state
8175
:type autogenerate: bool
8276
"""
83-
return get_manager().revision(message=message, autogenerate=autogenerate)
77+
return alembic_command.revision(
78+
_get_alembic_config(), message=message, autogenerate=autogenerate)

setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description_file =
66
author = OpenStack
77
author_email = openstack-dev@lists.openstack.org
88
home_page = http://docs.openstack.org/magnum/latest/
9-
python_requires = >=3.10
9+
python_requires = >=3.11
1010
classifier =
1111
Environment :: OpenStack
1212
Intended Audience :: Information Technology
@@ -17,7 +17,6 @@ classifier =
1717
Programming Language :: Python :: Implementation :: CPython
1818
Programming Language :: Python :: 3 :: Only
1919
Programming Language :: Python :: 3
20-
Programming Language :: Python :: 3.10
2120
Programming Language :: Python :: 3.11
2221
Programming Language :: Python :: 3.12
2322
Programming Language :: Python :: 3.13

0 commit comments

Comments
 (0)