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