docs: def validate(raid_config):
      """Validates the RAID configuration provided.
  
      This method validates the RAID configuration provided against
      a JSON schema.
  
      :param raid_config: The RAID configuration to be validated.
      :raises: InvalidInputError, if validation of the input fails.
      """
      raid_schema_fobj = open(RAID_CONFIG_SCHEMA, 'r')
      raid_config_schema = json.load(raid_schema_fobj)
      try:
          jsonschema.validate(raid_config, raid_config_schema)
      except json_schema_exc.ValidationError as e:
          raise exception.InvalidInputError(e.message)
  
      for logical_disk in raid_config['logical_disks']:
  
          # If user has provided 'number_of_physical_disks' or
          # 'physical_disks', validate that they have mentioned at least
          # minimum number of physical disks required for that RAID level.
          raid_level = logical_disk['raid_level']
          min_disks_reqd = constants.RAID_LEVEL_MIN_DISKS[raid_level]
  
          no_of_disks_specified = None
          if 'number_of_physical_disks' in logical_disk:
              no_of_disks_specified = logical_disk['number_of_physical_disks']
          elif 'physical_disks' in logical_disk:
              no_of_disks_specified = len(logical_disk['physical_disks'])
  
          if (no_of_disks_specified and
                  no_of_disks_specified < min_disks_reqd):
              msg = ("RAID level %(raid_level)s requires at least %(number)s "
                     "disks." % {'raid_level': raid_level,
                                 'number': min_disks_reqd})
              raise exception.InvalidInputError(msg)