configurationengine/doc/cli/rootflatten.rst
author m2lahtel
Tue, 10 Aug 2010 14:29:28 +0300
changeset 3 e7e0ae78773e
permissions -rw-r--r--
ConE 1.2.11 release
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
     1
ConE rootflatten action
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
     2
=======================
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
     3
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
     4
The *rootflatten* action is intended to be a temporary solution for enabling 
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
     5
Configuration roots anywhere inside the project structure. The current 
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
     6
Configuration project specification (0.4) is defined to allow configuration roots
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
     7
only in the project root folder, so the root flatten will convert a file located
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
     8
in any subfolder of the project to root file under the project folder that follows 
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
     9
the Configuration project specification. 
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    10
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    11
The configuration roots in the subfolders can use absolute includes to include other 
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    12
configuration roots and / or layers.
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    13
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    14
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    15
Examples
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    16
--------
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    17
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    18
**Create a flat configuration from a Country configuration**
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    19
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    20
The configuration root could for example exist in family/product/country/`product_Euro2_ALPS_02_customisation_root.confml <../_static/country/product_Euro1_ALPS_01_customisation_root.confml>`_.
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    21
So this configuration root includes another configuration and two extra layers. The script trusts that the normal SD naming convention is in use, where all layer root confml files 
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    22
are just name root.confml (to know what is a configuration root and what is a layer). 
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    23
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    24
Commands::
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    25
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    26
    > cd configproject_root
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    27
    > cone rootflatten -c family\product\country\product_Euro2_ALPS_02_customisation_root.confml
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    28
    Running action rootflatten
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    29
    Processing configurations ['family\\product\\country\\product_Euro1_ALPS_01_customisation_root.confml']
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    30
    opened family\product\country\product_Euro1_ALPS_01_customisation_root.confml for flattening
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    31
    Creating a new configuration root 'product_Euro1_ALPS_01_customisation_root.confml' for flattening
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    32
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    33
After the conversion there will be a file with the same name in root where includes are flattened and meta data is merged. 
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    34
 * See `product_Euro2_ALPS_02_customisation_root.confml <../_static/product_Euro1_ALPS_01_customisation_root.confml>`_
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    35
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    36
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    37
Options list
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    38
------------
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    39
Options:
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    40
  -h, --help            show this help message and exit
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    41
  -c CONFIG, --configuration=CONFIG
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    42
                        Defines the name of the configuration for the action,
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    43
                        can be specified multiple times to include multiple
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    44
                        configurations.
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    45
  --config-wildcard=WILDCARD
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    46
                        Wildcard pattern for including configurations, e.g.
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    47
                        product_langpack_*_root.confml
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    48
  --config-regex=REGEX  Regular expression for including configurations, e.g.
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    49
                        product_langpack_\d{2}_root.confml
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    50
  -p STORAGE, --project=STORAGE
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    51
                        defines the location of current project. Default is
e7e0ae78773e ConE 1.2.11 release
m2lahtel
parents:
diff changeset
    52
                        the current working directory.