tonobo / hcloud-ruby

Native ruby client for HetznerCloud
MIT License
32 stars 11 forks source link

[Bug] Firewalls do not expose actions #54

Closed ghost closed 1 year ago

ghost commented 1 year ago

When I implemented firewalls, I forgot to return the actions from the API to the caller.

The API returns a JSON

{
    "actions": [...],
    "firewall": {...}
}

but firewall = client.firewalls.create(...) only returns the firewall.

The behavior of other create methods with actions is:

action, foo = client.foos.create() # e.g. floating IP
action, foo, next_actions = client.foos.create() # e.g. servers and volumes

The natural behavior of firewalls thus should be:

actions, fw = client.firewalls.create()