Class: OracleBMC::Core::Models::IScsiVolumeAttachment
- Inherits:
-
VolumeAttachment
- Object
- VolumeAttachment
- OracleBMC::Core::Models::IScsiVolumeAttachment
- Defined in:
- lib/oraclebmc/core/models/i_scsi_volume_attachment.rb
Constant Summary
Constants inherited from VolumeAttachment
VolumeAttachment::LIFECYCLE_STATE_ENUM
Instance Attribute Summary collapse
-
#chap_secret ⇒ String
The Challenge-Handshake-Authentication-Protocol (CHAP) secret valid for the associated CHAP user name.
-
#chap_username ⇒ String
The volume’s system-generated Challenge-Handshake-Authentication-Protocol (CHAP) user name.
-
#ipv4 ⇒ String
The volume’s iSCSI IP address.
-
#iqn ⇒ String
The target volume’s iSCSI Qualified Name in the format defined by RFC 3720.
-
#port ⇒ Integer
The volume’s iSCSI port.
Attributes inherited from VolumeAttachment
#attachment_type, #availability_domain, #compartment_id, #display_name, #id, #instance_id, #lifecycle_state, #time_created, #volume_id
Instance Method Summary collapse
-
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other_object) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ IScsiVolumeAttachment
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Methods inherited from VolumeAttachment
Constructor Details
#initialize(attributes = {}) ⇒ IScsiVolumeAttachment
Initializes the object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/oraclebmc/core/models/i_scsi_volume_attachment.rb', line 47 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['attachmentType'] = 'iscsi' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} if attributes[:'chapSecret'] self.chap_secret = attributes[:'chapSecret'] end if attributes[:'chapUsername'] self.chap_username = attributes[:'chapUsername'] end if attributes[:'ipv4'] self.ipv4 = attributes[:'ipv4'] end if attributes[:'iqn'] self.iqn = attributes[:'iqn'] end if attributes[:'port'] self.port = attributes[:'port'] end end |
Instance Attribute Details
#chap_secret ⇒ String
The Challenge-Handshake-Authentication-Protocol (CHAP) secret valid for the associated CHAP user name. (Also called the "CHAP password".)
Example: ‘d6866c0d-298b-48ba-95af-309b4faux45e`
14 15 16 |
# File 'lib/oraclebmc/core/models/i_scsi_volume_attachment.rb', line 14 def chap_secret @chap_secret end |
#chap_username ⇒ String
The volume’s system-generated Challenge-Handshake-Authentication-Protocol (CHAP) user name.
Example: ‘ocid1.volume.oc1.phx.abyhqljrgvttnlx73nmrwfaux7kcvzfs3s66izvxf2h4lgvyndsdsnoiwr5q`
21 22 23 |
# File 'lib/oraclebmc/core/models/i_scsi_volume_attachment.rb', line 21 def chap_username @chap_username end |
#ipv4 ⇒ String
The volume’s iSCSI IP address.
Example: ‘169.254.0.2`
28 29 30 |
# File 'lib/oraclebmc/core/models/i_scsi_volume_attachment.rb', line 28 def ipv4 @ipv4 end |
#iqn ⇒ String
The target volume’s iSCSI Qualified Name in the format defined by RFC 3720.
Example: ‘iqn.2015-12.us.oracle.com:456b0391-17b8-4122-bbf1-f85fc0bb97d9`
35 36 37 |
# File 'lib/oraclebmc/core/models/i_scsi_volume_attachment.rb', line 35 def iqn @iqn end |
#port ⇒ Integer
The volume’s iSCSI port.
Example: ‘3260`
42 43 44 |
# File 'lib/oraclebmc/core/models/i_scsi_volume_attachment.rb', line 42 def port @port end |
Instance Method Details
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/oraclebmc/core/models/i_scsi_volume_attachment.rb', line 82 def ==(other_object) return true if self.equal?(other_object) self.class == other_object.class && == other_object. && availability_domain == other_object.availability_domain && compartment_id == other_object.compartment_id && display_name == other_object.display_name && id == other_object.id && instance_id == other_object.instance_id && lifecycle_state == other_object.lifecycle_state && time_created == other_object.time_created && volume_id == other_object.volume_id && chap_secret == other_object.chap_secret && chap_username == other_object.chap_username && ipv4 == other_object.ipv4 && iqn == other_object.iqn && port == other_object.port end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/oraclebmc/core/models/i_scsi_volume_attachment.rb', line 116 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other_object) ⇒ Boolean
103 104 105 |
# File 'lib/oraclebmc/core/models/i_scsi_volume_attachment.rb', line 103 def eql?(other_object) self == other_object end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
109 110 111 |
# File 'lib/oraclebmc/core/models/i_scsi_volume_attachment.rb', line 109 def hash [, availability_domain, compartment_id, display_name, id, instance_id, lifecycle_state, time_created, volume_id, chap_secret, chap_username, ipv4, iqn, port].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
141 142 143 144 145 146 147 148 149 |
# File 'lib/oraclebmc/core/models/i_scsi_volume_attachment.rb', line 141 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
135 136 137 |
# File 'lib/oraclebmc/core/models/i_scsi_volume_attachment.rb', line 135 def to_s to_hash.to_s end |