Class: Kitchen::Driver::Oci::Models::Iscsi
- Inherits:
-
Blockstorage
- Object
- Base
- Kitchen::Driver::Oci
- Blockstorage
- Kitchen::Driver::Oci::Models::Iscsi
- Defined in:
- lib/kitchen/driver/oci/models/iscsi.rb
Overview
iscsi volume attachment model
Instance Attribute Summary collapse
-
#attachment_type ⇒ Object
readonly
Returns the value of attribute attachment_type.
Attributes inherited from Blockstorage
#api, #config, #oci, #state, #volume_attachment_state, #volume_state
Instance Method Summary collapse
- #attachment_details(volume_details, server_id) ⇒ Object
- #final_volume_attachment_state(response) ⇒ Object
-
#initialize(config, state, oci, api) ⇒ Iscsi
constructor
A new instance of Iscsi.
Methods inherited from Blockstorage
#attach_volume, #create_volume, #delete_volume, #detatch_and_delete, #detatch_volume, #final_state
Methods inherited from Kitchen::Driver::Oci
#create, #destroy, validation_error
Methods included from Kitchen::Driver::Oci::Models
#instance_class, #volume_class
Constructor Details
#initialize(config, state, oci, api) ⇒ Iscsi
Returns a new instance of Iscsi.
28 29 30 31 |
# File 'lib/kitchen/driver/oci/models/iscsi.rb', line 28 def initialize(config, state, oci, api) super @attachment_type = "iscsi" end |
Instance Attribute Details
#attachment_type ⇒ Object (readonly)
Returns the value of attribute attachment_type.
26 27 28 |
# File 'lib/kitchen/driver/oci/models/iscsi.rb', line 26 def @attachment_type end |
Instance Method Details
#attachment_details(volume_details, server_id) ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/kitchen/driver/oci/models/iscsi.rb', line 33 def (volume_details, server_id) OCI::Core::Models::AttachIScsiVolumeDetails.new( display_name: "#{}-#{volume_details.display_name}", volume_id: volume_details.id, instance_id: server_id ) end |
#final_volume_attachment_state(response) ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'lib/kitchen/driver/oci/models/iscsi.rb', line 41 def (response) .store(:id, response.id) .store(:display_name, response.display_name) .store(:iqn_ipv4, response.ipv4) .store(:iqn, response.iqn) .store(:port, response.port) end |