Jonas L
19e586fa22
feat: use exponential backoff algorithm when polling actions ( #524 )
...
##### SUMMARY
Replace the constant poll interval of 1 second, with a truncated
exponential back off algorithm with jitter.
Below is a suite of poll interval (in seconds) generated by the new
algorithm:
```
1.49
2.14
5.46
6.51
6.57
5.57
5.98
7.13
6.59
7.10
5.54
5.03
6.56
5.96
6.72
7.21
7.05
5.31
5.60
6.33
6.82
5.42
6.08
6.60
TOTAL: 140.77
```
2024-07-04 15:07:05 +02:00
Jonas L
e781f48f15
chore: add fail_on_invalid_params
helper ( #470 )
...
##### SUMMARY
Add a small helper to validate parameters while executing the module.
---------
Co-authored-by: Justin Jeffery <justin.jeffery@ipfabric.io>
2024-03-11 18:03:26 +01:00
Jonas L
4cbf9a2838
refactor: add no return typings ( #433 )
...
Fixes type checking (false unbound variables), for the fail json helper
function that never returns (system exit).
2023-12-21 17:44:42 +01:00
Jonas L
fb40a00689
refactor: extract client utils in reusable functions ( #399 )
...
##### SUMMARY
Extract some client utils functions in reusable function, to be used in
the inventory plugin.
2023-11-24 12:14:04 +01:00
Jonas L
df8c3b6a59
refactor: add future annotations imports ( #398 )
...
##### SUMMARY
This adds future annotations imports to benefit from the modern python
typing system.
2023-11-23 14:53:10 +01:00
Jonas L
7c9fbf85a7
feat: rename api_endpoint module argument ( #395 )
...
##### SUMMARY
Make the api endpoint module argument consistent with the api token.
- Renamed the `endpoint` module argument to `api_endpoint`, backward
compatibility is maintained using an alias.
- Allow to configure it using the `HCLOUD_ENDPOINT` env var.
This makes the inventory config and the modules config a bit more
consistent.
##### ISSUE TYPE
- Feature Pull Request
2023-11-21 10:13:21 +01:00
Jonas L
5e425c56c2
feat: allow selecting a resource using its ID ( #361 )
...
##### SUMMARY
Allow referring to resources using their IDs for:
- hcloud_load_balancer_network
- hcloud_load_balancer_service
- hcloud_load_balancer_target
- hcloud_rdns
- hcloud_route
- hcloud_server_network
- hcloud_subnetwork
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
- hcloud_load_balancer_network
- hcloud_load_balancer_service
- hcloud_load_balancer_target
- hcloud_rdns
- hcloud_route
- hcloud_server_network
- hcloud_subnetwork
2023-10-18 10:28:42 +02:00
Jonas L
94190ae6cb
refactor: move module vars out of __init__
( #336 )
...
##### SUMMARY
- move module vars out of `__init__`
- add modules type hints
- catch hcloud exception for api calls
2023-09-26 09:41:01 +02:00
Jonas L
dd5ee78386
feat: replace ansible version with collection version in hcloud user agent ( #291 )
...
* feat: use collection version in hcloud user-agent
* chore: add version sync pre-commit hook
* chore: add changelog fragment
2023-08-09 11:34:12 +02:00
Jonas L
a0e91d942a
refactor: rename ansible module classes ( #284 )
...
* refactor: rename Hcloud class to AnsibleHCloud
* refactor: rename AnsibleHCloud* modules
* refactor: remove Hcloud deprecation wrapper
2023-08-04 09:24:14 +02:00
Jonas L
98afa99904
refactor: use super() to reference parent class ( #280 )
2023-08-02 12:05:00 +02:00
Jonas L
64b6804b41
refactor: use relative imports for local modules ( #279 )
2023-07-31 10:12:55 +02:00
Jonas L
c15377c672
feat: improve hcloud library exceptions handling ( #243 )
2023-07-20 14:34:48 +02:00
Jonas L
8a6157e8b2
feat: vendor hcloud python dependency ( #244 )
...
* chore: ignore venv directories
* chore: ignore integration test generated inventory
* feat: vendor hcloud package
* import https://github.com/hetznercloud/hcloud-python
* use vendored hcloud in modules
* update integration test requirements
* make vendor script self contained
* chore: add check-hcloud-vendor pre-commit hook
* pin hcloud version to v.1.24.0
* move vendored __version__.py file to _version.py
* update comment about galaxy-importer filename lint
2023-07-11 11:15:08 +02:00
Jonas L
dfff49e31f
chore: setup pre-commit ( #234 )
...
* chore: add pre-commit config
* chore: fix pre-commit errors
* chore: add black pre-commit hook
* style: format python files with black
* chore: add isort pre-commit hook
* style: format python files using isort
* chore: add pyupgrade pre-commit hook
* refactor: upgrade code to python3.7
* Allow stacking PRs
Co-authored-by: Julian Tölle <julian.toelle97@gmail.com>
---------
Co-authored-by: Julian Tölle <julian.toelle97@gmail.com>
2023-06-27 11:50:13 +02:00
Julian Tölle
43ae035040
lint: fix unused-import errors ( #195 )
...
The linting rule `unused-import` was recently activated in ansible-test.
This commit removes all unused imports to satify the linting rule.
2023-03-31 09:01:22 +02:00
Lukas Kämmerling
8bb449d3de
Improve imports of APIException ( #37 )
...
Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
2020-11-24 06:39:21 +01:00
Ansible Core Team
36309bd27a
Initial commit
2020-03-09 13:36:01 +00:00