From 901a863851908933367ede8d8a9a8a7904ed4622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Krienb=C3=BChl?= Date: Tue, 24 Jun 2025 15:00:53 +0200 Subject: [PATCH 1/6] Drop support for Python <3.9 --- .github/workflows/test.yml | 7 ++++--- tox.ini | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f66998a..5556a28 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,10 +9,11 @@ jobs: max-parallel: 4 matrix: python-version: - - "3.6" - - "3.7" - - "3.8" + - "3.9" - "3.10" + - "3.11" + - "3.12" + - "3.13" steps: - uses: actions/checkout@v3 diff --git a/tox.ini b/tox.ini index fda2ab6..606c83f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,15 @@ [tox] -envlist = py{36,37,38,310} +envlist = py{39,310,311,312,313} skip_missing_interpreters = True skipsdist = True [gh-actions] python = - 3.6: py36 - 3.7: py37 - 3.8: py38 + 3.9: py39 3.10: py310 + 3.11: py311 + 3.12: py312 + 3.13: py313 [testenv] deps = From 0eedf0b95ef62dc8da8764cacf5aa7b46f847eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Krienb=C3=BChl?= Date: Wed, 25 Jun 2025 09:33:06 +0200 Subject: [PATCH 2/6] Bump action releases --- .github/workflows/flake8.yml | 2 +- .github/workflows/publish_docs.yml | 6 +++--- .github/workflows/publish_pypi.yml | 4 ++-- .github/workflows/test.yml | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 44aedca..0542341 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -7,6 +7,6 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: GitHub Action for Flake8 uses: cclauss/GitHub-Action-for-Flake8@v0.5.0 diff --git a/.github/workflows/publish_docs.yml b/.github/workflows/publish_docs.yml index f2e43fb..add6d87 100644 --- a/.github/workflows/publish_docs.yml +++ b/.github/workflows/publish_docs.yml @@ -9,10 +9,10 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.8" @@ -39,7 +39,7 @@ jobs: - run: mkdocs build - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./site diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index 13f219f..50e3456 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -9,9 +9,9 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.x" - name: Install dependencies diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5556a28..587c37b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,9 +16,9 @@ jobs: - "3.13" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -29,7 +29,7 @@ jobs: run: tox - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml From 6985c8d8667359978a05d2486346e32864e33a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Krienb=C3=BChl?= Date: Tue, 24 Jun 2025 16:11:47 +0200 Subject: [PATCH 3/6] Fix some commands not showing with newer click releases --- cloudscale_cli/cli.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/cloudscale_cli/cli.py b/cloudscale_cli/cli.py index d5543ba..d8bfb47 100644 --- a/cloudscale_cli/cli.py +++ b/cloudscale_cli/cli.py @@ -53,14 +53,14 @@ def cli(ctx, profile, api_token, debug, output, verbose): ) -cli.add_command(custom_image) -cli.add_command(flavor) -cli.add_command(floating_ip) -cli.add_command(image) -cli.add_command(network) -cli.add_command(objects_user) -cli.add_command(region) -cli.add_command(server_group) -cli.add_command(server) -cli.add_command(subnet) -cli.add_command(volume) +cli.add_command(custom_image, name='custom-image') +cli.add_command(flavor, name='flavor') +cli.add_command(floating_ip, name='floating-ip') +cli.add_command(image, name='image') +cli.add_command(network, name='network') +cli.add_command(objects_user, name='objects-user') +cli.add_command(region, name='region') +cli.add_command(server_group, name='server-group') +cli.add_command(server, name='server') +cli.add_command(subnet, name='subnet') +cli.add_command(volume, name='volume') From b2b96b36197a9e1821890b87e151a0d03f74dfde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Krienb=C3=BChl?= Date: Tue, 24 Jun 2025 16:12:21 +0200 Subject: [PATCH 4/6] Fix tests failing with click 8.2+ --- tests/test_common.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_common.py b/tests/test_common.py index f924038..f31550c 100644 --- a/tests/test_common.py +++ b/tests/test_common.py @@ -5,4 +5,11 @@ def test_list_commands(): runner = CliRunner() result = runner.invoke(cli, []) + + # Since click 8.2, the exit code is 2, when usage is invoked without + # -h/--help. Since we support older releases as well, it can be one of two. + assert result.exit_code in (0, 2) + + # This can be avoided by asking for help + result = runner.invoke(cli, ['--help']) assert result.exit_code == 0 From e49954fd4344dddad04836d2f7813df2b818a40d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Krienb=C3=BChl?= Date: Tue, 24 Jun 2025 16:19:43 +0200 Subject: [PATCH 5/6] Fix issues with mock responses in tests - They included bodies in HTTP 204 responses (not RFC2626 compatible). - They were not formatted consistently. While the formatting may be up to taste, the RFC2626 compatibiliity is enforced by newer releases of the `responses` library. --- tests/test_custom_image.py | 5 +++-- tests/test_flavor.py | 12 +++++++++-- tests/test_floating_ip.py | 10 ++++++--- tests/test_image.py | 12 +++++++++-- tests/test_network.py | 38 ++++++++++++++++++++++++++-------- tests/test_objects_user.py | 21 +++++++++++++------ tests/test_region.py | 12 +++++++++-- tests/test_server.py | 34 ++++++++++++++++++++++-------- tests/test_server_group.py | 10 +++++---- tests/test_subnet.py | 39 +++++++++++++++++++++++++++-------- tests/test_volume.py | 42 ++++++++++++++++++++++++++++++-------- 11 files changed, 181 insertions(+), 54 deletions(-) diff --git a/tests/test_custom_image.py b/tests/test_custom_image.py index 63d287e..d0d0ca1 100644 --- a/tests/test_custom_image.py +++ b/tests/test_custom_image.py @@ -111,7 +111,9 @@ def test_custom_images_delete(): status=200, ) responses.add( - responses.DELETE, CLOUDSCALE_API_URL + "/custom-images/" + uuid, status=204 + responses.DELETE, + CLOUDSCALE_API_URL + "/custom-images/" + uuid, + status=204, ) runner = CliRunner() @@ -255,7 +257,6 @@ def test_custom_images_update(): responses.add( responses.PATCH, CLOUDSCALE_API_URL + "/custom-images/" + uuid, - json=CUSTOM_IMAGE_RESP, status=204, ) responses.add( diff --git a/tests/test_flavor.py b/tests/test_flavor.py index 0aa58e3..e725ae6 100644 --- a/tests/test_flavor.py +++ b/tests/test_flavor.py @@ -15,9 +15,17 @@ @responses.activate def test_flavor_get_all(): responses.add( - responses.GET, CLOUDSCALE_API_URL + "/flavors", json=[FLAVOR_RESP], status=200 + responses.GET, + CLOUDSCALE_API_URL + "/flavors", + json=[FLAVOR_RESP], + status=200, + ) + responses.add( + responses.GET, + CLOUDSCALE_API_URL + "/flavors", + json={}, + status=500, ) - responses.add(responses.GET, CLOUDSCALE_API_URL + "/flavors", json={}, status=500) runner = CliRunner() result = runner.invoke( diff --git a/tests/test_floating_ip.py b/tests/test_floating_ip.py index f47e495..83670e3 100644 --- a/tests/test_floating_ip.py +++ b/tests/test_floating_ip.py @@ -30,7 +30,10 @@ def test_floating_ip_get_all(): status=200, ) responses.add( - responses.GET, CLOUDSCALE_API_URL + "/floating-ips", json={}, status=500 + responses.GET, + CLOUDSCALE_API_URL + "/floating-ips", + json={}, + status=500, ) runner = CliRunner() @@ -105,7 +108,9 @@ def test_floating_ip_delete(): status=200, ) responses.add( - responses.DELETE, CLOUDSCALE_API_URL + "/floating-ips/" + network_id, status=204 + responses.DELETE, + CLOUDSCALE_API_URL + "/floating-ips/" + network_id, + status=204, ) responses.add( responses.DELETE, @@ -222,7 +227,6 @@ def test_floating_ip_update(): responses.add( responses.PATCH, CLOUDSCALE_API_URL + "/floating-ips/" + network_id, - json=FLOATING_IP_RESP, status=204, ) responses.add( diff --git a/tests/test_image.py b/tests/test_image.py index b19b2fa..4ba7a97 100644 --- a/tests/test_image.py +++ b/tests/test_image.py @@ -15,9 +15,17 @@ @responses.activate def test_image_get_all(): responses.add( - responses.GET, CLOUDSCALE_API_URL + "/images", json=[IMAGE_RESP], status=200 + responses.GET, + CLOUDSCALE_API_URL + "/images", + json=[IMAGE_RESP], + status=200, + ) + responses.add( + responses.GET, + CLOUDSCALE_API_URL + "/images", + json={}, + status=500, ) - responses.add(responses.GET, CLOUDSCALE_API_URL + "/images", json={}, status=500) runner = CliRunner() result = runner.invoke( diff --git a/tests/test_network.py b/tests/test_network.py index a1bacc7..e61f569 100644 --- a/tests/test_network.py +++ b/tests/test_network.py @@ -24,9 +24,17 @@ @responses.activate def test_network_get_all(): responses.add( - responses.GET, CLOUDSCALE_API_URL + "/networks", json=[NETWORK_RESP], status=200 + responses.GET, + CLOUDSCALE_API_URL + "/networks", + json=[NETWORK_RESP], + status=200, + ) + responses.add( + responses.GET, + CLOUDSCALE_API_URL + "/networks", + json={}, + status=500, ) - responses.add(responses.GET, CLOUDSCALE_API_URL + "/networks", json={}, status=500) runner = CliRunner() result = runner.invoke( @@ -61,7 +69,10 @@ def test_network_get_by_uuid(): status=200, ) responses.add( - responses.GET, CLOUDSCALE_API_URL + "/networks/" + uuid, json={}, status=500 + responses.GET, + CLOUDSCALE_API_URL + "/networks/" + uuid, + json={}, + status=500, ) runner = CliRunner() @@ -105,7 +116,9 @@ def test_network_delete(): status=200, ) responses.add( - responses.DELETE, CLOUDSCALE_API_URL + "/networks/" + uuid, status=204 + responses.DELETE, + CLOUDSCALE_API_URL + "/networks/" + uuid, + status=204, ) responses.add( responses.DELETE, @@ -158,9 +171,17 @@ def test_network_create(): name = "my-network-name" responses.add( - responses.POST, CLOUDSCALE_API_URL + "/networks", json=NETWORK_RESP, status=201 + responses.POST, + CLOUDSCALE_API_URL + "/networks", + json=NETWORK_RESP, + status=201, + ) + responses.add( + responses.POST, + CLOUDSCALE_API_URL + "/networks", + json={}, + status=500, ) - responses.add(responses.POST, CLOUDSCALE_API_URL + "/networks", json={}, status=500) runner = CliRunner() result = runner.invoke( @@ -196,7 +217,6 @@ def test_network_update(): responses.add( responses.PATCH, CLOUDSCALE_API_URL + "/networks/" + uuid, - json=NETWORK_RESP, status=204, ) responses.add( @@ -206,7 +226,9 @@ def test_network_update(): status=200, ) responses.add( - responses.PATCH, CLOUDSCALE_API_URL + "/networks/" + uuid, json={}, status=500 + responses.PATCH, + CLOUDSCALE_API_URL + "/networks/" + uuid, + status=500, ) runner = CliRunner() diff --git a/tests/test_objects_user.py b/tests/test_objects_user.py index b577a17..e5b5fc2 100644 --- a/tests/test_objects_user.py +++ b/tests/test_objects_user.py @@ -32,7 +32,10 @@ def test_objects_user_get_all(): status=200, ) responses.add( - responses.GET, CLOUDSCALE_API_URL + "/objects-users", json={}, status=500 + responses.GET, + CLOUDSCALE_API_URL + "/objects-users", + json={}, + status=500, ) runner = CliRunner() @@ -128,7 +131,9 @@ def test_objects_user_delete(): status=200, ) responses.add( - responses.DELETE, CLOUDSCALE_API_URL + "/objects-users/" + uuid, status=204 + responses.DELETE, + CLOUDSCALE_API_URL + "/objects-users/" + uuid, + status=204, ) responses.add( responses.DELETE, @@ -186,7 +191,10 @@ def test_objects_user_create(): status=201, ) responses.add( - responses.POST, CLOUDSCALE_API_URL + "/objects-users", json={}, status=500 + responses.POST, + CLOUDSCALE_API_URL + "/objects-users", + json={}, + status=500, ) responses.add( responses.POST, @@ -195,7 +203,10 @@ def test_objects_user_create(): status=201, ) responses.add( - responses.POST, CLOUDSCALE_API_URL + "/objects-users", json={}, status=500 + responses.POST, + CLOUDSCALE_API_URL + "/objects-users", + json={}, + status=500, ) runner = CliRunner() @@ -232,7 +243,6 @@ def test_objects_user_update(): responses.add( responses.PATCH, CLOUDSCALE_API_URL + "/objects-users/" + uuid, - json=OBJECTS_USER_RESP, status=204, ) responses.add( @@ -244,7 +254,6 @@ def test_objects_user_update(): responses.add( responses.PATCH, CLOUDSCALE_API_URL + "/objects-users/unknown", - json={}, status=404, ) diff --git a/tests/test_region.py b/tests/test_region.py index 5a2aeba..8f334a9 100644 --- a/tests/test_region.py +++ b/tests/test_region.py @@ -9,9 +9,17 @@ @responses.activate def test_region_get_all(): responses.add( - responses.GET, CLOUDSCALE_API_URL + "/regions", json=[REGION_RESP], status=200 + responses.GET, + CLOUDSCALE_API_URL + "/regions", + json=[REGION_RESP], + status=200, + ) + responses.add( + responses.GET, + CLOUDSCALE_API_URL + "/regions", + json={}, + status=500, ) - responses.add(responses.GET, CLOUDSCALE_API_URL + "/regions", json={}, status=500) runner = CliRunner() result = runner.invoke( diff --git a/tests/test_server.py b/tests/test_server.py index 39f013f..c22a68d 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -23,7 +23,10 @@ @responses.activate def test_server_get_all(): responses.add( - responses.GET, CLOUDSCALE_API_URL + "/servers", json=[SERVER_RESP], status=200 + responses.GET, + CLOUDSCALE_API_URL + "/servers", + json=[SERVER_RESP], + status=200, ) responses.add( responses.GET, @@ -58,7 +61,10 @@ def test_server_get_all(): @responses.activate def test_server_get_all_fitlered(): responses.add( - responses.GET, CLOUDSCALE_API_URL + "/servers", json=[SERVER_RESP], status=200 + responses.GET, + CLOUDSCALE_API_URL + "/servers", + json=[SERVER_RESP], + status=200, ) runner = CliRunner() @@ -128,7 +134,11 @@ def test_server_delete(): json=SERVER_RESP, status=200, ) - responses.add(responses.DELETE, CLOUDSCALE_API_URL + "/servers/" + uuid, status=204) + responses.add( + responses.DELETE, + CLOUDSCALE_API_URL + "/servers/" + uuid, + status=204, + ) responses.add( responses.DELETE, CLOUDSCALE_API_URL + "/servers/unknown", @@ -194,7 +204,10 @@ def test_server_create(): image = "debian9" responses.add( - responses.POST, CLOUDSCALE_API_URL + "/servers", json=SERVER_RESP, status=201 + responses.POST, + CLOUDSCALE_API_URL + "/servers", + json=SERVER_RESP, + status=201, ) responses.add( responses.POST, @@ -245,7 +258,6 @@ def test_server_update(): responses.add( responses.PATCH, CLOUDSCALE_API_URL + "/servers/" + uuid, - json=SERVER_RESP, status=204, ) responses.add( @@ -298,7 +310,9 @@ def test_server_update(): def test_server_start(): uuid = "47cec963-fcd2-482f-bdb6-24461b2d47b1" responses.add( - responses.POST, CLOUDSCALE_API_URL + "/servers/" + uuid + "/start", status=204 + responses.POST, + CLOUDSCALE_API_URL + "/servers/" + uuid + "/start", + status=204, ) responses.add( responses.GET, @@ -342,7 +356,9 @@ def test_server_start(): def test_server_stop(): uuid = "47cec963-fcd2-482f-bdb6-24461b2d47b1" responses.add( - responses.POST, CLOUDSCALE_API_URL + "/servers/" + uuid + "/stop", status=204 + responses.POST, + CLOUDSCALE_API_URL + "/servers/" + uuid + "/stop", + status=204, ) responses.add( responses.GET, @@ -386,7 +402,9 @@ def test_server_stop(): def test_server_reboot(): uuid = "47cec963-fcd2-482f-bdb6-24461b2d47b1" responses.add( - responses.POST, CLOUDSCALE_API_URL + "/servers/" + uuid + "/reboot", status=204 + responses.POST, + CLOUDSCALE_API_URL + "/servers/" + uuid + "/reboot", + status=204, ) responses.add( responses.GET, diff --git a/tests/test_server_group.py b/tests/test_server_group.py index af72dae..43b5945 100644 --- a/tests/test_server_group.py +++ b/tests/test_server_group.py @@ -34,7 +34,9 @@ def test_server_groups_get_all(): status=200, ) responses.add( - responses.GET, CLOUDSCALE_API_URL + "/server-groups", json={}, status=500 + responses.GET, + CLOUDSCALE_API_URL + "/server-groups", + status=500, ) runner = CliRunner() @@ -121,7 +123,9 @@ def test_server_groups_delete(): status=200, ) responses.add( - responses.DELETE, CLOUDSCALE_API_URL + "/server-groups/" + uuid, status=204 + responses.DELETE, + CLOUDSCALE_API_URL + "/server-groups/" + uuid, + status=204, ) responses.add( responses.DELETE, @@ -218,7 +222,6 @@ def test_server_groups_update(): responses.add( responses.PATCH, CLOUDSCALE_API_URL + "/server-groups/" + uuid, - json=SERVER_GROUP_RESP, status=204, ) responses.add( @@ -343,7 +346,6 @@ def test_invalid_tags_update(): responses.add( responses.PATCH, CLOUDSCALE_API_URL + "/server-groups/" + uuid, - json=SERVER_GROUP_RESP, status=204, ) responses.add( diff --git a/tests/test_subnet.py b/tests/test_subnet.py index 1fa7ed0..f700a4f 100644 --- a/tests/test_subnet.py +++ b/tests/test_subnet.py @@ -22,9 +22,17 @@ def test_subnet_get_all(): uuid = "33333333-1864-4608-853a-0771b6885a3a" responses.add( - responses.GET, CLOUDSCALE_API_URL + "/subnets", json=[SUBNET_RESP], status=200 + responses.GET, + CLOUDSCALE_API_URL + "/subnets", + json=[SUBNET_RESP], + status=200, + ) + responses.add( + responses.GET, + CLOUDSCALE_API_URL + "/subnets", + json={}, + status=500, ) - responses.add(responses.GET, CLOUDSCALE_API_URL + "/subnets", json={}, status=500) runner = CliRunner() result = runner.invoke( @@ -59,7 +67,10 @@ def test_subnet_get_by_uuid(): status=200, ) responses.add( - responses.GET, CLOUDSCALE_API_URL + "/subnets/" + uuid, json={}, status=500 + responses.GET, + CLOUDSCALE_API_URL + "/subnets/" + uuid, + json={}, + status=500, ) runner = CliRunner() @@ -114,7 +125,11 @@ def test_subnets_delete(): json=SUBNET_RESP, status=200, ) - responses.add(responses.DELETE, CLOUDSCALE_API_URL + "/subnets/" + uuid, status=204) + responses.add( + responses.DELETE, + CLOUDSCALE_API_URL + "/subnets/" + uuid, + status=204, + ) responses.add( responses.DELETE, CLOUDSCALE_API_URL + "/subnets/unknown", @@ -167,10 +182,16 @@ def test_subnets_create(): dns_server1 = "185.79.232.101" dns_server2 = "185.79.232.102" responses.add( - responses.POST, CLOUDSCALE_API_URL + "/subnets", json=SUBNET_RESP, status=201 + responses.POST, + CLOUDSCALE_API_URL + "/subnets", + json=SUBNET_RESP, + status=201, ) responses.add( - responses.POST, CLOUDSCALE_API_URL + "/subnets", json=SUBNET_RESP, status=500 + responses.POST, + CLOUDSCALE_API_URL + "/subnets", + json=SUBNET_RESP, + status=500, ) runner = CliRunner() @@ -220,7 +241,6 @@ def test_subnets_update(): responses.add( responses.PATCH, CLOUDSCALE_API_URL + "/subnets/" + uuid, - json=SUBNET_RESP, status=204, ) responses.add( @@ -230,7 +250,10 @@ def test_subnets_update(): status=200, ) responses.add( - responses.PATCH, CLOUDSCALE_API_URL + "/subnets/" + uuid, json={}, status=500 + responses.PATCH, + CLOUDSCALE_API_URL + "/subnets/" + uuid, + json={}, + status=500, ) runner = CliRunner() diff --git a/tests/test_volume.py b/tests/test_volume.py index 364ccd6..903185e 100644 --- a/tests/test_volume.py +++ b/tests/test_volume.py @@ -19,9 +19,17 @@ @responses.activate def test_volume_get_all(): responses.add( - responses.GET, CLOUDSCALE_API_URL + "/volumes", json=[VOLUME_RESP], status=200 + responses.GET, + CLOUDSCALE_API_URL + "/volumes", + json=[VOLUME_RESP], + status=200, + ) + responses.add( + responses.GET, + CLOUDSCALE_API_URL + "/volumes", + json={}, + status=500, ) - responses.add(responses.GET, CLOUDSCALE_API_URL + "/volumes", json={}, status=500) runner = CliRunner() result = runner.invoke( @@ -56,7 +64,10 @@ def test_volume_get_by_uuid(): status=200, ) responses.add( - responses.GET, CLOUDSCALE_API_URL + "/volumes/" + uuid, json={}, status=500 + responses.GET, + CLOUDSCALE_API_URL + "/volumes/" + uuid, + json={}, + status=500, ) runner = CliRunner() @@ -99,7 +110,11 @@ def test_volume_delete(): json=VOLUME_RESP, status=200, ) - responses.add(responses.DELETE, CLOUDSCALE_API_URL + "/volumes/" + uuid, status=204) + responses.add( + responses.DELETE, + CLOUDSCALE_API_URL + "/volumes/" + uuid, + status=204, + ) responses.add( responses.DELETE, CLOUDSCALE_API_URL + "/volumes/unknown", @@ -151,9 +166,17 @@ def test_volume_create(): size_gb = 150 server_uuids = "2db69ba3-1864-4608-853a-0771b6885a3a" responses.add( - responses.POST, CLOUDSCALE_API_URL + "/volumes", json=VOLUME_RESP, status=201 + responses.POST, + CLOUDSCALE_API_URL + "/volumes", + json=VOLUME_RESP, + status=201, + ) + responses.add( + responses.POST, + CLOUDSCALE_API_URL + "/volumes", + json={}, + status=500, ) - responses.add(responses.POST, CLOUDSCALE_API_URL + "/volumes", json={}, status=500) runner = CliRunner() result = runner.invoke( @@ -198,7 +221,6 @@ def test_volume_update(): responses.add( responses.PATCH, CLOUDSCALE_API_URL + "/volumes/" + uuid, - json=VOLUME_RESP, status=204, ) responses.add( @@ -208,7 +230,10 @@ def test_volume_update(): status=200, ) responses.add( - responses.PATCH, CLOUDSCALE_API_URL + "/volumes/" + uuid, json={}, status=500 + responses.PATCH, + CLOUDSCALE_API_URL + "/volumes/" + uuid, + json={}, + status=500, ) runner = CliRunner() @@ -288,7 +313,6 @@ def test_volume_detach(): responses.add( responses.PATCH, CLOUDSCALE_API_URL + "/volumes/" + uuid, - json=VOLUME_RESP, status=204, ) responses.add( From e501d59f0a21cc3a4a908bcd8544e9358c204314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Krienb=C3=BChl?= Date: Tue, 24 Jun 2025 14:57:38 +0200 Subject: [PATCH 6/6] Release 1.5.0 --- CHANGELOG.md | 13 ++++++++++++- cloudscale_cli/version.py | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21523d0..1b1b641 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,20 @@ All notable changes to this project will be documented in this file. +## v1.5.0 (2025-06-24) + +### Minor changes + +- Add qcow2 as supported image import format. +- Drop support for Python <3.9. + +### Bug fixes + +- Fix some commands not showing up in certain configurations. + ## v1.4.0 (2021-05-03) -### Minor Chages +### Minor changes - Implemented interface support. diff --git a/cloudscale_cli/version.py b/cloudscale_cli/version.py index 3e8d9f9..5b60188 100644 --- a/cloudscale_cli/version.py +++ b/cloudscale_cli/version.py @@ -1 +1 @@ -__version__ = "1.4.0" +__version__ = "1.5.0"