'Validate automatic installation file used by a system/profile
@param Item obj system/profile
@param bool is_profile if obj is a profile
@return [bool, int, list] list with validation result, errors type and list of errors'

def validate_autoinstall_file(self, obj, is_profile):

    last_errors = []
    blended = utils.blender(self.collection_mgr.api, False, obj)
    autoinstall = blended['autoinstall']
    if ((autoinstall is None) or (autoinstall == '')):
        self.logger.info(('%s    has    no    automatic    installation    template    set,    skipping' % obj.name))
        return [True, None, None]
    os_version = blended['os_version']
    self.logger.info('----------------------------')
    self.logger.debug(('osversion:    %s' % os_version))
    if is_profile:
        self.generate_autoinstall(profile=obj)
    else:
        self.generate_autoinstall(system=obj)
    last_errors = self.autoinstallgen.get_last_errors()
    if (len(last_errors) > 0):
        return [False, TEMPLATING_ERROR, last_errors]
