Class: Fog::OpenStack::DNS::V2::Recordsets
- Inherits:
-
Collection
- Object
- Collection
- Collection
- Fog::OpenStack::DNS::V2::Recordsets
- Defined in:
- lib/fog/openstack/dns/v2/models/recordsets.rb
Instance Attribute Summary
Attributes inherited from Collection
Instance Method Summary collapse
- #all(options = {}) ⇒ Object
- #destroy(zone_id, id, options = {}) ⇒ Object
- #find_by_id(zone_id, id, options = {}) ⇒ Object (also: #get)
Methods inherited from Collection
Instance Method Details
#all(options = {}) ⇒ Object
11 12 13 |
# File 'lib/fog/openstack/dns/v2/models/recordsets.rb', line 11 def all( = {}) load_response(service.list_recordsets(), 'recordsets') end |
#destroy(zone_id, id, options = {}) ⇒ Object
22 23 24 25 |
# File 'lib/fog/openstack/dns/v2/models/recordsets.rb', line 22 def destroy(zone_id, id, = {}) recordset = find_by_id(zone_id, id, ) recordset.destroy end |
#find_by_id(zone_id, id, options = {}) ⇒ Object Also known as: get
15 16 17 18 |
# File 'lib/fog/openstack/dns/v2/models/recordsets.rb', line 15 def find_by_id(zone_id, id, = {}) recordset_hash = service.get_recordset(zone_id, id, ).body new(recordset_hash.merge(:service => service)) end |