Class: Bosh::Director::DeploymentPlan::JobNetwork
- Defined in:
- lib/bosh/director/deployment_plan/job_network.rb
Instance Attribute Summary collapse
-
#deployment_network ⇒ Object
readonly
Returns the value of attribute deployment_network.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#static_ips ⇒ Object
readonly
Returns the value of attribute static_ips.
Instance Method Summary collapse
- #availability_zones ⇒ Object
- #default_for?(property) ⇒ Boolean
- #has_azs?(az_names) ⇒ Boolean
-
#initialize(name, static_ips, default_for, deployment_network) ⇒ JobNetwork
constructor
A new instance of JobNetwork.
- #make_default_for(defaults) ⇒ Object
- #properties_for_which_the_network_is_the_default ⇒ Object
- #static? ⇒ Boolean
- #vip? ⇒ Boolean
Constructor Details
#initialize(name, static_ips, default_for, deployment_network) ⇒ JobNetwork
Returns a new instance of JobNetwork.
6 7 8 9 10 11 |
# File 'lib/bosh/director/deployment_plan/job_network.rb', line 6 def initialize(name, static_ips, default_for, deployment_network) @name = name @static_ips = static_ips @default_for = default_for @deployment_network = deployment_network end |
Instance Attribute Details
#deployment_network ⇒ Object (readonly)
Returns the value of attribute deployment_network.
4 5 6 |
# File 'lib/bosh/director/deployment_plan/job_network.rb', line 4 def deployment_network @deployment_network end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/bosh/director/deployment_plan/job_network.rb', line 4 def name @name end |
#static_ips ⇒ Object (readonly)
Returns the value of attribute static_ips.
4 5 6 |
# File 'lib/bosh/director/deployment_plan/job_network.rb', line 4 def static_ips @static_ips end |
Instance Method Details
#availability_zones ⇒ Object
13 14 15 |
# File 'lib/bosh/director/deployment_plan/job_network.rb', line 13 def availability_zones @deployment_network.availability_zones end |
#default_for?(property) ⇒ Boolean
29 30 31 |
# File 'lib/bosh/director/deployment_plan/job_network.rb', line 29 def default_for?(property) properties_for_which_the_network_is_the_default.include?(property) end |
#has_azs?(az_names) ⇒ Boolean
37 38 39 |
# File 'lib/bosh/director/deployment_plan/job_network.rb', line 37 def has_azs?(az_names) @deployment_network.has_azs?(az_names) end |
#make_default_for(defaults) ⇒ Object
33 34 35 |
# File 'lib/bosh/director/deployment_plan/job_network.rb', line 33 def make_default_for(defaults) @default_for = defaults end |
#properties_for_which_the_network_is_the_default ⇒ Object
17 18 19 |
# File 'lib/bosh/director/deployment_plan/job_network.rb', line 17 def properties_for_which_the_network_is_the_default @default_for end |
#static? ⇒ Boolean
21 22 23 |
# File 'lib/bosh/director/deployment_plan/job_network.rb', line 21 def static? !!@static_ips end |
#vip? ⇒ Boolean
25 26 27 |
# File 'lib/bosh/director/deployment_plan/job_network.rb', line 25 def vip? deployment_network.kind_of?(VipNetwork) end |