master/slaves => leader/followers
This commit is contained in:
@ -75,7 +75,7 @@ everything_frozen
|
||||
property)
|
||||
|
||||
empty
|
||||
raise mandatory PropertiesOptionError if multi or master have empty value
|
||||
raise mandatory PropertiesOptionError if multi or leader have empty value
|
||||
|
||||
validator
|
||||
launch validator set by user in option (this property has no effect
|
||||
@ -258,7 +258,7 @@ class GroupModule(_NameSpace):
|
||||
"emulates a module to manage unique group (OptionDescription) names"
|
||||
class GroupType(str):
|
||||
"""allowed normal group (OptionDescription) names
|
||||
*normal* means : groups that are not master
|
||||
*normal* means : groups that are not leader
|
||||
"""
|
||||
pass
|
||||
|
||||
@ -266,9 +266,9 @@ class GroupModule(_NameSpace):
|
||||
"""groups that are default (typically 'default')"""
|
||||
pass
|
||||
|
||||
class MasterGroupType(GroupType):
|
||||
class LeadershipGroupType(GroupType):
|
||||
"""allowed normal group (OptionDescription) names
|
||||
*master* means : groups that have the 'master' attribute set
|
||||
*leadership* means : groups that have the 'leadership' attribute set
|
||||
"""
|
||||
pass
|
||||
|
||||
@ -301,12 +301,12 @@ groups = GroupModule()
|
||||
default group set when creating a new optiondescription"""
|
||||
groups.default = groups.DefaultGroupType('default')
|
||||
|
||||
"""groups.master
|
||||
master group is a special optiondescription, all suboptions should be
|
||||
multi option and all values should have same length, to find master's
|
||||
option, the optiondescription's name should be same than de master's
|
||||
"""groups.leadership
|
||||
leadership group is a special optiondescription, all suboptions should be
|
||||
multi option and all values should have same length, to find leader's
|
||||
option, the optiondescription's name should be same than de leader's
|
||||
option"""
|
||||
groups.master = groups.MasterGroupType('master')
|
||||
groups.leadership = groups.LeadershipGroupType('leadership')
|
||||
|
||||
""" groups.family
|
||||
example of group, no special behavior with this group's type"""
|
||||
@ -520,7 +520,7 @@ class Settings(object):
|
||||
"'{1}'").format(option_bag.path, reqpath))
|
||||
idx = None
|
||||
is_indexed = False
|
||||
if option.impl_is_master_slaves('slave'):
|
||||
if option.impl_is_follower():
|
||||
idx = option_bag.index
|
||||
elif option.impl_is_multi() and option_bag.index is not None:
|
||||
is_indexed = True
|
||||
@ -638,13 +638,13 @@ class Settings(object):
|
||||
"").format(opt.impl_get_display_name()))
|
||||
if 'force_default_on_freeze' in properties and \
|
||||
'frozen' not in properties and \
|
||||
opt.impl_is_master_slaves('master'):
|
||||
raise ConfigError(_('a master ({0}) cannot have '
|
||||
opt.impl_is_leader():
|
||||
raise ConfigError(_('a leader ({0}) cannot have '
|
||||
'"force_default_on_freeze" property without "frozen"'
|
||||
'').format(opt.impl_get_display_name()))
|
||||
self._p_.setproperties(path,
|
||||
properties)
|
||||
#values too because of slave values could have a PropertiesOptionError has value
|
||||
# values too because of follower values could have a PropertiesOptionError has value
|
||||
context.cfgimpl_reset_cache(option_bag)
|
||||
if option_bag is not None:
|
||||
del option_bag.properties
|
||||
|
Reference in New Issue
Block a user