Class: Kubernetes::V1ScaleIOPersistentVolumeSource
- Inherits:
-
Object
- Object
- Kubernetes::V1ScaleIOPersistentVolumeSource
- Defined in:
- lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb
Overview
ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume
Instance Attribute Summary collapse
-
#fs_type ⇒ Object
Filesystem type to mount.
-
#gateway ⇒ Object
The host address of the ScaleIO API Gateway.
-
#protection_domain ⇒ Object
The name of the ScaleIO Protection Domain for the configured storage.
-
#read_only ⇒ Object
Defaults to false (read/write).
-
#secret_ref ⇒ Object
SecretRef references to the secret for ScaleIO user and other sensitive information.
-
#ssl_enabled ⇒ Object
Flag to enable/disable SSL communication with Gateway, default false.
-
#storage_mode ⇒ Object
Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.
-
#storage_pool ⇒ Object
The ScaleIO Storage Pool associated with the protection domain.
-
#system ⇒ Object
The name of the storage system as configured in ScaleIO.
-
#volume_name ⇒ Object
The name of a volume already created in the ScaleIO system that is associated with this volume source.
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.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ V1ScaleIOPersistentVolumeSource
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ V1ScaleIOPersistentVolumeSource
Initializes the object
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 82 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.transform_keys(&:to_sym) self.fs_type = attributes[:fsType] if attributes.key?(:fsType) self.gateway = attributes[:gateway] if attributes.key?(:gateway) self.protection_domain = attributes[:protectionDomain] if attributes.key?(:protectionDomain) self.read_only = attributes[:readOnly] if attributes.key?(:readOnly) self.secret_ref = attributes[:secretRef] if attributes.key?(:secretRef) self.ssl_enabled = attributes[:sslEnabled] if attributes.key?(:sslEnabled) self.storage_mode = attributes[:storageMode] if attributes.key?(:storageMode) self.storage_pool = attributes[:storagePool] if attributes.key?(:storagePool) self.system = attributes[:system] if attributes.key?(:system) self.volume_name = attributes[:volumeName] if attributes.key?(:volumeName) end |
Instance Attribute Details
#fs_type ⇒ Object
Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs"
19 20 21 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 19 def fs_type @fs_type end |
#gateway ⇒ Object
The host address of the ScaleIO API Gateway.
22 23 24 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 22 def gateway @gateway end |
#protection_domain ⇒ Object
The name of the ScaleIO Protection Domain for the configured storage.
25 26 27 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 25 def protection_domain @protection_domain end |
#read_only ⇒ Object
Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
28 29 30 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 28 def read_only @read_only end |
#secret_ref ⇒ Object
SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.
31 32 33 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 31 def secret_ref @secret_ref end |
#ssl_enabled ⇒ Object
Flag to enable/disable SSL communication with Gateway, default false
34 35 36 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 34 def ssl_enabled @ssl_enabled end |
#storage_mode ⇒ Object
Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
37 38 39 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 37 def storage_mode @storage_mode end |
#storage_pool ⇒ Object
The ScaleIO Storage Pool associated with the protection domain.
40 41 42 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 40 def storage_pool @storage_pool end |
#system ⇒ Object
The name of the storage system as configured in ScaleIO.
43 44 45 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 43 def system @system end |
#volume_name ⇒ Object
The name of a volume already created in the ScaleIO system that is associated with this volume source.
46 47 48 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 46 def volume_name @volume_name end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 49 def self.attribute_map { fs_type: :fsType, gateway: :gateway, protection_domain: :protectionDomain, read_only: :readOnly, secret_ref: :secretRef, ssl_enabled: :sslEnabled, storage_mode: :storageMode, storage_pool: :storagePool, system: :system, volume_name: :volumeName } end |
.swagger_types ⇒ Object
Attribute type mapping.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 65 def self.swagger_types { fs_type: :String, gateway: :String, protection_domain: :String, read_only: :BOOLEAN, secret_ref: :V1SecretReference, ssl_enabled: :BOOLEAN, storage_mode: :String, storage_pool: :String, system: :String, volume_name: :String } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 138 def ==(other) return true if equal?(other) self.class == other.class && fs_type == other.fs_type && gateway == other.gateway && protection_domain == other.protection_domain && read_only == other.read_only && secret_ref == other.secret_ref && ssl_enabled == other.ssl_enabled && storage_mode == other.storage_mode && storage_pool == other.storage_pool && system == other.system && volume_name == other.volume_name end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
194 195 196 197 198 199 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 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 194 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = Kubernetes.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 261 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 170 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/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) send("#{key}=", attributes[self.class.attribute_map[key]].map do |v| _deserialize(Regexp.last_match(1), v) end) end elsif !attributes[self.class.attribute_map[key]].nil? send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(other) ⇒ Boolean
156 157 158 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 156 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
162 163 164 165 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 162 def hash [fs_type, gateway, protection_domain, read_only, secret_ref, ssl_enabled, storage_mode, storage_pool, system, volume_name].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 111 def list_invalid_properties invalid_properties = [] if @gateway.nil? invalid_properties.push("invalid value for 'gateway', gateway cannot be nil.") end if @secret_ref.nil? invalid_properties.push("invalid value for 'secret_ref', secret_ref cannot be nil.") end invalid_properties.push("invalid value for 'system', system cannot be nil.") if @system.nil? invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
240 241 242 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 240 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
246 247 248 249 250 251 252 253 254 255 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 246 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
234 235 236 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 234 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
128 129 130 131 132 133 134 |
# File 'lib/kubernetes/models/v1_scale_io_persistent_volume_source.rb', line 128 def valid? return false if @gateway.nil? return false if @secret_ref.nil? return false if @system.nil? true end |