docs: def _get_firmware_update_xml_for_file_and_component(
              self, filename, component):
          """Creates the dynamic xml for flashing the device firmware via iLO.
  
          This method creates the dynamic xml for flashing the firmware, based
          on the component type so passed.
          :param filename: location of the raw firmware file.
          :param component_type: Type of component to be applied to.
          :returns: the etree.Element for the root of the RIBCL XML
                    for flashing the device (component) firmware.
          """
          if component == 'ilo':
              cmd_name = 'UPDATE_RIB_FIRMWARE'
          else:
              # Note(deray): Not explicitly checking for all other supported
              # devices (components), as those checks have already happened
              # in the invoking methods and may seem redundant here.
              cmd_name = 'UPDATE_FIRMWARE'
  
          fwlen = os.path.getsize(filename)
          root = self._create_dynamic_xml(cmd_name,
                                          'RIB_INFO',
                                          'write',
                                          subelements={
                                              'IMAGE_LOCATION': filename,
                                              'IMAGE_LENGTH': str(fwlen)
                                          })
          return root