class TungstenInstall::TungstenTopology

Attributes

connectors[R]
dataservices[R]
datasources[R]
master[R]
type[R]

Public Class Methods

new(install, dataservice) click to toggle source
# File lib/tungsten/install.rb, line 479
def initialize(install, dataservice)
  @install = install
  @name = dataservice
  
  unless @install.use_tpm?()
    raise "Unable to parse the topology for #{@name} from #{@install.hostname()}:#{@install.root()} because tpm was not used for installation"
  end
  
  values = @install.settings([
    "dataservices.#{@name}.dataservice_hosts",
    "dataservices.#{@name}.dataservice_master_host",
    "dataservices.#{@name}.dataservice_connectors",
    "dataservices.#{@name}.dataservice_composite_datasources",
    "dataservices.#{@name}.dataservice_topology"
  ])
  
  @type = values["dataservices.#{@name}.dataservice_topology"]
  @members = values["dataservices.#{@name}.dataservice_hosts"].to_s().split(",")
  @master = values["dataservices.#{@name}.dataservice_master_host"]
  @connectors = values["dataservices.#{@name}.dataservice_connectors"].to_s().split(",")
  @dataservices = values["dataservices.#{@name}.dataservice_composite_datasources"].to_s().split(",")
end

Public Instance Methods

is_composite?() click to toggle source
# File lib/tungsten/install.rb, line 502
def is_composite?
  (@dataservices.size() > 0)
end
to_hash() click to toggle source
# File lib/tungsten/install.rb, line 506
def to_hash
  {
    :hostname => @install.hostname(),
    :root => @install.root(),
    :is_composite => is_composite?(),
    :type => @type,
    :members => @members,
    :master => @master,
    :connectors => @connectors,
    :dataservices => @dataservices
  }
end