Class: Fog::Slicehost::DNS::Mock

Inherits:
Object
  • Object
show all
Defined in:
lib/fog/dns/slicehost.rb,
lib/fog/dns/requests/slicehost/get_zone.rb,
lib/fog/dns/requests/slicehost/get_zones.rb,
lib/fog/dns/requests/slicehost/get_record.rb,
lib/fog/dns/requests/slicehost/create_zone.rb,
lib/fog/dns/requests/slicehost/delete_zone.rb,
lib/fog/dns/requests/slicehost/get_records.rb,
lib/fog/dns/requests/slicehost/create_record.rb,
lib/fog/dns/requests/slicehost/delete_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
# File 'lib/fog/dns/slicehost.rb', line 39

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

  @slicehost_password = options[:slicehost_password]
  @data = self.class.data[@slicehost_password]
end

Class Method Details

.dataObject



27
28
29
30
31
# File 'lib/fog/dns/slicehost.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/slicehost.rb', line 33

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

Instance Method Details

#create_record(record_type, zone_id, name, data) ⇒ Object



53
54
55
# File 'lib/fog/dns/requests/slicehost/create_record.rb', line 53

def create_record(record_type, zone_id, name, data)
  Fog::Mock.not_implemented
end

#create_zone(origin, ttl, active) ⇒ Object



47
48
49
# File 'lib/fog/dns/requests/slicehost/create_zone.rb', line 47

def create_zone(origin, ttl, active)
  Fog::Mock.not_implemented
end

#delete_record(record_id) ⇒ Object



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

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

#delete_zone(zone_id) ⇒ Object



24
25
26
# File 'lib/fog/dns/requests/slicehost/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/slicehost/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/slicehost/get_records.rb', line 34

def get_records
  Fog::Mock.not_implemented
end

#get_zone(zone_id) ⇒ Object



33
34
35
# File 'lib/fog/dns/requests/slicehost/get_zone.rb', line 33

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

#get_zonesObject



31
32
33
# File 'lib/fog/dns/requests/slicehost/get_zones.rb', line 31

def get_zones
  Fog::Mock.not_implemented
end