Class: Radfish::Volume
- Inherits:
-
Object
- Object
- Radfish::Volume
- Defined in:
- lib/radfish/volume.rb
Instance Attribute Summary collapse
-
#adapter_data ⇒ Object
readonly
Canonical, normalized attributes only.
-
#capacity_bytes ⇒ Object
readonly
Canonical, normalized attributes only.
-
#controller ⇒ Object
readonly
Canonical, normalized attributes only.
-
#drives ⇒ Object
readonly
Canonical, normalized attributes only.
-
#encrypted ⇒ Object
readonly
Canonical, normalized attributes only.
-
#fastpath ⇒ Object
readonly
Canonical, normalized attributes only.
-
#health ⇒ Object
readonly
Canonical, normalized attributes only.
-
#id ⇒ Object
readonly
Canonical, normalized attributes only.
-
#lock_status ⇒ Object
readonly
Canonical, normalized attributes only.
-
#name ⇒ Object
readonly
Canonical, normalized attributes only.
-
#operation_name ⇒ Object
readonly
Canonical, normalized attributes only.
-
#operation_percent_complete ⇒ Object
readonly
Canonical, normalized attributes only.
-
#raid_type ⇒ Object
readonly
Canonical, normalized attributes only.
-
#read_cache_policy ⇒ Object
readonly
Canonical, normalized attributes only.
-
#stripe_size ⇒ Object
readonly
Canonical, normalized attributes only.
-
#volume_type ⇒ Object
readonly
Canonical, normalized attributes only.
-
#write_cache_policy ⇒ Object
readonly
Canonical, normalized attributes only.
Instance Method Summary collapse
-
#initialize(client:, controller:, id: nil, name: nil, capacity_bytes: nil, raid_type: nil, volume_type: nil, drives: nil, encrypted: nil, lock_status: nil, stripe_size: nil, operation_percent_complete: nil, operation_name: nil, write_cache_policy: nil, read_cache_policy: nil, fastpath: nil, health: nil, adapter_data: nil) ⇒ Volume
constructor
A new instance of Volume.
- #to_h ⇒ Object
Constructor Details
#initialize(client:, controller:, id: nil, name: nil, capacity_bytes: nil, raid_type: nil, volume_type: nil, drives: nil, encrypted: nil, lock_status: nil, stripe_size: nil, operation_percent_complete: nil, operation_name: nil, write_cache_policy: nil, read_cache_policy: nil, fastpath: nil, health: nil, adapter_data: nil) ⇒ Volume
Returns a new instance of Volume.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/radfish/volume.rb', line 12 def initialize(client:, controller:, id: nil, name: nil, capacity_bytes: nil, raid_type: nil, volume_type: nil, drives: nil, encrypted: nil, lock_status: nil, stripe_size: nil, operation_percent_complete: nil, operation_name: nil, write_cache_policy: nil, read_cache_policy: nil, fastpath: nil, health: nil, adapter_data: nil) @client = client @controller = controller @id = id @name = name @capacity_bytes = capacity_bytes @raid_type = raid_type @volume_type = volume_type @drives = Array(drives) # normalized list of drive reference ids (e.g., @odata.id) @encrypted = encrypted @lock_status = lock_status @stripe_size = stripe_size @operation_percent_complete = operation_percent_complete @operation_name = operation_name @write_cache_policy = write_cache_policy @read_cache_policy = read_cache_policy @fastpath = fastpath @health = health @adapter_data = adapter_data end |
Instance Attribute Details
#adapter_data ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def adapter_data @adapter_data end |
#capacity_bytes ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def capacity_bytes @capacity_bytes end |
#controller ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def controller @controller end |
#drives ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def drives @drives end |
#encrypted ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def encrypted @encrypted end |
#fastpath ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def fastpath @fastpath end |
#health ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def health @health end |
#id ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def id @id end |
#lock_status ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def lock_status @lock_status end |
#name ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def name @name end |
#operation_name ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def operation_name @operation_name end |
#operation_percent_complete ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def operation_percent_complete @operation_percent_complete end |
#raid_type ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def raid_type @raid_type end |
#read_cache_policy ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def read_cache_policy @read_cache_policy end |
#stripe_size ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def stripe_size @stripe_size end |
#volume_type ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def volume_type @volume_type end |
#write_cache_policy ⇒ Object (readonly)
Canonical, normalized attributes only.
6 7 8 |
# File 'lib/radfish/volume.rb', line 6 def write_cache_policy @write_cache_policy end |
Instance Method Details
#to_h ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/radfish/volume.rb', line 43 def to_h { id: id, name: name, capacity_bytes: capacity_bytes, raid_type: raid_type, volume_type: volume_type, drives: drives, encrypted: encrypted, lock_status: lock_status, stripe_size: stripe_size, operation_percent_complete: operation_percent_complete, operation_name: operation_name, write_cache_policy: write_cache_policy, read_cache_policy: read_cache_policy, fastpath: fastpath, health: health }.compact end |