Class: Fog::DNS::Google::Mock

Inherits:
Object
  • Object
show all
Includes:
Google::Shared
Defined in:
lib/fog/dns/google/mock.rb,
lib/fog/dns/google/requests/get_change.rb,
lib/fog/dns/google/requests/get_project.rb,
lib/fog/dns/google/requests/list_changes.rb,
lib/fog/dns/google/requests/create_change.rb,
lib/fog/dns/google/requests/get_managed_zone.rb,
lib/fog/dns/google/requests/list_managed_zones.rb,
lib/fog/dns/google/requests/create_managed_zone.rb,
lib/fog/dns/google/requests/delete_managed_zone.rb,
lib/fog/dns/google/requests/list_resource_record_sets.rb

Instance Attribute Summary

Attributes included from Google::Shared

#api_url, #api_version, #project

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Google::Shared

#apply_client_options, #build_excon_response, #initialize_auth, #initialize_google_client, #request, #shared_initialize

Constructor Details

#initialize(options) ⇒ Mock

Returns a new instance of Mock.



7
8
9
# File 'lib/fog/dns/google/mock.rb', line 7

def initialize(options)
  shared_initialize(options[:google_project], GOOGLE_DNS_API_VERSION, GOOGLE_DNS_BASE_URL)
end

Class Method Details

.data(_api_version) ⇒ Object



11
12
13
# File 'lib/fog/dns/google/mock.rb', line 11

def self.data(_api_version)
  @data ||= {}
end

.resetObject



15
16
17
# File 'lib/fog/dns/google/mock.rb', line 15

def self.reset
  @data = nil
end

Instance Method Details

#create_change(_zone_name_or_id, _additions = [], _deletions = []) ⇒ Object



21
22
23
24
25
# File 'lib/fog/dns/google/requests/create_change.rb', line 21

def create_change(_zone_name_or_id, _additions = [], _deletions = [])
  # :no-coverage:
  Fog::Mock.not_implemented
  # :no-coverage:
end

#create_managed_zone(_name, _dns_name, _description) ⇒ Object



21
22
23
24
25
# File 'lib/fog/dns/google/requests/create_managed_zone.rb', line 21

def create_managed_zone(_name, _dns_name, _description)
  # :no-coverage:
  Fog::Mock.not_implemented
  # :no-coverage:
end

#data(project = @project) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/fog/dns/google/mock.rb', line 19

def data(project = @project)
  self.class.data(api_version)[project] ||= {
    :managed_zones => {},
    :resource_record_sets => {},
    :changes => {}
  }
end

#delete_managed_zone(_name_or_id) ⇒ Object



15
16
17
18
19
# File 'lib/fog/dns/google/requests/delete_managed_zone.rb', line 15

def delete_managed_zone(_name_or_id)
  # :no-coverage:
  Fog::Mock.not_implemented
  # :no-coverage:
end

#get_change(_zone_name_or_id, _identity) ⇒ Object



15
16
17
18
19
# File 'lib/fog/dns/google/requests/get_change.rb', line 15

def get_change(_zone_name_or_id, _identity)
  # :no-coverage:
  Fog::Mock.not_implemented
  # :no-coverage:
end

#get_managed_zone(_name_or_id) ⇒ Object



15
16
17
18
19
# File 'lib/fog/dns/google/requests/get_managed_zone.rb', line 15

def get_managed_zone(_name_or_id)
  # :no-coverage:
  Fog::Mock.not_implemented
  # :no-coverage:
end

#get_project(_identity) ⇒ Object



16
17
18
19
20
# File 'lib/fog/dns/google/requests/get_project.rb', line 16

def get_project(_identity)
  # :no-coverage:
  Fog::Mock.not_implemented
  # :no-coverage:
end

#list_changes(_zone_name_or_id, _opts = {}) ⇒ Object



22
23
24
25
26
# File 'lib/fog/dns/google/requests/list_changes.rb', line 22

def list_changes(_zone_name_or_id, _opts = {})
  # :no-coverage:
  Fog::Mock.not_implemented
  # :no-coverage:
end

#list_managed_zones(_opts = {}) ⇒ Object



18
19
20
21
22
# File 'lib/fog/dns/google/requests/list_managed_zones.rb', line 18

def list_managed_zones(_opts = {})
  # :no-coverage:
  Fog::Mock.not_implemented
  # :no-coverage:
end

#list_resource_record_sets(_zone_name_or_id, _options = {}) ⇒ Object



22
23
24
25
26
# File 'lib/fog/dns/google/requests/list_resource_record_sets.rb', line 22

def list_resource_record_sets(_zone_name_or_id, _options = {})
  # :no-coverage:
  Fog::Mock.not_implemented
  # :no-coverage:
end

#reset_dataObject



27
28
29
# File 'lib/fog/dns/google/mock.rb', line 27

def reset_data
  self.class.data(api_version).delete(@project)
end