1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-04 08:01:49 +00:00
hetzner.hcloud/tests/integration/targets
Jonas L. 826e6a5309
feat: per location server types (#692)
[Server Types](https://docs.hetzner.cloud/reference/cloud#server-types)
now depend on
[Locations](https://docs.hetzner.cloud/reference/cloud#locations).

- We added a new `locations` property to the [Server
Types](https://docs.hetzner.cloud/reference/cloud#server-types)
resource. The new property defines a list of supported
[Locations](https://docs.hetzner.cloud/reference/cloud#locations) and
additional per
[Locations](https://docs.hetzner.cloud/reference/cloud#locations)
details such as deprecations information.

- We deprecated the `deprecation` property from the [Server
Types](https://docs.hetzner.cloud/reference/cloud#server-types)
resource. The property will gradually be phased out as per
[Locations](https://docs.hetzner.cloud/reference/cloud#locations)
deprecations are being announced. Please use the new per
[Locations](https://docs.hetzner.cloud/reference/cloud#locations)
deprecation information instead.

See our
[changelog](https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types)
for more details.

**Upgrading**

```yaml
---
- name: Validate server type
  hosts: localhost
  connection: local
  tasks:
    - name: Fetch server type info
      hetzner.hcloud.server_type_info:
        name: cx22
      register: server_type

    - name: Ensure server type exists
      ansible.builtin.assert:
        fail_msg: server type does not exists
        that:
          - server_type.hcloud_server_type_info | count == 1

    - name: Ensure server type is not deprecated
      ansible.builtin.assert:
        fail_msg: server type is deprecated
        that:
          - server_type.hcloud_server_type_info[0].deprecation is none
```

```yaml
---
- name: Validate server type
  hosts: localhost
  connection: local
  tasks:
    - name: Fetch location info
      hetzner.hcloud.location_info:
        name: fsn1
      register: location

    - name: Fetch server type info
      hetzner.hcloud.server_type_info:
        name: cx22
      register: server_type

    - name: Ensure server type exists
      ansible.builtin.assert:
        fail_msg: server type does not exists
        that:
          - server_type.hcloud_server_type_info | count == 1

    - name: Extract server type location info
      ansible.builtin.set_fact:
        server_type_location: >
          {{
            server_type.hcloud_server_type_info[0].locations
            | selectattr("name", "eq", location.hcloud_location_info[0].name)
            | first
          }}

    - name: Ensure server type is not deprecated
      ansible.builtin.assert:
        fail_msg: server type is deprecated in location
        that:
          - server_type_location.deprecation is none
```
2025-09-26 11:50:05 +02:00
..
certificate test: fix templating warnings (#643) 2025-06-03 13:20:17 +02:00
certificate_info test: use shared network zone variable (#543) 2024-08-06 12:50:58 +02:00
datacenter_info test: use shared network zone variable (#543) 2024-08-06 12:50:58 +02:00
filter_all fix: check label_selector child targets with load_balancer_status filter (#552) 2024-08-16 11:09:20 +02:00
firewall feat: add new created state for idempotent server creation (#606) 2025-03-21 14:05:03 +01:00
firewall_info feat: add new created state for idempotent server creation (#606) 2025-03-21 14:05:03 +01:00
firewall_resource feat: add new created state for idempotent server creation (#606) 2025-03-21 14:05:03 +01:00
floating_ip feat: add new created state for idempotent server creation (#606) 2025-03-21 14:05:03 +01:00
floating_ip_info test: use shared network zone variable (#543) 2024-08-06 12:50:58 +02:00
image_info feat: add new created state for idempotent server creation (#606) 2025-03-21 14:05:03 +01:00
iso_info fix: ensure returned resource ids are integers (#651) 2025-06-11 10:09:12 +02:00
load_balancer test: use shared network zone variable (#543) 2024-08-06 12:50:58 +02:00
load_balancer_info feat: add new created state for idempotent server creation (#606) 2025-03-21 14:05:03 +01:00
load_balancer_network test: ignore lint error for missing args in tests (#602) 2025-02-24 13:50:13 +01:00
load_balancer_service test: reduce load balancer tests flakiness (#646) 2025-06-03 18:18:09 +02:00
load_balancer_target test: reduce load balancer tests flakiness (#646) 2025-06-03 18:18:09 +02:00
load_balancer_type_info test: use shared network zone variable (#543) 2024-08-06 12:50:58 +02:00
location_info test: use shared network zone variable (#543) 2024-08-06 12:50:58 +02:00
network test: use shared network zone variable (#543) 2024-08-06 12:50:58 +02:00
network_info test: use shared network zone variable (#543) 2024-08-06 12:50:58 +02:00
placement_group test: server placement group idempotency using id (#648) 2025-06-10 20:46:56 +02:00
primary_ip fix: ensure returned resource ids are integers (#651) 2025-06-11 10:09:12 +02:00
primary_ip_info test: use shared network zone variable (#543) 2024-08-06 12:50:58 +02:00
rdns test: ignore lint error for missing args in tests (#602) 2025-02-24 13:50:13 +01:00
route test: use shared network zone variable (#543) 2024-08-06 12:50:58 +02:00
server feat: allow renaming a server (#619) 2025-03-25 17:34:59 +01:00
server_info feat: add new created state for idempotent server creation (#606) 2025-03-21 14:05:03 +01:00
server_network feat: add new created state for idempotent server creation (#606) 2025-03-21 14:05:03 +01:00
server_type_info feat: per location server types (#692) 2025-09-26 11:50:05 +02:00
setup_hcloud_cli/tasks test: setup new temporary project service for integration tests (#316) 2023-09-08 09:37:43 +02:00
setup_selfsigned_certificate/tasks test: fix linting error for integrations setup roles (#426) 2023-12-15 15:25:20 +01:00
setup_ssh_keypair/tasks feat: allow recreating ssh key when public key in the API does not match (#634) 2025-06-03 17:43:54 +02:00
ssh_key feat: allow recreating ssh key when public key in the API does not match (#634) 2025-06-03 17:43:54 +02:00
ssh_key_info test: use shared network zone variable (#543) 2024-08-06 12:50:58 +02:00
subnetwork test: fix type casting for ansible-core 2.19 (devel) (#630) 2025-04-28 20:50:34 +02:00
volume feat: allow renaming a volume (#683) 2025-08-14 15:02:28 +02:00
volume_attachment feat: add volume_attachment module (#622) 2025-04-28 12:49:21 +02:00
volume_info test: use shared network zone variable (#543) 2024-08-06 12:50:58 +02:00