Class: Fog::DNS::Bluebox::Zone
- Inherits:
-
Model
- Object
- Model
- Fog::DNS::Bluebox::Zone
- Defined in:
- lib/fog/bluebox/models/dns/zone.rb
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize(attributes = {}) ⇒ Zone
constructor
A new instance of Zone.
- #nameservers ⇒ Object
- #records ⇒ Object
- #save ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ Zone
Returns a new instance of Zone.
19 20 21 |
# File 'lib/fog/bluebox/models/dns/zone.rb', line 19 def initialize(attributes = {}) super(attributes) end |
Instance Method Details
#destroy ⇒ Object
23 24 25 |
# File 'lib/fog/bluebox/models/dns/zone.rb', line 23 def destroy raise Fog::Errors::Error.new('Not implemented') end |
#nameservers ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/fog/bluebox/models/dns/zone.rb', line 36 def nameservers [ 'ns1.blueblxgrid.com', 'ns2.blueblxgrid.com', 'ns3.blueblxgrid.com' ] end |
#records ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/fog/bluebox/models/dns/zone.rb', line 27 def records @records ||= begin Fog::DNS::Bluebox::Records.new( :zone => self, :service => service ) end end |
#save ⇒ Object
50 51 52 53 54 55 56 57 58 |
# File 'lib/fog/bluebox/models/dns/zone.rb', line 50 def save self.ttl ||= 3600 requires :domain, :ttl = attributes.dup [:name] = .delete(:domain) data = identity.nil? ? service.create_zone() : service.update_zone(identity, ) merge_attributes(data.body) true end |