docs: def update_firmware(self, filename, component_type):
          """Updates the given firmware on the server for the given component.
  
          :param filename: location of the raw firmware file. Extraction of the
                           firmware file (if in compact format) is expected to
                           happen prior to this invocation.
          :param component_type: Type of component to be applied to.
          :raises: InvalidInputError, if the validation of the input fails
          :raises: IloError, on an error from iLO
          :raises: IloConnectionError, if not able to reach iLO.
          :raises: IloCommandNotSupportedError, if the command is
                   not supported on the server
          """
          fw_img_processor = firmware_controller.FirmwareImageUploader(filename)
  
          LOG.debug(self._('Uploading firmware file: %s ...'), filename)
          cookie = fw_img_processor.upload_file_to((self.host, self.port),
                                                   self.timeout)
          LOG.debug(self._('Uploading firmware file: %s ... done'), filename)
  
          root = self._get_firmware_update_xml_for_file_and_component(
              filename, component_type)
          element = root.find('LOGIN/RIB_INFO')
          etree.SubElement(element, 'TPM_ENABLED', VALUE='Yes')
          extra_headers = {'Cookie': cookie}
  
          LOG.debug(self._('Flashing firmware file: %s ...'), filename)
          d = self._request_ilo(root, extra_headers=extra_headers)
  
          # wait till the firmware update completes.
          common.wait_for_ribcl_firmware_update_to_complete(self)
          self._parse_output(d)
          LOG.info(self._('Flashing firmware file: %s ... done'), filename)