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