Module: HammerCLIForeman::ComputeResources
- Defined in:
- lib/hammer_cli_foreman/compute_resource/ec2.rb,
lib/hammer_cli_foreman/compute_resource/base.rb,
lib/hammer_cli_foreman/compute_resource/ovirt.rb,
lib/hammer_cli_foreman/compute_resource/utils.rb,
lib/hammer_cli_foreman/compute_resource/vmware.rb,
lib/hammer_cli_foreman/compute_resource/libvirt.rb,
lib/hammer_cli_foreman/compute_resource/openstack.rb
Defined Under Namespace
Classes: Base, EC2, Libvirt, OpenStack, Ovirt, VMware
Class Method Summary
collapse
Class Method Details
.get_host_compute_resource_id(host_id) ⇒ Object
.get_hostgroup_compute_resource_id(hostgroup_id) ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/hammer_cli_foreman/compute_resource/utils.rb', line 11
def self.get_hostgroup_compute_resource_id(hostgroup_id)
hostgroup = HammerCLIForeman.record_to_common_format(
HammerCLIForeman.foreman_resource(:hostgroups).call(:show, 'id' => hostgroup_id)
)
compute_resource_id = hostgroup['compute_resource_id']
if !hostgroup['compute_resource_name'].to_s.strip.empty? && compute_resource_id.nil?
compute_resource= HammerCLIForeman.record_to_common_format(
HammerCLIForeman.foreman_resource(:compute_resources).call(
:index, :search => "name = \"#{hostgroup['compute_resource_name']}\""
)
)
compute_resource_id = compute_resource['results'][0]['id'] if compute_resource['results'][0]
end
compute_resource_id
end
|
.get_image_uuid(compute_resource_id, image_id) ⇒ Object
.resource_provider(compute_resource_id) ⇒ Object