Class: RMC::Volumes
- Inherits:
-
Object
- Object
- RMC::Volumes
- Defined in:
- lib/rmc/volumes.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
Instance Method Summary collapse
-
#initialize(connection) ⇒ Volumes
constructor
A new instance of Volumes.
- #list_volumes(storage_system_id) ⇒ Object
Constructor Details
#initialize(connection) ⇒ Volumes
Returns a new instance of Volumes.
7 8 9 |
# File 'lib/rmc/volumes.rb', line 7 def initialize(connection) @connection = connection end |
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
5 6 7 |
# File 'lib/rmc/volumes.rb', line 5 def connection @connection end |
Instance Method Details
#list_volumes(storage_system_id) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rmc/volumes.rb', line 11 def list_volumes(storage_system_id) response = @connection.request( url: "/volume?query=\"storageSystemId EQ '#{storage_system_id}'\"", ) volumes = [] response['storageSystem']['volumes'].each do |_data| volumes << RMC::Item::Volume.new(@connection, _data) end volumes end |