Class: Bosh::Director::DeploymentPlan::VmExtension

Inherits:
Object
  • Object
show all
Includes:
ValidationHelper
Defined in:
lib/bosh/director/deployment_plan/vm_extension.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ValidationHelper

#safe_property

Constructor Details

#initialize(spec) ⇒ VmExtension

Returns a new instance of VmExtension.



10
11
12
13
14
15
16
17
# File 'lib/bosh/director/deployment_plan/vm_extension.rb', line 10

def initialize(spec)

  @name = safe_property(spec, "name", class: String)

  @cloud_properties =
    safe_property(spec, "cloud_properties", class: Hash, default: {})

end

Instance Attribute Details

#cloud_propertiesObject (readonly)

Returns the value of attribute cloud_properties.



8
9
10
# File 'lib/bosh/director/deployment_plan/vm_extension.rb', line 8

def cloud_properties
  @cloud_properties
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/bosh/director/deployment_plan/vm_extension.rb', line 6

def name
  @name
end

Instance Method Details

#specObject



19
20
21
22
23
24
# File 'lib/bosh/director/deployment_plan/vm_extension.rb', line 19

def spec
  {
    "name" => @name,
    "cloud_properties" => @cloud_properties,
  }
end