Nico Schottelius
73338c330b
record the type name, if there is no such type
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
11 years ago
Nico Schottelius
93f5ace932
clenaup logging in emulator, cleanup emulator in main script
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
11 years ago
Steven Armstrong
3de9b869ac
there is no such thing as cdist install in master
...
remove all traces of it to prevent the ongoing merge issues when using the real thing
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
11 years ago
Nico Schottelius
136ddc05b5
context based changes
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
11 years ago
Nico Schottelius
866645679a
throw a better exception when environment variables are missing
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
12 years ago
Nico Schottelius
2f5de23ae9
out_path -> base_path
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
12 years ago
Steven Armstrong
7205cd5ecf
remove that crappy old singleton object_id thingy
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
12 years ago
Nico Schottelius
3d73cd2fd3
better debugging for wrong type, fix emulator tests, fixes #176
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
12 years ago
Nico Schottelius
2fe647a1f7
Revert "implement before/after to declare dependencies and deprecate require"
...
Comment from asteven:
Some problems showed up while updating the docs and tests.
You should revert the merge for now.
This reverts commit 84770b9ef2
.
12 years ago
Steven Armstrong
84770b9ef2
implement before/after to declare dependencies and deprecate require
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
--whitespace
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
12 years ago
Steven Armstrong
6d430524f1
binary all the way, fixes issue #138
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
12 years ago
Steven Armstrong
6c685e61d5
fixes #126
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
12 years ago
Nico Schottelius
2fca87eda8
++comment
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
12 years ago
Nico Schottelius
a498330bd3
remove _read_stdin and open stdin file in non-binary mode
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
12 years ago
Nico Schottelius
45d5e4719a
read from stdin using read, not buffer.read() to be compatible with other IO streams
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
12 years ago
Nico Schottelius
a32d3abd33
allow to pass in environment into emulator
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
12 years ago
Nico Schottelius
7b51e22922
allow to read stdin from different handle than sys.stdin in emulator
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
12 years ago
Nico Schottelius
c9f728e073
lib/cdist => cdist (pypi)
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
12 years ago
Steven Armstrong
36513997d9
implement multiple parameters based on https://github.com/telmich/cdist/pull/71 by Sébastien Gross
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
06649d3478
new feature: capture and forward stdin to types
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
7d61b77708
fix autorequire dependency handling
...
- inherit explicit requirements that the user defined himself
- but _not_ implicit requirements that cdist added for autorequire
Changes:
- added new .autorequire property to CdistObject to keep track of implicit autorequire dependencies
- Emulator appends implicit requirements to this .autorequire property
- DependencyResolver preprocess these .autorequire properties before resolving normal dependencies
- refactored and documented DependencyResolver so it's clearer what happens and easier to use from tests
- update test cases to match new DependencyResolver behaviour
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
2ff286cf1d
inherit dependencies from defining object when setting up implicit dependencies through autorequire
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
0760ff3c94
implement boolean parameters, forgotten files ;-)
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Nico Schottelius
46e6ea4308
print name, not object (user does not need to see python way of things)
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
be67059725
print name, not object (user does not need to see python way of things)
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
861b13ffe4
record sanitised object, not the user supplied one, as requirement
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
0861276436
remove obsolete MissingEnvironmentVariableError()
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
2d61070023
remove old IllegalRequirementError exception
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
eadb62e67a
minimal beaufity
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
dcd3bcee32
use the great method object_from_name() in emulator
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
754aba1a15
record source in setup_object not in requirements
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
ab565dc3d9
cleanup / emulator
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
91ecfa7d3f
back to 100% tests working
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
4be37f6e93
begin rename Object => CdistObject
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Steven Armstrong
252ae5ea56
new feature: dependency resolver
13 years ago
Steven Armstrong
68f66af21a
implement: accept parameters with dashes
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
d0123acc2a
implement singleton as requirement
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
c58ec7e4ef
prevent circular dependencies
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
7d0238682b
implement autorequire in emulator
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
8f306a7484
/__debug/__cdist_debug/
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
2246b7496b
fails if requirement has illegal object_id
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Nico Schottelius
7bb81e2f18
Whitespace does not not weigh anything - remove - sed -i 's/ *$//g' *py */*py
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Steven Armstrong
e9a0aa1863
fail if requirements type does not exist
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Nico Schottelius
03ea7787d2
+self
...
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
13 years ago
Nico Schottelius
3c31b4f9a3
and finally also adjust the requirement itself
...
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
13 years ago
Nico Schottelius
5a72223ae3
strip away / in emulator in requirements
...
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
13 years ago
Nico Schottelius
ee1c568c7b
almost finish correct requirement loading, but need sleep
...
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
13 years ago
Nico Schottelius
0dd38f75c2
remove leading / from object_id of requirement
...
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
13 years ago
Nico Schottelius
a7a3ee6f19
adjust prefix
...
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
13 years ago
Nico Schottelius
e002710c4c
rewrite emulator to class based approach for better logging
...
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
13 years ago