Class: ForemanResourceQuota::ResourceOrigin
- Inherits:
-
Object
- Object
- ForemanResourceQuota::ResourceOrigin
show all
- Defined in:
- app/services/foreman_resource_quota/resource_origin.rb
Constant Summary
collapse
- RESOURCE_FUNCTION_MAP =
{
cpu_cores: :extract_cpu_cores,
memory_mb: :extract_memory_mb,
disk_gb: :extract_disk_gb,
}.freeze
Instance Method Summary
collapse
Instance Method Details
#collect_resources!(hosts_resources, missing_hosts_resources, host_objects) ⇒ Object
11
12
13
14
15
16
17
|
# File 'app/services/foreman_resource_quota/resource_origin.rb', line 11
def collect_resources!(hosts_resources, missing_hosts_resources, host_objects)
return if missing_hosts_resources.empty?
relevant_hosts = load_hosts_eagerly(missing_hosts_resources, host_objects, host_attribute_eager_name)
host_values = collect_attribute_from_hosts(relevant_hosts, host_attribute_name)
process_resources_and_delete_missing_hosts!(hosts_resources, missing_hosts_resources, host_values)
end
|
27
28
29
|
# File 'app/services/foreman_resource_quota/resource_origin.rb', line 27
def (param)
raise NotImplementedError
end
|
35
36
37
|
# File 'app/services/foreman_resource_quota/resource_origin.rb', line 35
def (param)
raise NotImplementedError
end
|
31
32
33
|
# File 'app/services/foreman_resource_quota/resource_origin.rb', line 31
def (param)
raise NotImplementedError
end
|
#host_attribute_eager_name ⇒ Object
19
20
21
|
# File 'app/services/foreman_resource_quota/resource_origin.rb', line 19
def host_attribute_eager_name
raise NotImplementedError
end
|
#host_attribute_name ⇒ Object
23
24
25
|
# File 'app/services/foreman_resource_quota/resource_origin.rb', line 23
def host_attribute_name
raise NotImplementedError
end
|