Class: Bosh::Director::DeploymentPlan::NetworkPlanner::Plan
- Defined in:
- lib/bosh/director/deployment_plan/network_planner/plan.rb
Instance Attribute Summary collapse
-
#existing ⇒ Object
Returns the value of attribute existing.
-
#reservation ⇒ Object
readonly
Returns the value of attribute reservation.
Instance Method Summary collapse
- #desired? ⇒ Boolean
- #existing? ⇒ Boolean
-
#initialize(attrs) ⇒ Plan
constructor
A new instance of Plan.
- #obsolete? ⇒ Boolean
Constructor Details
#initialize(attrs) ⇒ Plan
Returns a new instance of Plan.
4 5 6 7 8 |
# File 'lib/bosh/director/deployment_plan/network_planner/plan.rb', line 4 def initialize(attrs) @reservation = attrs.fetch(:reservation) @obsolete = attrs.fetch(:obsolete, false) @existing = attrs.fetch(:existing, false) end |
Instance Attribute Details
#existing ⇒ Object
Returns the value of attribute existing.
11 12 13 |
# File 'lib/bosh/director/deployment_plan/network_planner/plan.rb', line 11 def existing @existing end |
#reservation ⇒ Object (readonly)
Returns the value of attribute reservation.
10 11 12 |
# File 'lib/bosh/director/deployment_plan/network_planner/plan.rb', line 10 def reservation @reservation end |
Instance Method Details
#desired? ⇒ Boolean
17 18 19 |
# File 'lib/bosh/director/deployment_plan/network_planner/plan.rb', line 17 def desired? !existing? && !obsolete? end |
#existing? ⇒ Boolean
21 22 23 |
# File 'lib/bosh/director/deployment_plan/network_planner/plan.rb', line 21 def existing? !!@existing end |
#obsolete? ⇒ Boolean
13 14 15 |
# File 'lib/bosh/director/deployment_plan/network_planner/plan.rb', line 13 def obsolete? !!@obsolete end |