Class: Lun

Inherits:
Object
  • Object
show all
Defined in:
lib/rbvppc/lun.rb

Overview

Authors: Christopher M Wood (<[email protected]>) John F Hutchinson (<[email protected]) © Copyright IBM Corporation 2015.

LICENSE: MIT (opensource.org/licenses/MIT)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, pvid, size_in_mb) ⇒ Lun

Returns a new instance of Lun.



10
11
12
13
14
15
# File 'lib/rbvppc/lun.rb', line 10

def initialize(name,pvid, size_in_mb)
    @name = name
    #@serial_number = serial_number
    @pvid = pvid
    @size_in_mb = size_in_mb.to_i
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/rbvppc/lun.rb', line 9

def name
  @name
end

#pvidObject (readonly)

Returns the value of attribute pvid.



9
10
11
# File 'lib/rbvppc/lun.rb', line 9

def pvid
  @pvid
end

#size_in_mbObject (readonly)

Returns the value of attribute size_in_mb.



9
10
11
# File 'lib/rbvppc/lun.rb', line 9

def size_in_mb
  @size_in_mb
end

Instance Method Details

#==(other_lun) ⇒ Object

Override == to test equality of two disk’s PVIDs??



19
20
21
# File 'lib/rbvppc/lun.rb', line 19

def ==(other_lun)
   return self.pvid == other_lun.pvid 
end