Commit Graph

35 Commits

Author SHA1 Message Date
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
gwen a8e6bac87f refactoring, the values are in an OptionValues object 2013-02-08 11:50:22 +01:00
gwen 9259a6e3f7 values are in value objects now 2013-02-07 16:20:21 +01:00
gwen cd50cf7551 owners are *real* objects now 2012-12-10 14:10:05 +01:00
gwen d633574cc5 comparison failed 2012-12-03 15:48:04 +01:00
gwen eb7e393864 the value owner is a string now 2012-11-15 10:55:14 +01:00
gwen 09dba4b959 suppression of the override 2012-11-12 12:06:58 +01:00
gwen 753b0a55c7 opt.hidden and opt.disabled is replaced by opt.properties 2012-08-13 12:49:58 +02:00
gwen d05feb78f9 suppression of the notion of normal and expert mode 2012-08-13 09:32:33 +02:00
gwen 45ff59aea2 tests are passing again after package renaming 2012-07-23 14:52:08 +02:00
gwen 9aa9d9780a everything in src for packaging purposes 2012-07-13 09:42:14 +02:00
gwen d1f97ca50f everything in src for packaging purposes 2012-07-13 09:37:25 +02:00
gwen 736a1c77b6 add getowner method 2012-07-11 15:31:59 +02:00
gwen 4ec7dff6c4 value None in multi values 2012-07-11 12:30:45 +02:00
gwen bd9d98fcc6 None and [] are both possible 2012-07-10 16:46:30 +02:00
gwen a80b868cae default value if option is set to None 2012-07-10 15:15:35 +02:00
gwen 166ffc72f7 default value if option is set to None 2012-07-10 14:36:09 +02:00
gwen 10df0e1cd1 value owners can be lists 2012-07-09 17:34:39 +02:00
gwen 9f184d54c3 add type list for value owners 2012-07-09 11:27:51 +02:00
gwen b008f31e27 came prepared for setitem tests 2012-07-08 21:15:59 +02:00
gwen f3a9a96714 possibility to have a default as multi 2012-06-29 11:48:03 +02:00
gwen 8b16814ab4 first revision 2012-05-13 20:48:51 +02:00