Module: Hetzner::API::Reset
- Included in:
- Hetzner::API
- Defined in:
- lib/hetzner/api/reset.rb
Instance Method Summary collapse
-
#reset!(ip, type) ⇒ Object
resets a server by its IP address.
-
#reset?(ip = nil) ⇒ Boolean
returns the reset status of a given IP address or all servers of the account.
Instance Method Details
#reset!(ip, type) ⇒ Object
resets a server by its IP address.
type is one of:
-
sw (software reset)
-
hw (hardware reset)
-
man (manual reset)
17 18 19 |
# File 'lib/hetzner/api/reset.rb', line 17 def reset!(ip, type) perform_post "/reset/#{ip}", :query => { :type => type } end |
#reset?(ip = nil) ⇒ Boolean
returns the reset status of a given IP address or all servers of the account
5 6 7 8 9 |
# File 'lib/hetzner/api/reset.rb', line 5 def reset?(ip = nil) path = "/reset" path << "/#{ip}" if ip perform_get path end |