Class: OCI::CloudMigrations::Models::Storage
- Inherits:
-
Object
- Object
- OCI::CloudMigrations::Models::Storage
- Defined in:
- lib/oci/cloud_migrations/models/storage.rb
Overview
Host storage information
Constant Summary collapse
- NFS_VERSION_ENUM =
[ NFS_VERSION_AUTO = 'AUTO'.freeze, NFS_VERSION_V3 = 'V3'.freeze, NFS_VERSION_V4 = 'V4'.freeze, NFS_VERSION_V4_0 = 'V4_0'.freeze, NFS_VERSION_V4_1 = 'V4_1'.freeze, NFS_VERSION_V4_2 = 'V4_2'.freeze ].freeze
- TYPE_ENUM =
[ TYPE_CINDER = 'CINDER'.freeze, TYPE_FCP = 'FCP'.freeze, TYPE_GLANCE = 'GLANCE'.freeze, TYPE_GLUSTERFS = 'GLUSTERFS'.freeze, TYPE_ISCSI = 'ISCSI'.freeze, TYPE_LOCALFS = 'LOCALFS'.freeze, TYPE_MANAGED_BLOCK_STORAGE = 'MANAGED_BLOCK_STORAGE'.freeze, TYPE_NFS = 'NFS'.freeze, TYPE_POSIXFS = 'POSIXFS'.freeze ].freeze
Instance Attribute Summary collapse
-
#address ⇒ String
Address of storage domain.
-
#comment ⇒ String
Free text containing comments about this object.
-
#driver_options ⇒ Array<OCI::CloudMigrations::Models::OlvmProperty>
The options to be passed when creating a storage domain using a cinder driver.
-
#driver_sensitive_options ⇒ Array<OCI::CloudMigrations::Models::OlvmProperty>
The options containing sensitive information to be passed when creating a storage domain using a cinder driver.
-
#id ⇒ String
A unique identifier.
-
#is_override_luns ⇒ BOOLEAN
Whether to override LUNs.
-
#logical_units ⇒ Array<OCI::CloudMigrations::Models::LogicalUnit>
Logical Units of the host storage.
-
#mount_options ⇒ String
Mount options.
-
#nfs_retrans ⇒ Integer
The number of times to retry a request before attempting further recovery actions.
-
#nfs_timeo ⇒ Integer
The time in tenths of a second to wait for a response before retrying NFS requests.
-
#nfs_version ⇒ String
Version of NFS used.
-
#password ⇒ String
Password of the host storage.
-
#paths ⇒ Integer
Paths of the host storage.
-
#port ⇒ Integer
Port of the host storage.
-
#portal ⇒ String
Portal of the host storage.
-
#storage_description ⇒ String
A human-readable description in plain text.
-
#target ⇒ String
Target of the host storage.
-
#type ⇒ String
Type representing a storage domain type.
-
#username ⇒ String
Username of the host storage.
-
#vfs_type ⇒ String
Type of VFS.
- #volume_group ⇒ OCI::CloudMigrations::Models::VolumeGroup
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Storage
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.
Constructor Details
#initialize(attributes = {}) ⇒ Storage
Initializes the object
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 200 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.id = attributes[:'id'] if attributes[:'id'] self.address = attributes[:'address'] if attributes[:'address'] self.comment = attributes[:'comment'] if attributes[:'comment'] self.storage_description = attributes[:'storageDescription'] if attributes[:'storageDescription'] raise 'You cannot provide both :storageDescription and :storage_description' if attributes.key?(:'storageDescription') && attributes.key?(:'storage_description') self.storage_description = attributes[:'storage_description'] if attributes[:'storage_description'] self. = attributes[:'driverOptions'] if attributes[:'driverOptions'] raise 'You cannot provide both :driverOptions and :driver_options' if attributes.key?(:'driverOptions') && attributes.key?(:'driver_options') self. = attributes[:'driver_options'] if attributes[:'driver_options'] self. = attributes[:'driverSensitiveOptions'] if attributes[:'driverSensitiveOptions'] raise 'You cannot provide both :driverSensitiveOptions and :driver_sensitive_options' if attributes.key?(:'driverSensitiveOptions') && attributes.key?(:'driver_sensitive_options') self. = attributes[:'driver_sensitive_options'] if attributes[:'driver_sensitive_options'] self.logical_units = attributes[:'logicalUnits'] if attributes[:'logicalUnits'] raise 'You cannot provide both :logicalUnits and :logical_units' if attributes.key?(:'logicalUnits') && attributes.key?(:'logical_units') self.logical_units = attributes[:'logical_units'] if attributes[:'logical_units'] self. = attributes[:'mountOptions'] if attributes[:'mountOptions'] raise 'You cannot provide both :mountOptions and :mount_options' if attributes.key?(:'mountOptions') && attributes.key?(:'mount_options') self. = attributes[:'mount_options'] if attributes[:'mount_options'] self.nfs_retrans = attributes[:'nfsRetrans'] if attributes[:'nfsRetrans'] raise 'You cannot provide both :nfsRetrans and :nfs_retrans' if attributes.key?(:'nfsRetrans') && attributes.key?(:'nfs_retrans') self.nfs_retrans = attributes[:'nfs_retrans'] if attributes[:'nfs_retrans'] self.nfs_timeo = attributes[:'nfsTimeo'] if attributes[:'nfsTimeo'] raise 'You cannot provide both :nfsTimeo and :nfs_timeo' if attributes.key?(:'nfsTimeo') && attributes.key?(:'nfs_timeo') self.nfs_timeo = attributes[:'nfs_timeo'] if attributes[:'nfs_timeo'] self.nfs_version = attributes[:'nfsVersion'] if attributes[:'nfsVersion'] raise 'You cannot provide both :nfsVersion and :nfs_version' if attributes.key?(:'nfsVersion') && attributes.key?(:'nfs_version') self.nfs_version = attributes[:'nfs_version'] if attributes[:'nfs_version'] self.is_override_luns = attributes[:'isOverrideLuns'] unless attributes[:'isOverrideLuns'].nil? raise 'You cannot provide both :isOverrideLuns and :is_override_luns' if attributes.key?(:'isOverrideLuns') && attributes.key?(:'is_override_luns') self.is_override_luns = attributes[:'is_override_luns'] unless attributes[:'is_override_luns'].nil? self.password = attributes[:'password'] if attributes[:'password'] self.paths = attributes[:'paths'] if attributes[:'paths'] self.port = attributes[:'port'] if attributes[:'port'] self.portal = attributes[:'portal'] if attributes[:'portal'] self.target = attributes[:'target'] if attributes[:'target'] self.username = attributes[:'username'] if attributes[:'username'] self.type = attributes[:'type'] if attributes[:'type'] self.vfs_type = attributes[:'vfsType'] if attributes[:'vfsType'] raise 'You cannot provide both :vfsType and :vfs_type' if attributes.key?(:'vfsType') && attributes.key?(:'vfs_type') self.vfs_type = attributes[:'vfs_type'] if attributes[:'vfs_type'] self.volume_group = attributes[:'volumeGroup'] if attributes[:'volumeGroup'] raise 'You cannot provide both :volumeGroup and :volume_group' if attributes.key?(:'volumeGroup') && attributes.key?(:'volume_group') self.volume_group = attributes[:'volume_group'] if attributes[:'volume_group'] end |
Instance Attribute Details
#address ⇒ String
Address of storage domain.
38 39 40 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 38 def address @address end |
#comment ⇒ String
Free text containing comments about this object.
42 43 44 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 42 def comment @comment end |
#driver_options ⇒ Array<OCI::CloudMigrations::Models::OlvmProperty>
The options to be passed when creating a storage domain using a cinder driver.
50 51 52 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 50 def @driver_options end |
#driver_sensitive_options ⇒ Array<OCI::CloudMigrations::Models::OlvmProperty>
The options containing sensitive information to be passed when creating a storage domain using a cinder driver.
54 55 56 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 54 def @driver_sensitive_options end |
#id ⇒ String
A unique identifier.
34 35 36 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 34 def id @id end |
#is_override_luns ⇒ BOOLEAN
Whether to override LUNs
78 79 80 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 78 def is_override_luns @is_override_luns end |
#logical_units ⇒ Array<OCI::CloudMigrations::Models::LogicalUnit>
Logical Units of the host storage
58 59 60 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 58 def logical_units @logical_units end |
#mount_options ⇒ String
Mount options
62 63 64 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 62 def @mount_options end |
#nfs_retrans ⇒ Integer
The number of times to retry a request before attempting further recovery actions.
66 67 68 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 66 def nfs_retrans @nfs_retrans end |
#nfs_timeo ⇒ Integer
The time in tenths of a second to wait for a response before retrying NFS requests.
70 71 72 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 70 def nfs_timeo @nfs_timeo end |
#nfs_version ⇒ String
Version of NFS used.
74 75 76 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 74 def nfs_version @nfs_version end |
#password ⇒ String
Password of the host storage.
82 83 84 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 82 def password @password end |
#paths ⇒ Integer
Paths of the host storage.
86 87 88 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 86 def paths @paths end |
#port ⇒ Integer
Port of the host storage.
90 91 92 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 90 def port @port end |
#portal ⇒ String
Portal of the host storage.
94 95 96 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 94 def portal @portal end |
#storage_description ⇒ String
A human-readable description in plain text.
46 47 48 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 46 def storage_description @storage_description end |
#target ⇒ String
Target of the host storage.
98 99 100 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 98 def target @target end |
#type ⇒ String
Type representing a storage domain type.
106 107 108 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 106 def type @type end |
#username ⇒ String
Username of the host storage.
102 103 104 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 102 def username @username end |
#vfs_type ⇒ String
Type of VFS
110 111 112 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 110 def vfs_type @vfs_type end |
#volume_group ⇒ OCI::CloudMigrations::Models::VolumeGroup
113 114 115 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 113 def volume_group @volume_group end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 116 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'address': :'address', 'comment': :'comment', 'storage_description': :'storageDescription', 'driver_options': :'driverOptions', 'driver_sensitive_options': :'driverSensitiveOptions', 'logical_units': :'logicalUnits', 'mount_options': :'mountOptions', 'nfs_retrans': :'nfsRetrans', 'nfs_timeo': :'nfsTimeo', 'nfs_version': :'nfsVersion', 'is_override_luns': :'isOverrideLuns', 'password': :'password', 'paths': :'paths', 'port': :'port', 'portal': :'portal', 'target': :'target', 'username': :'username', 'type': :'type', 'vfs_type': :'vfsType', 'volume_group': :'volumeGroup' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 145 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'address': :'String', 'comment': :'String', 'storage_description': :'String', 'driver_options': :'Array<OCI::CloudMigrations::Models::OlvmProperty>', 'driver_sensitive_options': :'Array<OCI::CloudMigrations::Models::OlvmProperty>', 'logical_units': :'Array<OCI::CloudMigrations::Models::LogicalUnit>', 'mount_options': :'String', 'nfs_retrans': :'Integer', 'nfs_timeo': :'Integer', 'nfs_version': :'String', 'is_override_luns': :'BOOLEAN', 'password': :'String', 'paths': :'Integer', 'port': :'Integer', 'portal': :'String', 'target': :'String', 'username': :'String', 'type': :'String', 'vfs_type': :'String', 'volume_group': :'OCI::CloudMigrations::Models::VolumeGroup' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 316 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && address == other.address && comment == other.comment && storage_description == other.storage_description && == other. && == other. && logical_units == other.logical_units && == other. && nfs_retrans == other.nfs_retrans && nfs_timeo == other.nfs_timeo && nfs_version == other.nfs_version && is_override_luns == other.is_override_luns && password == other.password && paths == other.paths && port == other.port && portal == other.portal && target == other.target && username == other.username && type == other.type && vfs_type == other.vfs_type && volume_group == other.volume_group end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 366 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) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::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) ⇒ Boolean
346 347 348 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 346 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
355 356 357 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 355 def hash [id, address, comment, storage_description, , , logical_units, , nfs_retrans, nfs_timeo, nfs_version, is_override_luns, password, paths, port, portal, target, username, type, vfs_type, volume_group].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
399 400 401 402 403 404 405 406 407 408 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 399 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
393 394 395 |
# File 'lib/oci/cloud_migrations/models/storage.rb', line 393 def to_s to_hash.to_s end |