Class: Fog::DNS::Bluebox::Zone
- Defined in:
- lib/fog/bluebox/models/dns/zone.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize(attributes = {}) ⇒ Zone
constructor
A new instance of Zone.
- #nameservers ⇒ Object
- #records ⇒ Object
- #save ⇒ Object
Methods inherited from Model
#inspect, #reload, #symbolize_keys, #to_json, #wait_for
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Core::DeprecatedConnectionAccessors
#connection, #connection=, #prepare_service_value
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one
Constructor Details
#initialize(attributes = {}) ⇒ Zone
Returns a new instance of Zone.
21 22 23 |
# File 'lib/fog/bluebox/models/dns/zone.rb', line 21 def initialize(attributes = {}) super(attributes) end |
Instance Method Details
#destroy ⇒ Object
25 26 27 |
# File 'lib/fog/bluebox/models/dns/zone.rb', line 25 def destroy raise Fog::Errors::Error.new('Not implemented') end |
#nameservers ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/fog/bluebox/models/dns/zone.rb', line 38 def nameservers [ 'ns1.blueblxgrid.com', 'ns2.blueblxgrid.com', 'ns3.blueblxgrid.com' ] end |
#records ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/fog/bluebox/models/dns/zone.rb', line 29 def records @records ||= begin Fog::DNS::Bluebox::Records.new( :zone => self, :service => service ) end end |
#save ⇒ Object
52 53 54 55 56 57 58 59 60 |
# File 'lib/fog/bluebox/models/dns/zone.rb', line 52 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 |