Sha256: c90bc1b3fc814f6dabb8d87f0f76c9fc9e56c6dc51ca81abe55b1c7a4a872d56

Contents?: true

Size: 837 Bytes

Versions: 10

Compression:

Stored size: 837 Bytes

Contents

module HammerCLIForeman
  module ComputeResources
    def self.get_image_uuid(compute_resource_id, image_id)
      HammerCLIForeman.record_to_common_format(
        HammerCLIForeman.foreman_resource(:images).call(
          :show, 'compute_resource_id' => compute_resource_id, 'id' => image_id
        )['uuid']
      )
    end

    def self.get_host_compute_resource_id(host_id)
      HammerCLIForeman.record_to_common_format(
        HammerCLIForeman.foreman_resource(:hosts).call(
          :show, 'id' => host_id
        )['compute_resource_id']
      )
    end

    def self.resource_provider(compute_resource_id)
      HammerCLIForeman.record_to_common_format(
        HammerCLIForeman.foreman_resource(:compute_resources).call(
          :show, 'id' => compute_resource_id
        )
      )['provider'].downcase
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
hammer_cli_foreman-0.19.6 lib/hammer_cli_foreman/compute_resource/utils.rb
hammer_cli_foreman-0.19.5 lib/hammer_cli_foreman/compute_resource/utils.rb
hammer_cli_foreman-0.19.4 lib/hammer_cli_foreman/compute_resource/utils.rb
hammer_cli_foreman-0.19.3 lib/hammer_cli_foreman/compute_resource/utils.rb
hammer_cli_foreman-0.19.2 lib/hammer_cli_foreman/compute_resource/utils.rb
hammer_cli_foreman-0.18.2 lib/hammer_cli_foreman/compute_resource/utils.rb
hammer_cli_foreman-0.19.1 lib/hammer_cli_foreman/compute_resource/utils.rb
hammer_cli_foreman-0.18.1 lib/hammer_cli_foreman/compute_resource/utils.rb
hammer_cli_foreman-0.19.0 lib/hammer_cli_foreman/compute_resource/utils.rb
hammer_cli_foreman-0.18.0 lib/hammer_cli_foreman/compute_resource/utils.rb