Class: Fog::DNS::Dreamhost::Zone
- Defined in:
- lib/fog/dreamhost/models/dns/zone.rb
Overview
Dreamhost API has no concept of ‘Zone’, but we can emulate it.
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
-
#destroy ⇒ Object
There’s no destroy API call.
-
#nameservers ⇒ Object
Return the Dreamhost nameserver list.
-
#records ⇒ Object
Return a list of records for this zone.
-
#save ⇒ Object
There’s no zone create API call.
Methods inherited from Model
#initialize, #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
This class inherits a constructor from Fog::Model
Instance Method Details
#destroy ⇒ Object
There’s no destroy API call
22 23 24 |
# File 'lib/fog/dreamhost/models/dns/zone.rb', line 22 def destroy raise NotImplementedError.new end |
#nameservers ⇒ Object
Return the Dreamhost nameserver list
40 41 42 43 44 45 46 |
# File 'lib/fog/dreamhost/models/dns/zone.rb', line 40 def nameservers [ "ns1.dreamhost.com", "ns2.dreamhost.com", "ns3.dreamhost.com", ] end |
#records ⇒ Object
Return a list of records for this zone
Since Dreamhost does not support zones, this is emulated. Iterates over all the records and discards the ones where Record.zone != domain (the current zone domain)
33 34 35 |
# File 'lib/fog/dreamhost/models/dns/zone.rb', line 33 def records service.records.all :zone => domain end |
#save ⇒ Object
There’s no zone create API call
51 52 53 |
# File 'lib/fog/dreamhost/models/dns/zone.rb', line 51 def save raise NotImplementedError.new end |