Commit graph

820 commits

Author SHA1 Message Date
Emmanuel Garette
2751a2694a RequirementRecursiveError => RequirementError
Properties in "apply_requires" are now transitive (but only if tested property is in properties list)
New requirement option (a boolean), don't touch properties if PropertyError in "apply_requires"
2013-05-31 23:30:00 +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
gwen
0e6032dd88 new api documentation 2013-05-21 18:42:56 +02:00
gwen
480ed190aa Merge branch 'master' of ssh://git.labs.libre-entreprise.org/gitroot/tiramisu 2013-05-21 11:38:02 +02:00
gwen
9acb522791 doc is ready for the new api refactoring 2013-05-21 11:37:39 +02:00
Emmanuel Garette
e131fdc5a5 add cfgimpl_get_children for MetaConfig and informations 2013-05-21 11:09:09 +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
gwen
d6098f353e refactoring doc for the new API 2013-05-17 12:11:14 +02:00
gwen
988bd659b8 refactoring the doc for the 0.55 new API 2013-05-15 17:35:49 +02:00
gwen
89dca8d707 suppress get_consistencies() method 2013-05-14 17:40:42 +02:00
Emmanuel Garette
536eb27904 multi, None and validation 2013-05-10 22:34:07 +02:00
gwen
bd489346a9 docstrings 2013-05-10 16:02:27 +02:00
Emmanuel Garette
c91e7eff97 if not need, don't validate 2013-05-10 16:00:53 +02:00
gwen
c13846238d add philippe as a contributor 2013-05-10 15:45:40 +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
6ffd71a43e DomainnameOption now works with default value 2013-05-10 09:27:54 +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
1b29793e0f compare option 2013-05-05 21:43:19 +02:00
Emmanuel Garette
2d57ed160e work on MetaConfig 2013-05-02 11:34:57 +02:00
Emmanuel Garette
9ceaa4b235 tiramisu/i18n.py: pep8 compliants 2013-05-02 11:23:47 +02:00
Emmanuel Garette
bcfc0cd41b tiramisu/setting.py: _get_properties and validate_properties are now more easier to read and has best performance 2013-05-02 11:23:04 +02:00
Emmanuel Garette
2c5bbb7bc0 Requires need option, not path
Valid requires
2013-04-26 14:40:44 +02:00
Emmanuel Garette
509f41e14c missing properties in PropertiesOptionError 2013-04-24 17:40:16 +02:00
Emmanuel Garette
f28288fbba In make_dict check PropertyConfigError for OptionDescription
Begin work's on MetaConfig
2013-04-24 11:47:01 +02:00
Emmanuel Garette
f0ef1734f4 add a test for force_store_value in read_only mode 2013-04-23 19:01:03 +02:00
Emmanuel Garette
2e21f13387 force_store_value store value but not in write mode 2013-04-23 16:43:39 +02:00
Philippe Caseiro
b7580125a5 Merge branch 'master' of git://git.labs.libre-entreprise.org/tiramisu 2013-04-23 16:30:45 +02:00
Philippe Caseiro
a57e89c82d * Makefile : Installation des fichiers de langue
Compilation et Installation des fichiers de traductions pour
Tiramisu
2013-04-23 16:30:24 +02:00
Philippe Caseiro
e8bc84ab33 Ajout des fichiers de traduction et mise à jour de i18n.py
Support du chargement des locales
2013-04-23 16:30:24 +02:00
gwen
604cb0339e 'make test' deleted 2013-04-23 14:14:19 +02:00
Emmanuel Garette
7cd44d6886 remove an unused callback in test 2013-04-23 11:41:16 +02:00
Emmanuel Garette
20fe56e03d tiramisu/values: _empty should not validate with defaultvalue, defaultvalue is already in value 2013-04-23 10:41:47 +02:00
Emmanuel Garette
e5de0234c2 don't raise if check_disabled is True 2013-04-22 20:42:54 +02:00
Emmanuel Garette
ec88d817ae missing import 2013-04-22 16:48:56 +02:00
Emmanuel Garette
1fd5f685de callback must be a function and validator support same paramaters has callback 2013-04-22 16:48:13 +02:00
Emmanuel Garette
e883e5b89e remove _setoption in SymLinkOption
objimpl_ => optimpl_
ConflictConfigError => ConflictError
add read_write/read_only/getowner in Config
2013-04-22 09:19:05 +02:00
Emmanuel Garette
682d9fe207 add option name's validation and rename Option method with objimpl_ 2013-04-20 21:58:52 +02:00
Emmanuel Garette
d4ef47759e Manipulate properties is now more convenient:
c.cfgimpl_get_settings().has_property('hidden') => 'hidden' in c.cfgimpl_get_settings()
c.cfgimpl_get_settings().has_property('hidden', option1) => 'frozen' in c.cfgimpl_get_settings()[opt]

c.cfgimpl_get_settings().get_properties(option1) => c.cfgimpl_get_settings()[option1]
c.cfgimpl_get_settings().get_properties(option1) => c.cfgimpl_get_settings()[option1]

c.cfgimpl_get_settings().add_property('hidden', option1) => c.cfgimpl_get_settings()[optiont1].append('hidden')
c.cfgimpl_get_settings().del_property('hidden', option1) => c.cfgimpl_get_settings()[optiont1].remove('hidden')

c.cfgimpl_get_settings().enable_property('hidden') => c.cfgimpl_get_settings().append('hidden')
c.cfgimpl_get_settings().disable_property('hidden') => c.cfgimpl_get_settings().remove('hidden')
2013-04-20 17:30:05 +02:00
Emmanuel Garette
54fe8d0f4b cache for properties is now in get_properties and not for validate_properties 2013-04-20 11:25:14 +02:00
Emmanuel Garette
a11768ef43 remove expired cache with config.cfgimpl_reset_cache(True) 2013-04-19 22:42:33 +02:00
Emmanuel Garette
d7b5d9dc16 add SlaveError for slave's length 2013-04-19 20:23:34 +02:00
Emmanuel Garette
410add6a2a add SlaveError for slave's length 2013-04-19 20:10:55 +02:00
Emmanuel Garette
e08bd93cd8 all multi gestion is now in Multi 2013-04-18 23:06:14 +02:00
Emmanuel Garette
324c3d2cf6 * to "reset" a value, now you just have to delete it
config.unwrap_from_path("string").reset(config) => del(config.string)
* add cache for value/setting to 5 secds
to "reset" cache just do: config.cfgimpl_clean_cache()
* can desactivate cache by removing "expire" property
2013-04-18 20:26:40 +02:00
Emmanuel Garette
d5e1cb6576 pass force_properties to value's _setitem and remove config's setoption 2013-04-17 23:19:53 +02:00
Emmanuel Garette
5e67522f91 _empty is u'' for UnicodeOption 2013-04-17 22:06:10 +02:00
Emmanuel Garette
eea96cc3d1 MultiTypeError => ValueError 2013-04-17 21:57:06 +02:00
Emmanuel Garette
80438b1495 Rename AmbigousOptionError as ConflictOptionError 2013-04-17 21:50:31 +02:00
Emmanuel Garette
3170237c8e properties validation not in setting and now launch when modify multi 2013-04-17 21:33:34 +02:00