Module: Hetzner::API::Failover
- Included in:
- Hetzner::API
- Defined in:
- lib/hetzner/api/failover.rb
Instance Method Summary collapse
-
#failover!(failover_ip, active_server_ip) ⇒ Object
redirects the failover_ip to another server ip.
-
#failover?(ip = nil) ⇒ Boolean
queries the failover status of one IP address or all failover IP addresses of the account.
Instance Method Details
#failover!(failover_ip, active_server_ip) ⇒ Object
redirects the failover_ip to another server ip
12 13 14 15 |
# File 'lib/hetzner/api/failover.rb', line 12 def failover!(failover_ip, active_server_ip) path = "/failover/#{failover_ip}" perform_post path, :query => { :active_server_ip => active_server_ip } end |
#failover?(ip = nil) ⇒ Boolean
queries the failover status of one IP address or all failover IP addresses of the account
5 6 7 8 9 |
# File 'lib/hetzner/api/failover.rb', line 5 def failover?(ip = nil) path = "/failover" path << "/#{ip}" if ip perform_get path end |