<commit_before>module Serverspec
  module Type

    class Firmware < Base

      def bios
        version_fetch('BIOS')
      end

      def idrac
        version_fetch('iDRAC7')
      end

      def lifecyclecontroller
        version_fetch('Lifecycle Controller')
      end

      def raid
        version_fetch('PERC H710')
      end

      def nics
        active_nics = @runner.run_command("omreport chassis nics |grep -B 4 'Connection Status : Connected'|awk '/Index/ {print $3}'")
        active_nics = active_nics.stdout.split
        nic_versions = []
        active_nics.each do |index|
          version = @runner.run_command("omreport chassis nics index=#{index} | grep Firmware -A1 | tail -1 ")
          nic_versions << version.stdout.chomp<commit_msg>TEST: PCI-4534 test for H710P raid model<commit_after>module Serverspec
  module Type

    class Firmware < Base

      def bios
        version_fetch('BIOS')
      end

      def idrac
        version_fetch('iDRAC7')
      end

      def lifecyclecontroller
        version_fetch('Lifecycle Controller')
      end

      def raid
        version_fetch('PERC H710')
      end

      def raid_model
        ret = @runner.run_command "omreport system version | awk '/PERC/ {print $4}'"
        ret.stdout.chomp
      end

      def nics
        active_nics = @runner.run_command("omreport chassis nics |grep -B 4 'Connection Status : Connected'|awk '/Index/ {print $3}'")
        active_nics = active_nics.stdout.split
        nic_versions = []
        active_nics.each do |index|
          version = @runner.run_command("omreport chassis nics index=#{index} | grep Firmware -A1 | tail -1 ")
          nic_versions << version.stdout.chomp
{'fraction_non_alphanumeric': 0.0898942420681551, 'fraction_numerical': 0.01410105757931845, 'mean_word_length': 2.2940038684719535, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6237311', 'n_tokens_mistral': 540, 'n_tokens_neox': 500, 'n_words': 134}