Class: Fog::OpenStack::Metric::Real
- Inherits:
-
Object
- Object
- Fog::OpenStack::Metric::Real
show all
- Includes:
- Core
- Defined in:
- lib/fog/openstack/metric.rb,
lib/fog/openstack/metric/requests/get_metric.rb,
lib/fog/openstack/metric/requests/get_resource.rb,
lib/fog/openstack/metric/requests/list_metrics.rb,
lib/fog/openstack/metric/requests/list_resources.rb,
lib/fog/openstack/metric/requests/get_metric_measures.rb,
lib/fog/openstack/metric/requests/get_resource_metric_measures.rb
Instance Attribute Summary
Attributes included from Core
#auth_token, #auth_token_expiration, #current_tenant, #current_user, #current_user_id, #openstack_cache_ttl, #openstack_domain_id, #openstack_domain_name, #openstack_identity_api_version, #openstack_project_domain, #openstack_project_domain_id, #openstack_project_id, #openstack_user_domain, #openstack_user_domain_id, #unscoped_token
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Core
#credentials, #initialize, #reload
Class Method Details
.not_found_class ⇒ Object
97
98
99
|
# File 'lib/fog/openstack/metric.rb', line 97
def self.not_found_class
Fog::OpenStack::Metric::NotFound
end
|
Instance Method Details
#default_path_prefix ⇒ Object
93
94
95
|
# File 'lib/fog/openstack/metric.rb', line 93
def default_path_prefix
'v1'
end
|
#default_service_type ⇒ Object
101
102
103
|
# File 'lib/fog/openstack/metric.rb', line 101
def default_service_type
%w[metric]
end
|
#get_metric(metric_id) ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/fog/openstack/metric/requests/get_metric.rb', line 5
def get_metric(metric_id)
request(
:expects => 200,
:method => 'GET',
:path => "metric/#{metric_id}"
)
end
|
#get_metric_measures(metric_id, options = {}) ⇒ Object
5
6
7
8
9
10
11
12
|
# File 'lib/fog/openstack/metric/requests/get_metric_measures.rb', line 5
def get_metric_measures(metric_id, options = {})
request(
:expects => 200,
:method => 'GET',
:path => "metric/#{metric_id}/measures",
:query => options,
)
end
|
#get_resource(resource_id) ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/fog/openstack/metric/requests/get_resource.rb', line 5
def get_resource(resource_id)
request(
:expects => 200,
:method => 'GET',
:path => "resource/generic/#{resource_id}"
)
end
|
#get_resource_metric_measures(resource_id, metric_name, options = {}) ⇒ Object
5
6
7
8
9
10
11
12
|
# File 'lib/fog/openstack/metric/requests/get_resource_metric_measures.rb', line 5
def get_resource_metric_measures(resource_id, metric_name, options = {})
request(
:expects => 200,
:method => 'GET',
:path => "resource/generic/#{resource_id}/metric/#{metric_name}/measures",
:query => options
)
end
|
#list_metrics(options = {}) ⇒ Object
5
6
7
8
9
10
11
12
|
# File 'lib/fog/openstack/metric/requests/list_metrics.rb', line 5
def list_metrics(options = {})
request(
:expects => 200,
:method => 'GET',
:path => 'metric',
:query => options
)
end
|
#list_resources(type = "generic", options = {}) ⇒ Object
5
6
7
8
9
10
11
12
|
# File 'lib/fog/openstack/metric/requests/list_resources.rb', line 5
def list_resources(type = "generic", options = {})
request(
:expects => 200,
:method => 'GET',
:path => "resource/#{Fog::OpenStack.escape(type)}",
:query => options
)
end
|