app/models/manageiq/providers/lenovo/physical_infra_manager/parser/physical_chassis_parser.rb
def parse_physical_chassis(chassis_hash, rack)
        chassis = XClarityClient::Chassi.new(chassis_hash)
        result = parse(chassis, parent::ParserDictionaryConstants::PHYSICAL_CHASSIS)

        result[:physical_rack]              = rack if rack
        result[:vendor]                     = "lenovo"
        result[:type]                       = parent::ParserDictionaryConstants::MIQ_TYPES["physical_chassis"]
        result[:health_state]               = parent::ParserDictionaryConstants::HEALTH_STATE_MAP[chassis.cmmHealthState.nil? ? chassis.cmmHealthState : chassis.cmmHealthState.downcase]
        result[:location_led_state]         = find_loc_led_state(chassis.leds)
        result[:computer_system][:hardware] = get_hardwares(chassis)

        result
      end
#
# Parse a chassis hash to a hash with physical racks data
#
# @param [Hash] chassis_hash - hash containing physical chassis raw data
# @param [Hash] rack - parsed physical rack data
#
# @return [Hash] containing the physical server information
#
Parse a chassis hash to a hash with physical racks data
Parse a chassis hash to a hash with physical racks data
def parse_physical_chassis(chassis_hash, rack)
        chassis = XClarityClient::Chassi.new(chassis_hash)
        result = parse(chassis, parent::ParserDictionaryConstants::PHYSICAL_CHASSIS)
        result[:physical_rack]              = rack if rack
        result[:vendor]                     = "lenovo"
        result[:type]                       = parent::ParserDictionaryConstants::MIQ_TYPES["physical_chassis"]
        result[:health_state]               = parent::ParserDictionaryConstants::HEALTH_STATE_MAP[chassis.cmmHealthState.nil? ? chassis.cmmHealthState : chassis.cmmHealthState.downcase]
        result[:location_led_state]         = find_loc_led_state(chassis.leds)
        result[:computer_system][:hardware] = get_hardwares(chassis)
        result
      end
def parse_physical_chassis ( chassis_hash , rack ) chassis = XClarityClient :: Chassi . new ( chassis_hash ) result = parse ( chassis , parent :: ParserDictionaryConstants :: PHYSICAL_CHASSIS ) result [ :physical_rack ] = rack if rack result [ :vendor ] = "lenovo" result [ :type ] = parent :: ParserDictionaryConstants :: MIQ_TYPES [ "physical_chassis" ] result [ :health_state ] = parent :: ParserDictionaryConstants :: HEALTH_STATE_MAP [ chassis . cmmHealthState . nil? ? chassis . cmmHealthState : chassis . cmmHealthState . downcase ] result [ :location_led_state ] = find_loc_led_state ( chassis . leds ) result [ :computer_system ] [ :hardware ] = get_hardwares ( chassis ) result end
Parse a chassis hash to a hash with physical racks data
Parse a chassis hash to a hash with physical racks data
containing the physical server information
containing the physical server information
Hash
chassis_hash
rack
parsed physical rack data
parsed physical rack data