Class: Fog::Bluebox::DNS::Mock

Inherits:
Object
  • Object
show all
Defined in:
lib/fog/dns/bluebox.rb,
lib/fog/dns/requests/bluebox/get_zone.rb,
lib/fog/dns/requests/bluebox/get_zones.rb,
lib/fog/dns/requests/bluebox/get_record.rb,
lib/fog/dns/requests/bluebox/create_zone.rb,
lib/fog/dns/requests/bluebox/delete_zone.rb,
lib/fog/dns/requests/bluebox/get_records.rb,
lib/fog/dns/requests/bluebox/update_zone.rb,
lib/fog/dns/requests/bluebox/create_record.rb,
lib/fog/dns/requests/bluebox/delete_record.rb,
lib/fog/dns/requests/bluebox/update_record.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/fog/dns/bluebox.rb', line 39

def initialize(options={})
  unless options.delete(:provider)
    location = caller.first
    warning = "[yellow][WARN] Fog::Bluebox::DNS.new is deprecated, use Fog::DNS.new(:provider => 'Bluebox') instead[/]"
    warning << " [light_black](" << location << ")[/] "
    Formatador.display_line(warning)
  end

  @bluebox_customer_id = options[:bluebox_customer_id]
  @bluebox_api_key = options[:bluebox_api_key]
  @data = self.class.data[@bluebox_customer_id]
  @data = self.class.data[@bluebox_api_key]
end

Class Method Details

.dataObject



27
28
29
30
31
# File 'lib/fog/dns/bluebox.rb', line 27

def self.data
  @data ||= Hash.new do |hash, key|
    hash[key] = {}
  end
end

.reset_data(keys = data.keys) ⇒ Object



33
34
35
36
37
# File 'lib/fog/dns/bluebox.rb', line 33

def self.reset_data(keys=data.keys)
  for key in [*keys]
    data.delete(key)
  end
end

Instance Method Details

#create_record(zone_id, type, domain, content) ⇒ Object



23
24
25
# File 'lib/fog/dns/requests/bluebox/update_zone.rb', line 23

def create_record(zone_id, type, domain, content)
  Fog::Mock.not_implemented
end

#create_zone(options) ⇒ Object



45
46
47
# File 'lib/fog/dns/requests/bluebox/create_zone.rb', line 45

def create_zone(options)
  Fog::Mock.not_implemented
end

#delete_record(zone_id, record_id) ⇒ Object



24
25
26
# File 'lib/fog/dns/requests/bluebox/delete_record.rb', line 24

def delete_record(zone_id, record_id)
  Fog::Mock.not_implemented
end

#delete_zone(zone_id) ⇒ Object



24
25
26
# File 'lib/fog/dns/requests/bluebox/delete_zone.rb', line 24

def delete_zone(zone_id)
  Fog::Mock.not_implemented
end

#get_record(record_id) ⇒ Object



33
34
35
# File 'lib/fog/dns/requests/bluebox/get_record.rb', line 33

def get_record(record_id)
  Fog::Mock.not_implemented
end

#get_recordsObject



34
35
36
# File 'lib/fog/dns/requests/bluebox/get_records.rb', line 34

def get_records
  Fog::Mock.not_implemented
end

#get_zone(zone_id) ⇒ Object



37
38
39
# File 'lib/fog/dns/requests/bluebox/get_zone.rb', line 37

def get_zone(zone_id)
  Fog::Mock.not_implemented
end

#get_zonesObject



36
37
38
# File 'lib/fog/dns/requests/bluebox/get_zones.rb', line 36

def get_zones
  Fog::Mock.not_implemented
end