Commit graph

142 commits

Author SHA1 Message Date
gwen
7dd9394b84 makefile and docstrings 2013-09-02 15:06:55 +02:00
Emmanuel Garette
d3ee2acaab can export options 2013-09-01 22:20:11 +02:00
Emmanuel Garette
82b375ade5 - add "make build-pot" to build or update translations/tiramisu.pot files
- corrections in error's message in tiramisu/option.py
- update tiramisu.pot
- update fr's translation
2013-08-31 09:54:23 +02:00
Emmanuel Garette
5893f8ad72 attributes in Option are now read-only if option set in Config (_name is everytime read-only) 2013-08-30 21:15:55 +02:00
gwen
fbf05ba5e4 python 3 compatibility
remove __eq__ and __ne__ in Option
2013-08-28 21:13:42 +02:00
Emmanuel Garette
776524a22d pep8 2013-08-28 09:18:48 +02:00
Emmanuel Garette
397a600be7 pep8 2013-08-28 09:16:12 +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
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
196d270cc9 _calc_requirement is a set, not a tuple 2013-08-24 16:34:08 +02:00
gwen
0db7ef72a6 automatic API documentation 2013-08-23 11:16:26 +02:00
Emmanuel Garette
04aa4e6bf1 never same calculated properties has properties (only in cache) 2013-08-22 22:48:09 +02:00
gwen
747d994762 documentation on the requirements and docstring updates 2013-08-22 11:08:26 +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
e9ffd96a28 update translation 2013-07-18 21:25:07 +02:00
Emmanuel Garette
15ac8c2872 update french translation 2013-07-17 22:30:35 +02:00
Emmanuel Garette
8056387f02 return true error message when validation 2013-07-17 20:48:46 +02:00
Emmanuel Garette
de44daafeb - can reset directly custom settings for an option: setting[option].reset()
- option properties are now tuple in internal, and change it to set when needed (that coping data)
2013-07-13 10:42:10 +02:00
Emmanuel Garette
c53d574ac2 can't use RESERVED address in IPOption and NetworkOption 2013-07-11 23:06:26 +02:00
Emmanuel Garette
1c951558da add new option's type: PortOption 2013-07-11 23:05:33 +02:00
Emmanuel Garette
0afb521766 support multi requirement with inverse for same option 2013-07-03 15:04:15 +02:00
gwen
b80bef0f7e string.format with numeric parameters 2013-07-02 15:05:50 +02:00
Emmanuel Garette
b8bfa02e02 Remove 'build_actions' in 'apply_requires', now 'validate_requires_arg' build requires with tuple of tuple
New _requires format:
- requirement (like old format)
- tuple of requirements, each items are a tuple of requirement with same action
2013-07-01 11:55:32 +02:00
Emmanuel Garette
9b134c3aa7 requirement are now a dictionary (not anymore a tuple) 2013-06-29 18:41:14 +02:00
Emmanuel Garette
32de14b731 validate_requires_arg return requires list 2013-06-26 16:25:02 +02:00
Emmanuel Garette
3c0629e6a9 better raise message if try to launch impl_get_information/impl_set_information in uncompatible class 2013-06-14 17:52:57 +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
c2471320c3 apply_requires: add property if any property raise PropertyError if same_action is False 2013-06-13 14:43:51 +02:00
Emmanuel Garette
755b2312c2 allow None in requirement 2013-06-13 12:15:46 +02:00
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
879a415e75 add docstrings 2013-05-23 14:55:52 +02:00
gwen
9acb522791 doc is ready for the new api refactoring 2013-05-21 11:37:39 +02:00
gwen
988bd659b8 refactoring the doc for the 0.55 new API 2013-05-15 17:35:49 +02:00
Emmanuel Garette
536eb27904 multi, None and validation 2013-05-10 22:34:07 +02:00
Emmanuel Garette
c91e7eff97 if not need, don't validate 2013-05-10 16:00:53 +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
2c5bbb7bc0 Requires need option, not path
Valid requires
2013-04-26 14:40:44 +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
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
5e67522f91 _empty is u'' for UnicodeOption 2013-04-17 22:06:10 +02:00
Emmanuel Garette
656b751995 mandatory is a true property (no more MandatoryError) + tests 2013-04-16 22:44:16 +02:00