Class: Bosh::Director::DeploymentPlan::AvailabilityZone

Inherits:
Object
  • Object
show all
Extended by:
ValidationHelper
Defined in:
lib/bosh/director/deployment_plan/availability_zone.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ValidationHelper

safe_property

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_propertiesObject (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

#nameObject (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

#inspectObject



22
23
24
# File 'lib/bosh/director/deployment_plan/availability_zone.rb', line 22

def inspect
  "az: #{name}"
end