core/rails/lib/barclamp_raid/lsi_ircu.rb
#   Output from the LSI util is broken into stanzas delineated with something like:
#     ------------------------------------------------------------------------
#     Controller information
#   ------------------------------------------------------------------------
#
#     This method finds a stanza by name and returns an array with its content
Output from the LSI util is broken into stanzas delineated with something like:
Controller information

This method finds a stanza by name and returns an array with its content
Output from the LSI util is broken into stanzas delineated with something like : Controller information This method finds a stanza by name and returns an array with its content
def find_stanza(lines,name)
      lines = lines.dup
      begin
        skip_to_find lines,@@re_lines
        lines.shift
      end while lines.length > 0 and  lines[0].strip.casecmp(name) != 0
      lines.shift 
      lines.shift
      log("start of #{name} is #{lines[0]}")
      ours = skip_to_find lines,@@re_lines
      ours
    end
def find_stanza ( lines , name ) lines = lines . dup begin skip_to_find lines , @@re_lines lines . shift end while lines . length > 0 and lines [ 0 ] . strip . casecmp ( name ) != 0 lines . shift lines . shift log ( "start of #{name} is #{lines[0]}" ) ours = skip_to_find lines , @@re_lines ours end
Output from the LSI util is broken into stanzas delineated with something like:
Controller information
Output from the LSI util is broken into stanzas delineated with something like : Controller information
# find a stanza mark. #make sure it's the right one. # skip stanza name and marker #lines now starts with the right stanzs.... filter out the rest.
lines
<not_specific>
name
<not_specific>