Class: Fog::OpenStack::DNS::V2::Recordset
- Inherits:
-
Model
- Object
- Model
- Model
- Fog::OpenStack::DNS::V2::Recordset
show all
- Defined in:
- lib/fog/openstack/dns/v2/models/recordset.rb
Instance Attribute Summary
Attributes inherited from Model
#project
Instance Method Summary
collapse
Methods inherited from Model
#create, #initialize
Instance Method Details
#destroy(options = {}) ⇒ Object
46
47
48
49
50
|
# File 'lib/fog/openstack/dns/v2/models/recordset.rb', line 46
def destroy(options = {})
requires :zone_id, :id
service.delete_recordset(zone_id, id, options)
true
end
|
#reload(options = {}) ⇒ Object
overwritten because zone_id is needed for get
34
35
36
37
38
|
# File 'lib/fog/openstack/dns/v2/models/recordset.rb', line 34
def reload(options = {})
requires :zone_id, :id
merge_attributes(collection.get(zone_id, id, options).attributes)
self
end
|
#save ⇒ Object
26
27
28
29
30
31
|
# File 'lib/fog/openstack/dns/v2/models/recordset.rb', line 26
def save
raise Fog::Errors::Error, 'Resaving an existing object may create a duplicate' if persisted?
requires :zone_id, :name, :type, :records
merge_attributes(service.create_recordset(zone_id, name, type, records, attributes).body)
true
end
|
#update(options = nil) ⇒ Object
40
41
42
43
44
|
# File 'lib/fog/openstack/dns/v2/models/recordset.rb', line 40
def update(options = nil)
requires :zone_id, :id
merge_attributes(service.update_recordset(zone_id, id, options || attributes).body)
self
end
|