Class: Fog::Google::Monitoring::Mock
- Inherits:
-
Object
- Object
- Fog::Google::Monitoring::Mock
show all
- Includes:
- Shared
- Defined in:
- lib/fog/google/monitoring/mock.rb,
lib/fog/google/requests/monitoring/list_timeseries.rb,
lib/fog/google/requests/monitoring/create_timeseries.rb,
lib/fog/google/requests/monitoring/get_metric_descriptor.rb,
lib/fog/google/requests/monitoring/list_metric_descriptors.rb,
lib/fog/google/requests/monitoring/create_metric_descriptor.rb,
lib/fog/google/requests/monitoring/delete_metric_descriptor.rb,
lib/fog/google/requests/monitoring/get_monitored_resource_descriptor.rb,
lib/fog/google/requests/monitoring/list_monitored_resource_descriptors.rb
Instance Attribute Summary
Attributes included from Shared
#api_url, #api_version, #project
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Shared
#apply_client_options, #build_excon_response, #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
|
# File 'lib/fog/google/monitoring/mock.rb', line 11
def self.data
@data ||= Hash.new do |hash, key|
hash[key] = {
:timeseries => {},
:monitored_resource_descriptor => {},
:metric_descriptors => {}
}
end
end
|
.reset ⇒ Object
21
22
23
|
# File 'lib/fog/google/monitoring/mock.rb', line 21
def self.reset
@data = nil
end
|
Instance Method Details
#create_metric_descriptor(**_args) ⇒ Object
43
44
45
46
47
|
# File 'lib/fog/google/requests/monitoring/create_metric_descriptor.rb', line 43
def create_metric_descriptor(**_args)
Fog::Mock.not_implemented
end
|
#create_timeseries(_timeseries: []) ⇒ Object
21
22
23
24
25
|
# File 'lib/fog/google/requests/monitoring/create_timeseries.rb', line 21
def create_timeseries(_timeseries: [])
Fog::Mock.not_implemented
end
|
#data ⇒ Object
25
26
27
|
# File 'lib/fog/google/monitoring/mock.rb', line 25
def data
self.class.data[project]
end
|
#delete_metric_descriptor(_metric_type) ⇒ Object
11
12
13
14
15
|
# File 'lib/fog/google/requests/monitoring/delete_metric_descriptor.rb', line 11
def delete_metric_descriptor(_metric_type)
Fog::Mock.not_implemented
end
|
#get_metric_descriptor(_metric_type) ⇒ Object
11
12
13
14
15
|
# File 'lib/fog/google/requests/monitoring/get_metric_descriptor.rb', line 11
def get_metric_descriptor(_metric_type)
Fog::Mock.not_implemented
end
|
#get_monitored_resource_descriptor(_resource_type) ⇒ Object
13
14
15
|
# File 'lib/fog/google/requests/monitoring/get_monitored_resource_descriptor.rb', line 13
def get_monitored_resource_descriptor(_resource_type)
raise Fog::Errors::MockNotImplemented
end
|
#list_metric_descriptors(_options = {}) ⇒ Object
20
21
22
|
# File 'lib/fog/google/requests/monitoring/list_metric_descriptors.rb', line 20
def list_metric_descriptors(_options = {})
raise Fog::Errors::MockNotImplemented
end
|
#list_monitored_resource_descriptors(_filter, _page_size, _page_token) ⇒ Object
21
22
23
24
25
|
# File 'lib/fog/google/requests/monitoring/list_monitored_resource_descriptors.rb', line 21
def list_monitored_resource_descriptors(_filter, _page_size, _page_token)
Fog::Mock.not_implemented
end
|
#list_timeseries(_options = {}) ⇒ Object
47
48
49
50
51
|
# File 'lib/fog/google/requests/monitoring/list_timeseries.rb', line 47
def list_timeseries(_options = {})
Fog::Mock.not_implemented
end
|
#reset_data ⇒ Object
29
30
31
|
# File 'lib/fog/google/monitoring/mock.rb', line 29
def reset_data
self.class.data.delete(project)
end
|