class OpsmanagerClient::Client::Internals::Product

Attributes

guid[R]
ips[R]
jobs[R]
prepared[R]
type[R]
version[R]

Public Class Methods

new(opts={}) click to toggle source
# File lib/opsmanager_client/client.rb, line 46
def initialize(opts={})
  @jobs    = opts.fetch('jobs').map{|job_details| Internals::Job.new(job_details.merge('product' => self)) }
  @ips     = opts.fetch('ips', {})
  @type    = opts.fetch('identifier')
  @version = opts.fetch('product_version')
  @guid    = opts.fetch('guid')
  @prepared = opts.fetch('prepared')
end

Public Instance Methods

has_job_of_type?(job_type) click to toggle source
# File lib/opsmanager_client/client.rb, line 61
def has_job_of_type?(job_type)
  job_of_type(job_type) != nil
end
job_of_type(job_type) click to toggle source
# File lib/opsmanager_client/client.rb, line 57
def job_of_type(job_type)
  jobs.find { |job| job.type == job_type }
end