Class: Bosh::AwsCloud::InstancesCreatePresenter
- Inherits:
-
Object
- Object
- Bosh::AwsCloud::InstancesCreatePresenter
- Defined in:
- lib/cloud/aws/instances_create_presenter.rb
Instance Attribute Summary collapse
-
#volume_properties ⇒ Object
readonly
Returns the value of attribute volume_properties.
Instance Method Summary collapse
-
#initialize(volume_properties) ⇒ InstancesCreatePresenter
constructor
A new instance of InstancesCreatePresenter.
- #present ⇒ Object
Constructor Details
#initialize(volume_properties) ⇒ InstancesCreatePresenter
Returns a new instance of InstancesCreatePresenter.
5 6 7 |
# File 'lib/cloud/aws/instances_create_presenter.rb', line 5 def initialize(volume_properties) @volume_properties = volume_properties end |
Instance Attribute Details
#volume_properties ⇒ Object (readonly)
Returns the value of attribute volume_properties.
4 5 6 |
# File 'lib/cloud/aws/instances_create_presenter.rb', line 4 def volume_properties @volume_properties end |
Instance Method Details
#present ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/cloud/aws/instances_create_presenter.rb', line 9 def present ebs = { volume_size: volume_size_in_gb, volume_type: volume_properties.type, delete_on_termination: true, } ebs[:iops] = volume_properties.iops if volume_properties.iops [{device_name: '/dev/sdb', ebs: ebs}] end |