)]}'
{"oslo_config/cfg.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":849,"context_line":"                             in. Accepts any string, though valid version"},{"line_number":850,"context_line":"                             strings are encouraged. Silently ignored if"},{"line_number":851,"context_line":"                             deprecated_for_removal is False"},{"line_number":852,"context_line":"    :param upgrade_value: a string for mapping old config to new config. Ex:"},{"line_number":853,"context_line":"                          {\u0027old1_value\u0027: \u0027new1_value\u0027,"},{"line_number":854,"context_line":"                          \u0027old2_value\u0027: \u0027new2_value\u0027}"},{"line_number":855,"context_line":"    :param mutable: True if this option may be reloaded"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_32c7e498","line":852,"range":{"start_line":852,"start_character":28,"end_line":852,"end_character":34},"updated":"2018-04-13 21:59:43.000000000","message":"Okay, changing my mind again. :-)\n\nSince we\u0027re doing this in code now we can just pass a dict in directly, rather than any sort of string that needs to be parsed.  I would prefer to do that.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":849,"context_line":"                             in. Accepts any string, though valid version"},{"line_number":850,"context_line":"                             strings are encouraged. Silently ignored if"},{"line_number":851,"context_line":"                             deprecated_for_removal is False"},{"line_number":852,"context_line":"    :param upgrade_value: a string for mapping old config to new config. Ex:"},{"line_number":853,"context_line":"                          {\u0027old1_value\u0027: \u0027new1_value\u0027,"},{"line_number":854,"context_line":"                          \u0027old2_value\u0027: \u0027new2_value\u0027}"},{"line_number":855,"context_line":"    :param mutable: True if this option may be reloaded"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_fc9fbcb1","line":852,"range":{"start_line":852,"start_character":28,"end_line":852,"end_character":34},"in_reply_to":"bf659307_32c7e498","updated":"2018-04-17 08:43:44.000000000","message":"it should be changed to \"dictionary\"","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d669d38f6d39609b5c5b631ceef50c6e9f522b6a","unresolved":false,"context_lines":[{"line_number":917,"context_line":"                             deprecated_for_removal is False"},{"line_number":918,"context_line":"    :param upgrade_value: a dictionary for mapping old config to new config.Ex:"},{"line_number":919,"context_line":"                          {\u0027old1_value\u0027: \u0027new1_value\u0027,"},{"line_number":920,"context_line":"                          \u0027old2_value\u0027: \u0027new2_value\u0027}."},{"line_number":921,"context_line":"    :param mutable: True if this option may be reloaded"},{"line_number":922,"context_line":"    :param advanced: a bool True/False value if this option has advanced usage"},{"line_number":923,"context_line":"                             and is not normally used by the majority of users"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f79a3b5_bfec7028","line":920,"updated":"2018-09-28 20:57:36.000000000","message":"Is this literally a mapping of old option values to new values? So if I have option1 set to 3 in the old file it might be converted to 17 in the new?\n\nI wonder if we want this to just be a function that does the conversion instead of assuming that we will be able to express all of the changes using a dictionary.","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"},{"author":{"_account_id":28278,"name":"Duc Nguyen","email":"ducnv41@viettel.com.vn","username":"ducnv"},"change_message_id":"950ef55c073629267a76cd26156fe43cdf48e082","unresolved":false,"context_lines":[{"line_number":917,"context_line":"                             deprecated_for_removal is False"},{"line_number":918,"context_line":"    :param upgrade_value: a dictionary for mapping old config to new config.Ex:"},{"line_number":919,"context_line":"                          {\u0027old1_value\u0027: \u0027new1_value\u0027,"},{"line_number":920,"context_line":"                          \u0027old2_value\u0027: \u0027new2_value\u0027}."},{"line_number":921,"context_line":"    :param mutable: True if this option may be reloaded"},{"line_number":922,"context_line":"    :param advanced: a bool True/False value if this option has advanced usage"},{"line_number":923,"context_line":"                             and is not normally used by the majority of users"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f79a3b5_e611d1f9","line":920,"in_reply_to":"3f79a3b5_3ff7005d","updated":"2018-10-02 09:13:23.000000000","message":"thanks Doug for the patch, I left a number comment in this patch, please let me know what you think.","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"919abf5d5a6cd5e319de51ab9adcbf17fa933bcf","unresolved":false,"context_lines":[{"line_number":917,"context_line":"                             deprecated_for_removal is False"},{"line_number":918,"context_line":"    :param upgrade_value: a dictionary for mapping old config to new config.Ex:"},{"line_number":919,"context_line":"                          {\u0027old1_value\u0027: \u0027new1_value\u0027,"},{"line_number":920,"context_line":"                          \u0027old2_value\u0027: \u0027new2_value\u0027}."},{"line_number":921,"context_line":"    :param mutable: True if this option may be reloaded"},{"line_number":922,"context_line":"    :param advanced: a bool True/False value if this option has advanced usage"},{"line_number":923,"context_line":"                             and is not normally used by the majority of users"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f79a3b5_3ff7005d","line":920,"in_reply_to":"3f79a3b5_bfec7028","updated":"2018-09-28 21:15:51.000000000","message":"See https://review.openstack.org/606207 for what that would look like.","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"},{"author":{"_account_id":28278,"name":"Duc Nguyen","email":"ducnv41@viettel.com.vn","username":"ducnv"},"change_message_id":"950ef55c073629267a76cd26156fe43cdf48e082","unresolved":false,"context_lines":[{"line_number":917,"context_line":"                             deprecated_for_removal is False"},{"line_number":918,"context_line":"    :param upgrade_value: a dictionary for mapping old config to new config.Ex:"},{"line_number":919,"context_line":"                          {\u0027old1_value\u0027: \u0027new1_value\u0027,"},{"line_number":920,"context_line":"                          \u0027old2_value\u0027: \u0027new2_value\u0027}."},{"line_number":921,"context_line":"    :param mutable: True if this option may be reloaded"},{"line_number":922,"context_line":"    :param advanced: a bool True/False value if this option has advanced usage"},{"line_number":923,"context_line":"                             and is not normally used by the majority of users"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f79a3b5_86e6dd49","line":920,"in_reply_to":"3f79a3b5_bfec7028","updated":"2018-10-02 09:13:23.000000000","message":"yes, that\u0027s right","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"}],"oslo_config/configchanges.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 Fujitsu Corporation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_f2bc0c07","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"updated":"2018-04-13 21:59:43.000000000","message":"Seems unlikely. :-)","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 Fujitsu Corporation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_286893f3","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"in_reply_to":"bf659307_f2bc0c07","updated":"2018-04-17 08:43:44.000000000","message":"Done","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import sys"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from oslo_config import cfg"},{"line_number":26,"context_line":"from oslo_config import generator as gn"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"import pkg_resources"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_72b31c0b","line":26,"updated":"2018-04-13 21:59:43.000000000","message":"Is there a reason to rename this?  I\u0027m not finding any name conflicts in this file.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import sys"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from oslo_config import cfg"},{"line_number":26,"context_line":"from oslo_config import generator as gn"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"import pkg_resources"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_88243fc8","line":26,"in_reply_to":"bf659307_72b31c0b","updated":"2018-04-17 08:43:44.000000000","message":"No, there isn\u0027t. I don\u0027t remember why I did it :). Anyway, i will update it.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":28,"context_line":"import pkg_resources"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":"CONFIG \u003d None"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"_handling_config_changes \u003d ["},{"line_number":34,"context_line":"    cfg.StrOpt("}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_72af9c7c","line":31,"updated":"2018-04-13 21:59:43.000000000","message":"Unused?","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":28,"context_line":"import pkg_resources"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":"CONFIG \u003d None"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"_handling_config_changes \u003d ["},{"line_number":34,"context_line":"    cfg.StrOpt("}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_67ed5eee","line":31,"in_reply_to":"bf659307_72af9c7c","updated":"2018-04-17 08:43:44.000000000","message":"Sure, i will be removed","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    ),"},{"line_number":38,"context_line":"    cfg.StrOpt("},{"line_number":39,"context_line":"        \u0027file-config\u0027,"},{"line_number":40,"context_line":"        help\u003d\u0027The part of configuration file.\u0027"},{"line_number":41,"context_line":"             \u0027For example: etc/cinder/cinder.conf\u0027,"},{"line_number":42,"context_line":"        required\u003dTrue"},{"line_number":43,"context_line":"    ),"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_52c85853","line":40,"range":{"start_line":40,"start_character":18,"end_line":40,"end_character":22},"updated":"2018-04-13 21:59:43.000000000","message":"*path","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    ),"},{"line_number":38,"context_line":"    cfg.StrOpt("},{"line_number":39,"context_line":"        \u0027file-config\u0027,"},{"line_number":40,"context_line":"        help\u003d\u0027The part of configuration file.\u0027"},{"line_number":41,"context_line":"             \u0027For example: etc/cinder/cinder.conf\u0027,"},{"line_number":42,"context_line":"        required\u003dTrue"},{"line_number":43,"context_line":"    ),"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_27a686c3","line":40,"range":{"start_line":40,"start_character":18,"end_line":40,"end_character":22},"in_reply_to":"bf659307_52c85853","updated":"2018-04-17 08:43:44.000000000","message":"Done","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        if k \u003d\u003d \u0027DEFAULT\u0027:"},{"line_number":86,"context_line":"            try:"},{"line_number":87,"context_line":"                new_conf.register_opts(list_opts)"},{"line_number":88,"context_line":"            except cfg.DuplicateOptError:"},{"line_number":89,"context_line":"                pass"},{"line_number":90,"context_line":"            continue"},{"line_number":91,"context_line":"        LOG.info(\"Register group %s into new_conf.\", group.name)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_d20a2888","line":88,"updated":"2018-04-13 21:59:43.000000000","message":"Are these happening?  It doesn\u0027t seem like they should be.  If there are duplicate opts I would think the service is broken.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"ee5e880a8e7e0f8280b4c254e8e42a9cdb4ffe53","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        if k \u003d\u003d \u0027DEFAULT\u0027:"},{"line_number":86,"context_line":"            try:"},{"line_number":87,"context_line":"                new_conf.register_opts(list_opts)"},{"line_number":88,"context_line":"            except cfg.DuplicateOptError:"},{"line_number":89,"context_line":"                pass"},{"line_number":90,"context_line":"            continue"},{"line_number":91,"context_line":"        LOG.info(\"Register group %s into new_conf.\", group.name)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_cd40ff38","line":88,"in_reply_to":"5f7c97a3_0276d4a5","updated":"2018-05-07 02:38:54.000000000","message":"Yeah, i read it.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"7aa72154307701a41d97f87a946dad0946fa6d6b","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        if k \u003d\u003d \u0027DEFAULT\u0027:"},{"line_number":86,"context_line":"            try:"},{"line_number":87,"context_line":"                new_conf.register_opts(list_opts)"},{"line_number":88,"context_line":"            except cfg.DuplicateOptError:"},{"line_number":89,"context_line":"                pass"},{"line_number":90,"context_line":"            continue"},{"line_number":91,"context_line":"        LOG.info(\"Register group %s into new_conf.\", group.name)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_0276d4a5","line":88,"in_reply_to":"9f6a8fd7_08634f1c","updated":"2018-05-04 16:16:32.000000000","message":"Okay, I\u0027ve commented on the Cinder review.  I believe it was doing the right thing.  I\u0027m still a little surprised that would cause a duplicate error though.  Registering duplicate opts that are exactly the same should work fine.\n\nAnyway, sounds like it\u0027s not an issue anymore.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        if k \u003d\u003d \u0027DEFAULT\u0027:"},{"line_number":86,"context_line":"            try:"},{"line_number":87,"context_line":"                new_conf.register_opts(list_opts)"},{"line_number":88,"context_line":"            except cfg.DuplicateOptError:"},{"line_number":89,"context_line":"                pass"},{"line_number":90,"context_line":"            continue"},{"line_number":91,"context_line":"        LOG.info(\"Register group %s into new_conf.\", group.name)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_08634f1c","line":88,"in_reply_to":"bf659307_d20a2888","updated":"2018-04-17 08:43:44.000000000","message":"Yeah, at the begining of this feature, we used the exist config file to make \"conf\" variable. \n\nAnd there are some projects like Cinder which has \"namespace \u003d oslo.config\". \"conf\" is created from oslo.config so there are some list_opts of oslo.config in the \"conf\", because the config file has \"oslo.confi\" so the list_opts will be registered again. That why it will raise exception.\n\nIn the pase, we had a patch set to remove \"oslo.config\" option for Cinder, but i was not accepted [2].\n\nHowever, i think this exception can be removed because i will make a config file in each project for this feature.\n\n[1] https://github.com/openstack/cinder/blob/95861128486d042d6d072a00a2ea1433782e8d19/tools/config/cinder-config-generator.conf#L8 \n\n[2] https://review.openstack.org/#/c/487663/","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    \"\"\"Register the formatter\u0027s CLI options with a ConfigOpts instance."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    :param conf: a ConfigOpts instance"},{"line_number":102,"context_line":"    :return: DuplicateOptError"},{"line_number":103,"context_line":"    \"\"\""},{"line_number":104,"context_line":"    conf.register_cli_opts(_handling_config_changes)"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_926d9004","line":102,"updated":"2018-04-13 21:59:43.000000000","message":"This is not the return value, it\u0027s a possible exception.  It should be:\n\n:raises DuplicateOptError:","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    \"\"\"Register the formatter\u0027s CLI options with a ConfigOpts instance."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    :param conf: a ConfigOpts instance"},{"line_number":102,"context_line":"    :return: DuplicateOptError"},{"line_number":103,"context_line":"    \"\"\""},{"line_number":104,"context_line":"    conf.register_cli_opts(_handling_config_changes)"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_67d79eef","line":102,"in_reply_to":"bf659307_926d9004","updated":"2018-04-17 08:43:44.000000000","message":"You are right, this function is copied from the generator.py file, i will update this docstring.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        except KeyError:"},{"line_number":146,"context_line":"            raise ErrorTemplate"},{"line_number":147,"context_line":"        return output"},{"line_number":148,"context_line":"    elif isinstance(old_value, str):"},{"line_number":149,"context_line":"        try:"},{"line_number":150,"context_line":"            output \u003d upgrade_value[old_value]"},{"line_number":151,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_d57d32e7","line":148,"range":{"start_line":148,"start_character":31,"end_line":148,"end_character":34},"updated":"2018-04-13 21:59:43.000000000","message":"Hmm, do we not support unicode config values?  I guess StrOpt does explicitly cast to str, so maybe not.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        except KeyError:"},{"line_number":146,"context_line":"            raise ErrorTemplate"},{"line_number":147,"context_line":"        return output"},{"line_number":148,"context_line":"    elif isinstance(old_value, str):"},{"line_number":149,"context_line":"        try:"},{"line_number":150,"context_line":"            output \u003d upgrade_value[old_value]"},{"line_number":151,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_9ccb20a4","line":148,"range":{"start_line":148,"start_character":31,"end_line":148,"end_character":34},"in_reply_to":"bf659307_d57d32e7","updated":"2018-04-17 08:43:44.000000000","message":"In my opinion, when we use StrOpt for a option then the typo of the option is \u0027str\u0027. That why i need to check with this type (i mean \"string\").","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        raise NoSupport"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"def delete_option_deprecate(options_in_file, option):"},{"line_number":159,"context_line":"    \"\"\"Removing options in options_in_file.\"\"\""},{"line_number":160,"context_line":"    try:"},{"line_number":161,"context_line":"        return options_in_file.remove(option)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_00c36a39","line":158,"range":{"start_line":158,"start_character":4,"end_line":158,"end_character":27},"updated":"2018-04-13 21:59:43.000000000","message":"This would read better as delete_deprecated_option","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        raise NoSupport"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"def delete_option_deprecate(options_in_file, option):"},{"line_number":159,"context_line":"    \"\"\"Removing options in options_in_file.\"\"\""},{"line_number":160,"context_line":"    try:"},{"line_number":161,"context_line":"        return options_in_file.remove(option)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_678f9ecc","line":158,"range":{"start_line":158,"start_character":4,"end_line":158,"end_character":27},"in_reply_to":"bf659307_00c36a39","updated":"2018-04-17 08:43:44.000000000","message":"Done","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        pass"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"class OutOfCase(cfg.Error):"},{"line_number":167,"context_line":"    \"\"\"Raised if it cannot map with cases.\"\"\""},{"line_number":168,"context_line":"    pass"},{"line_number":169,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_15708a3f","line":166,"updated":"2018-04-13 21:59:43.000000000","message":"Unused?","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        pass"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"class OutOfCase(cfg.Error):"},{"line_number":167,"context_line":"    \"\"\"Raised if it cannot map with cases.\"\"\""},{"line_number":168,"context_line":"    pass"},{"line_number":169,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_47ab7a1c","line":166,"in_reply_to":"bf659307_15708a3f","updated":"2018-04-17 08:43:44.000000000","message":"Yes, i forgot to remove this class","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":171,"context_line":"class ErrorTemplate(cfg.Error):"},{"line_number":172,"context_line":"    \"\"\"Raised if cannot mapping old value to new value.\"\"\""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def __str__(self):"},{"line_number":175,"context_line":"        msg \u003d \u0027Cannot mapping old value to new value. Maybe mapping_value\u0027 \\"},{"line_number":176,"context_line":"              \u0027or value in old configuration is wrong, please check it again\u0027"},{"line_number":177,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_75cea62d","line":174,"updated":"2018-04-13 21:59:43.000000000","message":"I would prefer not to implement this as a static message.  It would be more useful if we specified the message at the time we raise the exception so we can include details like the missing key name (as one example where this is raised).","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":171,"context_line":"class ErrorTemplate(cfg.Error):"},{"line_number":172,"context_line":"    \"\"\"Raised if cannot mapping old value to new value.\"\"\""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def __str__(self):"},{"line_number":175,"context_line":"        msg \u003d \u0027Cannot mapping old value to new value. Maybe mapping_value\u0027 \\"},{"line_number":176,"context_line":"              \u0027or value in old configuration is wrong, please check it again\u0027"},{"line_number":177,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_62ed4cee","line":174,"in_reply_to":"bf659307_75cea62d","updated":"2018-04-17 08:43:44.000000000","message":"Sure, let me update this for more detail.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":180,"context_line":"class NoSupport(cfg.Error):"},{"line_number":181,"context_line":"    \"\"\"Raised if this value is not still supported.\"\"\""},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def __str__(self):"},{"line_number":184,"context_line":"        msg \u003d \u0027This value is not still supported by oslo-handling-generator.\u0027"},{"line_number":185,"context_line":"        return msg"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_35dcaee2","line":183,"updated":"2018-04-13 21:59:43.000000000","message":"Likewise.  It would be better if we said which value is not supported when we raise this.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":180,"context_line":"class NoSupport(cfg.Error):"},{"line_number":181,"context_line":"    \"\"\"Raised if this value is not still supported.\"\"\""},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def __str__(self):"},{"line_number":184,"context_line":"        msg \u003d \u0027This value is not still supported by oslo-handling-generator.\u0027"},{"line_number":185,"context_line":"        return msg"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_02bc90da","line":183,"in_reply_to":"bf659307_35dcaee2","updated":"2018-04-17 08:43:44.000000000","message":"ditto","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        return msg"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"class _WritingFile(object):"},{"line_number":189,"context_line":"    \"\"\"This class is to write a new configuration file.\"\"\""},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def __init__(self, output_file):"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_a07e3e67","line":188,"updated":"2018-04-13 21:59:43.000000000","message":"I think it\u0027s worth noting in the documentation for this tool that any comments in the old file are going to be lost.  Notably this means that if the old config was using the generated example config they will lose all of the help text that was in comments.\n\nThe only way I can see to get around that would be to reuse the config generator\u0027s output method and provide new functionality that could actually set values, rather than just provide commented out examples.  I think that\u0027s complicated enough that I\u0027d rather do it as a followup though.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        return msg"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"class _WritingFile(object):"},{"line_number":189,"context_line":"    \"\"\"This class is to write a new configuration file.\"\"\""},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def __init__(self, output_file):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_9c56c006","line":188,"in_reply_to":"bf659307_a07e3e67","updated":"2018-04-17 08:43:44.000000000","message":"Yes, that is a problem i am thinking. It\u0027s hard to get user\u0027s comment to move them. But i will try to use the generator\u0027s output method to write a new config with each the help of options.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        deprecated_options \u003d data_structure[\u0027deprecated_options\u0027]"},{"line_number":226,"context_line":"        all_options \u003d data_structure[\u0027options\u0027]"},{"line_number":227,"context_line":"    except (IOError, TypeError):"},{"line_number":228,"context_line":"        LOG.info(\u0027There are no any deprecated_options and new_options.\u0027"},{"line_number":229,"context_line":"                 \u0027So no need to update configurations.\u0027)"},{"line_number":230,"context_line":"        raise SystemExit"},{"line_number":231,"context_line":"    for section, options in deprecated_options.items():"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_358a6ebe","line":228,"updated":"2018-04-13 21:59:43.000000000","message":"I don\u0027t feel like this should ever be run in a situation where there are no options, so maybe this exception handler should only wrap the deprecated_options lookup.  If the all_options call fails that seems like a legitimate problem that we shouldn\u0027t catch and ignore.\n\nThis message could also be simpler as: \"No deprecated options to migrate.\"  The variable names are implementation details that a user doesn\u0027t care about.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        deprecated_options \u003d data_structure[\u0027deprecated_options\u0027]"},{"line_number":226,"context_line":"        all_options \u003d data_structure[\u0027options\u0027]"},{"line_number":227,"context_line":"    except (IOError, TypeError):"},{"line_number":228,"context_line":"        LOG.info(\u0027There are no any deprecated_options and new_options.\u0027"},{"line_number":229,"context_line":"                 \u0027So no need to update configurations.\u0027)"},{"line_number":230,"context_line":"        raise SystemExit"},{"line_number":231,"context_line":"    for section, options in deprecated_options.items():"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_62746c36","line":228,"in_reply_to":"bf659307_358a6ebe","updated":"2018-04-17 08:43:44.000000000","message":"At the begining of this feature, i created the config mapping file manually so there will be cases without content in the file. That why i cat exception with all_options. \n\nAnd you are total right, we need to catch exception with deprecated_option from now on.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            try:"},{"line_number":235,"context_line":"                old_value \u003d _get_value(conf, section, old_key)"},{"line_number":236,"context_line":"            except cfg.NoSuchOptError:"},{"line_number":237,"context_line":"                LOG.info(\u0027There is no value of this {0}.Try getting the \u0027"},{"line_number":238,"context_line":"                         \u0027value from new_config\u0027.format(old_key))"},{"line_number":239,"context_line":"                new_key \u003d option[\u0027replacement_name\u0027]"},{"line_number":240,"context_line":"                new_section \u003d option[\u0027replacement_group\u0027]"},{"line_number":241,"context_line":"                try:"},{"line_number":242,"context_line":"                    old_value \u003d _get_value(conf, new_section, new_key)"},{"line_number":243,"context_line":"                except cfg.NoSuchOptError:"},{"line_number":244,"context_line":"                    LOG.info(\u0027There is no value with new_option \u0027"},{"line_number":245,"context_line":"                             \u0027as well. So do not need to continue \u0027"},{"line_number":246,"context_line":"                             \u0027running\u0027)"},{"line_number":247,"context_line":"                    continue"},{"line_number":248,"context_line":"            old_key_group \u003d (section, old_key,"},{"line_number":249,"context_line":"                             _convert_to_string(old_value))"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_f556362a","line":246,"range":{"start_line":237,"start_character":16,"end_line":246,"end_character":39},"updated":"2018-04-13 21:59:43.000000000","message":"I don\u0027t feel like any of this should be necessary.  If a deprecated opt was not set in the old file then there\u0027s nothing to do to migrate it.  Undeprecated opt values should be automatically brought over unchanged.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"ee5e880a8e7e0f8280b4c254e8e42a9cdb4ffe53","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            try:"},{"line_number":235,"context_line":"                old_value \u003d _get_value(conf, section, old_key)"},{"line_number":236,"context_line":"            except cfg.NoSuchOptError:"},{"line_number":237,"context_line":"                LOG.info(\u0027There is no value of this {0}.Try getting the \u0027"},{"line_number":238,"context_line":"                         \u0027value from new_config\u0027.format(old_key))"},{"line_number":239,"context_line":"                new_key \u003d option[\u0027replacement_name\u0027]"},{"line_number":240,"context_line":"                new_section \u003d option[\u0027replacement_group\u0027]"},{"line_number":241,"context_line":"                try:"},{"line_number":242,"context_line":"                    old_value \u003d _get_value(conf, new_section, new_key)"},{"line_number":243,"context_line":"                except cfg.NoSuchOptError:"},{"line_number":244,"context_line":"                    LOG.info(\u0027There is no value with new_option \u0027"},{"line_number":245,"context_line":"                             \u0027as well. So do not need to continue \u0027"},{"line_number":246,"context_line":"                             \u0027running\u0027)"},{"line_number":247,"context_line":"                    continue"},{"line_number":248,"context_line":"            old_key_group \u003d (section, old_key,"},{"line_number":249,"context_line":"                             _convert_to_string(old_value))"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_4d84ef5e","line":246,"range":{"start_line":237,"start_character":16,"end_line":246,"end_character":39},"in_reply_to":"5f7c97a3_02d3343a","updated":"2018-05-07 02:38:54.000000000","message":"i thought the problem, but if we want to remove this exception then we need to make sure all of projects using oslo.config correct. It should be have a mailing-list or something to discuss about this.\n\nFor now, we are focussing about this tool about what you think about the new source-code i changed. Is there any technical comment :)","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"7aa72154307701a41d97f87a946dad0946fa6d6b","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            try:"},{"line_number":235,"context_line":"                old_value \u003d _get_value(conf, section, old_key)"},{"line_number":236,"context_line":"            except cfg.NoSuchOptError:"},{"line_number":237,"context_line":"                LOG.info(\u0027There is no value of this {0}.Try getting the \u0027"},{"line_number":238,"context_line":"                         \u0027value from new_config\u0027.format(old_key))"},{"line_number":239,"context_line":"                new_key \u003d option[\u0027replacement_name\u0027]"},{"line_number":240,"context_line":"                new_section \u003d option[\u0027replacement_group\u0027]"},{"line_number":241,"context_line":"                try:"},{"line_number":242,"context_line":"                    old_value \u003d _get_value(conf, new_section, new_key)"},{"line_number":243,"context_line":"                except cfg.NoSuchOptError:"},{"line_number":244,"context_line":"                    LOG.info(\u0027There is no value with new_option \u0027"},{"line_number":245,"context_line":"                             \u0027as well. So do not need to continue \u0027"},{"line_number":246,"context_line":"                             \u0027running\u0027)"},{"line_number":247,"context_line":"                    continue"},{"line_number":248,"context_line":"            old_key_group \u003d (section, old_key,"},{"line_number":249,"context_line":"                             _convert_to_string(old_value))"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_02d3343a","line":246,"range":{"start_line":237,"start_character":16,"end_line":246,"end_character":39},"in_reply_to":"9f6a8fd7_0d37e1b2","updated":"2018-05-04 16:16:32.000000000","message":"Hmm, so that is actually wrong.  When you rename an option you don\u0027t mark the old one as deprecated_for_removal, you just add it as a deprecated_name on the new opt and oslo.config handles the lookup itself.  I\u0027m not sure we want to handle this in oslo.config, it\u0027s actually an error in the project and we should just fix it.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            try:"},{"line_number":235,"context_line":"                old_value \u003d _get_value(conf, section, old_key)"},{"line_number":236,"context_line":"            except cfg.NoSuchOptError:"},{"line_number":237,"context_line":"                LOG.info(\u0027There is no value of this {0}.Try getting the \u0027"},{"line_number":238,"context_line":"                         \u0027value from new_config\u0027.format(old_key))"},{"line_number":239,"context_line":"                new_key \u003d option[\u0027replacement_name\u0027]"},{"line_number":240,"context_line":"                new_section \u003d option[\u0027replacement_group\u0027]"},{"line_number":241,"context_line":"                try:"},{"line_number":242,"context_line":"                    old_value \u003d _get_value(conf, new_section, new_key)"},{"line_number":243,"context_line":"                except cfg.NoSuchOptError:"},{"line_number":244,"context_line":"                    LOG.info(\u0027There is no value with new_option \u0027"},{"line_number":245,"context_line":"                             \u0027as well. So do not need to continue \u0027"},{"line_number":246,"context_line":"                             \u0027running\u0027)"},{"line_number":247,"context_line":"                    continue"},{"line_number":248,"context_line":"            old_key_group \u003d (section, old_key,"},{"line_number":249,"context_line":"                             _convert_to_string(old_value))"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_0d37e1b2","line":246,"range":{"start_line":237,"start_character":16,"end_line":246,"end_character":39},"in_reply_to":"bf659307_f556362a","updated":"2018-04-17 08:43:44.000000000","message":"Why do I need to check this. Because, there will be some deprecated options but they still declare in source-code at new release.\n\nFor example:\n\"query_volume_filters\" option is replaced by \"resource_query_filters_file\" [1]. But it still declare in source with \"deprecated_for_remove\u003dTrue\" [2]. \n\n[1] https://github.com/openstack/cinder/blob/95861128486d042d6d072a00a2ea1433782e8d19/cinder/api/common.py#L39-L43 \n\n[2] https://github.com/openstack/cinder/blob/95861128486d042d6d072a00a2ea1433782e8d19/cinder/api/common.py#L44-L55","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":276,"context_line":"    # only changed value."},{"line_number":277,"context_line":"    for section, options in all_options.items():"},{"line_number":278,"context_line":"        for option in options[\u0027opts\u0027]:"},{"line_number":279,"context_line":"            mapping_template \u003d option[\u0027upgrade_value\u0027]"},{"line_number":280,"context_line":"            if mapping_template:"},{"line_number":281,"context_line":"                key \u003d option[\u0027name\u0027]"},{"line_number":282,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_4023a256","line":279,"range":{"start_line":279,"start_character":12,"end_line":279,"end_character":54},"updated":"2018-04-13 21:59:43.000000000","message":"This name mismatch (mapping_template vs. upgrade_value) is not helpful for anyone trying to read the code.  I might propose renaming both to \"upgrade_mapping\" as I think that adequately describes the data it contains.\n\nAlso, I think that\u0027s a better name for the user-facing attribute of the config opts, so at least that part should be renamed.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":276,"context_line":"    # only changed value."},{"line_number":277,"context_line":"    for section, options in all_options.items():"},{"line_number":278,"context_line":"        for option in options[\u0027opts\u0027]:"},{"line_number":279,"context_line":"            mapping_template \u003d option[\u0027upgrade_value\u0027]"},{"line_number":280,"context_line":"            if mapping_template:"},{"line_number":281,"context_line":"                key \u003d option[\u0027name\u0027]"},{"line_number":282,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_cd0ec9e4","line":279,"range":{"start_line":279,"start_character":12,"end_line":279,"end_character":54},"in_reply_to":"bf659307_4023a256","updated":"2018-04-17 08:43:44.000000000","message":"Done","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                key \u003d option[\u0027name\u0027]"},{"line_number":282,"context_line":"                try:"},{"line_number":283,"context_line":"                    old_value \u003d conf[section][key]"},{"line_number":284,"context_line":"                    old2_value_string \u003d _convert_to_string(old_value)"},{"line_number":285,"context_line":"                except cfg.NoSuchOptError:"},{"line_number":286,"context_line":"                    LOG.info(\u0027There is no value with new_option \u0027"},{"line_number":287,"context_line":"                             \u0027as well. So do not need to continue \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_c0d49222","line":284,"range":{"start_line":284,"start_character":23,"end_line":284,"end_character":24},"updated":"2018-04-13 21:59:43.000000000","message":"Why 2?","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                key \u003d option[\u0027name\u0027]"},{"line_number":282,"context_line":"                try:"},{"line_number":283,"context_line":"                    old_value \u003d conf[section][key]"},{"line_number":284,"context_line":"                    old2_value_string \u003d _convert_to_string(old_value)"},{"line_number":285,"context_line":"                except cfg.NoSuchOptError:"},{"line_number":286,"context_line":"                    LOG.info(\u0027There is no value with new_option \u0027"},{"line_number":287,"context_line":"                             \u0027as well. So do not need to continue \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_adf595cd","line":284,"range":{"start_line":284,"start_character":23,"end_line":284,"end_character":24},"in_reply_to":"bf659307_c0d49222","updated":"2018-04-17 08:43:44.000000000","message":"Done","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":283,"context_line":"                    old_value \u003d conf[section][key]"},{"line_number":284,"context_line":"                    old2_value_string \u003d _convert_to_string(old_value)"},{"line_number":285,"context_line":"                except cfg.NoSuchOptError:"},{"line_number":286,"context_line":"                    LOG.info(\u0027There is no value with new_option \u0027"},{"line_number":287,"context_line":"                             \u0027as well. So do not need to continue \u0027"},{"line_number":288,"context_line":"                             \u0027running\u0027)"},{"line_number":289,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_2066aebc","line":286,"updated":"2018-04-13 21:59:43.000000000","message":"As this is likely to happen a lot during a run of the tool, I\u0027m not sure we want to dump out a log message every time.  It\u0027s going to overwhelm potentially more useful log messages.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":283,"context_line":"                    old_value \u003d conf[section][key]"},{"line_number":284,"context_line":"                    old2_value_string \u003d _convert_to_string(old_value)"},{"line_number":285,"context_line":"                except cfg.NoSuchOptError:"},{"line_number":286,"context_line":"                    LOG.info(\u0027There is no value with new_option \u0027"},{"line_number":287,"context_line":"                             \u0027as well. So do not need to continue \u0027"},{"line_number":288,"context_line":"                             \u0027running\u0027)"},{"line_number":289,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_cdb569f0","line":286,"in_reply_to":"bf659307_2066aebc","updated":"2018-04-17 08:43:44.000000000","message":"Yeah, i will change them to comments. It is usefull to remember why it needs this exception. :)","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":317,"context_line":"def main(args\u003dNone):"},{"line_number":318,"context_line":"    \"\"\"The main function of oslo-handling-configuration-changes.\"\"\""},{"line_number":319,"context_line":"    version \u003d pkg_resources.get_distribution(\u0027oslo.config\u0027).version"},{"line_number":320,"context_line":"    logging.basicConfig(level\u003dlogging.WARN)"},{"line_number":321,"context_line":"    conf \u003d cfg.ConfigOpts()"},{"line_number":322,"context_line":"    register_cli_opts(conf)"},{"line_number":323,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_35e82ee0","line":320,"updated":"2018-04-13 21:59:43.000000000","message":"Hard-coding this to warning level is going to make all of the info log calls pointless.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":317,"context_line":"def main(args\u003dNone):"},{"line_number":318,"context_line":"    \"\"\"The main function of oslo-handling-configuration-changes.\"\"\""},{"line_number":319,"context_line":"    version \u003d pkg_resources.get_distribution(\u0027oslo.config\u0027).version"},{"line_number":320,"context_line":"    logging.basicConfig(level\u003dlogging.WARN)"},{"line_number":321,"context_line":"    conf \u003d cfg.ConfigOpts()"},{"line_number":322,"context_line":"    register_cli_opts(conf)"},{"line_number":323,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_88cbdf51","line":320,"in_reply_to":"bf659307_35e82ee0","updated":"2018-04-17 08:43:44.000000000","message":"Ok, i will delete this line of code.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":324,"context_line":"        conf(args, version\u003dversion)"},{"line_number":325,"context_line":"    except cfg.RequiredOptError:"},{"line_number":326,"context_line":"        conf.print_help()"},{"line_number":327,"context_line":"        if not sys.argv[1:]:"},{"line_number":328,"context_line":"            raise SystemExit"},{"line_number":329,"context_line":"        raise"},{"line_number":330,"context_line":"    handling_config_changes(conf\u003dconf)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_b5a2feac","line":327,"updated":"2018-04-13 21:59:43.000000000","message":"I\u0027m not sure I understand this logic.  Do we not just always want to sys.exit(1) here?","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":324,"context_line":"        conf(args, version\u003dversion)"},{"line_number":325,"context_line":"    except cfg.RequiredOptError:"},{"line_number":326,"context_line":"        conf.print_help()"},{"line_number":327,"context_line":"        if not sys.argv[1:]:"},{"line_number":328,"context_line":"            raise SystemExit"},{"line_number":329,"context_line":"        raise"},{"line_number":330,"context_line":"    handling_config_changes(conf\u003dconf)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_0d62813f","line":327,"in_reply_to":"bf659307_b5a2feac","updated":"2018-04-17 08:43:44.000000000","message":"I learned these lines of code from this patch set: https://review.openstack.org/#/c/484234","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"}],"oslo_config/generator.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"59fb77d1da9c9ed93d709d5a2d7a19254815a3c2","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    return results"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"def _format_real_value(opt, group_data):"},{"line_number":143,"context_line":"    \"Return a list of formatted real values.\""},{"line_number":144,"context_line":"    if isinstance(opt, cfg.MultiStrOpt):"},{"line_number":145,"context_line":"        return group_data[opt.name]"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_62c5438e","line":142,"updated":"2018-05-08 19:48:11.000000000","message":"Is this change related?","commit_id":"e1ccd4c3a22d0806908c40aac1434c0eb2dd2841"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"ac45e11a6749b5ca95faad5cc9a3c5cf5ca390e1","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    return results"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"def _format_real_value(opt, group_data):"},{"line_number":143,"context_line":"    \"Return a list of formatted real values.\""},{"line_number":144,"context_line":"    if isinstance(opt, cfg.MultiStrOpt):"},{"line_number":145,"context_line":"        return group_data[opt.name]"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_7c901aee","line":142,"in_reply_to":"5f7c97a3_62c5438e","updated":"2018-05-15 16:57:56.000000000","message":"yes, it is","commit_id":"e1ccd4c3a22d0806908c40aac1434c0eb2dd2841"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"41e9b8638f3ad58cb5012e68ecfc4c0446946e80","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":26,"id":"5f7c97a3_16a0baa4","updated":"2018-07-06 22:10:20.000000000","message":"The changes in this file seem unrelated to this work.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"05ec4a240886f1f429dd2c37d3c0210a551f9633","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":26,"id":"5f7c97a3_98890320","in_reply_to":"5f7c97a3_16a0baa4","updated":"2018-07-11 16:21:00.000000000","message":"Done","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"}],"oslo_config/mappinggenerator.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"b460289badda980202404acb680421df970fb2b9","unresolved":false,"context_lines":[{"line_number":36,"context_line":"]"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def make_deprecated_options_to_dict(conf\u003dNone):"},{"line_number":40,"context_line":"    \"\"\"Making deprecated options to a dict"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    :param conf: This is list_opt."}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_b2fb2f77","line":39,"updated":"2018-01-16 18:10:53.000000000","message":"There is already code to do this: https://github.com/openstack/oslo.config/blob/557861692fffb9af032caccc37c84a0189ebbf83/oslo_config/generator.py#L616\n\nIt should be possible to reuse that instead of writing another deprecated opts to dict function.","commit_id":"cba2d66a9c1b11055bc3725d03c93508d9b7c4a4"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"a5e726491af47ed146dcc2839070175e7d469f8b","unresolved":false,"context_lines":[{"line_number":36,"context_line":"]"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def make_deprecated_options_to_dict(conf\u003dNone):"},{"line_number":40,"context_line":"    \"\"\"Making deprecated options to a dict"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    :param conf: This is list_opt."}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_28f68490","line":39,"in_reply_to":"7f96bb07_b2fb2f77","updated":"2018-02-26 02:28:53.000000000","message":"Hi Ben,\n\nAfter thinking again, I think the function as your link should be re-used. I will change the workflow of my code to use the one.","commit_id":"cba2d66a9c1b11055bc3725d03c93508d9b7c4a4"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"c7f72884985a37165faf715d8ca2076e714f3547","unresolved":false,"context_lines":[{"line_number":36,"context_line":"]"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def make_deprecated_options_to_dict(conf\u003dNone):"},{"line_number":40,"context_line":"    \"\"\"Making deprecated options to a dict"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    :param conf: This is list_opt."}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_d33e6fd9","line":39,"in_reply_to":"7f96bb07_b2fb2f77","updated":"2018-02-09 04:06:34.000000000","message":"Hi Ben, thanks for your comment.\n\nYes, you are right, but the file which is created by the function is so large. We don\u0027t use all content of the file, we only need deprecated and new option, that why we create this function. By the way, we will consider the function again and re-test it before update anything.","commit_id":"cba2d66a9c1b11055bc3725d03c93508d9b7c4a4"}],"oslo_config/migrator.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"59fb77d1da9c9ed93d709d5a2d7a19254815a3c2","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    float: \u0027floating point value\u0027,"},{"line_number":35,"context_line":"}"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"_handling_config_changes \u003d ["},{"line_number":38,"context_line":"    cfg.StrOpt("},{"line_number":39,"context_line":"        \u0027output-file\u0027,"},{"line_number":40,"context_line":"        help\u003d\u0027The path of the file to write. Defaults to stdout.\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_423287f3","line":37,"range":{"start_line":37,"start_character":1,"end_line":37,"end_character":9},"updated":"2018-05-08 19:48:11.000000000","message":"Nit: s/handling/migrate/","commit_id":"e1ccd4c3a22d0806908c40aac1434c0eb2dd2841"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"ac45e11a6749b5ca95faad5cc9a3c5cf5ca390e1","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    float: \u0027floating point value\u0027,"},{"line_number":35,"context_line":"}"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"_handling_config_changes \u003d ["},{"line_number":38,"context_line":"    cfg.StrOpt("},{"line_number":39,"context_line":"        \u0027output-file\u0027,"},{"line_number":40,"context_line":"        help\u003d\u0027The path of the file to write. Defaults to stdout.\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_9c8df6d4","line":37,"range":{"start_line":37,"start_character":1,"end_line":37,"end_character":9},"in_reply_to":"5f7c97a3_423287f3","updated":"2018-05-15 16:57:56.000000000","message":"Done","commit_id":"e1ccd4c3a22d0806908c40aac1434c0eb2dd2841"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"59fb77d1da9c9ed93d709d5a2d7a19254815a3c2","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        default\u003d70,"},{"line_number":45,"context_line":"        help\u003d\u0027The maximum length of help lines.\u0027),"},{"line_number":46,"context_line":"    cfg.StrOpt("},{"line_number":47,"context_line":"        \u0027file-config\u0027,"},{"line_number":48,"context_line":"        help\u003d\u0027The path of configuration file.\u0027"},{"line_number":49,"context_line":"             \u0027For example: etc/cinder/cinder.conf\u0027,"},{"line_number":50,"context_line":"        required\u003dTrue"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_6240e336","line":47,"range":{"start_line":47,"start_character":9,"end_line":47,"end_character":20},"updated":"2018-05-08 19:48:11.000000000","message":"config-file?  Or is this to avoid conflicts with projects that are importing oslo.config to their generator too?","commit_id":"e1ccd4c3a22d0806908c40aac1434c0eb2dd2841"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"ac45e11a6749b5ca95faad5cc9a3c5cf5ca390e1","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        default\u003d70,"},{"line_number":45,"context_line":"        help\u003d\u0027The maximum length of help lines.\u0027),"},{"line_number":46,"context_line":"    cfg.StrOpt("},{"line_number":47,"context_line":"        \u0027file-config\u0027,"},{"line_number":48,"context_line":"        help\u003d\u0027The path of configuration file.\u0027"},{"line_number":49,"context_line":"             \u0027For example: etc/cinder/cinder.conf\u0027,"},{"line_number":50,"context_line":"        required\u003dTrue"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_1cbb2672","line":47,"range":{"start_line":47,"start_character":9,"end_line":47,"end_character":20},"in_reply_to":"5f7c97a3_6240e336","updated":"2018-05-15 16:57:56.000000000","message":"It is file-config exactly. This options is to show the path of old configuration.","commit_id":"e1ccd4c3a22d0806908c40aac1434c0eb2dd2841"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"59fb77d1da9c9ed93d709d5a2d7a19254815a3c2","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        self.old_value \u003d old_value"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def __str__(self):"},{"line_number":227,"context_line":"        msg \u003d \u0027Cannot mapping %s. Maybe upgrade_value or %s in old \u0027 \\"},{"line_number":228,"context_line":"              \u0027configuration is wrong, please check it again.\u0027 \\"},{"line_number":229,"context_line":"              % (self.old_value, self.old_value)"},{"line_number":230,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_c2a9b7df","line":227,"range":{"start_line":227,"start_character":69,"end_line":227,"end_character":70},"updated":"2018-05-08 19:48:11.000000000","message":"Nit: \\ line continuations are discouraged.  It\u0027s preferred to just wrap the string in (), which allows multi-line strings without continuation at the end of each line.\n\nAlso, I think this could use some re-wording, but I need to refresh my memory on where it is thrown.","commit_id":"e1ccd4c3a22d0806908c40aac1434c0eb2dd2841"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"ac45e11a6749b5ca95faad5cc9a3c5cf5ca390e1","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        self.old_value \u003d old_value"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def __str__(self):"},{"line_number":227,"context_line":"        msg \u003d \u0027Cannot mapping %s. Maybe upgrade_value or %s in old \u0027 \\"},{"line_number":228,"context_line":"              \u0027configuration is wrong, please check it again.\u0027 \\"},{"line_number":229,"context_line":"              % (self.old_value, self.old_value)"},{"line_number":230,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_bcb31298","line":227,"range":{"start_line":227,"start_character":69,"end_line":227,"end_character":70},"in_reply_to":"5f7c97a3_c2a9b7df","updated":"2018-05-15 16:57:56.000000000","message":"Done","commit_id":"e1ccd4c3a22d0806908c40aac1434c0eb2dd2841"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"59fb77d1da9c9ed93d709d5a2d7a19254815a3c2","unresolved":false,"context_lines":[{"line_number":281,"context_line":"    options_in_new_file \u003d []"},{"line_number":282,"context_line":"    try:"},{"line_number":283,"context_line":"        deprecated_options \u003d data_structure[\u0027deprecated_options\u0027]"},{"line_number":284,"context_line":"    except (IOError, TypeError):"},{"line_number":285,"context_line":"        LOG.info(\u0027No deprecated options to migrate.\u0027)"},{"line_number":286,"context_line":"        raise SystemExit"},{"line_number":287,"context_line":"    all_options \u003d data_structure[\u0027options\u0027]"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_82c2df84","line":284,"range":{"start_line":284,"start_character":11,"end_line":284,"end_character":31},"updated":"2018-05-08 19:48:11.000000000","message":"Neither of these are the exception you would get if there is no deprecated_options key (it would be a KeyError).  That seems wrong.","commit_id":"e1ccd4c3a22d0806908c40aac1434c0eb2dd2841"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"ac45e11a6749b5ca95faad5cc9a3c5cf5ca390e1","unresolved":false,"context_lines":[{"line_number":281,"context_line":"    options_in_new_file \u003d []"},{"line_number":282,"context_line":"    try:"},{"line_number":283,"context_line":"        deprecated_options \u003d data_structure[\u0027deprecated_options\u0027]"},{"line_number":284,"context_line":"    except (IOError, TypeError):"},{"line_number":285,"context_line":"        LOG.info(\u0027No deprecated options to migrate.\u0027)"},{"line_number":286,"context_line":"        raise SystemExit"},{"line_number":287,"context_line":"    all_options \u003d data_structure[\u0027options\u0027]"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_dcb04e8d","line":284,"range":{"start_line":284,"start_character":11,"end_line":284,"end_character":31},"in_reply_to":"5f7c97a3_82c2df84","updated":"2018-05-15 16:57:56.000000000","message":"Yes, i will update this.","commit_id":"e1ccd4c3a22d0806908c40aac1434c0eb2dd2841"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"59fb77d1da9c9ed93d709d5a2d7a19254815a3c2","unresolved":false,"context_lines":[{"line_number":291,"context_line":"            try:"},{"line_number":292,"context_line":"                old_value \u003d _get_value(conf, section, old_key)"},{"line_number":293,"context_line":"            except cfg.NoSuchOptError:"},{"line_number":294,"context_line":"                # Note(namnh): There is no value of this option."},{"line_number":295,"context_line":"                # Try getting the value from new_config"},{"line_number":296,"context_line":"                new_key \u003d option[\u0027replacement_name\u0027]"},{"line_number":297,"context_line":"                new_section \u003d option[\u0027replacement_group\u0027]"},{"line_number":298,"context_line":"                try:"},{"line_number":299,"context_line":"                    old_value \u003d _get_value(conf, new_section, new_key)"},{"line_number":300,"context_line":"                except cfg.NoSuchOptError:"},{"line_number":301,"context_line":"                    # Note(namnh): There is no value with new_option as well."},{"line_number":302,"context_line":"                    # So no need to solve this option."},{"line_number":303,"context_line":"                    continue"},{"line_number":304,"context_line":"            group \u003d (section, old_key,"},{"line_number":305,"context_line":"                     _convert_to_string(old_value))"},{"line_number":306,"context_line":"            if group not in options_in_file:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_c2453719","line":303,"range":{"start_line":294,"start_character":16,"end_line":303,"end_character":28},"updated":"2018-05-08 19:48:11.000000000","message":"This still doesn\u0027t seem right to me.  If we\u0027re looking at a deprecated option name that wasn\u0027t set in the old config, there\u0027s nothing to do.  If they already put a value in the undeprecated name, then there\u0027s nothing for us to migrate.  They configured everything correctly for the new version already.\n\nI realize we had a separate set of comments going on the old patch set related to this, but even in the case of the incorrect deprecated_for_removal, we don\u0027t want to do anything with the old opt if it\u0027s deprecated and not set.","commit_id":"e1ccd4c3a22d0806908c40aac1434c0eb2dd2841"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"ac45e11a6749b5ca95faad5cc9a3c5cf5ca390e1","unresolved":false,"context_lines":[{"line_number":291,"context_line":"            try:"},{"line_number":292,"context_line":"                old_value \u003d _get_value(conf, section, old_key)"},{"line_number":293,"context_line":"            except cfg.NoSuchOptError:"},{"line_number":294,"context_line":"                # Note(namnh): There is no value of this option."},{"line_number":295,"context_line":"                # Try getting the value from new_config"},{"line_number":296,"context_line":"                new_key \u003d option[\u0027replacement_name\u0027]"},{"line_number":297,"context_line":"                new_section \u003d option[\u0027replacement_group\u0027]"},{"line_number":298,"context_line":"                try:"},{"line_number":299,"context_line":"                    old_value \u003d _get_value(conf, new_section, new_key)"},{"line_number":300,"context_line":"                except cfg.NoSuchOptError:"},{"line_number":301,"context_line":"                    # Note(namnh): There is no value with new_option as well."},{"line_number":302,"context_line":"                    # So no need to solve this option."},{"line_number":303,"context_line":"                    continue"},{"line_number":304,"context_line":"            group \u003d (section, old_key,"},{"line_number":305,"context_line":"                     _convert_to_string(old_value))"},{"line_number":306,"context_line":"            if group not in options_in_file:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_1c7006dc","line":303,"range":{"start_line":294,"start_character":16,"end_line":303,"end_character":28},"in_reply_to":"5f7c97a3_c2453719","updated":"2018-05-15 16:57:56.000000000","message":"After thinking again. Yes, you are right totally :)\nIt shouldn\u0027t have the exception in here, i already tested it.","commit_id":"e1ccd4c3a22d0806908c40aac1434c0eb2dd2841"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"59fb77d1da9c9ed93d709d5a2d7a19254815a3c2","unresolved":false,"context_lines":[{"line_number":354,"context_line":"                options_in_new_file.append([key, section])"},{"line_number":355,"context_line":"                delete_deprecated_option(options_in_file, group)"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    # Move options that is not equal with default and not deprecated."},{"line_number":358,"context_line":"    for section, key, _value in options_in_file:"},{"line_number":359,"context_line":"        try:"},{"line_number":360,"context_line":"            value \u003d conf[section][key]"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_6d498289","line":357,"range":{"start_line":357,"start_character":27,"end_line":357,"end_character":49},"updated":"2018-05-08 19:48:11.000000000","message":"I don\u0027t think we should care if the value was equal to the default in this tool.  If it was explicitly set in the old config, even if the setting was equal to the default, we should bring it over to the new file.  There can be valid reasons for setting a value to the default, like if the default is changing in a future version and you want to keep the old behavior.","commit_id":"e1ccd4c3a22d0806908c40aac1434c0eb2dd2841"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"ac45e11a6749b5ca95faad5cc9a3c5cf5ca390e1","unresolved":false,"context_lines":[{"line_number":354,"context_line":"                options_in_new_file.append([key, section])"},{"line_number":355,"context_line":"                delete_deprecated_option(options_in_file, group)"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    # Move options that is not equal with default and not deprecated."},{"line_number":358,"context_line":"    for section, key, _value in options_in_file:"},{"line_number":359,"context_line":"        try:"},{"line_number":360,"context_line":"            value \u003d conf[section][key]"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_7546edc2","line":357,"range":{"start_line":357,"start_character":27,"end_line":357,"end_character":49},"in_reply_to":"5f7c97a3_6d498289","updated":"2018-05-15 16:57:56.000000000","message":"Yeah, I am thinking about this point.","commit_id":"e1ccd4c3a22d0806908c40aac1434c0eb2dd2841"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"b119bd3f08182b837a5fb25d524f91aa875c2d91","unresolved":false,"context_lines":[{"line_number":224,"context_line":""},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"def _output_opts(f, group, group_data, conf, help_comment\u003dTrue,"},{"line_number":227,"context_line":"                 minimal\u003dTrue, summarize\u003dFalse,):"},{"line_number":228,"context_line":"    f.format_group(group)"},{"line_number":229,"context_line":"    try:"},{"line_number":230,"context_line":"        opts \u003d group_data._opts"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_132dc845","line":227,"range":{"start_line":227,"start_character":46,"end_line":227,"end_character":47},"updated":"2018-05-18 08:19:22.000000000","message":"remove this","commit_id":"e113f1d0d5f4706ef99e3fb58d4ec63dc65ecf78"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"b119bd3f08182b837a5fb25d524f91aa875c2d91","unresolved":false,"context_lines":[{"line_number":242,"context_line":"                         help_comment\u003dhelp_comment)"},{"line_number":243,"context_line":"            except Exception as err:"},{"line_number":244,"context_line":"                f.write(\u0027# Warning: Failed to write config for %s\\n\u0027 %"},{"line_number":245,"context_line":"                        (opt.dest,))"},{"line_number":246,"context_line":"                f.write(\u0027# %s\\n\u0027 % (err,))"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_b3e2d400","line":245,"range":{"start_line":245,"start_character":24,"end_line":245,"end_character":25},"updated":"2018-05-18 08:19:22.000000000","message":"redundant","commit_id":"e113f1d0d5f4706ef99e3fb58d4ec63dc65ecf78"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"b119bd3f08182b837a5fb25d524f91aa875c2d91","unresolved":false,"context_lines":[{"line_number":243,"context_line":"            except Exception as err:"},{"line_number":244,"context_line":"                f.write(\u0027# Warning: Failed to write config for %s\\n\u0027 %"},{"line_number":245,"context_line":"                        (opt.dest,))"},{"line_number":246,"context_line":"                f.write(\u0027# %s\\n\u0027 % (err,))"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"def _append_wrong_opts(config_file, options):"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_53efc0e8","line":246,"range":{"start_line":246,"start_character":35,"end_line":246,"end_character":36},"updated":"2018-05-18 08:19:22.000000000","message":"redundant","commit_id":"e113f1d0d5f4706ef99e3fb58d4ec63dc65ecf78"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"8e508d4c6c5d3aec9a4a99c349a184a8f3ecfae2","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"import pkg_resources"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"OLD_OPTS_IN_FILE \u003d []"},{"line_number":30,"context_line":"NEW_OPTS_IN_FILE \u003d []"},{"line_number":31,"context_line":"DEPRECATED_OPTS \u003d {}"},{"line_number":32,"context_line":"ALL_OPTS \u003d {}"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_8ee5cfa6","line":29,"updated":"2018-06-08 17:06:56.000000000","message":"These should not be all caps.  They aren\u0027t constants, they\u0027re just module-level variables.\n\nThey should also probably be private.","commit_id":"f80811bc49ddb130cadf29d8c8f08616cd044769"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"8e508d4c6c5d3aec9a4a99c349a184a8f3ecfae2","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        default\u003d70,"},{"line_number":53,"context_line":"        help\u003d\u0027The maximum length of help lines.\u0027),"},{"line_number":54,"context_line":"    cfg.StrOpt("},{"line_number":55,"context_line":"        \u0027file-config\u0027,"},{"line_number":56,"context_line":"        help\u003d\u0027The path of configuration file.\u0027"},{"line_number":57,"context_line":"             \u0027For example: etc/cinder/cinder.conf\u0027,"},{"line_number":58,"context_line":"        required\u003dTrue"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_ce9427eb","line":55,"range":{"start_line":55,"start_character":9,"end_line":55,"end_character":13},"updated":"2018-06-08 17:06:56.000000000","message":"Okay, then maybe to make this more clear and avoid any confusion we can call it old-config.","commit_id":"f80811bc49ddb130cadf29d8c8f08616cd044769"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"927b2ac7324e3cb667a24540bb3d889ad1799e59","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        default\u003d70,"},{"line_number":53,"context_line":"        help\u003d\u0027The maximum length of help lines.\u0027),"},{"line_number":54,"context_line":"    cfg.StrOpt("},{"line_number":55,"context_line":"        \u0027file-config\u0027,"},{"line_number":56,"context_line":"        help\u003d\u0027The path of configuration file.\u0027"},{"line_number":57,"context_line":"             \u0027For example: etc/cinder/cinder.conf\u0027,"},{"line_number":58,"context_line":"        required\u003dTrue"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_2b8fb223","line":55,"range":{"start_line":55,"start_character":9,"end_line":55,"end_character":13},"in_reply_to":"5f7c97a3_ce9427eb","updated":"2018-06-11 08:23:40.000000000","message":"Yes, I did it in the help option","commit_id":"f80811bc49ddb130cadf29d8c8f08616cd044769"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"8e508d4c6c5d3aec9a4a99c349a184a8f3ecfae2","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        help\u003d\u0027Only output summaries of help text to config files. Retain \u0027"},{"line_number":68,"context_line":"             \u0027longer help text for Sphinx documents.\u0027),"},{"line_number":69,"context_line":"    cfg.BoolOpt("},{"line_number":70,"context_line":"        \u0027help_comment\u0027,"},{"line_number":71,"context_line":"        default\u003dTrue,"},{"line_number":72,"context_line":"        help\u003d\u0027Generate new configuration files with the help of each option.\u0027"},{"line_number":73,"context_line":"    ),"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_cebd0769","line":70,"updated":"2018-06-08 17:06:56.000000000","message":"Let\u0027s not make this configurable.  It\u0027s significantly complicating this change (twice as many test scenarios, hundreds of lines of whitespace changes as a result of the change to the generator code) and I don\u0027t think it\u0027s particularly necessary.  Just always include comments like the config generator does.\n\nIf at some point we discover a need to turn off comments for some reason, we can do that as a follow-up patch.","commit_id":"f80811bc49ddb130cadf29d8c8f08616cd044769"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"927b2ac7324e3cb667a24540bb3d889ad1799e59","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        help\u003d\u0027Only output summaries of help text to config files. Retain \u0027"},{"line_number":68,"context_line":"             \u0027longer help text for Sphinx documents.\u0027),"},{"line_number":69,"context_line":"    cfg.BoolOpt("},{"line_number":70,"context_line":"        \u0027help_comment\u0027,"},{"line_number":71,"context_line":"        default\u003dTrue,"},{"line_number":72,"context_line":"        help\u003d\u0027Generate new configuration files with the help of each option.\u0027"},{"line_number":73,"context_line":"    ),"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_2bb812c6","line":70,"in_reply_to":"5f7c97a3_cebd0769","updated":"2018-06-11 08:23:40.000000000","message":"I agreed with this point. I will remove this option in the next patch set.","commit_id":"f80811bc49ddb130cadf29d8c8f08616cd044769"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"8e508d4c6c5d3aec9a4a99c349a184a8f3ecfae2","unresolved":false,"context_lines":[{"line_number":275,"context_line":"    return new_conf, data_structure"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"def make_global_variables(namespaces, file_config):"},{"line_number":279,"context_line":"    \"\"\"Making some global variables"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    This function is to make some global variables which will be used in some"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_4e0d773c","line":278,"range":{"start_line":278,"start_character":4,"end_line":278,"end_character":25},"updated":"2018-06-08 17:06:56.000000000","message":"Just this function name is raising a big red flag for me.  Global variables should be avoided.","commit_id":"f80811bc49ddb130cadf29d8c8f08616cd044769"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"927b2ac7324e3cb667a24540bb3d889ad1799e59","unresolved":false,"context_lines":[{"line_number":275,"context_line":"    return new_conf, data_structure"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"def make_global_variables(namespaces, file_config):"},{"line_number":279,"context_line":"    \"\"\"Making some global variables"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    This function is to make some global variables which will be used in some"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_2b06d287","line":278,"range":{"start_line":278,"start_character":4,"end_line":278,"end_character":25},"in_reply_to":"5f7c97a3_4e0d773c","updated":"2018-06-11 08:23:40.000000000","message":"Yeah, you are right. My solution, for now, is making a new class to store all these variables.","commit_id":"f80811bc49ddb130cadf29d8c8f08616cd044769"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"8e508d4c6c5d3aec9a4a99c349a184a8f3ecfae2","unresolved":false,"context_lines":[{"line_number":330,"context_line":"    \"\"\"Mapping old configuration to new configuration.\"\"\""},{"line_number":331,"context_line":"    global WRONG_OPTS"},{"line_number":332,"context_line":"    old_opts \u003d copy.deepcopy(OLD_OPTS_IN_FILE)"},{"line_number":333,"context_line":"    if not bool(DEPRECATED_OPTS):"},{"line_number":334,"context_line":"        LOG.warning(\u0027No deprecated options to migrate.\u0027)"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    for section, options in DEPRECATED_OPTS.items():"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_ee1ec36e","line":333,"range":{"start_line":333,"start_character":11,"end_line":333,"end_character":15},"updated":"2018-06-08 17:06:56.000000000","message":"Nit: An explicit cast to bool is not needed.","commit_id":"f80811bc49ddb130cadf29d8c8f08616cd044769"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"927b2ac7324e3cb667a24540bb3d889ad1799e59","unresolved":false,"context_lines":[{"line_number":330,"context_line":"    \"\"\"Mapping old configuration to new configuration.\"\"\""},{"line_number":331,"context_line":"    global WRONG_OPTS"},{"line_number":332,"context_line":"    old_opts \u003d copy.deepcopy(OLD_OPTS_IN_FILE)"},{"line_number":333,"context_line":"    if not bool(DEPRECATED_OPTS):"},{"line_number":334,"context_line":"        LOG.warning(\u0027No deprecated options to migrate.\u0027)"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    for section, options in DEPRECATED_OPTS.items():"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_0b01966a","line":333,"range":{"start_line":333,"start_character":11,"end_line":333,"end_character":15},"in_reply_to":"5f7c97a3_ee1ec36e","updated":"2018-06-11 08:23:40.000000000","message":"sure, I will update it.","commit_id":"f80811bc49ddb130cadf29d8c8f08616cd044769"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"8e508d4c6c5d3aec9a4a99c349a184a8f3ecfae2","unresolved":false,"context_lines":[{"line_number":331,"context_line":"    global WRONG_OPTS"},{"line_number":332,"context_line":"    old_opts \u003d copy.deepcopy(OLD_OPTS_IN_FILE)"},{"line_number":333,"context_line":"    if not bool(DEPRECATED_OPTS):"},{"line_number":334,"context_line":"        LOG.warning(\u0027No deprecated options to migrate.\u0027)"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    for section, options in DEPRECATED_OPTS.items():"},{"line_number":337,"context_line":"        for option in options:"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_0e2a1f90","line":334,"range":{"start_line":334,"start_character":12,"end_line":334,"end_character":19},"updated":"2018-06-08 17:06:56.000000000","message":"This should not be a warning.  There\u0027s nothing wrong with having no deprecated options.","commit_id":"f80811bc49ddb130cadf29d8c8f08616cd044769"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"927b2ac7324e3cb667a24540bb3d889ad1799e59","unresolved":false,"context_lines":[{"line_number":331,"context_line":"    global WRONG_OPTS"},{"line_number":332,"context_line":"    old_opts \u003d copy.deepcopy(OLD_OPTS_IN_FILE)"},{"line_number":333,"context_line":"    if not bool(DEPRECATED_OPTS):"},{"line_number":334,"context_line":"        LOG.warning(\u0027No deprecated options to migrate.\u0027)"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    for section, options in DEPRECATED_OPTS.items():"},{"line_number":337,"context_line":"        for option in options:"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_4b30ee56","line":334,"range":{"start_line":334,"start_character":12,"end_line":334,"end_character":19},"in_reply_to":"5f7c97a3_0e2a1f90","updated":"2018-06-11 08:23:40.000000000","message":"It means that it is not necessary to have this check.","commit_id":"f80811bc49ddb130cadf29d8c8f08616cd044769"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"8e508d4c6c5d3aec9a4a99c349a184a8f3ecfae2","unresolved":false,"context_lines":[{"line_number":381,"context_line":"        _change_default_value(section\u003dsection, name\u003dkey_name, value\u003dvalue)"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"def append_wrong_opts(conf):"},{"line_number":385,"context_line":"    \"\"\"Write wrong options to the configuration file\"\"\""},{"line_number":386,"context_line":"    if WRONG_OPTS:"},{"line_number":387,"context_line":"        lines \u003d [\u0027\\n\u0027]"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_996bdbb7","line":384,"updated":"2018-06-08 17:06:56.000000000","message":"I assume that by \"wrong opts\" you mean the non-existent opts that were set in the previous file?  Let\u0027s just leave those out.","commit_id":"f80811bc49ddb130cadf29d8c8f08616cd044769"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"927b2ac7324e3cb667a24540bb3d889ad1799e59","unresolved":false,"context_lines":[{"line_number":381,"context_line":"        _change_default_value(section\u003dsection, name\u003dkey_name, value\u003dvalue)"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"def append_wrong_opts(conf):"},{"line_number":385,"context_line":"    \"\"\"Write wrong options to the configuration file\"\"\""},{"line_number":386,"context_line":"    if WRONG_OPTS:"},{"line_number":387,"context_line":"        lines \u003d [\u0027\\n\u0027]"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_4b1f8e6b","line":384,"in_reply_to":"5f7c97a3_996bdbb7","updated":"2018-06-11 08:23:40.000000000","message":"Maybe, my comment makes you confuse. This function is to comment all option in the config file which is not declared in source-code. I also wrote scenario_10 in the test_migrator.py file to test this.","commit_id":"f80811bc49ddb130cadf29d8c8f08616cd044769"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"41e9b8638f3ad58cb5012e68ecfc4c0446946e80","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        default\u003d70,"},{"line_number":45,"context_line":"        help\u003d\u0027The maximum length of help lines.\u0027),"},{"line_number":46,"context_line":"    cfg.StrOpt("},{"line_number":47,"context_line":"        \u0027file-config\u0027,"},{"line_number":48,"context_line":"        help\u003d\u0027The path of configuration file.\u0027"},{"line_number":49,"context_line":"             \u0027For example: etc/cinder/cinder.conf\u0027,"},{"line_number":50,"context_line":"        required\u003dTrue"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_f6a89e8b","line":47,"updated":"2018-07-06 22:10:20.000000000","message":"I would still prefer to rename this, although thinking some more about it I think I like \"input-file\" better than \"old-config\" as I had suggested before.  input-file matches up nicely with output-file above and makes it very obvious what these two options are for, even without reading the help.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"05ec4a240886f1f429dd2c37d3c0210a551f9633","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        default\u003d70,"},{"line_number":45,"context_line":"        help\u003d\u0027The maximum length of help lines.\u0027),"},{"line_number":46,"context_line":"    cfg.StrOpt("},{"line_number":47,"context_line":"        \u0027file-config\u0027,"},{"line_number":48,"context_line":"        help\u003d\u0027The path of configuration file.\u0027"},{"line_number":49,"context_line":"             \u0027For example: etc/cinder/cinder.conf\u0027,"},{"line_number":50,"context_line":"        required\u003dTrue"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_1d3ba5c9","line":47,"in_reply_to":"5f7c97a3_f6a89e8b","updated":"2018-07-11 16:21:00.000000000","message":"Thanks, a good comment for me. I will update this parameter.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"41e9b8638f3ad58cb5012e68ecfc4c0446946e80","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        self.old_value \u003d old_value"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def __str__(self):"},{"line_number":76,"context_line":"        msg \u003d (\u0027Cannot mapping %s. Maybe upgrade_value or %s \u0027"},{"line_number":77,"context_line":"               \u0027in old configuration is wrong, please check it \u0027"},{"line_number":78,"context_line":"               \u0027again.\u0027 % (self.old_value, self.old_value))"},{"line_number":79,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_368cd633","line":76,"range":{"start_line":76,"start_character":23,"end_line":76,"end_character":30},"updated":"2018-07-06 22:10:20.000000000","message":"Nit: *map","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"05ec4a240886f1f429dd2c37d3c0210a551f9633","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        self.old_value \u003d old_value"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def __str__(self):"},{"line_number":76,"context_line":"        msg \u003d (\u0027Cannot mapping %s. Maybe upgrade_value or %s \u0027"},{"line_number":77,"context_line":"               \u0027in old configuration is wrong, please check it \u0027"},{"line_number":78,"context_line":"               \u0027again.\u0027 % (self.old_value, self.old_value))"},{"line_number":79,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_286afcb3","line":76,"range":{"start_line":76,"start_character":23,"end_line":76,"end_character":30},"in_reply_to":"5f7c97a3_368cd633","updated":"2018-07-11 16:21:00.000000000","message":"Done","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"41e9b8638f3ad58cb5012e68ecfc4c0446946e80","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        self.type_value \u003d type_value"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def __str__(self):"},{"line_number":89,"context_line":"        msg \u003d (\u0027This %s is not still supported by \u0027"},{"line_number":90,"context_line":"               \u0027oslo-config-migrator.\u0027 % (self.type_value))"},{"line_number":91,"context_line":"        return msg"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_7617ae9e","line":89,"range":{"start_line":89,"start_character":31,"end_line":89,"end_character":36},"updated":"2018-07-06 22:10:20.000000000","message":"Femto-nit: I would probably remove \"still\".  There\u0027s no guarantee that the type was ever supported.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"05ec4a240886f1f429dd2c37d3c0210a551f9633","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        self.type_value \u003d type_value"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def __str__(self):"},{"line_number":89,"context_line":"        msg \u003d (\u0027This %s is not still supported by \u0027"},{"line_number":90,"context_line":"               \u0027oslo-config-migrator.\u0027 % (self.type_value))"},{"line_number":91,"context_line":"        return msg"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_6874749c","line":89,"range":{"start_line":89,"start_character":31,"end_line":89,"end_character":36},"in_reply_to":"5f7c97a3_7617ae9e","updated":"2018-07-11 16:21:00.000000000","message":"Done","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"41e9b8638f3ad58cb5012e68ecfc4c0446946e80","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        output \u003d []"},{"line_number":189,"context_line":"        for value in old_value:"},{"line_number":190,"context_line":"            try:"},{"line_number":191,"context_line":"                new_value \u003d key_map[value]"},{"line_number":192,"context_line":"                output.append(new_value)"},{"line_number":193,"context_line":"            except KeyError:"},{"line_number":194,"context_line":"                raise ErrorTemplate(value)"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_36337615","line":191,"range":{"start_line":191,"start_character":28,"end_line":191,"end_character":42},"updated":"2018-07-06 22:10:20.000000000","message":"I wonder if this should be:\n\nkey_map.get(value, value)\n\nThat way if a single possible value for an option needs to be renamed but the others don\u0027t, we leave the ones that aren\u0027t renamed alone and just pass them through.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"05ec4a240886f1f429dd2c37d3c0210a551f9633","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        output \u003d []"},{"line_number":189,"context_line":"        for value in old_value:"},{"line_number":190,"context_line":"            try:"},{"line_number":191,"context_line":"                new_value \u003d key_map[value]"},{"line_number":192,"context_line":"                output.append(new_value)"},{"line_number":193,"context_line":"            except KeyError:"},{"line_number":194,"context_line":"                raise ErrorTemplate(value)"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_4cf17196","line":191,"range":{"start_line":191,"start_character":28,"end_line":191,"end_character":42},"in_reply_to":"5f7c97a3_36337615","updated":"2018-07-11 16:21:00.000000000","message":"Yeah, your comment at this point is right, I totally agree with you.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"41e9b8638f3ad58cb5012e68ecfc4c0446946e80","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        return output"},{"line_number":196,"context_line":"    elif isinstance(old_value, str):"},{"line_number":197,"context_line":"        try:"},{"line_number":198,"context_line":"            output \u003d key_map[old_value]"},{"line_number":199,"context_line":"        except KeyError:"},{"line_number":200,"context_line":"            raise ErrorTemplate(old_value)"},{"line_number":201,"context_line":"        return output"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_b61ea671","line":198,"updated":"2018-07-06 22:10:20.000000000","message":"Likewise.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"aabb8b98d5dad30aba0f350164c968327129f82e","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        return output"},{"line_number":196,"context_line":"    elif isinstance(old_value, str):"},{"line_number":197,"context_line":"        try:"},{"line_number":198,"context_line":"            output \u003d key_map[old_value]"},{"line_number":199,"context_line":"        except KeyError:"},{"line_number":200,"context_line":"            raise ErrorTemplate(old_value)"},{"line_number":201,"context_line":"        return output"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_3f4f6b36","line":198,"in_reply_to":"5f7c97a3_16ffff02","updated":"2018-07-12 02:22:55.000000000","message":"Oh yeah, I understood. Thanks for making it very clean. I will update this.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"fcef478bdb9091847ea55fd7fdffa311cd06c44f","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        return output"},{"line_number":196,"context_line":"    elif isinstance(old_value, str):"},{"line_number":197,"context_line":"        try:"},{"line_number":198,"context_line":"            output \u003d key_map[old_value]"},{"line_number":199,"context_line":"        except KeyError:"},{"line_number":200,"context_line":"            raise ErrorTemplate(old_value)"},{"line_number":201,"context_line":"        return output"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_16ffff02","line":198,"in_reply_to":"5f7c97a3_4c573129","updated":"2018-07-11 21:54:19.000000000","message":"Okay, but consider this case:\n\nThe previous version has an option with choices of a, b, and c.  For the current version, a was renamed to new_a (for whatever reason).\n\nNow consider two deployers.  One had set the option to \"a\" and the other to \"b\".  When the first deployer runs the migration tool, this will be fine because there will be a mapping from a to new_a.  When the second deployer runs the tool, it will fail because b wasn\u0027t renamed so there\u0027s no mapping.  But it\u0027s okay to continue using \"b\" as the value because that\u0027s still valid in the new version.\n\nI think this is a reasonable scenario if, for example, a driver got renamed or replaced in a project.  The old driver would need to be migrated to the new driver, but other drivers may not have changed.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"05ec4a240886f1f429dd2c37d3c0210a551f9633","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        return output"},{"line_number":196,"context_line":"    elif isinstance(old_value, str):"},{"line_number":197,"context_line":"        try:"},{"line_number":198,"context_line":"            output \u003d key_map[old_value]"},{"line_number":199,"context_line":"        except KeyError:"},{"line_number":200,"context_line":"            raise ErrorTemplate(old_value)"},{"line_number":201,"context_line":"        return output"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_4c573129","line":198,"in_reply_to":"5f7c97a3_b61ea671","updated":"2018-07-11 16:21:00.000000000","message":"I am considering at this point. Generally, for the case which needs to be changed value then the option must have \"choices\" option. \n\nIn case developers want to update the value then they must declare \"upgrade_value\" option correctly.  Because the value of the option at this point is a single value, not a list.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"05ec4a240886f1f429dd2c37d3c0210a551f9633","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            raise ErrorTemplate(old_value)"},{"line_number":201,"context_line":"        return output"},{"line_number":202,"context_line":"    else:"},{"line_number":203,"context_line":"        type_value \u003d type(old_value)"},{"line_number":204,"context_line":"        raise NoSupport(type_value)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"def register_cli_opts(conf):"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_18d5f3b8","line":204,"range":{"start_line":203,"start_character":1,"end_line":204,"end_character":35},"updated":"2018-07-11 16:21:00.000000000","message":"Btw, I feel that I am missing some case. With the code of this function, there are only two cases (string and list) will be solved. Do you have any suggestion at this point?","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"fcef478bdb9091847ea55fd7fdffa311cd06c44f","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            raise ErrorTemplate(old_value)"},{"line_number":201,"context_line":"        return output"},{"line_number":202,"context_line":"    else:"},{"line_number":203,"context_line":"        type_value \u003d type(old_value)"},{"line_number":204,"context_line":"        raise NoSupport(type_value)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"def register_cli_opts(conf):"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_916f99c3","line":204,"range":{"start_line":203,"start_character":1,"end_line":204,"end_character":35},"in_reply_to":"5f7c97a3_18d5f3b8","updated":"2018-07-11 21:54:19.000000000","message":"That may be fine.  The basic types in a config file are either strings or lists, and the more specific types get coerced from string.  Ideally we wouldn\u0027t have to deal with every type in oslo.config here, so hopefully this is right.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"35d2d5dbc30a32de1cb1440742458e7a6e21eaa4","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            raise ErrorTemplate(old_value)"},{"line_number":201,"context_line":"        return output"},{"line_number":202,"context_line":"    else:"},{"line_number":203,"context_line":"        type_value \u003d type(old_value)"},{"line_number":204,"context_line":"        raise NoSupport(type_value)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"def register_cli_opts(conf):"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_a196ec48","line":204,"range":{"start_line":203,"start_character":1,"end_line":204,"end_character":35},"in_reply_to":"5f7c97a3_3fc0cb2b","updated":"2018-07-12 16:50:35.000000000","message":"I suppose that\u0027s theoretically possible.  I suspect in practice that ints won\u0027t be getting migrated very often, but we\u0027ll see.  We can always add support for more types if/when we find they are needed too.  The implementation isn\u0027t immutable after we merge the first version. :-)","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"aabb8b98d5dad30aba0f350164c968327129f82e","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            raise ErrorTemplate(old_value)"},{"line_number":201,"context_line":"        return output"},{"line_number":202,"context_line":"    else:"},{"line_number":203,"context_line":"        type_value \u003d type(old_value)"},{"line_number":204,"context_line":"        raise NoSupport(type_value)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"def register_cli_opts(conf):"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_3fc0cb2b","line":204,"range":{"start_line":203,"start_character":1,"end_line":204,"end_character":35},"in_reply_to":"5f7c97a3_916f99c3","updated":"2018-07-12 02:22:55.000000000","message":"How about the \u0027int\u0027 type. Is there any case that updates from number1 to new_number1.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"41e9b8638f3ad58cb5012e68ecfc4c0446946e80","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        self.all_opts \u003d {}"},{"line_number":275,"context_line":"        self.wrong_opts \u003d {}"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def set_variable(self):"},{"line_number":278,"context_line":"        self.old_conf, data_structure \u003d create_conf("},{"line_number":279,"context_line":"            namespaces\u003dself.namespaces, config_file\u003dself.file_config)"},{"line_number":280,"context_line":"        self.old_opts_in_file \u003d _get_config_from_file(conf\u003dself.old_conf)"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_b6e0e6f9","line":277,"range":{"start_line":277,"start_character":8,"end_line":277,"end_character":20},"updated":"2018-07-06 22:10:20.000000000","message":"Nit: *set_variables\n\nSince we\u0027re setting more than one here.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"05ec4a240886f1f429dd2c37d3c0210a551f9633","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        self.all_opts \u003d {}"},{"line_number":275,"context_line":"        self.wrong_opts \u003d {}"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def set_variable(self):"},{"line_number":278,"context_line":"        self.old_conf, data_structure \u003d create_conf("},{"line_number":279,"context_line":"            namespaces\u003dself.namespaces, config_file\u003dself.file_config)"},{"line_number":280,"context_line":"        self.old_opts_in_file \u003d _get_config_from_file(conf\u003dself.old_conf)"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_6899d4cd","line":277,"range":{"start_line":277,"start_character":8,"end_line":277,"end_character":20},"in_reply_to":"5f7c97a3_b6e0e6f9","updated":"2018-07-11 16:21:00.000000000","message":"Done","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"41e9b8638f3ad58cb5012e68ecfc4c0446946e80","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                                       filters\u003dself.new_opts_in_file)"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"def mapping_configuration(vars_config):"},{"line_number":320,"context_line":"    \"\"\"Mapping old configuration to new configuration.\"\"\""},{"line_number":321,"context_line":"    old_opts \u003d copy.deepcopy(vars_config.old_opts_in_file)"},{"line_number":322,"context_line":"    if not vars_config.deprecated_opts:"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_c117f19c","line":319,"updated":"2018-07-06 22:10:20.000000000","message":"These methods should probably all be private.  I almost wonder if we just want to make this whole module private since the intended use case is through the CLI, so nobody needs to be directly calling this code from Python except the CLI entrypoint, which is part of the project and allowed to reference private members.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"05ec4a240886f1f429dd2c37d3c0210a551f9633","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                                       filters\u003dself.new_opts_in_file)"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"def mapping_configuration(vars_config):"},{"line_number":320,"context_line":"    \"\"\"Mapping old configuration to new configuration.\"\"\""},{"line_number":321,"context_line":"    old_opts \u003d copy.deepcopy(vars_config.old_opts_in_file)"},{"line_number":322,"context_line":"    if not vars_config.deprecated_opts:"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_57033e0d","line":319,"in_reply_to":"5f7c97a3_c117f19c","updated":"2018-07-11 16:21:00.000000000","message":"Yeah, you are right, they should be updated to the private method.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"41e9b8638f3ad58cb5012e68ecfc4c0446946e80","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    \"\"\"Mapping old configuration to new configuration.\"\"\""},{"line_number":321,"context_line":"    old_opts \u003d copy.deepcopy(vars_config.old_opts_in_file)"},{"line_number":322,"context_line":"    if not vars_config.deprecated_opts:"},{"line_number":323,"context_line":"        LOG.warning(\u0027No deprecated options to migrate.\u0027)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    for section, options in vars_config.deprecated_opts.items():"},{"line_number":326,"context_line":"        for option in options:"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_e13b0d36","line":323,"updated":"2018-07-06 22:10:20.000000000","message":"Did you mean to remove this?  I got the impression from your reply to my previous comment that you did.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"05ec4a240886f1f429dd2c37d3c0210a551f9633","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    \"\"\"Mapping old configuration to new configuration.\"\"\""},{"line_number":321,"context_line":"    old_opts \u003d copy.deepcopy(vars_config.old_opts_in_file)"},{"line_number":322,"context_line":"    if not vars_config.deprecated_opts:"},{"line_number":323,"context_line":"        LOG.warning(\u0027No deprecated options to migrate.\u0027)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    for section, options in vars_config.deprecated_opts.items():"},{"line_number":326,"context_line":"        for option in options:"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_fd134958","line":323,"in_reply_to":"5f7c97a3_e13b0d36","updated":"2018-07-11 16:21:00.000000000","message":"Yes, I will remove this","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"41e9b8638f3ad58cb5012e68ecfc4c0446946e80","unresolved":false,"context_lines":[{"line_number":375,"context_line":""},{"line_number":376,"context_line":"def append_wrong_opts(conf, vars_config):"},{"line_number":377,"context_line":"    \"\"\"Write wrong options to the configuration file\"\"\""},{"line_number":378,"context_line":"    if vars_config.wrong_opts:"},{"line_number":379,"context_line":"        lines \u003d [\u0027\\n\u0027]"},{"line_number":380,"context_line":"        with open(conf.output_file, \u0027a\u0027) as output_file:"},{"line_number":381,"context_line":"            lines.append(\"# Wrong options which did not configured right in\\n\""}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_b61b061a","line":378,"updated":"2018-07-06 22:10:20.000000000","message":"Okay, so I still don\u0027t think we should include these in the output file.  By definition, they won\u0027t have any effect because they aren\u0027t used by the service.  That makes them unnecessary noise.\n\nHowever, it does seem prudent to log a warning that we\u0027re dropping the option.  That way if someone sees an option being dropped that they didn\u0027t expect they can investigate.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"05ec4a240886f1f429dd2c37d3c0210a551f9633","unresolved":false,"context_lines":[{"line_number":375,"context_line":""},{"line_number":376,"context_line":"def append_wrong_opts(conf, vars_config):"},{"line_number":377,"context_line":"    \"\"\"Write wrong options to the configuration file\"\"\""},{"line_number":378,"context_line":"    if vars_config.wrong_opts:"},{"line_number":379,"context_line":"        lines \u003d [\u0027\\n\u0027]"},{"line_number":380,"context_line":"        with open(conf.output_file, \u0027a\u0027) as output_file:"},{"line_number":381,"context_line":"            lines.append(\"# Wrong options which did not configured right in\\n\""}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_3d8f8177","line":378,"in_reply_to":"5f7c97a3_b61b061a","updated":"2018-07-11 16:21:00.000000000","message":"Yeah, let me update the function of this method. It will show warning logs instead writing the new configuration file.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"41e9b8638f3ad58cb5012e68ecfc4c0446946e80","unresolved":false,"context_lines":[{"line_number":411,"context_line":"def migrator(conf):"},{"line_number":412,"context_line":"    vars_conf \u003d StoreConfig(namespaces\u003dconf.namespace,"},{"line_number":413,"context_line":"                            file_config\u003dconf.file_config)"},{"line_number":414,"context_line":"    vars_conf.set_variable()"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    mapping_configuration(vars_config\u003dvars_conf)"},{"line_number":417,"context_line":"    write_configuration_file(conf\u003dconf, vars_config\u003dvars_conf)"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_e1ed3624","line":414,"updated":"2018-07-06 22:10:20.000000000","message":"Since we\u0027re calling this immediately after creating the object, I think we should just call it from the StoreConfig __init__ and skip the manual call here.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"05ec4a240886f1f429dd2c37d3c0210a551f9633","unresolved":false,"context_lines":[{"line_number":411,"context_line":"def migrator(conf):"},{"line_number":412,"context_line":"    vars_conf \u003d StoreConfig(namespaces\u003dconf.namespace,"},{"line_number":413,"context_line":"                            file_config\u003dconf.file_config)"},{"line_number":414,"context_line":"    vars_conf.set_variable()"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    mapping_configuration(vars_config\u003dvars_conf)"},{"line_number":417,"context_line":"    write_configuration_file(conf\u003dconf, vars_config\u003dvars_conf)"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_e895e488","line":414,"in_reply_to":"5f7c97a3_e1ed3624","updated":"2018-07-11 16:21:00.000000000","message":"Done","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d669d38f6d39609b5c5b631ceef50c6e9f522b6a","unresolved":false,"context_lines":[{"line_number":134,"context_line":"def _get_value_file(conf, sec, key_name):"},{"line_number":135,"context_line":"    \"\"\"Getting value from the configuration file\"\"\""},{"line_number":136,"context_line":"    section_options \u003d conf._namespace._parsed[0]"},{"line_number":137,"context_line":"    for section, options in section_options.items():"},{"line_number":138,"context_line":"        for key, value in options.items():"},{"line_number":139,"context_line":"            if section \u003d\u003d sec and key \u003d\u003d key_name:"},{"line_number":140,"context_line":"                return value"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f79a3b5_5f88bc69","line":137,"updated":"2018-09-28 20:57:36.000000000","message":"This nested loop looks like it could be replaced with\n\n  section_options[section][key]\n\nor if we expect some of the values to be missing\n\n  section_options.get(section, {}).get(key)\n\nIs there a reason that using loops works better?","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7c997a6372c0fbe1c184494e67a56d74e5805932","unresolved":false,"context_lines":[{"line_number":134,"context_line":"def _get_value_file(conf, sec, key_name):"},{"line_number":135,"context_line":"    \"\"\"Getting value from the configuration file\"\"\""},{"line_number":136,"context_line":"    section_options \u003d conf._namespace._parsed[0]"},{"line_number":137,"context_line":"    for section, options in section_options.items():"},{"line_number":138,"context_line":"        for key, value in options.items():"},{"line_number":139,"context_line":"            if section \u003d\u003d sec and key \u003d\u003d key_name:"},{"line_number":140,"context_line":"                return value"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f79a3b5_3f7aa0ba","line":137,"in_reply_to":"3f79a3b5_5f88bc69","updated":"2018-09-28 21:18:46.000000000","message":"See https://review.openstack.org/606209","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"},{"author":{"_account_id":28278,"name":"Duc Nguyen","email":"ducnv41@viettel.com.vn","username":"ducnv"},"change_message_id":"950ef55c073629267a76cd26156fe43cdf48e082","unresolved":false,"context_lines":[{"line_number":134,"context_line":"def _get_value_file(conf, sec, key_name):"},{"line_number":135,"context_line":"    \"\"\"Getting value from the configuration file\"\"\""},{"line_number":136,"context_line":"    section_options \u003d conf._namespace._parsed[0]"},{"line_number":137,"context_line":"    for section, options in section_options.items():"},{"line_number":138,"context_line":"        for key, value in options.items():"},{"line_number":139,"context_line":"            if section \u003d\u003d sec and key \u003d\u003d key_name:"},{"line_number":140,"context_line":"                return value"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f79a3b5_86b9fdec","line":137,"in_reply_to":"3f79a3b5_5f88bc69","updated":"2018-10-02 09:13:23.000000000","message":"thanks, a good comment for me. I totally agree with you.","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d669d38f6d39609b5c5b631ceef50c6e9f522b6a","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                f.write(\u0027# %s\\n\u0027 % (err,))"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"def _change_default_value(section, name, value, vars_config):"},{"line_number":174,"context_line":"    \"\"\"Changing default value"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    This function is to change the default value of option. This is a trick to"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f79a3b5_bfaf909b","line":173,"updated":"2018-09-28 20:57:36.000000000","message":"If an option has a sample default value, the generator code will use that value and ignore the default. So I think this code should modify the \"sample_default\" attribute of the Opt rather than the \"default: attribute. See generator._format_defaults().","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"72fd99ba91c399958d7c21d27b53d8012124c8a5","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                f.write(\u0027# %s\\n\u0027 % (err,))"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"def _change_default_value(section, name, value, vars_config):"},{"line_number":174,"context_line":"    \"\"\"Changing default value"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    This function is to change the default value of option. This is a trick to"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f79a3b5_da585afa","line":173,"in_reply_to":"3f79a3b5_bfaf909b","updated":"2018-09-28 21:39:12.000000000","message":"See https://review.openstack.org/606211","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"},{"author":{"_account_id":28278,"name":"Duc Nguyen","email":"ducnv41@viettel.com.vn","username":"ducnv"},"change_message_id":"950ef55c073629267a76cd26156fe43cdf48e082","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                f.write(\u0027# %s\\n\u0027 % (err,))"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"def _change_default_value(section, name, value, vars_config):"},{"line_number":174,"context_line":"    \"\"\"Changing default value"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    This function is to change the default value of option. This is a trick to"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f79a3b5_e6a23197","line":173,"in_reply_to":"3f79a3b5_bfaf909b","updated":"2018-10-02 09:13:23.000000000","message":"nice, thank you for this helpful comment :)","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d669d38f6d39609b5c5b631ceef50c6e9f522b6a","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            name][\u0027opt\u0027].default \u003d value"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"def _upgrade_value(key_map, old_value):"},{"line_number":187,"context_line":"    if isinstance(old_value, list):"},{"line_number":188,"context_line":"        output \u003d []"},{"line_number":189,"context_line":"        for value in old_value:"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f79a3b5_3f4e2039","line":186,"updated":"2018-09-28 20:57:36.000000000","message":"It looks like this is the function that would need to change if we replace the upgrade_value with a function.","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"},{"author":{"_account_id":28278,"name":"Duc Nguyen","email":"ducnv41@viettel.com.vn","username":"ducnv"},"change_message_id":"950ef55c073629267a76cd26156fe43cdf48e082","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            name][\u0027opt\u0027].default \u003d value"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"def _upgrade_value(key_map, old_value):"},{"line_number":187,"context_line":"    if isinstance(old_value, list):"},{"line_number":188,"context_line":"        output \u003d []"},{"line_number":189,"context_line":"        for value in old_value:"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f79a3b5_a62d19fe","line":186,"in_reply_to":"3f79a3b5_3f4e2039","updated":"2018-10-02 09:13:23.000000000","message":"Yep!","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d669d38f6d39609b5c5b631ceef50c6e9f522b6a","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"def create_conf(namespaces, filters\u003dNone, config_file\u003dNone):"},{"line_number":214,"context_line":"    \"\"\"Create an CONF object for specific project\"\"\""},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    groups \u003d generator._get_groups(generator._list_opts(namespaces))"},{"line_number":217,"context_line":"    data_structure \u003d generator._generate_machine_readable_data(groups, {})"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f79a3b5_1f31e4a2","line":214,"updated":"2018-09-28 20:57:36.000000000","message":"It looks like this function is using the config generator code to discover the options for the project and then registering them with the ConfigOpts instance. Is that correct?","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"},{"author":{"_account_id":28278,"name":"Duc Nguyen","email":"ducnv41@viettel.com.vn","username":"ducnv"},"change_message_id":"950ef55c073629267a76cd26156fe43cdf48e082","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"def create_conf(namespaces, filters\u003dNone, config_file\u003dNone):"},{"line_number":214,"context_line":"    \"\"\"Create an CONF object for specific project\"\"\""},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    groups \u003d generator._get_groups(generator._list_opts(namespaces))"},{"line_number":217,"context_line":"    data_structure \u003d generator._generate_machine_readable_data(groups, {})"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f79a3b5_e688f1c3","line":214,"in_reply_to":"3f79a3b5_1f31e4a2","updated":"2018-10-02 09:13:23.000000000","message":"Yes, you are right.","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"}],"oslo_config/tests/test_generator.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d669d38f6d39609b5c5b631ceef50c6e9f522b6a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":32,"id":"3f79a3b5_1f8d6430","updated":"2018-09-28 20:57:36.000000000","message":"If the change being made is backwards compatible, we should not need to change this file to pass upgrade_value. Are the changes here necessary? Or were they made for completeness?","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"919abf5d5a6cd5e319de51ab9adcbf17fa933bcf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":32,"id":"3f79a3b5_bf98f019","in_reply_to":"3f79a3b5_1f8d6430","updated":"2018-09-28 21:15:51.000000000","message":"Nevermind, I understand why these are here now.","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"}],"oslo_config/tests/test_migrator.py":[{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"b119bd3f08182b837a5fb25d524f91aa875c2d91","unresolved":false,"context_lines":[{"line_number":288,"context_line":"                                                 \u0027section\u0027),"},{"line_number":289,"context_line":"        \u0027deprecated_foo_default\u0027: cfg.StrOpt(\u0027deprecated_foo_default\u0027,"},{"line_number":290,"context_line":"                                             deprecated_name\u003d\u0027foo_default\u0027,"},{"line_number":291,"context_line":"                                             help\u003d\u0027This option is to replace\u0027"},{"line_number":292,"context_line":"                                                  \u0027foo_default option.\u0027),"},{"line_number":293,"context_line":"        \u0027deprecated_number2\u0027: cfg.IntOpt(\u0027deprecated_number2\u0027,"},{"line_number":294,"context_line":"                                         deprecated_name\u003d\u0027number2\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_13a068a5","line":291,"range":{"start_line":291,"start_character":76,"end_line":291,"end_character":77},"updated":"2018-05-18 08:19:22.000000000","message":"add a space","commit_id":"e113f1d0d5f4706ef99e3fb58d4ec63dc65ecf78"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"b119bd3f08182b837a5fb25d524f91aa875c2d91","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        \u0027deprecated_number2\u0027: cfg.IntOpt(\u0027deprecated_number2\u0027,"},{"line_number":294,"context_line":"                                         deprecated_name\u003d\u0027number2\u0027,"},{"line_number":295,"context_line":"                                         deprecated_group\u003d\u0027group1\u0027,"},{"line_number":296,"context_line":"                                         help\u003d\u0027This option is to replace\u0027"},{"line_number":297,"context_line":"                                              \u0027number2 in group1 section.\u0027)"},{"line_number":298,"context_line":"    }"},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_33a564b6","line":296,"range":{"start_line":296,"start_character":72,"end_line":296,"end_character":73},"updated":"2018-05-18 08:19:22.000000000","message":"add a space","commit_id":"e113f1d0d5f4706ef99e3fb58d4ec63dc65ecf78"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"8e508d4c6c5d3aec9a4a99c349a184a8f3ecfae2","unresolved":false,"context_lines":[{"line_number":575,"context_line":""},{"line_number":576,"context_line":"    def tearDown(self):"},{"line_number":577,"context_line":"        super(MigratorTestCase, self).tearDown()"},{"line_number":578,"context_line":"        migrator.OLD_OPTS_IN_FILE \u003d []"},{"line_number":579,"context_line":"        migrator.NEW_OPTS_IN_FILE \u003d []"},{"line_number":580,"context_line":"        migrator.DEPRECATED_OPTS \u003d {}"},{"line_number":581,"context_line":"        migrator.ALL_OPTS \u003d {}"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_b909f72b","line":578,"updated":"2018-06-08 17:06:56.000000000","message":"This is one of the reasons why you don\u0027t want to use global variables.  I suspect this will be racy when unit tests are run in parallel.  You might have two separate tests modifying these variables at the same time.","commit_id":"f80811bc49ddb130cadf29d8c8f08616cd044769"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"41e9b8638f3ad58cb5012e68ecfc4c0446946e80","unresolved":false,"context_lines":[{"line_number":144,"context_line":"\u0027\u0027\u0027,"},{"line_number":145,"context_line":"    \u0027expected\u0027: \u0027\u0027\u0027[DEFAULT]"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"# This option is to replacefoo_default option. (string value)"},{"line_number":148,"context_line":"# Deprecated group/name - [DEFAULT]/foo_default"},{"line_number":149,"context_line":"deprecated_foo_default \u003d value_foo"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_010dd2e5","line":147,"range":{"start_line":147,"start_character":20,"end_line":147,"end_character":38},"updated":"2018-07-06 22:10:20.000000000","message":"Femto-nit: Looks like we\u0027re missing a space in the opt help.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"05ec4a240886f1f429dd2c37d3c0210a551f9633","unresolved":false,"context_lines":[{"line_number":144,"context_line":"\u0027\u0027\u0027,"},{"line_number":145,"context_line":"    \u0027expected\u0027: \u0027\u0027\u0027[DEFAULT]"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"# This option is to replacefoo_default option. (string value)"},{"line_number":148,"context_line":"# Deprecated group/name - [DEFAULT]/foo_default"},{"line_number":149,"context_line":"deprecated_foo_default \u003d value_foo"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_7d5979fb","line":147,"range":{"start_line":147,"start_character":20,"end_line":147,"end_character":38},"in_reply_to":"5f7c97a3_010dd2e5","updated":"2018-07-11 16:21:00.000000000","message":"Done","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"41e9b8638f3ad58cb5012e68ecfc4c0446946e80","unresolved":false,"context_lines":[{"line_number":433,"context_line":"                                            help\u003d\u0027This option is to replace \u0027"},{"line_number":434,"context_line":"                                                 \u0027bar_group1 option with same \u0027"},{"line_number":435,"context_line":"                                                 \u0027section\u0027),"},{"line_number":436,"context_line":"        \u0027deprecated_foo_default\u0027: cfg.StrOpt(\u0027deprecated_foo_default\u0027,"},{"line_number":437,"context_line":"                                             deprecated_name\u003d\u0027foo_default\u0027,"},{"line_number":438,"context_line":"                                             help\u003d\u0027This option is to replace\u0027"},{"line_number":439,"context_line":"                                                  \u0027foo_default option.\u0027),"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_c16d9a99","line":436,"updated":"2018-07-06 22:10:20.000000000","message":"Nit: This feels backward.  This is having \"deprecated_foo_default\" deprecate \"foo_default\", but it feels like foo_default should deprecate deprecated_foo_default.\n\nActually, looking through the other scenarios I would say that all of these deprecated_* opts are backward.  We can maybe fix that in a followup though since functionally everything seems fine.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"05ec4a240886f1f429dd2c37d3c0210a551f9633","unresolved":false,"context_lines":[{"line_number":433,"context_line":"                                            help\u003d\u0027This option is to replace \u0027"},{"line_number":434,"context_line":"                                                 \u0027bar_group1 option with same \u0027"},{"line_number":435,"context_line":"                                                 \u0027section\u0027),"},{"line_number":436,"context_line":"        \u0027deprecated_foo_default\u0027: cfg.StrOpt(\u0027deprecated_foo_default\u0027,"},{"line_number":437,"context_line":"                                             deprecated_name\u003d\u0027foo_default\u0027,"},{"line_number":438,"context_line":"                                             help\u003d\u0027This option is to replace\u0027"},{"line_number":439,"context_line":"                                                  \u0027foo_default option.\u0027),"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_38754f34","line":436,"in_reply_to":"5f7c97a3_c16d9a99","updated":"2018-07-11 16:21:00.000000000","message":"yes, I will update in the next patch.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"41e9b8638f3ad58cb5012e68ecfc4c0446946e80","unresolved":false,"context_lines":[{"line_number":446,"context_line":"                                             deprecated_name\u003d\u0027choices_opt\u0027,"},{"line_number":447,"context_line":"                                             deprecated_group\u003d\u0027group1\u0027,"},{"line_number":448,"context_line":"                                             choices\u003d(\u0027a_updated\u0027, \u0027b_updated\u0027,"},{"line_number":449,"context_line":"                                                      \u0027c_updated\u0027, \u0027a\u0027, \u0027b\u0027,"},{"line_number":450,"context_line":"                                                      \u0027c\u0027),"},{"line_number":451,"context_line":"                                             upgrade_value\u003d{\u0027a\u0027: \u0027a_updated\u0027,"},{"line_number":452,"context_line":"                                                            \u0027b\u0027: \u0027b_updated\u0027,"},{"line_number":453,"context_line":"                                                            \u0027c\u0027: \u0027c_updated\u0027},"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_c1fd9a3b","line":450,"range":{"start_line":449,"start_character":67,"end_line":450,"end_character":57},"updated":"2018-07-06 22:10:20.000000000","message":"I would argue that a, b, and c shouldn\u0027t be choices on the new opt.  I guess that\u0027s kind of a nit-pick though since the  point of the test is to validate that the value gets updated properly, which this does.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"41e9b8638f3ad58cb5012e68ecfc4c0446946e80","unresolved":false,"context_lines":[{"line_number":455,"context_line":"                                                  \u0027choices_opt\u0027)"},{"line_number":456,"context_line":"    }"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"    content_scenarios \u003d ["},{"line_number":459,"context_line":"        (scenario_2[\u0027name\u0027], {"},{"line_number":460,"context_line":"            \u0027name_scenario\u0027: scenario_2[\u0027name\u0027],"},{"line_number":461,"context_line":"            \u0027opts\u0027: ["}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_21048ec5","line":458,"updated":"2018-07-06 22:10:20.000000000","message":"If we\u0027re only going to use the even scenarios, can we remove the odd ones above?  And maybe renumber them (although that could be done as a followup).","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"05ec4a240886f1f429dd2c37d3c0210a551f9633","unresolved":false,"context_lines":[{"line_number":455,"context_line":"                                                  \u0027choices_opt\u0027)"},{"line_number":456,"context_line":"    }"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"    content_scenarios \u003d ["},{"line_number":459,"context_line":"        (scenario_2[\u0027name\u0027], {"},{"line_number":460,"context_line":"            \u0027name_scenario\u0027: scenario_2[\u0027name\u0027],"},{"line_number":461,"context_line":"            \u0027opts\u0027: ["}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_7808a726","line":458,"in_reply_to":"5f7c97a3_21048ec5","updated":"2018-07-11 16:21:00.000000000","message":"Done","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"41e9b8638f3ad58cb5012e68ecfc4c0446946e80","unresolved":false,"context_lines":[{"line_number":566,"context_line":"        with open(output_file, \u0027r\u0027) as f:"},{"line_number":567,"context_line":"            actual \u003d f.read()"},{"line_number":568,"context_line":"            self.assertEqual(self.expected, actual)"},{"line_number":569,"context_line":"        if self.name_scenario \u003d\u003d \u0027scenario 1\u0027:"},{"line_number":570,"context_line":"            log_warning \u003d self.log_warning"},{"line_number":571,"context_line":"            mock_log.warning.assert_called_once_with(log_warning)"},{"line_number":572,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_41c0aae0","line":569,"updated":"2018-07-06 22:10:20.000000000","message":"I would prefer not to select this based on scenario name, and instead just have a boolean in the scenario that we can check for whether a warning is expected.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"05ec4a240886f1f429dd2c37d3c0210a551f9633","unresolved":false,"context_lines":[{"line_number":566,"context_line":"        with open(output_file, \u0027r\u0027) as f:"},{"line_number":567,"context_line":"            actual \u003d f.read()"},{"line_number":568,"context_line":"            self.assertEqual(self.expected, actual)"},{"line_number":569,"context_line":"        if self.name_scenario \u003d\u003d \u0027scenario 1\u0027:"},{"line_number":570,"context_line":"            log_warning \u003d self.log_warning"},{"line_number":571,"context_line":"            mock_log.warning.assert_called_once_with(log_warning)"},{"line_number":572,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_982263a6","line":569,"in_reply_to":"5f7c97a3_41c0aae0","updated":"2018-07-11 16:21:00.000000000","message":"Yes, but it will be removed in the next patch set. Because I will remove log_warning so no need to check it.","commit_id":"ec80197a6906b338af5a463c1119be02b7a79500"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"e2a65dafbe0fdbbd0b71a6d0306a4099672e6ae5","unresolved":false,"context_lines":[{"line_number":189,"context_line":"# b - \u003cNo description provided\u003e"},{"line_number":190,"context_line":"# c - \u003cNo description provided\u003e"},{"line_number":191,"context_line":"# Deprecated group/name - [group1]/deprecated_choices_opt"},{"line_number":192,"context_line":"choices_opt \u003d a_new"},{"line_number":193,"context_line":"\u0027\u0027\u0027"},{"line_number":194,"context_line":"}"},{"line_number":195,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"3f79a3b5_413961d4","line":192,"range":{"start_line":192,"start_character":14,"end_line":192,"end_character":19},"updated":"2018-08-15 21:33:28.000000000","message":"a_new isn\u0027t a valid possible value for the new opt.","commit_id":"4dd890cf31c1a7cf568309c1674ead061ea648ac"},{"author":{"_account_id":28278,"name":"Duc Nguyen","email":"ducnv41@viettel.com.vn","username":"ducnv"},"change_message_id":"078db2902658ac8d953d9004defade349ade57ba","unresolved":false,"context_lines":[{"line_number":189,"context_line":"# b - \u003cNo description provided\u003e"},{"line_number":190,"context_line":"# c - \u003cNo description provided\u003e"},{"line_number":191,"context_line":"# Deprecated group/name - [group1]/deprecated_choices_opt"},{"line_number":192,"context_line":"choices_opt \u003d a_new"},{"line_number":193,"context_line":"\u0027\u0027\u0027"},{"line_number":194,"context_line":"}"},{"line_number":195,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"3f79a3b5_a29069ee","line":192,"range":{"start_line":192,"start_character":14,"end_line":192,"end_character":19},"in_reply_to":"3f79a3b5_413961d4","updated":"2018-08-16 12:28:24.000000000","message":"You are right, I will fix this.","commit_id":"4dd890cf31c1a7cf568309c1674ead061ea648ac"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"e2a65dafbe0fdbbd0b71a6d0306a4099672e6ae5","unresolved":false,"context_lines":[{"line_number":296,"context_line":"                                  choices\u003d(\u0027a_updated\u0027, \u0027b_updated\u0027,"},{"line_number":297,"context_line":"                                           \u0027c_updated\u0027, \u0027a\u0027, \u0027b\u0027,"},{"line_number":298,"context_line":"                                           \u0027c\u0027),"},{"line_number":299,"context_line":"                                  upgrade_value\u003d{\u0027a\u0027: \u0027a_new\u0027,"},{"line_number":300,"context_line":"                                                 \u0027b\u0027: \u0027b_new\u0027,"},{"line_number":301,"context_line":"                                                 \u0027c\u0027: \u0027c_new\u0027},"},{"line_number":302,"context_line":"                                  help\u003d\u0027This option is to replace \u0027"}],"source_content_type":"text/x-python","patch_set":29,"id":"3f79a3b5_c17b3189","line":299,"updated":"2018-08-15 21:33:28.000000000","message":"These mappings should go to a valid choice for the opt.  It might be a good followup to validate that the upgrade values are valid when running the migration.  That doesn\u0027t need to be done in this patch already though (it\u0027s big enough as it is :-).","commit_id":"4dd890cf31c1a7cf568309c1674ead061ea648ac"},{"author":{"_account_id":28278,"name":"Duc Nguyen","email":"ducnv41@viettel.com.vn","username":"ducnv"},"change_message_id":"078db2902658ac8d953d9004defade349ade57ba","unresolved":false,"context_lines":[{"line_number":296,"context_line":"                                  choices\u003d(\u0027a_updated\u0027, \u0027b_updated\u0027,"},{"line_number":297,"context_line":"                                           \u0027c_updated\u0027, \u0027a\u0027, \u0027b\u0027,"},{"line_number":298,"context_line":"                                           \u0027c\u0027),"},{"line_number":299,"context_line":"                                  upgrade_value\u003d{\u0027a\u0027: \u0027a_new\u0027,"},{"line_number":300,"context_line":"                                                 \u0027b\u0027: \u0027b_new\u0027,"},{"line_number":301,"context_line":"                                                 \u0027c\u0027: \u0027c_new\u0027},"},{"line_number":302,"context_line":"                                  help\u003d\u0027This option is to replace \u0027"}],"source_content_type":"text/x-python","patch_set":29,"id":"3f79a3b5_42a07542","line":299,"in_reply_to":"3f79a3b5_c17b3189","updated":"2018-08-16 12:28:24.000000000","message":"thanks, I will update it.","commit_id":"4dd890cf31c1a7cf568309c1674ead061ea648ac"}],"releasenotes/notes/add-oslo-config-migrator-3ab7b22802dca1d7.yaml":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"0b184f942d8655727520218fb3e8efcf1138f930","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    oslo.config now support to migrate configuration files from N to N+1"},{"line_number":5,"context_line":"    version. Use the ``oslo-config-migrator`` command to migrate."}],"source_content_type":"text/x-yaml","patch_set":32,"id":"3f79a3b5_13096d82","line":4,"range":{"start_line":4,"start_character":64,"end_line":4,"end_character":72},"updated":"2018-09-21 18:17:46.000000000","message":"I would probably refer to this as N-1 to N since you need to have the new code in place before running the migration, but the main point is that it moves from one release to the next so I\u0027m not too concerned about it.\n\nWe do still need docs that explain the flow for using the tool too.","commit_id":"697ee7e1e4e5ca3fca2cb081e2a2176a21e5e730"}],"setup.cfg":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2919af6c8a2fd8099b92873a45773c8b92728697","unresolved":false,"context_lines":[{"line_number":30,"context_line":"[entry_points]"},{"line_number":31,"context_line":"console_scripts \u003d"},{"line_number":32,"context_line":"    oslo-config-generator \u003d oslo_config.generator:main"},{"line_number":33,"context_line":"    oslo-handling-generator \u003d oslo_config.configchanges:main"},{"line_number":34,"context_line":"oslo.config.opts \u003d"},{"line_number":35,"context_line":"    oslo.config \u003d oslo_config._list_opts:list_opts"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-ttcn-cfg","patch_set":11,"id":"bf659307_9299106e","line":33,"updated":"2018-04-13 21:59:43.000000000","message":"I would prefer to call this oslo-config-migrator or something along those lines.\n\nGenerally speaking I think I would prefer to refer to what we\u0027re doing here as config migration rather than config handling.  I think it\u0027s more descriptive of what\u0027s happening.","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"94a8fe178023093ddf30e3c910b9c7d26bc71242","unresolved":false,"context_lines":[{"line_number":30,"context_line":"[entry_points]"},{"line_number":31,"context_line":"console_scripts \u003d"},{"line_number":32,"context_line":"    oslo-config-generator \u003d oslo_config.generator:main"},{"line_number":33,"context_line":"    oslo-handling-generator \u003d oslo_config.configchanges:main"},{"line_number":34,"context_line":"oslo.config.opts \u003d"},{"line_number":35,"context_line":"    oslo.config \u003d oslo_config._list_opts:list_opts"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-ttcn-cfg","patch_set":11,"id":"9f6a8fd7_a7705674","line":33,"in_reply_to":"bf659307_9299106e","updated":"2018-04-17 08:43:44.000000000","message":"To be honest, i don\u0027t like my command name so much but there is no idea to change it.\n\nI quite like the name, it will be updated surely :)","commit_id":"f2a2ad4e07cac1f1e9eb0272444ed9fb1d2c96b6"}]}
