Class: Fog::Google::SQL::Mock
- Inherits:
-
Object
- Object
- Fog::Google::SQL::Mock
show all
- Includes:
- Fog::Google::Shared
- Defined in:
- lib/fog/google/sql/mock.rb,
lib/fog/google/requests/sql/list_flags.rb,
lib/fog/google/requests/sql/list_tiers.rb,
lib/fog/google/requests/sql/list_users.rb,
lib/fog/google/requests/sql/delete_user.rb,
lib/fog/google/requests/sql/insert_user.rb,
lib/fog/google/requests/sql/update_user.rb,
lib/fog/google/requests/sql/get_instance.rb,
lib/fog/google/requests/sql/get_ssl_cert.rb,
lib/fog/google/requests/sql/get_operation.rb,
lib/fog/google/requests/sql/clone_instance.rb,
lib/fog/google/requests/sql/get_backup_run.rb,
lib/fog/google/requests/sql/list_instances.rb,
lib/fog/google/requests/sql/list_ssl_certs.rb,
lib/fog/google/requests/sql/delete_instance.rb,
lib/fog/google/requests/sql/delete_ssl_cert.rb,
lib/fog/google/requests/sql/export_instance.rb,
lib/fog/google/requests/sql/import_instance.rb,
lib/fog/google/requests/sql/insert_instance.rb,
lib/fog/google/requests/sql/insert_ssl_cert.rb,
lib/fog/google/requests/sql/list_operations.rb,
lib/fog/google/requests/sql/update_instance.rb,
lib/fog/google/requests/sql/list_backup_runs.rb,
lib/fog/google/requests/sql/restart_instance.rb,
lib/fog/google/requests/sql/delete_backup_run.rb,
lib/fog/google/requests/sql/insert_backup_run.rb,
lib/fog/google/requests/sql/restore_instance_backup.rb,
lib/fog/google/requests/sql/reset_instance_ssl_config.rb
Instance Attribute Summary
#api_url, #api_version, #project
Class Method Summary
collapse
Instance Method Summary
collapse
-
#clone_instance(_instance_id, _destination_name, _log_filename: nil, _log_position: nil) ⇒ Object
-
#data ⇒ Object
-
#delete_backup_run(_instance_id, _run) ⇒ Object
-
#delete_instance(_instance_id) ⇒ Object
-
#delete_ssl_cert(_instance_id, _sha1_fingerprint) ⇒ Object
-
#delete_user(_instance_id, _host, _name) ⇒ Object
-
#export_instance(_instance_id, _uri, _options: {}) ⇒ Object
-
#get_backup_run(_instance_id, _backup_run_id, _due_time) ⇒ Object
-
#get_instance(_instance_id) ⇒ Object
-
#get_operation(_operation_id) ⇒ Object
-
#get_ssl_cert(_instance_id, _sha1_fingerprint) ⇒ Object
-
#import_instance(_instance_id, _uri, _options = {}) ⇒ Object
-
#initialize(options) ⇒ Mock
constructor
-
#insert_backup_run(_instance_id, _run) ⇒ Object
-
#insert_instance(_name, _tier, _options = {}) ⇒ Object
-
#insert_ssl_cert(_instance_id, _common_name) ⇒ Object
-
#insert_user(_instance_id, _user) ⇒ Object
-
#list_backup_runs(_instance_id, _backup_configuration_id) ⇒ Object
-
#list_flags ⇒ Object
-
#list_instances(_options: {}) ⇒ Object
-
#list_operations(_instance_id, _options: {}) ⇒ Object
-
#list_ssl_certs(_instance_id) ⇒ Object
-
#list_tiers ⇒ Object
-
#random_operation ⇒ Object
-
#reset_data ⇒ Object
-
#reset_instance_ssl_config(_instance_id) ⇒ Object
-
#restart_instance(_instance_id) ⇒ Object
-
#restore_instance_backup(_instance_id, _backup_run_id) ⇒ Object
-
#update_instance(_instance_id, _settings_version, _tier, _settings = {}) ⇒ Object
-
#update_user(_instance_id, _host, _name, _user) ⇒ Object
#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.
Class Method Details
.data ⇒ Object
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/fog/google/sql/mock.rb', line 11
def self.data
@data ||= Hash.new do |hash, key|
hash[key] = {
:backup_runs => {},
:instances => {},
:operations => {},
:ssl_certs => {}
}
end
end
|
.reset ⇒ Object
22
23
24
|
# File 'lib/fog/google/sql/mock.rb', line 22
def self.reset
@data = nil
end
|
Instance Method Details
#clone_instance(_instance_id, _destination_name, _log_filename: nil, _log_position: nil) ⇒ Object
33
34
35
36
37
38
|
# File 'lib/fog/google/requests/sql/clone_instance.rb', line 33
def clone_instance(_instance_id, _destination_name,
_log_filename: nil, _log_position: nil)
Fog::Mock.not_implemented
end
|
#data ⇒ Object
26
27
28
|
# File 'lib/fog/google/sql/mock.rb', line 26
def data
self.class.data[project]
end
|
#delete_backup_run(_instance_id, _run) ⇒ Object
15
16
17
18
19
|
# File 'lib/fog/google/requests/sql/delete_backup_run.rb', line 15
def delete_backup_run(_instance_id, _run)
Fog::Mock.not_implemented
end
|
#delete_instance(_instance_id) ⇒ Object
16
17
18
19
20
|
# File 'lib/fog/google/requests/sql/delete_instance.rb', line 16
def delete_instance(_instance_id)
Fog::Mock.not_implemented
end
|
#delete_ssl_cert(_instance_id, _sha1_fingerprint) ⇒ Object
16
17
18
19
20
|
# File 'lib/fog/google/requests/sql/delete_ssl_cert.rb', line 16
def delete_ssl_cert(_instance_id, _sha1_fingerprint)
Fog::Mock.not_implemented
end
|
#delete_user(_instance_id, _host, _name) ⇒ Object
16
17
18
19
20
|
# File 'lib/fog/google/requests/sql/delete_user.rb', line 16
def delete_user(_instance_id, _host, _name)
Fog::Mock.not_implemented
end
|
#export_instance(_instance_id, _uri, _options: {}) ⇒ Object
47
48
49
50
51
|
# File 'lib/fog/google/requests/sql/export_instance.rb', line 47
def export_instance(_instance_id, _uri, _options: {})
Fog::Mock.not_implemented
end
|
#get_backup_run(_instance_id, _backup_run_id, _due_time) ⇒ Object
15
16
17
18
19
|
# File 'lib/fog/google/requests/sql/get_backup_run.rb', line 15
def get_backup_run(_instance_id, _backup_run_id, _due_time)
Fog::Mock.not_implemented
end
|
#get_instance(_instance_id) ⇒ Object
16
17
18
19
20
|
# File 'lib/fog/google/requests/sql/get_instance.rb', line 16
def get_instance(_instance_id)
Fog::Mock.not_implemented
end
|
#get_operation(_operation_id) ⇒ Object
16
17
18
19
20
|
# File 'lib/fog/google/requests/sql/get_operation.rb', line 16
def get_operation(_operation_id)
Fog::Mock.not_implemented
end
|
#get_ssl_cert(_instance_id, _sha1_fingerprint) ⇒ Object
16
17
18
19
20
|
# File 'lib/fog/google/requests/sql/get_ssl_cert.rb', line 16
def get_ssl_cert(_instance_id, _sha1_fingerprint)
Fog::Mock.not_implemented
end
|
#import_instance(_instance_id, _uri, _options = {}) ⇒ Object
36
37
38
39
40
|
# File 'lib/fog/google/requests/sql/import_instance.rb', line 36
def import_instance(_instance_id, _uri, _options = {})
Fog::Mock.not_implemented
end
|
#insert_backup_run(_instance_id, _run) ⇒ Object
20
21
22
23
24
|
# File 'lib/fog/google/requests/sql/insert_backup_run.rb', line 20
def insert_backup_run(_instance_id, _run)
Fog::Mock.not_implemented
end
|
#insert_instance(_name, _tier, _options = {}) ⇒ Object
20
21
22
23
24
|
# File 'lib/fog/google/requests/sql/insert_instance.rb', line 20
def insert_instance(_name, _tier, _options = {})
Fog::Mock.not_implemented
end
|
#insert_ssl_cert(_instance_id, _common_name) ⇒ Object
22
23
24
25
26
|
# File 'lib/fog/google/requests/sql/insert_ssl_cert.rb', line 22
def insert_ssl_cert(_instance_id, _common_name)
Fog::Mock.not_implemented
end
|
#insert_user(_instance_id, _user) ⇒ Object
17
18
19
20
21
|
# File 'lib/fog/google/requests/sql/insert_user.rb', line 17
def insert_user(_instance_id, _user)
Fog::Mock.not_implemented
end
|
#list_backup_runs(_instance_id, _backup_configuration_id) ⇒ Object
19
20
21
22
23
|
# File 'lib/fog/google/requests/sql/list_backup_runs.rb', line 19
def list_backup_runs(_instance_id, _backup_configuration_id)
Fog::Mock.not_implemented
end
|
#list_flags ⇒ Object
16
17
18
19
20
|
# File 'lib/fog/google/requests/sql/list_flags.rb', line 16
def list_flags
Fog::Mock.not_implemented
end
|
#list_instances(_options: {}) ⇒ Object
19
20
21
22
23
|
# File 'lib/fog/google/requests/sql/list_instances.rb', line 19
def list_instances(_options: {})
Fog::Mock.not_implemented
end
|
#list_operations(_instance_id, _options: {}) ⇒ Object
16
17
18
19
20
|
# File 'lib/fog/google/requests/sql/list_users.rb', line 16
def list_operations(_instance_id)
Fog::Mock.not_implemented
end
|
#list_ssl_certs(_instance_id) ⇒ Object
16
17
18
19
20
|
# File 'lib/fog/google/requests/sql/list_ssl_certs.rb', line 16
def list_ssl_certs(_instance_id)
Fog::Mock.not_implemented
end
|
#list_tiers ⇒ Object
16
17
18
19
20
|
# File 'lib/fog/google/requests/sql/list_tiers.rb', line 16
def list_tiers
Fog::Mock.not_implemented
end
|
#random_operation ⇒ Object
34
35
36
|
# File 'lib/fog/google/sql/mock.rb', line 34
def random_operation
"operation-#{Fog::Mock.random_numbers(13)}-#{Fog::Mock.random_hex(13)}-#{Fog::Mock.random_hex(8)}"
end
|
#reset_data ⇒ Object
30
31
32
|
# File 'lib/fog/google/sql/mock.rb', line 30
def reset_data
self.class.data.delete(project)
end
|
#reset_instance_ssl_config(_instance_id) ⇒ Object
18
19
20
21
22
|
# File 'lib/fog/google/requests/sql/reset_instance_ssl_config.rb', line 18
def reset_instance_ssl_config(_instance_id)
Fog::Mock.not_implemented
end
|
#restart_instance(_instance_id) ⇒ Object
16
17
18
19
20
|
# File 'lib/fog/google/requests/sql/restart_instance.rb', line 16
def restart_instance(_instance_id)
Fog::Mock.not_implemented
end
|
#restore_instance_backup(_instance_id, _backup_run_id) ⇒ Object
23
24
25
26
27
|
# File 'lib/fog/google/requests/sql/restore_instance_backup.rb', line 23
def restore_instance_backup(_instance_id, _backup_run_id)
Fog::Mock.not_implemented
end
|
#update_instance(_instance_id, _settings_version, _tier, _settings = {}) ⇒ Object
23
24
25
26
27
|
# File 'lib/fog/google/requests/sql/update_instance.rb', line 23
def update_instance(_instance_id, _settings_version, _tier, _settings = {})
Fog::Mock.not_implemented
end
|
#update_user(_instance_id, _host, _name, _user) ⇒ Object
19
20
21
22
23
|
# File 'lib/fog/google/requests/sql/update_user.rb', line 19
def update_user(_instance_id, _host, _name, _user)
Fog::Mock.not_implemented
end
|