Module: Hetzner::API::IP

Included in:
Hetzner::API
Defined in:
lib/hetzner/api/ip.rb

Instance Method Summary collapse

Instance Method Details

#ip!(ip, options = {}) ⇒ Object

sets or unsets traffic warning limits on a specific IP address



21
22
23
24
# File 'lib/hetzner/api/ip.rb', line 21

def ip!(ip, options = {})
  path = "/ip/#{ip}"
  perform_post path, :query => options
end

#ip?(ip) ⇒ Boolean

shows information of a given IP addresses of the customer

Returns:

  • (Boolean)


16
17
18
# File 'lib/hetzner/api/ip.rb', line 16

def ip?(ip)
  get_ip_or_ips ip
end

#ips?Boolean

shows information of all IP addresses of the customer

Returns:

  • (Boolean)


11
12
13
# File 'lib/hetzner/api/ip.rb', line 11

def ips?
  get_ip_or_ips
end

#ips_for_server?(server_ip) ⇒ Boolean

shows all addresses that belong to the main server IP

Returns:

  • (Boolean)


5
6
7
8
# File 'lib/hetzner/api/ip.rb', line 5

def ips_for_server?(server_ip)
  path = "/ip"
  perform_get path, :query => { :server_ip => server_ip }
end