Class: Simplenet::Client::Firewall
- Inherits:
-
Base
- Object
- Base
- Simplenet::Client::Firewall
show all
- Defined in:
- lib/simplenet/client/firewall.rb
Instance Method Summary
collapse
Methods inherited from Base
#delete, #list, #method_missing, #show
Constructor Details
#initialize(url) ⇒ Firewall
Returns a new instance of Firewall.
5
6
7
8
|
# File 'lib/simplenet/client/firewall.rb', line 5
def initialize(url)
@url = url
@fullurl = "#{url}/firewalls"
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Simplenet::Client::Base
Instance Method Details
#attach_anycast(uuid, anycast_id) ⇒ Object
#create(zone_id, name, mac) ⇒ Object
10
11
12
|
# File 'lib/simplenet/client/firewall.rb', line 10
def create(zone_id, name, mac)
simplenet_post(@fullurl, {"name" => name, "zone_id" => zone_id, "mac" => mac})
end
|
#detach_anycast(uuid, anycast_id) ⇒ Object
35
36
37
|
# File 'lib/simplenet/client/firewall.rb', line 35
def detach_anycast(uuid, anycast_id)
simplenet_delete("#{@fullurl}/#{uuid}/anycasts/#{anycast_id}")
end
|
#disable(uuid) ⇒ Object
18
19
20
|
# File 'lib/simplenet/client/firewall.rb', line 18
def disable(uuid)
simplenet_post("#{@fullurl}/disable", {"id" => uuid})
end
|
#enable(uuid) ⇒ Object
14
15
16
|
# File 'lib/simplenet/client/firewall.rb', line 14
def enable(uuid)
simplenet_post("#{@fullurl}/enable", {"id" => uuid})
end
|
#sync(uuid) ⇒ Object
22
23
24
|
# File 'lib/simplenet/client/firewall.rb', line 22
def sync(uuid)
simplenet_post("#{@fullurl}/sync", {"id" => uuid})
end
|