Class: Bosh::Director::DeploymentPlan::AvailabilityZone
- Extended by:
- ValidationHelper
- Defined in:
- lib/bosh/director/deployment_plan/availability_zone.rb
Instance Attribute Summary collapse
-
#cloud_properties ⇒ Object
readonly
Returns the value of attribute cloud_properties.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, cloud_properties) ⇒ AvailabilityZone
constructor
A new instance of AvailabilityZone.
- #inspect ⇒ Object
Methods included from ValidationHelper
Constructor Details
#initialize(name, cloud_properties) ⇒ AvailabilityZone
Returns a new instance of AvailabilityZone.
15 16 17 18 |
# File 'lib/bosh/director/deployment_plan/availability_zone.rb', line 15 def initialize(name, cloud_properties) @name = name @cloud_properties = cloud_properties end |
Instance Attribute Details
#cloud_properties ⇒ Object (readonly)
Returns the value of attribute cloud_properties.
20 21 22 |
# File 'lib/bosh/director/deployment_plan/availability_zone.rb', line 20 def cloud_properties @cloud_properties end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
20 21 22 |
# File 'lib/bosh/director/deployment_plan/availability_zone.rb', line 20 def name @name end |
Class Method Details
.parse(availability_zone_spec) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/bosh/director/deployment_plan/availability_zone.rb', line 6 def self.parse(availability_zone_spec) name = safe_property(availability_zone_spec, "name", class: String) cloud_properties = safe_property(availability_zone_spec, "cloud_properties", class: Hash, default: {}) new(name, cloud_properties) end |
Instance Method Details
#inspect ⇒ Object
22 23 24 |
# File 'lib/bosh/director/deployment_plan/availability_zone.rb', line 22 def inspect "az: #{name}" end |