Emmanuel Garette
20bef5ff04
Important behavior change in callback with multi.
...
Before, tiramisu iterable multi's callback_params in all cases.
Now, this append only if multi's callback_params are in master/slave group.
2013-12-09 15:08:14 +01:00
Emmanuel Garette
70f684e70c
tiramisu/option.py:
...
separate _consistencies (for Option) and _cache_consistencies (for OptionDescription)
_launch_consistency need index for multi's option
_cons_not_equal support multi options
tiramisu/value.py:
Multi._validate support consistency
2013-09-28 17:05:01 +02:00
Emmanuel Garette
f4677b9ef9
use warnings instead of a new dictionary
2013-09-26 21:56:06 +02:00
Emmanuel Garette
f040d3da61
warning is now a dict
2013-09-26 18:35:20 +02:00
Emmanuel Garette
4e0f0a5b70
config_error is an exception, raise directly config_error
2013-09-25 10:22:31 +02:00
Emmanuel Garette
06baff2f3b
add warning ability
2013-09-24 23:19:20 +02:00
Emmanuel Garette
051f1c8774
tiramisu/config.py:
...
- find byvalue support Multi
tiramisu/value.py:
- Multi's pop comment
2013-09-22 21:23:12 +02:00
Emmanuel Garette
c84d13a1c6
we can serialize Config now
2013-09-22 20:57:52 +02:00
Emmanuel Garette
ae4df32d0e
error if change slave len for default's slave option
2013-09-19 23:02:15 +02:00
Emmanuel Garette
90ae9aa70d
refactore carry_out_calculation + test + documentation
2013-09-19 21:39:41 +02:00
Emmanuel Garette
866364059c
dont change anything if config_error
2013-09-17 09:10:08 +02:00
Emmanuel Garette
57f4dd8d3f
allow mandatory value (see 9ddf100118
for more details)
2013-09-16 20:51:13 +02:00
Emmanuel Garette
9ddf100118
when we get an option's value, we need it's values to calculate properties (ie for mandatory's option)
...
if a disabled option has a callback to an other disabled value, it's raise ConfigError
now only raise if option has no other propertiesError
2013-09-16 15:07:34 +02:00
Emmanuel Garette
77c1ccf40b
add 'cache' property
2013-09-07 17:25:22 +02:00
Emmanuel Garette
22bfbb9fa4
storage no more in setting.py, code is now in storage/__init__.py
2013-09-06 23:15:36 +02:00
Emmanuel Garette
aeeaf6ec14
impl_get_information and impl_set_information are, now, persistent in storage
2013-09-03 10:38:38 +02:00
Emmanuel Garette
8aa4260404
test force_default_on_freeze with multi and correction in Multi()
2013-08-28 22:50:35 +02:00
gwen
fbf05ba5e4
python 3 compatibility
...
remove __eq__ and __ne__ in Option
2013-08-28 21:13:42 +02:00
Emmanuel Garette
3be005e82e
add test test/test_dereference.py + memoryleaks in optiondescription's cache
2013-08-27 21:36:52 +02:00
Emmanuel Garette
acd27fb56c
huge use of weakrefs to remove memoryleaks due to circular references
2013-08-27 11:39:32 +02:00
Emmanuel Garette
0bc47b1cf9
ConstError in tiramisu/error.py
...
storage_type is now unique
rename _const => _NameSpace
can change storage's options in set_storage
storage :
add Setting object in storage
rename enumerate to list_sessions
rename delete to delete_session
auto-create owner when load sqlite3 storage and in getowner
2013-08-26 21:48:42 +02:00
Emmanuel Garette
dc2c173b44
revert change in append of Multi object for sqlite3 storage
2013-08-25 20:51:29 +02:00
Emmanuel Garette
36ed6f874f
add some tests for values
...
cannot use __setitem__ to set value for an option
in append, len should not greater than master option
2013-08-25 18:06:07 +02:00
Emmanuel Garette
f482737a47
add test to known if has a value + some corrections
2013-08-24 23:10:35 +02:00
Emmanuel Garette
1ddd88fc99
some corrections in sqlite3 storage
2013-08-21 23:21:28 +02:00
Emmanuel Garette
b6bb685ca5
key is now always path and change opt by path dictionary storage
2013-08-21 22:21:50 +02:00
gwen
acca6d5a27
documentation update and docstrings
2013-08-21 17:21:09 +02:00
gwen
7d2449380c
documentation and docstring updates
2013-08-21 14:52:48 +02:00
gwen
a431b46fb9
Merge branch 'master' of ssh://git.labs.libre-entreprise.org/gitroot/tiramisu
2013-08-21 11:10:15 +02:00
gwen
defae40a2f
documentation update and docstrings
2013-08-21 11:09:11 +02:00
Emmanuel Garette
0d5a447eb3
add persistent option for db
2013-08-20 22:45:11 +02:00
Emmanuel Garette
ace7f6f828
merge from master
2013-08-20 16:33:32 +02:00
gwen
564fecc261
pep 8 lines too long
2013-08-20 12:08:02 +02:00
Emmanuel Garette
e826f3d1c6
we can personalise storage easily
2013-08-20 09:47:12 +02:00
Emmanuel Garette
df7d6759cd
add sqlite plugin
2013-08-19 11:01:21 +02:00
Emmanuel Garette
f6f709f83d
split cache/value/setting in plugin
2013-08-14 23:06:31 +02:00
Emmanuel Garette
8056387f02
return true error message when validation
2013-07-17 20:48:46 +02:00
Emmanuel Garette
4d15c91383
symlink support for getowner and raise if option in master/slave
2013-06-13 22:06:49 +02:00
Emmanuel Garette
fd02a954ca
add sort, reverse, insert and extend in Multi
2013-06-12 22:48:22 +02:00
Emmanuel Garette
0d114001f4
Works callback/multi/master-slave
...
- in multi, never modify _default value
- _reset slave when _reset master
- if append None in master with callback return not a list, replace None by the value
- list support in slave
2013-06-12 10:22:50 +02:00
Emmanuel Garette
b2538f6f0b
support of non multi variable
2013-06-11 15:31:20 +02:00
Emmanuel Garette
6d1cf308b2
Better support for slave with callback:
...
- callback must return single value, not a list
- if default value, append slave values with master len
- if not default and append, set default value
2013-06-11 15:12:31 +02:00
gwen
9cf30d214d
raise ConfigError
2013-06-10 17:12:57 +02:00
gwen
c6c422f472
docstrings and api
2013-05-23 17:51:50 +02:00
gwen
879a415e75
add docstrings
2013-05-23 14:55:52 +02:00
Emmanuel Garette
1d8c248d1b
Multi: don't touch slave's value if it's default one's + don't check slave properties (if, for example, disabled for example)
2013-05-21 11:09:09 +02:00
Emmanuel Garette
536eb27904
multi, None and validation
2013-05-10 22:34:07 +02:00
Emmanuel Garette
fa5d643aee
tiramisu/autolib.py: optimpl_ => impl_
...
tiramisu/option.py: consistency simplication and allow multi
tiramisu/option.py: don't touch cache if force_permissive or force_properties
tiramisu/values.py: set validate paramaters in Multi()
2013-05-10 15:10:06 +02:00
Emmanuel Garette
6de65859b4
* config herite from BaseInformation class
...
* _cfgimpl_ => _impl_
* optimpl_ => impl_
* properties/permissives are now set/frozenset
* validation raise ValueError if not valid, didn't return anything otherwise
* consistencies are now validate in setting and when deleting value
* ip/network with netmask consistency now works
* DomainnameOption now works
* if no validation, don't set cache for value
* symlinkoption: remove path (not used)
2013-05-08 18:14:42 +02:00
Emmanuel Garette
2d57ed160e
work on MetaConfig
2013-05-02 11:34:57 +02:00