Darko Poljak
c17541f24c
Expand and split by consecutive require delimiters
...
Resolves #832 .
2 years ago
Darko Poljak
fe193ecab8
Make code consistent
...
* Remove supreflous checking and warning message.
* Fix cache recording.
3 years ago
Dennis Camera
ce07021580
Do not subclass object
3 years ago
Darko Poljak
840e417eb7
Fix emulator colored logging
3 years ago
Dennis Camera
747c6b1076
Respect NO_COLOR environment variable
3 years ago
evilham
ba77ea9edc
[UX] Add option to enable LogLevel-based coloured output.
...
This makes it easier for new and experienced users to run cdist with higher
verbosity levels, both to know that things are working as expected and to debug
issues.
Documentation has been modified accordingly and default behaviour is not
changed.
3 years ago
Darko Poljak
da274e5ef3
Redefine/reimplement CDIST_ORDER_DEPENDENCY
...
CDIST_ORDER_DEPENDENCY now defines type order dependency context.
cdist (emulator) maintains global state variables, as files,
order_dep_state and typeorder_dep, and per object state variable,
as file, typeorder_dep.
If order_dep_state exists then this defines that order dependency is
turned on.
If order_dep_state does not exist then order dependency is turned off.
If order dependency is on then objects created after it is turned on are
recorded into:
* global typeorder_dep, in case of init manifest
* object's typeorder_dep, in case of type's manifest.
If order dependency is on then requirement is injected, where object
created before current, is read from:
* global typeorder_dep, in case of init manifest
* object's typeorder_dep, in case of type's manifest.
Every time order dependency is turned off, typeorder_dep files are
removed, which means that type order list is cleared, context is
cleaned.
In the end cdist cleans after itself, i.e. mentioned files are removed.
When running type manifest is finished typeorder_dep file is removed.
When running config finishes global typeorder_dep and order_dep_state
files are removed.
Global type order recording is untouched.
Furthermore, for completeness, type order is now recorded for each object
too.
3 years ago
Darko Poljak
3d3b59ab87
Add pycodestyle ignores
3 years ago
Darko Poljak
2505023387
Append requirement only if already not present
4 years ago
Darko Poljak
797522f91e
Fix circular dep for CDIST_ORDER_DEPENDENCY
...
Fixes #756
4 years ago
Darko Poljak
5480c22020
Adapt object_parameters before checking conflicting parameters.
4 years ago
Darko Poljak
eb8922ebcd
Remove redundant log.error line.
5 years ago
Darko Poljak
e6c5563a16
NoSuchTypeError -> InvalidTypeError
5 years ago
Darko Poljak
f0dc21ec0c
__cdist_log_level=<log level int value>; __cdist_log_level_name=<log level name> ( #574 )
5 years ago
Darko Poljak
3454da076f
Add -l/--log-level option. Honor __cdist_loglevel env var. ( #572 )
...
Add -l/--log-level option, __cdist_loglevel -> __cdist_log_level; honor __cdist_log_level env var
5 years ago
Darko Poljak
57f15f9cce
Make __cdist_loglevel value more expressive. ( #571 )
5 years ago
Darko Poljak
f368539447
Some pylint cleaning.
6 years ago
Darko Poljak
75fe3272b3
Add file locking for -j parallel execution.
6 years ago
Darko Poljak
87fe52ea61
Default logging level is WARNING.
6 years ago
Darko Poljak
314a931b84
Respect cdist log level in emulator.
6 years ago
Darko Poljak
a722f3c634
3rd iteration of logging cleanup.
6 years ago
Darko Poljak
127c05a882
2nd iteration of logging cleanup.
6 years ago
Darko Poljak
248656b81f
First iteration of logging cleanup.
6 years ago
Darko Poljak
d49af95d3c
Add warning message for faulty dependencies case.
6 years ago
Darko Poljak
72001b237e
Remove relict comment.
7 years ago
Darko Poljak
d96be90f26
Fix self.target_host
7 years ago
Darko Poljak
dbcc94ab65
Add derived env vars for target hostname and fqdn.
7 years ago
Darko Poljak
64efa04599
pep8
7 years ago
Darko Poljak
92d96c14b9
Undo reqs conflict detection, continue appending new reqs.
7 years ago
Darko Poljak
72345f5516
Make union of existing and new requirements instead of conflict error.
7 years ago
Darko Poljak
bd9008794c
Conflicting requirements bugfix.
7 years ago
Nico Schottelius
fa6e389fdd
cannot use False for object id, as it is being used for os.path.join() in object
...
Signed-off-by: Nico Schottelius <nico@freiheit.schottelius.org>
8 years ago
Nico Schottelius
73c77dd2d3
Let core use random .cdist directory for objects
...
Signed-off-by: Nico Schottelius <nico@freiheit.schottelius.org>
8 years ago
Daniel Heule
cfbc68aa11
bugfix if both override and order is specified
9 years ago
Daniel Heule
60c53e213c
testcases emulator.OverrideTestCase, with some minor bugfixes to make
...
test work as expected ...
9 years ago
Daniel Heule
52e2017d8f
CDIST_ALLOW_OVERRIDE -> CDIST_OVERRIDE as requested by nico
9 years ago
Daniel Heule
51afca5336
Implement lastest suggestions from nico, rename ENV Variable to
...
CDIST_ORDER_DEPENDENCY
9 years ago
Nico Schottelius
34f2f7f038
setting up CDIST_ALLOW_OVERRIDE to any value is ok - do not depend on true/yes/ja
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
9 years ago
Daniel Heule
5fbac8d0ba
forgot the : after the else ...
9 years ago
Daniel Heule
197fabf40a
added some ideas from asteven and a bit more description about the order
...
in the manpage
9 years ago
Daniel Heule
4ef55ef13f
allow object overrides with CDIST_ALLOW_OVERRIDE=true
9 years ago
Nico Schottelius
ac0c88fe9f
remove some old typos and omit type details that follow anyway
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
9 years ago
Nico Schottelius
ce73cef457
explain that a requirement caused the error, otherwise you search until you die
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
9 years ago
Daniel Heule
61aec12ba1
Try2 to make cdist honor the manifest order,
...
this implementation has some more lines of code,
but no collision with the require variable.
9 years ago
Daniel Heule
824381e6ca
new special value require="CDIST_HONOR_MANIFEST_ORDER"
...
which tells cdist to execute types in the manifest order
9 years ago
Steven Armstrong
54815e2b29
implement cdist install
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
9 years ago
Steven Armstrong
08762330e1
default to None, not empty list
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
9 years ago
Steven Armstrong
39f65d2ef7
leave conversion of list to underlying fsproperty
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
9 years ago
Steven Armstrong
8b0eb5766a
bugfix: handle non-existent default
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
9 years ago
Steven Armstrong
67f61eb7ec
make default values for optional_multiple parameters work
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
9 years ago