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
25bdcb1602
cleanup tests and ... - 100% green
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
12 years ago
Nico Schottelius
0b4914a7f3
+comment wording
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
12 years ago
Nico Schottelius
a265d87037
begin dry run in command line
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
12 years ago
Nico Schottelius
85d24ce259
fix execution order - seems to be fine now
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
12 years ago
Nico Schottelius
8a7c64f86a
cleanups + indent errors
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
12 years ago
Nico Schottelius
a064cc19b3
try new object orientated (hrrr) code instead of stage based
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
12 years ago
Nico Schottelius
cb829ec8d0
introduce MissingObjectIdError
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
12 years ago
Nico Schottelius
2732a4ba5c
finally finish the dynamic resolver
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
12 years ago
Nico Schottelius
369305f376
remove circularreferenceerror, because it is not being used anymore
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
12 years ago
Nico Schottelius
8031c77700
fix some tests, break some others :-)
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
12 years ago
Nico Schottelius
958d2d336f
various cleanups
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
12 years ago
Nico Schottelius
cd8b3cf68d
finish rewrite of dependency resolver
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
12 years ago
Nico Schottelius
6a8778e595
remove most of the resolver boilerplate, keep the interesting functions
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
12 years ago
Nico Schottelius
81c92e5cc4
merge all resolver code into cdist_object (to gain the requirement searching code
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
12 years ago
Nico Schottelius
16340b7d34
report on broken requirements, begin to satisfy requirements
...
Signed-off-by: Nico Schottelius <nico@brief.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
Nico Schottelius
c9f728e073
lib/cdist => cdist (pypi)
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
12 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
Nico Schottelius
0082b7f07c
allow objects to start with /, but not to contain //; sanitise after validation
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
632146114c
update copyright
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
8f75a9133f
do not fail validation on empty object_id
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
1e5226e21c
fix indention errors due to vim c&p
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
2492d51f6f
make object_from_name() better readable
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
097b4ea6ad
:%s/self.type/self.cdist_type/g
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
f27730e10b
finish rewrite to instance method
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
0c990e1756
add singleton / no object_id test to CdistObject
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
fb4f8784b6
rename Type => CdistType
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Nico Schottelius
1314567012
also begin to prefix type with cdist
...
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
Nico Schottelius
15fb097464
add function to sanitise object_id and verify no //
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Steven Armstrong
252ae5ea56
new feature: dependency resolver
13 years ago
Steven Armstrong
1729516414
allow .cdist (OBJECT_MARKER) inside file names but not as _the_ file/folder name
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Nico Schottelius
c7d0d581b1
we pass base_path, not object_path (clearification)
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
13 years ago
Steven Armstrong
792ddf0a5b
add utility method to join object name from type and object_id
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
afba5e9280
add utilitly method to split an object name into its type name and object_id
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
70ee0f1681
implement __lt__ to support sorting a list of objects
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
ff2192f6de
remove legacy attributes: ran, prepared
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
022b17d700
implement Object state
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
030d5919e6
raise exception if object_id contains .cdist
...
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
fb705adc5d
simplify object_id error handling
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
93db0b58d6
append type to error message
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
f76a5abf6f
/./,/
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
1c84e423d1
include type name in error message
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
d346364544
better error message
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
3e3919d15f
implement fail if object_id starts with /
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
b122b53d73
implement Object object_from_name
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago
Steven Armstrong
5edcc0537b
use api internally instead of constructing the same paths again
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
13 years ago