Commit graph

38 commits

Author SHA1 Message Date
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.
2019-11-27 15:04:47 +01:00
Darko Poljak
5480c22020 Adapt object_parameters before checking conflicting parameters. 2018-10-13 16:11:51 +02:00
Darko Poljak
e6c5563a16 NoSuchTypeError -> InvalidTypeError 2017-11-02 13:57:36 +01:00
Darko Poljak
f0dc21ec0c __cdist_log_level=<log level int value>; __cdist_log_level_name=<log level name> (#574) 2017-09-11 09:06:47 +02:00
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
2017-09-09 21:17:29 +02:00
Darko Poljak
57f15f9cce Make __cdist_loglevel value more expressive. (#571) 2017-09-07 16:36:23 +02:00
Darko Poljak
e2a1519332 Merge inventory from beta branch. 2017-07-20 22:04:44 +02:00
Darko Poljak
d49af95d3c Add warning message for faulty dependencies case. 2016-10-08 11:40:32 +02:00
Darko Poljak
dbcc94ab65 Add derived env vars for target hostname and fqdn. 2016-08-10 23:56:56 +02:00
Darko Poljak
6f28fc2db2 Fix ssh mux socket file error.
ssh ControlPath socket file needs to be unique for each host.
To avoid using ssh ControlPath option placeholders move socket file
to host's temp directory. Since each host has unique temp
directory then, although file name for socket file is fixed, its path
is unique.
2016-07-23 16:13:59 +02:00
Darko Poljak
64efa04599 pep8 2016-07-05 20:44:24 +02:00
Darko Poljak
72345f5516 Make union of existing and new requirements instead of conflict error. 2016-06-30 20:37:08 +02:00
Darko Poljak
bd9008794c Conflicting requirements bugfix. 2016-06-10 07:50:07 +02:00
Nico Schottelius
b0321895a7 fix all tests
Signed-off-by: Nico Schottelius <nico@freiheit.schottelius.org>
2015-03-05 19:20:06 +01:00
Nico Schottelius
d08c29b581 fix most test cases broken by no-dot-cdist change
Signed-off-by: Nico Schottelius <nico@freiheit.schottelius.org>
2015-03-05 18:32:47 +01:00
Daniel Heule
e29255b9f2 add an unittest for CDIST_ORDER_DEPENDENCY 2014-02-11 15:20:26 +01:00
Daniel Heule
60c53e213c testcases emulator.OverrideTestCase, with some minor bugfixes to make
test work as expected ...
2014-02-07 14:24:12 +01:00
Daniel Heule
f163b32720 first try of a test 2014-02-07 13:28:22 +01:00
Daniel Heule
717e21da6c initial update for override unittests 2014-02-07 00:28:02 +01:00
Steven Armstrong
1927d4852a add tests for configurable default values for parameters
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-09-04 22:11:08 +02:00
Nico Schottelius
2f5de23ae9 out_path -> base_path
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-19 12:03:25 +02:00
Nico Schottelius
c1441fc676 enhance singleton testing
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-07-10 17:21:38 +02:00
Nico Schottelius
8ab760ad90 document unit test
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-07-10 17:02:19 +02:00
Steven Armstrong
7205cd5ecf remove that crappy old singleton object_id thingy
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-07-10 16:31:58 +02:00
Nico Schottelius
3d73cd2fd3 better debugging for wrong type, fix emulator tests, fixes #176
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-05-27 16:36:20 +02:00
Nico Schottelius
7d57d1df79 update emulator tests to work again
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-07 11:05:40 +01:00
Nico Schottelius
4dd0f61934 --whitespace
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-07 10:51:13 +01:00
Nico Schottelius
217d2bcb23 Fix test: StdinTestCase
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-07 10:49:51 +01:00
Nico Schottelius
9cf80f5fdf make use of env provided by manifest
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-06 22:39:25 +01:00
Nico Schottelius
28bf0c3ed8 setup target_host for tests in test main class
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-06 21:52:11 +01:00
Nico Schottelius
866f23ea2c inject conf_dir for emulator test
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-06 21:32:54 +01:00
Nico Schottelius
528901bdee update a lot of tests for new exec.local
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-01 15:20:10 +01:00
Nico Schottelius
32a94a0f89 adjust emulator test to pass exec_path to local
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-01 13:35:52 +01:00
Nico Schottelius
63573a9797 make package_data work
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-10-29 22:50:27 +01:00
Nico Schottelius
85fcfb1744 correct __file link again
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-10-25 23:48:56 +02:00
Nico Schottelius
91c1374657 begin restructering for python package
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-10-25 23:37:15 +02:00
Nico Schottelius
392ec3c5ed correct link to __file
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-10-25 17:46:19 +02:00
Nico Schottelius
c9f728e073 lib/cdist => cdist (pypi)
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-10-25 17:21:58 +02:00