27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/fog/compute/gridscale/models/ip.rb', line 27
def save
raise Fog::Errors::Error.new('Re-saving an existing object may create a duplicate') if persisted?
requires :family
options = {}
if attributes[:labels]
options[:labels] = labels
end
if attributes[:failover]
options[:failover] = failover
end
if attributes[:name]
options[:name] = name
end
if attributes[:reverse_dns]
options[:reverse_dns] = reverse_dns
end
if attributes[:location_uuid]
options[:location_uuid] = location_uuid
end
data = service.ip_create(family, options)
merge_attributes(data.body)
true
end
|