Class: Bosh::Director::DeploymentPlan::Link
- Defined in:
- lib/bosh/director/deployment_plan/links/link.rb
Overview
tested in links_resolver_spec
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, source) ⇒ Link
constructor
A new instance of Link.
- #spec ⇒ Object
Constructor Details
#initialize(name, source) ⇒ Link
Returns a new instance of Link.
8 9 10 11 |
# File 'lib/bosh/director/deployment_plan/links/link.rb', line 8 def initialize(name, source) @name = name @source = source end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/bosh/director/deployment_plan/links/link.rb', line 6 def name @name end |
Instance Method Details
#spec ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/bosh/director/deployment_plan/links/link.rb', line 13 def spec { 'nodes' => @source.needed_instance_plans.map do |instance_plan| instance = instance_plan.instance availability_zone = instance.availability_zone.name if instance.availability_zone { 'name' => @source.name, 'index' => instance.index, 'id' => instance.uuid, 'az' => availability_zone, 'networks' => instance_plan.network_addresses } end } end |