class OpsmanagerClient::Client::Internals::Job

Attributes

guid[R]
partitions[R]
product[R]
properties[R]
type[R]

Public Class Methods

new(opts={}) click to toggle source
# File lib/opsmanager_client/client.rb, line 19
def initialize(opts={})
  @type       = opts.fetch('identifier')
  @guid       = opts.fetch('guid')
  @properties = Hash[opts.fetch('properties', {}).map{|property| [property.fetch('identifier'), property.fetch('value',nil)] }]
  @product    = opts.fetch('product')
  @partitions = opts.fetch('partitions', []).map{|p| JobPartition.new(p) }
end

Public Instance Methods

ips() click to toggle source
# File lib/opsmanager_client/client.rb, line 29
def ips
  product.ips.values_at(*partitions.map(&:guid)).flatten.compact.uniq
end