Commit Graph

71 Commits

Author SHA1 Message Date
Emmanuel Garette 5eb2f04202 find in api return an api object 2018-04-10 12:33:51 +02:00
Emmanuel Garette c3be5e82ba update help() in api 2018-04-07 20:15:19 +02:00
Emmanuel Garette 42fc21e6f5 update access to property or permissive in tests 2018-04-06 08:30:32 +02:00
Emmanuel Garette bc4fa9d3d0 remove (g|s)et_modified_*, now it's exportation/importation 2018-04-04 21:51:18 +02:00
Emmanuel Garette de77cd1027 reset cache only if calculated value return a new value 2018-03-31 23:09:40 +02:00
Emmanuel Garette d5d826f967 adapt tests 2018-03-19 08:33:53 +01:00
Emmanuel Garette 5a1987f2e6 Add MasterSlaves object 2017-10-14 13:33:25 +02:00
Emmanuel Garette ddaadb0701 coverage 2017-07-21 18:03:34 +02:00
Emmanuel Garette d445963429 add permissive cache 2017-07-13 22:04:06 +02:00
Emmanuel Garette c8bc3093c7 python 3.5 support 2017-07-09 09:49:03 +02:00
Emmanuel Garette 2db15e193e require with inverse 2017-01-30 19:23:52 +01:00
Emmanuel Garette f497e99002 remove unicode decode error 2017-01-19 21:38:16 +01:00
Emmanuel Garette fc36f674eb consistency "not_equal" works now with multi 2016-11-16 22:31:42 +01:00
Emmanuel Garette fb16dd2a79 slave's requires with multi is different than slave's requires with non multi option 2016-11-14 21:14:45 +01:00
Emmanuel Garette 1b87e1d9bb Merge branch '2.0' 2016-10-12 20:50:12 +02:00
Emmanuel Garette 071035854b slave with requires could not raise 2016-10-12 20:49:56 +02:00
Emmanuel Garette 19b676967d better propertyerror message 2016-09-14 20:17:25 +02:00
Emmanuel Garette f4307b9122 cannot append properties for option with forbidden_set_properties 2016-01-25 15:49:40 +01:00
Emmanuel Garette a521a6d322 requires could be apply to a slave and properties could be different 2015-11-29 23:03:08 +01:00
Emmanuel Garette 44cd618704 remove pep8 validation errors 2015-07-24 17:54:10 +02:00
Emmanuel Garette d959020eed ability to disable warnings validation 2015-04-18 23:11:57 +02:00
Emmanuel Garette 71f8926fca better support for sqlalchemy storage 2014-07-06 15:31:57 +02:00
Emmanuel Garette 5d8b5719a0 Merge branch 'master' into orm
Conflicts:
	test/test_config_api.py
	tiramisu/autolib.py
	tiramisu/config.py
	tiramisu/option.py
	tiramisu/value.py
2014-04-13 10:30:42 +02:00
Emmanuel Garette d3f9d20ab5 add extend in config setting 2014-03-08 18:53:22 +01:00
Emmanuel Garette d5b83c123c tiramisu/setting.py : properties store in cache was a reference to a list modified in validation, should copy properties in cache 2014-02-20 16:55:35 +01:00
Emmanuel Garette a1dd2cfce7 require works well in sqlalchemy storage 2014-01-27 17:16:05 +01:00
Emmanuel Garette 374c56a9c8 first version with sqlalchemy option's storage 2013-11-23 23:34:17 +01:00
Emmanuel Garette c84d13a1c6 we can serialize Config now 2013-09-22 20:57:52 +02:00
Emmanuel Garette 77c1ccf40b add 'cache' property 2013-09-07 17:25:22 +02:00
Emmanuel Garette e4c129efc5 getowner need now an option 2013-08-24 22:32:54 +02:00
Emmanuel Garette c2b16d2605 add _path in reset for performance + more tests 2013-08-24 16:30:46 +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
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 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 9b134c3aa7 requirement are now a dictionary (not anymore a tuple) 2013-06-29 18:41:14 +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 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 2c5bbb7bc0 Requires need option, not path
Valid requires
2013-04-26 14:40:44 +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 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 80438b1495 Rename AmbigousOptionError as ConflictOptionError 2013-04-17 21:50:31 +02:00
Emmanuel Garette 9357b342c1 review exception 2013-04-14 12:01:32 +02:00
Emmanuel Garette 9c2dcc164c attribute in Option now starts with '_'
add ValidateError
add consistancies in Option
remove byattr in find
2013-04-13 22:50:55 +02:00
Emmanuel Garette 26568dc45a Values validate now value 2013-04-11 11:30:58 +02:00
Emmanuel Garette d100d66548 tiramisu/config.py can specify return type for find ('option', 'value', 'path') and remove get
user need replace config.get(value) by config.find(byname="value", type_='value')
2013-04-05 12:20:33 +02:00
Emmanuel Garette e6f00948f3 optimisations and all is properties 2013-04-03 12:20:26 +02:00