configurationengine/doc/cli/generate.rst
changeset 0 2e8eeb919028
equal deleted inserted replaced
-1:000000000000 0:2e8eeb919028
       
     1 ConE generate action
       
     2 ====================
       
     3 Running action generate
       
     4 Usage: cone generate [options]
       
     5 
       
     6 The generate action is intended to generate output files with different implementation plugins. The
       
     7 implementation files can be filtered by different mechanism, via the command line options. 
       
     8 
       
     9 Examples
       
    10 --------
       
    11 
       
    12 **Generate all files of a configurations**::
       
    13 
       
    14     >cd configproject_root
       
    15     >cone generate -c configuration_root.confml
       
    16 
       
    17 or use the option -p|--project to point to the configuration project root::
       
    18 
       
    19     >cone generate --project=configproject_root -c configuration_root.confml
       
    20 
       
    21 **Generate by filtering with values in last layer**
       
    22 
       
    23 The data can be located in different layers in configuration project. Quite a common use case is to 
       
    24 generate only output files that have been changed in the last layer.::
       
    25 
       
    26     >cd configproject_root
       
    27     >cone generate -c configuration_root.confml --layer=-1
       
    28 
       
    29 This will read data value definitions on the last configuration layer (last included confml 
       
    30 file in the root file), and run generate only to implementation files that use one of these
       
    31 data values.
       
    32 
       
    33 Options list
       
    34 ------------
       
    35   --version             show program's version number and exit
       
    36   -h, --help            show this help message and exit
       
    37   --print-settings      Print all the default settings from the current
       
    38                         setting container.
       
    39   --print-supported-impls
       
    40                         Print all supported ImplML XML namespaces and file
       
    41                         extensions.
       
    42   -v LEVEL, --verbose=LEVEL
       
    43                         Print error, warning and information on system out.
       
    44                         Possible choices: Default is 3.
       
    45                         NONE (all)    0
       
    46                         CRITICAL      1
       
    47                         ERROR         2
       
    48                         WARNING       3
       
    49                         INFO          4
       
    50                         DEBUG         5
       
    51   --log-file=FILE       Location of the used log file. Default is 'cone.log'
       
    52   -c CONFIG, --configuration=CONFIG
       
    53                         defines the name of the configuration for the action
       
    54   -p STORAGE, --project=STORAGE
       
    55                         defines the location of current project. Default is
       
    56                         the current working directory.
       
    57 
       
    58   Generate options:
       
    59     The generate function will create target files from a specific
       
    60     configuration.The generate will always work with read-only mode of the
       
    61     project, so no changes are saved to project
       
    62 
       
    63     -o FOLDER, --output=FOLDER
       
    64                         defines the target folder where the files are is
       
    65                         generated or copied
       
    66     -l LAYER, --layer=LAYER
       
    67                         define layers of the configuration that are included
       
    68                         to the output. The layer operation can be used several
       
    69                         times in a single command.Example -l -1 --layer=-2,
       
    70                         which would append a layers -1 and -2 to the layers =>
       
    71                         layers = -1,-2
       
    72     --all-layers        Include all layers in generation. This switch
       
    73                         overrides all other layer configurations (iMaker API
       
    74                         and using the --layer parameter)
       
    75     -i IMPLS, --impl=IMPLS
       
    76                         Define a Python regular expression filter for actual
       
    77                         ImplML plugin(s) that needs to be executed. The whole
       
    78                         path to ImplML filename is used in the regexp
       
    79                         matching. The impl operation can be used several times
       
    80                         in a single command.
       
    81                         Example1 --impl crml => matches for any ImplML file
       
    82                         that has a CrML string in the path. Example2 --impl
       
    83                         makeml$ => matches for ImplML file that has ends with
       
    84                         MakeML string.
       
    85     --impl-tag=TAG      define a tag for the implementations that are included
       
    86                         to the output. A tag is name value pair and has the
       
    87                         following format: name:value, e.g.
       
    88                         target:rofs3.Example --impl-tag=target:uda --impl-
       
    89                         tag=target:content, which would include impls include
       
    90                         both tags.
       
    91     --impl-tag-policy=TAGS_POLICY
       
    92                         Policy for implementation tags. May have one of the
       
    93                         following values: --impl-tag-policy=AND, --impl-tag-
       
    94                         policy=OR. Default is OR.
       
    95     -s SET, --set=SET   Override a ConfML reference in the execution.The set
       
    96                         operation can be used several times in a single
       
    97                         command.Example -s foo.bar=10 -s foo.fea='test'.
       
    98     --add=CONF          Add a given configuration to the given configuration
       
    99                         as last element.The add operation can be used several
       
   100                         times in a single command.Example --add
       
   101                         foo/root.confml --add bar/root-confml.
       
   102     -r FILE, --report=FILE
       
   103                         Generates a report about settings that are properly
       
   104                         generated.Example -r report.html.
       
   105     -t FILE, --template=FILE
       
   106                         Template used in report generation.Example -t
       
   107                         report_template.html.
       
   108     --report-data-output=FILE
       
   109                         Specifies a file where intermediary report data is
       
   110                         generated.
       
   111     -n, --dryrun        Executes generation without generation output.
       
   112     --add-setting-file=FILE
       
   113                         Generate specific settings in ini format.Example -o
       
   114                         my_generate_settings.cfg.