Refer to https://bugs.launchpad.net/keystone/+bug/1259735
1. In keystone's codes, init a ListOpt object with a string default object, not list. And since no options appears in config file or cli, the variable 'user_attribute_ignore' will map to a string 'default_project_id,tenants', not a list. I think it's incorrect. cfg should raise a exception if default value not match the Opt types.
keystone/common/config.py: cfg.ListOpt('user_attribute_ignore',
keystone/common/config.py- default='default_project_id,tenants'),
2. Related Codes:
def _get_cli_value(self, names, positional):
for group_name, name in names:
name = name if group_name is None else group_name + '_' + name
try:
value = getattr(self, name)
if value is not None:
# argparse ignores default=None for nargs='*'
if positional and not value:
value = self.default
return value
except AttributeError:
pass
raise KeyError
Hello, I'm not sure if we should add logic to raise a ConfigFileValue Error(Or, DefaultValueError) when got a type-error default value.
What's your opinion?
Could anyone kindly share your ideas?