configurationengine/doc/cli/compare.rst
changeset 0 2e8eeb919028
child 3 e7e0ae78773e
equal deleted inserted replaced
-1:000000000000 0:2e8eeb919028
       
     1 ConE compare action
       
     2 ===================
       
     3 The compare action is intended to enable comparison of two configurations in different ways. The 
       
     4 compare logic is done in a Jinja template, which makes it quite customizable. There are default
       
     5 templates for data and API comparison that can be used with the --report-type switch, but a custom
       
     6 template can also be used with the --template switch (see the examples).
       
     7 
       
     8 Examples
       
     9 --------
       
    10 
       
    11 **Compare two configurations in current storage**::
       
    12 
       
    13     >cd configproject_root
       
    14     >cone compare -s configuration_root1.confml -t configuration_root2.confml
       
    15 
       
    16 By default the output is generated under current folder to compare.html (use switch --report=FILENAME
       
    17 to change the output file).
       
    18 
       
    19 **Compare configurations between the current storage and some remote storage**:
       
    20 
       
    21 The target configuration can also include remote storage path, which must be separated from the 
       
    22 configuration root by semicolon::
       
    23 
       
    24     >cd configproject_root
       
    25     >cone compare -s configuration_root1.confml -t \config_project2;configuration_root2.confml
       
    26 
       
    27 **Compare configuration API between two configurations**
       
    28 
       
    29 Use the --report-type switch make an API comparison.::
       
    30 
       
    31     >cd configproject_root
       
    32     >cone compare -s configuration_root1.confml -t \config_project2;configuration_root2.confml --report-type api
       
    33 
       
    34 **Compare configurations using a custom template**
       
    35 
       
    36 Use the --template switch to specify a custom template file.::
       
    37 
       
    38     >cd configproject_root
       
    39     >cone compare -s configuration_root1.confml -t \config_project2;configuration_root2.confml --template my_template.html
       
    40 
       
    41 Options list
       
    42 ------------
       
    43   --version             show program's version number and exit
       
    44   -h, --help            show this help message and exit
       
    45   --print-settings      Print all the default settings from the current
       
    46                         setting container.
       
    47   --print-supported-impls
       
    48                         Print all supported ImplML XML namespaces and file
       
    49                         extension.
       
    50   -v LEVEL, --verbose=LEVEL
       
    51                         Print error, warning and information on system out.
       
    52                         Possible choices: Default is 3.
       
    53                         NONE (all)    0
       
    54                         CRITICAL      1
       
    55                         ERROR         2
       
    56                         WARNING       3
       
    57                         INFO          4
       
    58                         DEBUG         5
       
    59   --log-file=FILE       Location of the used log file. Default is 'cone.log'
       
    60   -p STORAGE, --project=STORAGE
       
    61                         defines the location of current project. Default is
       
    62                         the current working directory.
       
    63 
       
    64   Compare options:
       
    65     The generate function will create target files from a specific
       
    66     configuration.The generate will always work with read-only mode of the
       
    67     project, so no changes are saved to project
       
    68 
       
    69     -s CONFIG, --sourceconfiguration=CONFIG
       
    70                         defines the name of the sourceconfiguration for the
       
    71                         compare action. The configuration is expected to be
       
    72                         located current storage.
       
    73     -t CONFIG, --targetconfiguration=CONFIG
       
    74                         defines the name of the target configuration for the
       
    75                         compare action. The configuration can be located in
       
    76                         the current storage or it the configurationdefinition
       
    77                         can contain a path to a storage. The storage
       
    78                         definition is given as a pathbefore semicolon. e.g.
       
    79                         x:\data\configproject;productx.confml,
       
    80                         test.cpf;root.confml
       
    81     --report=FILE       The file where the comparison report is written.By
       
    82                         default this value is determined by the used report
       
    83                         type. Example: -r report.html.
       
    84     --template=FILE     Template used in a report generation. By default this
       
    85                         value is determined by the used report type. Example:
       
    86                         -t report_template.html.
       
    87     --report-type=TYPE  The type of the report to generate. This is a
       
    88                         convenience switch for setting the used template.
       
    89                         Possible values:
       
    90                         api  - Report changes in feature definitions
       
    91                         data - Report changes in data values
       
    92                         crml_dc - Report CRML data compatibility issues
       
    93     --impl-filter=PATTERN
       
    94                         The pattern used for filtering implementations for the
       
    95                         comparison. See the switch --impl in action generate
       
    96                         for more info.