configurationengine/source/scripts/conesub_compare.py
changeset 3 e7e0ae78773e
parent 0 2e8eeb919028
equal deleted inserted replaced
2:87cfa131b535 3:e7e0ae78773e
    23 import cone_common
    23 import cone_common
    24 import time
    24 import time
    25 
    25 
    26 from cone.public import api, plugin, utils, exceptions
    26 from cone.public import api, plugin, utils, exceptions
    27 from time import gmtime, strftime
    27 from time import gmtime, strftime
    28 import report_util
    28 from cone.report import report_util
    29 ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
    29 ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
    30 
    30 
    31 VERSION = '1.0'
    31 VERSION = '1.0'
    32 
    32 
    33 log = logging.getLogger('cone')
    33 log = logging.getLogger('cone')
    36     'api': report_util.ReportShortcut(
    36     'api': report_util.ReportShortcut(
    37         os.path.join(ROOT_PATH, 'compare_api_report_template.html'),
    37         os.path.join(ROOT_PATH, 'compare_api_report_template.html'),
    38         'api_comparison.html',
    38         'api_comparison.html',
    39         'Report changes in feature definitions'),
    39         'Report changes in feature definitions'),
    40                        
    40                        
       
    41     'ci': report_util.ReportShortcut(
       
    42         os.path.join(ROOT_PATH, 'compare_ci_report_template.html'),
       
    43         'ci_comparison.html',
       
    44         'Report changes in CustomisationInterface definitions'),
       
    45 
    41     'data': report_util.ReportShortcut(
    46     'data': report_util.ReportShortcut(
    42         os.path.join(ROOT_PATH, 'compare_data_report_template.html'),
    47         os.path.join(ROOT_PATH, 'compare_data_report_template.html'),
    43         'data_comparison.html',
    48         'data_comparison.html',
    44         'Report changes in data values'),
    49         'Report changes in data values'),
    45                        
    50                        
    54         'Report CRML data compatibility issues (CSV format)'),
    59         'Report CRML data compatibility issues (CSV format)'),
    55 }
    60 }
    56 DEFAULT_SHORTCUT = 'data'
    61 DEFAULT_SHORTCUT = 'data'
    57 
    62 
    58 def main():
    63 def main():
       
    64     """ Compare two configurations """
    59     shortcut_container = report_util.ReportShortcutContainer(REPORT_SHORTCUTS,
    65     shortcut_container = report_util.ReportShortcutContainer(REPORT_SHORTCUTS,
    60                                                              DEFAULT_SHORTCUT)
    66                                                              DEFAULT_SHORTCUT)
    61     
    67     
    62     gset = cone_common.get_settings([os.path.join(ROOT_PATH,'conesub_compare.cfg')])
    68     gset = cone_common.get_settings([os.path.join(ROOT_PATH,'conesub_compare.cfg')])
    63 
    69