29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/fog/compute/gridscale/models/loadbalancer.rb', line 29
def save
raise Fog::Errors::Error.new('Re-saving an existing object may create a duplicate') if persisted?
requires :name, :algorithm, :listen_ipv4_uuid, :listen_ipv6_uuid, :backend_servers, :forwarding_rules, :redirect_http_to_https, :labels
options = {}
if attributes[:storage_type]
options[:storage_type] = storage_type
end
if attributes[:location_uuid]
options[:location_uuid] = location_uuid
end
data = service.load_balancer_create(name, algorithm, listen_ipv4_uuid, listen_ipv6_uuid, backend_servers, forwarding_rules, redirect_http_to_https, labels, options)
merge_attributes(data.body)
true
end
|