Module: Hetzner::API::Subnet
- Included in:
- Hetzner::API
- Defined in:
- lib/hetzner/api/subnet.rb
Instance Method Summary collapse
-
#subnet!(ip, options = {}) ⇒ Object
sets or unsets traffic warning limits on a specific IP subnet address.
-
#subnet?(ip) ⇒ Boolean
shows information of a given IP subnet of the customer.
-
#subnets? ⇒ Boolean
shows information of all IP subnets of the customer.
-
#subnets_for_server?(server_ip) ⇒ Boolean
shows all IP subnets that belong to the main server IP.
Instance Method Details
#subnet!(ip, options = {}) ⇒ Object
sets or unsets traffic warning limits on a specific IP subnet address
21 22 23 24 |
# File 'lib/hetzner/api/subnet.rb', line 21 def subnet!(ip, = {}) path = "/subnet/#{ip}" perform_post path, :query => end |
#subnet?(ip) ⇒ Boolean
shows information of a given IP subnet of the customer
16 17 18 |
# File 'lib/hetzner/api/subnet.rb', line 16 def subnet?(ip) get_subnet_or_subnets ip end |
#subnets? ⇒ Boolean
shows information of all IP subnets of the customer
11 12 13 |
# File 'lib/hetzner/api/subnet.rb', line 11 def subnets? get_subnet_or_subnets end |
#subnets_for_server?(server_ip) ⇒ Boolean
shows all IP subnets that belong to the main server IP
5 6 7 8 |
# File 'lib/hetzner/api/subnet.rb', line 5 def subnets_for_server?(server_ip) path = "/subnet" perform_get path, :query => { :server_ip => server_ip } end |