Class: FrameIOSlot
- Inherits:
-
Object
- Object
- FrameIOSlot
- Defined in:
- lib/HMC/FrameIOSlot.rb
Instance Attribute Summary collapse
-
#bus_grouping ⇒ Object
readonly
Returns the value of attribute bus_grouping.
-
#bus_id ⇒ Object
readonly
Returns the value of attribute bus_id.
-
#data_string_raw ⇒ Object
readonly
Returns the value of attribute data_string_raw.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#drc_index ⇒ Object
readonly
Returns the value of attribute drc_index.
-
#drc_name ⇒ Object
readonly
Returns the value of attribute drc_name.
-
#feature_codes ⇒ Object
readonly
Returns the value of attribute feature_codes.
-
#interposer_pcie ⇒ Object
readonly
Returns the value of attribute interposer_pcie.
-
#interposer_present ⇒ Object
readonly
Returns the value of attribute interposer_present.
-
#iop ⇒ Object
readonly
Returns the value of attribute iop.
-
#lpar_id ⇒ Object
readonly
Returns the value of attribute lpar_id.
-
#lpar_name ⇒ Object
readonly
Returns the value of attribute lpar_name.
-
#parent_slot_drc_index ⇒ Object
readonly
Returns the value of attribute parent_slot_drc_index.
-
#pci_class ⇒ Object
readonly
Returns the value of attribute pci_class.
-
#pci_device_id ⇒ Object
readonly
Returns the value of attribute pci_device_id.
-
#pci_revision_id ⇒ Object
readonly
Returns the value of attribute pci_revision_id.
-
#pci_subs_device_id ⇒ Object
readonly
Returns the value of attribute pci_subs_device_id.
-
#pci_subs_vendor ⇒ Object
readonly
Returns the value of attribute pci_subs_vendor.
-
#pci_subs_vendor_id ⇒ Object
readonly
Returns the value of attribute pci_subs_vendor_id.
-
#pci_vendor_id ⇒ Object
readonly
Returns the value of attribute pci_vendor_id.
-
#phys_loc ⇒ Object
readonly
Returns the value of attribute phys_loc.
-
#slot_io_pool_id ⇒ Object
readonly
Returns the value of attribute slot_io_pool_id.
-
#unit_phys_loc ⇒ Object
readonly
Returns the value of attribute unit_phys_loc.
Instance Method Summary collapse
-
#initialize(string = '') ⇒ FrameIOSlot
constructor
A new instance of FrameIOSlot.
- #parse(string) ⇒ Object
- #to_s ⇒ Object
- #validate ⇒ Object
Constructor Details
#initialize(string = '') ⇒ FrameIOSlot
Returns a new instance of FrameIOSlot.
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/HMC/FrameIOSlot.rb', line 32 def initialize(string = '') @variables_int = %w[ bus_id iop interposer_present interposer_pcie ] @variables_string = %w[ unit_phys_loc phys_loc lpar_id drc_index lpar_name slot_io_pool_id description feature_codes pci_vendor_id pci_device_id pci_subs_vendor_id pci_subs_device_id pci_class pci_revision_id bus_grouping parent_slot_drc_index drc_name ] unless string.empty? @data_string_raw = string parse(string) end end |
Instance Attribute Details
#bus_grouping ⇒ Object (readonly)
Returns the value of attribute bus_grouping.
19 20 21 |
# File 'lib/HMC/FrameIOSlot.rb', line 19 def bus_grouping @bus_grouping end |
#bus_id ⇒ Object (readonly)
Returns the value of attribute bus_id.
8 9 10 |
# File 'lib/HMC/FrameIOSlot.rb', line 8 def bus_id @bus_id end |
#data_string_raw ⇒ Object (readonly)
Returns the value of attribute data_string_raw.
30 31 32 |
# File 'lib/HMC/FrameIOSlot.rb', line 30 def data_string_raw @data_string_raw end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
25 26 27 |
# File 'lib/HMC/FrameIOSlot.rb', line 25 def description @description end |
#drc_index ⇒ Object (readonly)
Returns the value of attribute drc_index.
10 11 12 |
# File 'lib/HMC/FrameIOSlot.rb', line 10 def drc_index @drc_index end |
#drc_name ⇒ Object (readonly)
Returns the value of attribute drc_name.
22 23 24 |
# File 'lib/HMC/FrameIOSlot.rb', line 22 def drc_name @drc_name end |
#feature_codes ⇒ Object (readonly)
Returns the value of attribute feature_codes.
26 27 28 |
# File 'lib/HMC/FrameIOSlot.rb', line 26 def feature_codes @feature_codes end |
#interposer_pcie ⇒ Object (readonly)
Returns the value of attribute interposer_pcie.
24 25 26 |
# File 'lib/HMC/FrameIOSlot.rb', line 24 def interposer_pcie @interposer_pcie end |
#interposer_present ⇒ Object (readonly)
Returns the value of attribute interposer_present.
23 24 25 |
# File 'lib/HMC/FrameIOSlot.rb', line 23 def interposer_present @interposer_present end |
#iop ⇒ Object (readonly)
Returns the value of attribute iop.
20 21 22 |
# File 'lib/HMC/FrameIOSlot.rb', line 20 def iop @iop end |
#lpar_id ⇒ Object (readonly)
Returns the value of attribute lpar_id.
12 13 14 |
# File 'lib/HMC/FrameIOSlot.rb', line 12 def lpar_id @lpar_id end |
#lpar_name ⇒ Object (readonly)
Returns the value of attribute lpar_name.
11 12 13 |
# File 'lib/HMC/FrameIOSlot.rb', line 11 def lpar_name @lpar_name end |
#parent_slot_drc_index ⇒ Object (readonly)
Returns the value of attribute parent_slot_drc_index.
21 22 23 |
# File 'lib/HMC/FrameIOSlot.rb', line 21 def parent_slot_drc_index @parent_slot_drc_index end |
#pci_class ⇒ Object (readonly)
Returns the value of attribute pci_class.
17 18 19 |
# File 'lib/HMC/FrameIOSlot.rb', line 17 def pci_class @pci_class end |
#pci_device_id ⇒ Object (readonly)
Returns the value of attribute pci_device_id.
27 28 29 |
# File 'lib/HMC/FrameIOSlot.rb', line 27 def pci_device_id @pci_device_id end |
#pci_revision_id ⇒ Object (readonly)
Returns the value of attribute pci_revision_id.
18 19 20 |
# File 'lib/HMC/FrameIOSlot.rb', line 18 def pci_revision_id @pci_revision_id end |
#pci_subs_device_id ⇒ Object (readonly)
Returns the value of attribute pci_subs_device_id.
16 17 18 |
# File 'lib/HMC/FrameIOSlot.rb', line 16 def pci_subs_device_id @pci_subs_device_id end |
#pci_subs_vendor ⇒ Object (readonly)
Returns the value of attribute pci_subs_vendor.
15 16 17 |
# File 'lib/HMC/FrameIOSlot.rb', line 15 def pci_subs_vendor @pci_subs_vendor end |
#pci_subs_vendor_id ⇒ Object (readonly)
Returns the value of attribute pci_subs_vendor_id.
28 29 30 |
# File 'lib/HMC/FrameIOSlot.rb', line 28 def pci_subs_vendor_id @pci_subs_vendor_id end |
#pci_vendor_id ⇒ Object (readonly)
Returns the value of attribute pci_vendor_id.
14 15 16 |
# File 'lib/HMC/FrameIOSlot.rb', line 14 def pci_vendor_id @pci_vendor_id end |
#phys_loc ⇒ Object (readonly)
Returns the value of attribute phys_loc.
9 10 11 |
# File 'lib/HMC/FrameIOSlot.rb', line 9 def phys_loc @phys_loc end |
#slot_io_pool_id ⇒ Object (readonly)
Returns the value of attribute slot_io_pool_id.
13 14 15 |
# File 'lib/HMC/FrameIOSlot.rb', line 13 def slot_io_pool_id @slot_io_pool_id end |
#unit_phys_loc ⇒ Object (readonly)
Returns the value of attribute unit_phys_loc.
7 8 9 |
# File 'lib/HMC/FrameIOSlot.rb', line 7 def unit_phys_loc @unit_phys_loc end |
Instance Method Details
#parse(string) ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/HMC/FrameIOSlot.rb', line 55 def parse(string) HmcString.parse(string).each do |name, value| if @variables_int.include?(name) instance_variable_set("@#{name}", value.to_i) elsif @variables_string.include?(name) instance_variable_set("@#{name}", value.to_s) else print "FrameIOSlot: unknown name: #{name} with value #{value}" raise end end end |
#to_s ⇒ Object
50 51 52 53 |
# File 'lib/HMC/FrameIOSlot.rb', line 50 def to_s validate() result end |
#validate ⇒ Object
46 47 48 |
# File 'lib/HMC/FrameIOSlot.rb', line 46 def validate # raise "virtualSlotNumber not defined" unless (@virtualSlotNumber.is_a? Numeric) end |