Class: Squall::IpAddress
Overview
OnApp IpAddress
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary (collapse)
-
- (Object) create(network_id, options = {})
Creates a new IpAddress.
-
- (Object) delete(network_id, id)
Deletes an existing ip address.
-
- (Object) edit(network_id, id, options = {})
Updates an existing ip address.
-
- (Object) list(network_id)
Lists IP addresses for a network.
Methods inherited from Base
#check_config, #default_params, #key_for_class, #request
Instance Method Details
- (Object) create(network_id, options = {})
Creates a new IpAddress
30 31 32 |
# File 'lib/squall/ip_address.rb', line 30 def create(network_id, = {}) request(:post, "/settings/networks/#{network_id}/ip_addresses.json", default_params()) end |
- (Object) delete(network_id, id)
Deletes an existing ip address.
51 52 53 |
# File 'lib/squall/ip_address.rb', line 51 def delete(network_id, id) request(:delete, "/settings/networks/#{network_id}/ip_addresses/#{id}.json") end |
- (Object) edit(network_id, id, options = {})
Updates an existing ip address.
41 42 43 |
# File 'lib/squall/ip_address.rb', line 41 def edit(network_id, id, = {}) request(:put, "/settings/networks/#{network_id}/ip_addresses/#{id}.json", default_params()) end |
- (Object) list(network_id)
Lists IP addresses for a network.
9 10 11 12 |
# File 'lib/squall/ip_address.rb', line 9 def list(network_id) response = request(:get, "/settings/networks/#{network_id}/ip_addresses.json") response.collect { |ip| ip['ip_address'] } end |