Example #1
0
    def write_software_profile_info(self):
        self.ws.write(
            self.row, 0,
            'Software Profile: ' + self.conformance_report.software_profile,
            XLSWriter.style_bold)
        self.row += 2

        software_profile_packages = self.conformance_report.software_profile_packages.split(
            ',')

        smu_loader = None
        platform, release = get_platform_and_release(software_profile_packages)
        if platform != UNKNOWN and release != UNKNOWN:
            smu_loader = SMUInfoLoader(platform, release)

        for software_profile_package in software_profile_packages:
            self.ws.write(self.row, 0, software_profile_package)
            if smu_loader is not None and smu_loader.is_valid:
                smu_info = smu_loader.get_smu_info(
                    software_profile_package.replace(
                        '.' + smu_loader.file_suffix, ''))
                if smu_info is not None:
                    self.ws.write(self.row, 1, smu_info.description)

            self.row += 1

        self.row += 1
Example #2
0
def api_get_conformance_report_software_profile_packages(id):
    rows = []
    db_session = DBSession()

    conformance_report = get_conformance_report_by_id(db_session, id)
    if conformance_report is not None:
        software_profile_packages = conformance_report.software_profile_packages.split(
            ',')

        smu_loader = None
        platform, release = get_platform_and_release(software_profile_packages)
        if platform != UNKNOWN and release != UNKNOWN:
            smu_loader = SMUInfoLoader(platform, release)

        for software_profile_package in software_profile_packages:
            description = ''
            if smu_loader is not None and smu_loader.is_valid:
                smu_info = smu_loader.get_smu_info(
                    software_profile_package.replace(
                        '.' + smu_loader.file_suffix, ''))
                if smu_info is not None:
                    description = smu_info.description

            rows.append({
                'software_profile_package': software_profile_package,
                'description': description
            })

    return jsonify(**{'data': rows})
Example #3
0
 def write_software_profile_info(self):
     self.ws.write(self.row, 0, 'Software Profile: ' + self.conformance_report.software_profile, XLSWriter.style_bold)
     self.row += 2
 
     software_profile_packages = self.conformance_report.software_profile_packages.split(',')
     
     smu_loader = None
     platform, release = get_platform_and_release(software_profile_packages)
     if platform != UNKNOWN and release != UNKNOWN:
         smu_loader = SMUInfoLoader(platform, release)
     
     for software_profile_package in software_profile_packages:
         self.ws.write(self.row, 0, software_profile_package)
         if smu_loader is not None and smu_loader.is_valid:
             smu_info = smu_loader.get_smu_info(software_profile_package.replace('.' + smu_loader.file_suffix,''))
             if smu_info is not None:
                 self.ws.write(self.row, 1, smu_info.description)
         
         self.row += 1  
     
     self.row += 1
Example #4
0
def api_get_conformance_report_software_profile_packages(id):
    rows = []
    db_session = DBSession()

    conformance_report = get_conformance_report_by_id(db_session, id)
    if conformance_report is not None:
        software_profile_packages = conformance_report.software_profile_packages.split(',')

        smu_loader = None
        platform, release = get_platform_and_release(software_profile_packages)
        if platform != UNKNOWN and release != UNKNOWN:
            smu_loader = SMUInfoLoader(platform, release)

        for software_profile_package in software_profile_packages:
            description = ''
            if smu_loader is not None and smu_loader.is_valid:
                smu_info = smu_loader.get_smu_info(software_profile_package.replace('.' + smu_loader.file_suffix,''))
                if smu_info is not None:
                    description = smu_info.description

            rows.append({'software_profile_package': software_profile_package,
                         'description': description})

    return jsonify(**{'data': rows})