Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: openstack
base: core24
base: core26
summary: Dead simple OpenStack installation
license: Apache-2.0
description: |
Expand Down Expand Up @@ -88,7 +88,7 @@ parts:
- --prefix=
- --enable-build-raft
stage-packages:
- libuv1
- libuv1t64
- liblz4-1
- libsqlite3-0
build-packages:
Expand Down Expand Up @@ -249,18 +249,21 @@ parts:
- cargo
stage-packages:
- openssh-client
- python3-venv
override-build: |
uv export --directory sunbeam-python --extra=openstackclients --frozen --no-hashes --format=requirements-txt -o requirements.txt
craftctl default
override-prime: |
craftctl default
# Write out snap hooks
snap-helpers write-hooks
./bin/python3 ./bin/snap-helpers write-hooks
# Keep hooks on the snap's virtual environment when run by snapd.
sed -i '1c\#!/snap/openstack/current/bin/python3' snap/hooks/*
# This is the last step, let's now compile all our pyc files.
./bin/python3 -m compileall .
# Generate completer script snippets
mkdir -p usr/share/bash-completion/completions
./bin/openstack complete > usr/share/bash-completion/completions/openstack
./bin/python3 ./bin/openstack complete > usr/share/bash-completion/completions/openstack
echo "complete -F _openstack openstack.openstack" >> usr/share/bash-completion/completions/openstack
# Pre-generate sunbeam completion cache
cp completions/sunbeam-completion usr/share/bash-completion/completions/sunbeam-completion
Expand Down
16 changes: 10 additions & 6 deletions sunbeam-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "sunbeam"
version = "2026.1"
requires-python = "~=3.12.0"
requires-python = ">=3.12, <3.15"
license-files = ["LICENSE"]
description = "The simple way to build and manage your OpenStack Cloud"
readme = "README.md"
Expand All @@ -25,6 +25,7 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.14",
]

dependencies = [
Expand All @@ -38,7 +39,8 @@ dependencies = [
"petname", # Used in the launch command to launch an instance
"pexpect", # Interactive subprocess execution
"pwgen",
"pydantic", # For Manifest dataclasses
"pydantic; python_version < '3.14'", # For Manifest dataclasses
"pydantic>=2.12; python_version >= '3.14'",
"pyroute2",
"python-libmaas",
"pyyaml>=6.0",
Expand Down Expand Up @@ -302,7 +304,7 @@ constraint-dependencies = [
"jira===3.8.0",
"extras===1.0.0",
"PyJWT===2.10.1",
"typing_extensions===4.12.2",
"typing_extensions===4.12.2; python_version < '3.14'",
"XStatic-lodash===4.16.4.2",
"zVMCloudConnector===1.6.3",
"paramiko===3.5.1",
Expand All @@ -326,7 +328,8 @@ constraint-dependencies = [
"beautifulsoup4===4.13.3",
"ovs===3.5.0",
"cryptography===43.0.3",
"httpcore===1.0.7",
"httpcore===1.0.7; python_version < '3.14'",
"httpcore>=1.0.9; python_version >= '3.14'",
"URLObject===2.4.3",
"psycopg2-binary===2.9.10",
"glance_store===4.9.1",
Expand All @@ -351,7 +354,7 @@ constraint-dependencies = [
"os-client-config===2.1.0",
"XStatic-Angular-Gettext===2.4.1.0",
"Deprecated===1.2.18",
"h11===0.14.0",
"h11===0.14.0; python_version < '3.14'",
"Pygments===2.19.1",
"XStatic-Hogan===2.0.0.3",
"XStatic-objectpath===1.2.1.0",
Expand Down Expand Up @@ -538,7 +541,8 @@ constraint-dependencies = [
"oslo.config===9.7.1",
"openstackdocstheme===3.4.1",
"osc-placement===4.6.0",
"rpds-py===0.23.1",
"rpds-py===0.23.1; python_version < '3.14'",
"rpds-py>=0.30.0; python_version >= '3.14'",
"zake===0.2.2",
"flux===1.3.5",
"pysnmpcrypto===0.0.4",
Expand Down
17 changes: 17 additions & 0 deletions sunbeam-python/tests/unit/sunbeam/steps/test_k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,23 @@ def test_get_kube_client_success(
)
assert result == mock_client.return_value

@patch("sunbeam.steps.k8s.read_config")
def test_get_kube_client_initializes_http_transport(self, mock_read_config, client):
mock_read_config.return_value = {
"apiVersion": "v1",
"kind": "Config",
"current-context": "test",
"clusters": [
{"name": "test", "cluster": {"server": "https://localhost:6443"}}
],
"contexts": [
{"name": "test", "context": {"cluster": "test", "user": "test"}}
],
"users": [{"name": "test", "user": {}}],
}

assert isinstance(get_kube_client(client), lightkube.Client)

@patch("sunbeam.steps.k8s.read_config", side_effect=ConfigItemNotFoundException)
@patch(
"sunbeam.steps.k8s.K8SHelper.get_kubeconfig_key", return_value="kubeconfig-key"
Expand Down
Loading
Loading