class Fog::Brightbox::Compute::FirewallPolicy
Public Instance Methods
apply_to(server_group_id)
click to toggle source
# File lib/fog/brightbox/models/compute/firewall_policy.rb, line 31 def apply_to(server_group_id) requires :identity options = { :server_group => server_group_id } data = service.apply_to_firewall_policy(identity, options) merge_attributes(data) true end
destroy()
click to toggle source
# File lib/fog/brightbox/models/compute/firewall_policy.rb, line 51 def destroy requires :identity service.delete_firewall_policy(identity) true end
remove(server_group_id)
click to toggle source
# File lib/fog/brightbox/models/compute/firewall_policy.rb, line 41 def remove(server_group_id) requires :identity options = { :server_group => server_group_id } data = service.remove_firewall_policy(identity, options) merge_attributes(data) true end
save()
click to toggle source
Sticking with existing Fog
behaviour, save does not update but creates a new resource
# File lib/fog/brightbox/models/compute/firewall_policy.rb, line 19 def save raise Fog::Errors::Error.new("Resaving an existing object may create a duplicate") if persisted? options = { :server_group => server_group_id, :name => name, :description => description }.delete_if { |_k, v| v.nil? || v == "" } data = service.create_firewall_policy(options) merge_attributes(data) true end