Class: TungstenInstall::TungstenTopology
- Inherits:
-
Object
- Object
- TungstenInstall::TungstenTopology
- Defined in:
- lib/tungsten/install.rb
Instance Attribute Summary collapse
-
#connectors ⇒ Object
readonly
Returns the value of attribute connectors.
-
#dataservices ⇒ Object
readonly
Returns the value of attribute dataservices.
-
#datasources ⇒ Object
readonly
Returns the value of attribute datasources.
-
#master ⇒ Object
readonly
Returns the value of attribute master.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(install, dataservice) ⇒ TungstenTopology
constructor
A new instance of TungstenTopology.
- #is_composite? ⇒ Boolean
- #to_hash ⇒ Object
Constructor Details
#initialize(install, dataservice) ⇒ TungstenTopology
Returns a new instance of TungstenTopology.
479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 |
# 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 |
Instance Attribute Details
#connectors ⇒ Object (readonly)
Returns the value of attribute connectors.
477 478 479 |
# File 'lib/tungsten/install.rb', line 477 def connectors @connectors end |
#dataservices ⇒ Object (readonly)
Returns the value of attribute dataservices.
477 478 479 |
# File 'lib/tungsten/install.rb', line 477 def dataservices @dataservices end |
#datasources ⇒ Object (readonly)
Returns the value of attribute datasources.
477 478 479 |
# File 'lib/tungsten/install.rb', line 477 def datasources @datasources end |
#master ⇒ Object (readonly)
Returns the value of attribute master.
477 478 479 |
# File 'lib/tungsten/install.rb', line 477 def master @master end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
477 478 479 |
# File 'lib/tungsten/install.rb', line 477 def type @type end |
Instance Method Details
#is_composite? ⇒ Boolean
502 503 504 |
# File 'lib/tungsten/install.rb', line 502 def is_composite? (@dataservices.size() > 0) end |
#to_hash ⇒ Object
506 507 508 509 510 511 512 513 514 515 516 517 |
# 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 |