)]}'
{"tempest/config.py":[{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"73168c690e69ad2df73bb68821f68f8b722e79fa","unresolved":false,"context_lines":[{"line_number":1090,"context_line":"        try:"},{"line_number":1091,"context_line":"            return getattr(_CONF, attr)"},{"line_number":1092,"context_line":"        except cfg.NoSuchOptError:"},{"line_number":1093,"context_line":"            # transparently handle group options like foo-bar-baz"},{"line_number":1094,"context_line":"            # which are accessed as foo_bar_baz"},{"line_number":1095,"context_line":"            attr \u003d attr.replace(\u0027_\u0027, \u0027-\u0027)"},{"line_number":1096,"context_line":"            return getattr(_CONF, attr)"},{"line_number":1097,"context_line":""},{"line_number":1098,"context_line":"    def _set_attrs(self):"},{"line_number":1099,"context_line":"        logging.tempest_set_log_file(\u0027tempest.log\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_d7562c29","line":1096,"range":{"start_line":1093,"start_character":0,"end_line":1096,"end_character":39},"updated":"2017-03-09 11:55:44.000000000","message":"I fear getattr my lead to unexpected behaviors, I\u0027d rather use _set_attrs and set the attributes we *know* we may expect.","commit_id":"e97f770841bd0efca74b6b92b07053aeaf96d982"},{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"62bfd80076cdf9ca17b9aad376ba23b20d057c63","unresolved":false,"context_lines":[{"line_number":1090,"context_line":"        try:"},{"line_number":1091,"context_line":"            return getattr(_CONF, attr)"},{"line_number":1092,"context_line":"        except cfg.NoSuchOptError:"},{"line_number":1093,"context_line":"            # transparently handle group options like foo-bar-baz"},{"line_number":1094,"context_line":"            # which are accessed as foo_bar_baz"},{"line_number":1095,"context_line":"            attr \u003d attr.replace(\u0027_\u0027, \u0027-\u0027)"},{"line_number":1096,"context_line":"            return getattr(_CONF, attr)"},{"line_number":1097,"context_line":""},{"line_number":1098,"context_line":"    def _set_attrs(self):"},{"line_number":1099,"context_line":"        logging.tempest_set_log_file(\u0027tempest.log\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_da32d1f1","line":1096,"range":{"start_line":1093,"start_character":0,"end_line":1096,"end_character":39},"in_reply_to":"9a30ddce_d7562c29","updated":"2017-03-09 12:00:46.000000000","message":"The existing code is inside _set_attrs and indeed it has n hardcoded list of elements. Can I do something generic there as well? The point is that plugins could defined unexpected sections, how can I detect this?\n\n(which kind of unexpected behaviors, btw?)","commit_id":"e97f770841bd0efca74b6b92b07053aeaf96d982"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"a70a3e78c7952c765fd6619c0c8536d2d8833982","unresolved":false,"context_lines":[{"line_number":1119,"context_line":"                group_name \u003d group.name"},{"line_number":1120,"context_line":"                group_dest \u003d group.dest"},{"line_number":1121,"context_line":"            else:"},{"line_number":1122,"context_line":"                # If we have a group name as a string"},{"line_number":1123,"context_line":"                group_name \u003d group"},{"line_number":1124,"context_line":"                group_dest \u003d group.replace(\u0027-\u0027, \u0027_\u0027)"},{"line_number":1125,"context_line":"            # NOTE(andreaf) We can set the attribute safely here since in"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_67884ec6","line":1122,"range":{"start_line":1122,"start_character":16,"end_line":1122,"end_character":53},"updated":"2017-03-10 02:35:47.000000000","message":"Can we put some samples to know what is expectation here ?\n\nThe expectation is like\n\n monasca-api -\u003e monasca_api\n\n, right?","commit_id":"6848c12c86bcb24a8bd0774a560a35c2d232e962"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"99f0ba351790d6454d2cb4035509761f268eab90","unresolved":false,"context_lines":[{"line_number":1121,"context_line":"            else:"},{"line_number":1122,"context_line":"                # If we have a group name as a string"},{"line_number":1123,"context_line":"                group_name \u003d group"},{"line_number":1124,"context_line":"                group_dest \u003d group.replace(\u0027-\u0027, \u0027_\u0027)"},{"line_number":1125,"context_line":"            # NOTE(andreaf) We can set the attribute safely here since in"},{"line_number":1126,"context_line":"            # case of name conflict we would not have reached this point."},{"line_number":1127,"context_line":"            setattr(self, group_dest, _CONF[group_name])"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_e765d91d","line":1124,"range":{"start_line":1124,"start_character":0,"end_line":1124,"end_character":52},"updated":"2017-03-13 10:21:16.000000000","message":"this is the main reason why we have to add this magic which honestly i do not like much.\n\ngroup with \u0027-\u0027 cannot be accessed from oslo CONF directly as python variable. All other plugins access their registered config group and options directly on CONF object which are available from oslo.\n\nThese kind of cases(\u0027-\u0027) case, should not Oslo have some restriction/limitation on group names etc at least same as what python have?\n\nBut anyways, i would not block this fix and ll check with oslo later.","commit_id":"6848c12c86bcb24a8bd0774a560a35c2d232e962"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"206da802ff37147d7dfdce1abad420fa60ec52d5","unresolved":false,"context_lines":[{"line_number":1121,"context_line":"            else:"},{"line_number":1122,"context_line":"                # If we have a group name as a string"},{"line_number":1123,"context_line":"                group_name \u003d group"},{"line_number":1124,"context_line":"                group_dest \u003d group.replace(\u0027-\u0027, \u0027_\u0027)"},{"line_number":1125,"context_line":"            # NOTE(andreaf) We can set the attribute safely here since in"},{"line_number":1126,"context_line":"            # case of name conflict we would not have reached this point."},{"line_number":1127,"context_line":"            setattr(self, group_dest, _CONF[group_name])"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a25e98e_fc6c660a","line":1124,"range":{"start_line":1124,"start_character":0,"end_line":1124,"end_character":52},"in_reply_to":"9a30ddce_5a575857","updated":"2017-03-14 00:01:03.000000000","message":"yea, actually my point was if oslo does for storing as dest they should for group.name also and let user fetch with .*_*. Now we have to put this translation on oslo as well as on project side too.","commit_id":"6848c12c86bcb24a8bd0774a560a35c2d232e962"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"2e1d0f464bceaef722e32f43c305d5a6e8c2fb30","unresolved":false,"context_lines":[{"line_number":1121,"context_line":"            else:"},{"line_number":1122,"context_line":"                # If we have a group name as a string"},{"line_number":1123,"context_line":"                group_name \u003d group"},{"line_number":1124,"context_line":"                group_dest \u003d group.replace(\u0027-\u0027, \u0027_\u0027)"},{"line_number":1125,"context_line":"            # NOTE(andreaf) We can set the attribute safely here since in"},{"line_number":1126,"context_line":"            # case of name conflict we would not have reached this point."},{"line_number":1127,"context_line":"            setattr(self, group_dest, _CONF[group_name])"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_5a575857","line":1124,"range":{"start_line":1124,"start_character":0,"end_line":1124,"end_character":52},"in_reply_to":"9a30ddce_e765d91d","updated":"2017-03-13 10:44:59.000000000","message":"I think this is consistent with what oslo does:\nhttp://git.openstack.org/cgit/openstack/oslo.config/tree/oslo_config/cfg.py#n876\n\nA plugin can pass the group, in which case group.dest will be honoured.\nIf the plugin passes the group name instead, we behave the same as oslo.config.\n\nGranted, documentation needs to be improved.","commit_id":"6848c12c86bcb24a8bd0774a560a35c2d232e962"}]}
