From e8e81fb74b45481e9d1cdf41bada9388449efffa Mon Sep 17 00:00:00 2001 From: gwen Date: Tue, 10 Jul 2012 08:55:52 +0200 Subject: [PATCH] previous value api method --- config.py | 6 +++- doc/build/pydoc/api-objects.txt | 50 ++++++++++++++++++++++----------- 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/config.py b/config.py index 6688218..e5498c5 100644 --- a/config.py +++ b/config.py @@ -284,7 +284,7 @@ class Config(object): self._cfgimpl_values[name] = getattr(opt, 'default', None) def setoption(self, name, value, who=None): - "who is **not necessarily** a owner, because it cannot be a list" + #who is **not necessarily** a owner, because it cannot be a list child = getattr(self._cfgimpl_descr, name) if who == None: if child.is_multi(): @@ -372,6 +372,10 @@ class Config(object): self = self._cfgimpl_parent return self + def cfgimpl_previous_values(self, path): + home, name = self._cfgimpl_get_home_by_path(path) + return home._cfgimpl_previous_values[name] + def add_warning(self, warning): self._cfgimpl_get_toplevel()._cfgimpl_warnings.append(warning) diff --git a/doc/build/pydoc/api-objects.txt b/doc/build/pydoc/api-objects.txt index 27eb542..c9ed6ab 100644 --- a/doc/build/pydoc/api-objects.txt +++ b/doc/build/pydoc/api-objects.txt @@ -1,12 +1,11 @@ tiramisu tiramisu-module.html tiramisu.__package__ tiramisu-module.html#__package__ tiramisu.autolib tiramisu.autolib-module.html -tiramisu.autolib.identical tiramisu.autolib-module.html#identical -tiramisu.autolib.g tiramisu.autolib-module.html#g +tiramisu.autolib.calculate tiramisu.autolib-module.html#calculate tiramisu.autolib.special_owners tiramisu.autolib-module.html#special_owners tiramisu.autolib.__package__ tiramisu.autolib-module.html#__package__ +tiramisu.autolib.calc_factory tiramisu.autolib-module.html#calc_factory tiramisu.autolib.special_owner_factory tiramisu.autolib-module.html#special_owner_factory -tiramisu.autolib.auto_factory tiramisu.autolib-module.html#auto_factory tiramisu.basetype tiramisu.basetype-module.html tiramisu.basetype.modes tiramisu.basetype-module.html#modes tiramisu.basetype.__package__ tiramisu.basetype-module.html#__package__ @@ -101,6 +100,7 @@ tiramisu.error.RequiresError tiramisu.error.RequiresError-class.html tiramisu.error.SpecialOwnersError tiramisu.error.SpecialOwnersError-class.html tiramisu.option.ArbitraryOption tiramisu.option.ArbitraryOption-class.html tiramisu.basetype.HiddenBaseType.show tiramisu.basetype.HiddenBaseType-class.html#show +tiramisu.option.ArbitraryOption._validate tiramisu.option.ArbitraryOption-class.html#_validate tiramisu.option.Option.getkey tiramisu.option.Option-class.html#getkey tiramisu.basetype.DisabledBaseType.disabled tiramisu.basetype.DisabledBaseType-class.html#disabled tiramisu.option.Option.setowner tiramisu.option.Option-class.html#setowner @@ -115,7 +115,7 @@ tiramisu.option.Option.setoption tiramisu.option.Option-class.html#setoption tiramisu.basetype.DisabledBaseType.disable tiramisu.basetype.DisabledBaseType-class.html#disable tiramisu.option.Option.getcallback tiramisu.option.Option-class.html#getcallback tiramisu.basetype.HiddenBaseType.hide tiramisu.basetype.HiddenBaseType-class.html#hide -tiramisu.option.ArbitraryOption.validate tiramisu.option.ArbitraryOption-class.html#validate +tiramisu.option.Option.validate tiramisu.option.Option-class.html#validate tiramisu.option.Option.freeze tiramisu.option.Option-class.html#freeze tiramisu.basetype.ModeBaseType.get_mode tiramisu.basetype.ModeBaseType-class.html#get_mode tiramisu.option.Option._frozen tiramisu.option.Option-class.html#_frozen @@ -124,14 +124,16 @@ tiramisu.option.Option.is_multi tiramisu.option.Option-class.html#is_multi tiramisu.option.ArbitraryOption.getdefault tiramisu.option.ArbitraryOption-class.html#getdefault tiramisu.option.Option.unfreeze tiramisu.option.Option-class.html#unfreeze tiramisu.basetype.ModeBaseType.mode tiramisu.basetype.ModeBaseType-class.html#mode +tiramisu.option.Option.getcallback_params tiramisu.option.Option-class.html#getcallback_params tiramisu.option.BoolOption tiramisu.option.BoolOption-class.html tiramisu.basetype.HiddenBaseType.show tiramisu.basetype.HiddenBaseType-class.html#show +tiramisu.option.BoolOption._validate tiramisu.option.BoolOption-class.html#_validate tiramisu.option.BoolOption.opt_type tiramisu.option.BoolOption-class.html#opt_type tiramisu.option.Option.getkey tiramisu.option.Option-class.html#getkey tiramisu.basetype.DisabledBaseType.disabled tiramisu.basetype.DisabledBaseType-class.html#disabled tiramisu.option.Option.setowner tiramisu.option.Option-class.html#setowner tiramisu.basetype.DisabledBaseType._is_disabled tiramisu.basetype.DisabledBaseType-class.html#_is_disabled -tiramisu.option.BoolOption.__init__ tiramisu.option.BoolOption-class.html#__init__ +tiramisu.option.Option.__init__ tiramisu.option.Option-class.html#__init__ tiramisu.option.Option.is_mandatory tiramisu.option.Option-class.html#is_mandatory tiramisu.basetype.ModeBaseType.set_mode tiramisu.basetype.ModeBaseType-class.html#set_mode tiramisu.basetype.HiddenBaseType._is_hidden tiramisu.basetype.HiddenBaseType-class.html#_is_hidden @@ -141,7 +143,7 @@ tiramisu.option.Option.setoption tiramisu.option.Option-class.html#setoption tiramisu.basetype.DisabledBaseType.disable tiramisu.basetype.DisabledBaseType-class.html#disable tiramisu.option.Option.getcallback tiramisu.option.Option-class.html#getcallback tiramisu.basetype.HiddenBaseType.hide tiramisu.basetype.HiddenBaseType-class.html#hide -tiramisu.option.BoolOption.validate tiramisu.option.BoolOption-class.html#validate +tiramisu.option.Option.validate tiramisu.option.Option-class.html#validate tiramisu.option.Option.freeze tiramisu.option.Option-class.html#freeze tiramisu.basetype.ModeBaseType.get_mode tiramisu.basetype.ModeBaseType-class.html#get_mode tiramisu.option.Option._frozen tiramisu.option.Option-class.html#_frozen @@ -150,8 +152,10 @@ tiramisu.option.Option.is_multi tiramisu.option.Option-class.html#is_multi tiramisu.option.Option.getdefault tiramisu.option.Option-class.html#getdefault tiramisu.option.Option.unfreeze tiramisu.option.Option-class.html#unfreeze tiramisu.basetype.ModeBaseType.mode tiramisu.basetype.ModeBaseType-class.html#mode +tiramisu.option.Option.getcallback_params tiramisu.option.Option-class.html#getcallback_params tiramisu.option.ChoiceOption tiramisu.option.ChoiceOption-class.html tiramisu.basetype.HiddenBaseType.show tiramisu.basetype.HiddenBaseType-class.html#show +tiramisu.option.ChoiceOption._validate tiramisu.option.ChoiceOption-class.html#_validate tiramisu.option.ChoiceOption.opt_type tiramisu.option.ChoiceOption-class.html#opt_type tiramisu.option.Option.getkey tiramisu.option.Option-class.html#getkey tiramisu.basetype.DisabledBaseType.disabled tiramisu.basetype.DisabledBaseType-class.html#disabled @@ -167,7 +171,7 @@ tiramisu.option.ChoiceOption.setoption tiramisu.option.ChoiceOption-class.html#s tiramisu.basetype.DisabledBaseType.disable tiramisu.basetype.DisabledBaseType-class.html#disable tiramisu.option.Option.getcallback tiramisu.option.Option-class.html#getcallback tiramisu.basetype.HiddenBaseType.hide tiramisu.basetype.HiddenBaseType-class.html#hide -tiramisu.option.ChoiceOption.validate tiramisu.option.ChoiceOption-class.html#validate +tiramisu.option.Option.validate tiramisu.option.Option-class.html#validate tiramisu.option.Option.freeze tiramisu.option.Option-class.html#freeze tiramisu.basetype.ModeBaseType.get_mode tiramisu.basetype.ModeBaseType-class.html#get_mode tiramisu.option.Option._frozen tiramisu.option.Option-class.html#_frozen @@ -176,14 +180,16 @@ tiramisu.option.Option.is_multi tiramisu.option.Option-class.html#is_multi tiramisu.option.Option.getdefault tiramisu.option.Option-class.html#getdefault tiramisu.option.Option.unfreeze tiramisu.option.Option-class.html#unfreeze tiramisu.basetype.ModeBaseType.mode tiramisu.basetype.ModeBaseType-class.html#mode +tiramisu.option.Option.getcallback_params tiramisu.option.Option-class.html#getcallback_params tiramisu.option.FloatOption tiramisu.option.FloatOption-class.html tiramisu.basetype.HiddenBaseType.show tiramisu.basetype.HiddenBaseType-class.html#show +tiramisu.option.FloatOption._validate tiramisu.option.FloatOption-class.html#_validate tiramisu.option.FloatOption.opt_type tiramisu.option.FloatOption-class.html#opt_type tiramisu.option.Option.getkey tiramisu.option.Option-class.html#getkey tiramisu.basetype.DisabledBaseType.disabled tiramisu.basetype.DisabledBaseType-class.html#disabled tiramisu.option.Option.setowner tiramisu.option.Option-class.html#setowner tiramisu.basetype.DisabledBaseType._is_disabled tiramisu.basetype.DisabledBaseType-class.html#_is_disabled -tiramisu.option.FloatOption.__init__ tiramisu.option.FloatOption-class.html#__init__ +tiramisu.option.Option.__init__ tiramisu.option.Option-class.html#__init__ tiramisu.option.Option.is_mandatory tiramisu.option.Option-class.html#is_mandatory tiramisu.basetype.ModeBaseType.set_mode tiramisu.basetype.ModeBaseType-class.html#set_mode tiramisu.basetype.HiddenBaseType._is_hidden tiramisu.basetype.HiddenBaseType-class.html#_is_hidden @@ -193,7 +199,7 @@ tiramisu.option.FloatOption.setoption tiramisu.option.FloatOption-class.html#set tiramisu.basetype.DisabledBaseType.disable tiramisu.basetype.DisabledBaseType-class.html#disable tiramisu.option.Option.getcallback tiramisu.option.Option-class.html#getcallback tiramisu.basetype.HiddenBaseType.hide tiramisu.basetype.HiddenBaseType-class.html#hide -tiramisu.option.FloatOption.validate tiramisu.option.FloatOption-class.html#validate +tiramisu.option.Option.validate tiramisu.option.Option-class.html#validate tiramisu.option.Option.freeze tiramisu.option.Option-class.html#freeze tiramisu.basetype.ModeBaseType.get_mode tiramisu.basetype.ModeBaseType-class.html#get_mode tiramisu.option.Option._frozen tiramisu.option.Option-class.html#_frozen @@ -202,14 +208,16 @@ tiramisu.option.Option.is_multi tiramisu.option.Option-class.html#is_multi tiramisu.option.Option.getdefault tiramisu.option.Option-class.html#getdefault tiramisu.option.Option.unfreeze tiramisu.option.Option-class.html#unfreeze tiramisu.basetype.ModeBaseType.mode tiramisu.basetype.ModeBaseType-class.html#mode +tiramisu.option.Option.getcallback_params tiramisu.option.Option-class.html#getcallback_params tiramisu.option.IPOption tiramisu.option.IPOption-class.html tiramisu.basetype.HiddenBaseType.show tiramisu.basetype.HiddenBaseType-class.html#show +tiramisu.option.IPOption._validate tiramisu.option.IPOption-class.html#_validate tiramisu.option.IPOption.opt_type tiramisu.option.IPOption-class.html#opt_type tiramisu.option.Option.getkey tiramisu.option.Option-class.html#getkey tiramisu.basetype.DisabledBaseType.disabled tiramisu.basetype.DisabledBaseType-class.html#disabled tiramisu.option.Option.setowner tiramisu.option.Option-class.html#setowner tiramisu.basetype.DisabledBaseType._is_disabled tiramisu.basetype.DisabledBaseType-class.html#_is_disabled -tiramisu.option.IPOption.__init__ tiramisu.option.IPOption-class.html#__init__ +tiramisu.option.Option.__init__ tiramisu.option.Option-class.html#__init__ tiramisu.option.Option.is_mandatory tiramisu.option.Option-class.html#is_mandatory tiramisu.basetype.ModeBaseType.set_mode tiramisu.basetype.ModeBaseType-class.html#set_mode tiramisu.basetype.HiddenBaseType._is_hidden tiramisu.basetype.HiddenBaseType-class.html#_is_hidden @@ -219,7 +227,7 @@ tiramisu.option.IPOption.setoption tiramisu.option.IPOption-class.html#setoption tiramisu.basetype.DisabledBaseType.disable tiramisu.basetype.DisabledBaseType-class.html#disable tiramisu.option.Option.getcallback tiramisu.option.Option-class.html#getcallback tiramisu.basetype.HiddenBaseType.hide tiramisu.basetype.HiddenBaseType-class.html#hide -tiramisu.option.IPOption.validate tiramisu.option.IPOption-class.html#validate +tiramisu.option.Option.validate tiramisu.option.Option-class.html#validate tiramisu.option.Option.freeze tiramisu.option.Option-class.html#freeze tiramisu.basetype.ModeBaseType.get_mode tiramisu.basetype.ModeBaseType-class.html#get_mode tiramisu.option.Option._frozen tiramisu.option.Option-class.html#_frozen @@ -228,14 +236,16 @@ tiramisu.option.Option.is_multi tiramisu.option.Option-class.html#is_multi tiramisu.option.Option.getdefault tiramisu.option.Option-class.html#getdefault tiramisu.option.Option.unfreeze tiramisu.option.Option-class.html#unfreeze tiramisu.basetype.ModeBaseType.mode tiramisu.basetype.ModeBaseType-class.html#mode +tiramisu.option.Option.getcallback_params tiramisu.option.Option-class.html#getcallback_params tiramisu.option.IntOption tiramisu.option.IntOption-class.html tiramisu.basetype.HiddenBaseType.show tiramisu.basetype.HiddenBaseType-class.html#show +tiramisu.option.IntOption._validate tiramisu.option.IntOption-class.html#_validate tiramisu.option.IntOption.opt_type tiramisu.option.IntOption-class.html#opt_type tiramisu.option.Option.getkey tiramisu.option.Option-class.html#getkey tiramisu.basetype.DisabledBaseType.disabled tiramisu.basetype.DisabledBaseType-class.html#disabled tiramisu.option.Option.setowner tiramisu.option.Option-class.html#setowner tiramisu.basetype.DisabledBaseType._is_disabled tiramisu.basetype.DisabledBaseType-class.html#_is_disabled -tiramisu.option.IntOption.__init__ tiramisu.option.IntOption-class.html#__init__ +tiramisu.option.Option.__init__ tiramisu.option.Option-class.html#__init__ tiramisu.option.Option.is_mandatory tiramisu.option.Option-class.html#is_mandatory tiramisu.basetype.ModeBaseType.set_mode tiramisu.basetype.ModeBaseType-class.html#set_mode tiramisu.basetype.HiddenBaseType._is_hidden tiramisu.basetype.HiddenBaseType-class.html#_is_hidden @@ -245,7 +255,7 @@ tiramisu.option.IntOption.setoption tiramisu.option.IntOption-class.html#setopti tiramisu.basetype.DisabledBaseType.disable tiramisu.basetype.DisabledBaseType-class.html#disable tiramisu.option.Option.getcallback tiramisu.option.Option-class.html#getcallback tiramisu.basetype.HiddenBaseType.hide tiramisu.basetype.HiddenBaseType-class.html#hide -tiramisu.option.IntOption.validate tiramisu.option.IntOption-class.html#validate +tiramisu.option.Option.validate tiramisu.option.Option-class.html#validate tiramisu.option.Option.freeze tiramisu.option.Option-class.html#freeze tiramisu.basetype.ModeBaseType.get_mode tiramisu.basetype.ModeBaseType-class.html#get_mode tiramisu.option.Option._frozen tiramisu.option.Option-class.html#_frozen @@ -254,14 +264,16 @@ tiramisu.option.Option.is_multi tiramisu.option.Option-class.html#is_multi tiramisu.option.Option.getdefault tiramisu.option.Option-class.html#getdefault tiramisu.option.Option.unfreeze tiramisu.option.Option-class.html#unfreeze tiramisu.basetype.ModeBaseType.mode tiramisu.basetype.ModeBaseType-class.html#mode +tiramisu.option.Option.getcallback_params tiramisu.option.Option-class.html#getcallback_params tiramisu.option.NetmaskOption tiramisu.option.NetmaskOption-class.html tiramisu.basetype.HiddenBaseType.show tiramisu.basetype.HiddenBaseType-class.html#show +tiramisu.option.NetmaskOption._validate tiramisu.option.NetmaskOption-class.html#_validate tiramisu.option.NetmaskOption.opt_type tiramisu.option.NetmaskOption-class.html#opt_type tiramisu.option.Option.getkey tiramisu.option.Option-class.html#getkey tiramisu.basetype.DisabledBaseType.disabled tiramisu.basetype.DisabledBaseType-class.html#disabled tiramisu.option.Option.setowner tiramisu.option.Option-class.html#setowner tiramisu.basetype.DisabledBaseType._is_disabled tiramisu.basetype.DisabledBaseType-class.html#_is_disabled -tiramisu.option.NetmaskOption.__init__ tiramisu.option.NetmaskOption-class.html#__init__ +tiramisu.option.Option.__init__ tiramisu.option.Option-class.html#__init__ tiramisu.option.Option.is_mandatory tiramisu.option.Option-class.html#is_mandatory tiramisu.basetype.ModeBaseType.set_mode tiramisu.basetype.ModeBaseType-class.html#set_mode tiramisu.basetype.HiddenBaseType._is_hidden tiramisu.basetype.HiddenBaseType-class.html#_is_hidden @@ -271,7 +283,7 @@ tiramisu.option.NetmaskOption.setoption tiramisu.option.NetmaskOption-class.html tiramisu.basetype.DisabledBaseType.disable tiramisu.basetype.DisabledBaseType-class.html#disable tiramisu.option.Option.getcallback tiramisu.option.Option-class.html#getcallback tiramisu.basetype.HiddenBaseType.hide tiramisu.basetype.HiddenBaseType-class.html#hide -tiramisu.option.NetmaskOption.validate tiramisu.option.NetmaskOption-class.html#validate +tiramisu.option.Option.validate tiramisu.option.Option-class.html#validate tiramisu.option.Option.freeze tiramisu.option.Option-class.html#freeze tiramisu.basetype.ModeBaseType.get_mode tiramisu.basetype.ModeBaseType-class.html#get_mode tiramisu.option.Option._frozen tiramisu.option.Option-class.html#_frozen @@ -280,6 +292,7 @@ tiramisu.option.Option.is_multi tiramisu.option.Option-class.html#is_multi tiramisu.option.Option.getdefault tiramisu.option.Option-class.html#getdefault tiramisu.option.Option.unfreeze tiramisu.option.Option-class.html#unfreeze tiramisu.basetype.ModeBaseType.mode tiramisu.basetype.ModeBaseType-class.html#mode +tiramisu.option.Option.getcallback_params tiramisu.option.Option-class.html#getcallback_params tiramisu.option.Option tiramisu.option.Option-class.html tiramisu.basetype.HiddenBaseType.show tiramisu.basetype.HiddenBaseType-class.html#show tiramisu.option.Option.getkey tiramisu.option.Option-class.html#getkey @@ -305,6 +318,7 @@ tiramisu.option.Option.is_multi tiramisu.option.Option-class.html#is_multi tiramisu.option.Option.getdefault tiramisu.option.Option-class.html#getdefault tiramisu.option.Option.unfreeze tiramisu.option.Option-class.html#unfreeze tiramisu.basetype.ModeBaseType.mode tiramisu.basetype.ModeBaseType-class.html#mode +tiramisu.option.Option.getcallback_params tiramisu.option.Option-class.html#getcallback_params tiramisu.option.OptionDescription tiramisu.option.OptionDescription-class.html tiramisu.option.OptionDescription.show tiramisu.option.OptionDescription-class.html#show tiramisu.option.OptionDescription.add_child tiramisu.option.OptionDescription-class.html#add_child @@ -329,12 +343,13 @@ tiramisu.option.OptionDescription.getdoc tiramisu.option.OptionDescription-class tiramisu.basetype.ModeBaseType.mode tiramisu.basetype.ModeBaseType-class.html#mode tiramisu.option.StrOption tiramisu.option.StrOption-class.html tiramisu.basetype.HiddenBaseType.show tiramisu.basetype.HiddenBaseType-class.html#show +tiramisu.option.StrOption._validate tiramisu.option.StrOption-class.html#_validate tiramisu.option.StrOption.opt_type tiramisu.option.StrOption-class.html#opt_type tiramisu.option.Option.getkey tiramisu.option.Option-class.html#getkey tiramisu.basetype.DisabledBaseType.disabled tiramisu.basetype.DisabledBaseType-class.html#disabled tiramisu.option.Option.setowner tiramisu.option.Option-class.html#setowner tiramisu.basetype.DisabledBaseType._is_disabled tiramisu.basetype.DisabledBaseType-class.html#_is_disabled -tiramisu.option.StrOption.__init__ tiramisu.option.StrOption-class.html#__init__ +tiramisu.option.Option.__init__ tiramisu.option.Option-class.html#__init__ tiramisu.option.Option.is_mandatory tiramisu.option.Option-class.html#is_mandatory tiramisu.basetype.ModeBaseType.set_mode tiramisu.basetype.ModeBaseType-class.html#set_mode tiramisu.basetype.HiddenBaseType._is_hidden tiramisu.basetype.HiddenBaseType-class.html#_is_hidden @@ -344,7 +359,7 @@ tiramisu.option.StrOption.setoption tiramisu.option.StrOption-class.html#setopti tiramisu.basetype.DisabledBaseType.disable tiramisu.basetype.DisabledBaseType-class.html#disable tiramisu.option.Option.getcallback tiramisu.option.Option-class.html#getcallback tiramisu.basetype.HiddenBaseType.hide tiramisu.basetype.HiddenBaseType-class.html#hide -tiramisu.option.StrOption.validate tiramisu.option.StrOption-class.html#validate +tiramisu.option.Option.validate tiramisu.option.Option-class.html#validate tiramisu.option.Option.freeze tiramisu.option.Option-class.html#freeze tiramisu.basetype.ModeBaseType.get_mode tiramisu.basetype.ModeBaseType-class.html#get_mode tiramisu.option.Option._frozen tiramisu.option.Option-class.html#_frozen @@ -353,6 +368,7 @@ tiramisu.option.Option.is_multi tiramisu.option.Option-class.html#is_multi tiramisu.option.Option.getdefault tiramisu.option.Option-class.html#getdefault tiramisu.option.Option.unfreeze tiramisu.option.Option-class.html#unfreeze tiramisu.basetype.ModeBaseType.mode tiramisu.basetype.ModeBaseType-class.html#mode +tiramisu.option.Option.getcallback_params tiramisu.option.Option-class.html#getcallback_params tiramisu.option.SymLinkOption tiramisu.option.SymLinkOption-class.html tiramisu.option.SymLinkOption.setoption tiramisu.option.SymLinkOption-class.html#setoption tiramisu.option.SymLinkOption.opt_type tiramisu.option.SymLinkOption-class.html#opt_type