)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"5d107ce472f26dd24576126946ecde439d0f86e4","unresolved":false,"context_lines":[{"line_number":12,"context_line":"for ssl/pki_setup to clean up the exist generated files and rebuild"},{"line_number":13,"context_line":"the configure files. Also, if you run \"keystone-manage ssl_setup\""},{"line_number":14,"context_line":"more than once, it will print prompt message to tell you take"},{"line_number":15,"context_line":"--rebuild option to rebuild configure files."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ia1e6830c4c81d5a53317a522c526b79b67de1bce"},{"line_number":18,"context_line":"Closes-Bug: #1308778"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"baada198_7a713c76","line":15,"updated":"2014-07-25 04:33:43.000000000","message":"We\u0027re not creating/rebuilding configuration files right? These are SSL certificates and keys.","commit_id":"4c671b6ba9825223915fb1cefdaee6b2ea70f85a"}],"keystone/cli.py":[{"author":{"_account_id":11333,"name":"David J Hu","email":"david.hu@hpe.com","username":"dhu"},"change_message_id":"a972f956ac9df4110ae4ce335ccb9fb61a0609d6","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    def main(cls):"},{"line_number":132,"context_line":"        keystone_user_id, keystone_group_id \u003d cls.get_user_group()"},{"line_number":133,"context_line":"        conf_pki \u003d openssl.ConfigurePKI(keystone_user_id, keystone_group_id,"},{"line_number":134,"context_line":"                                        is_rebuild\u003dCONF.command.rebuild)"},{"line_number":135,"context_line":"        conf_pki.run()"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_dd63493f","line":134,"updated":"2014-07-10 23:24:41.000000000","message":"Instead of \"is_rebuild\", I would rename it to something more meaningful such as \"rebuild\" or \"rebuild_config_file\"","commit_id":"384de463e4784f5d75bf4e0cb452a483cff64692"},{"author":{"_account_id":11333,"name":"David J Hu","email":"david.hu@hpe.com","username":"dhu"},"change_message_id":"a972f956ac9df4110ae4ce335ccb9fb61a0609d6","unresolved":false,"context_lines":[{"line_number":144,"context_line":"    def main(cls):"},{"line_number":145,"context_line":"        keystone_user_id, keystone_group_id \u003d cls.get_user_group()"},{"line_number":146,"context_line":"        conf_ssl \u003d openssl.ConfigureSSL(keystone_user_id, keystone_group_id,"},{"line_number":147,"context_line":"                                        is_rebuild\u003dCONF.command.rebuild)"},{"line_number":148,"context_line":"        conf_ssl.run()"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_1dece18e","line":147,"updated":"2014-07-10 23:24:41.000000000","message":"Same as my comment above.","commit_id":"384de463e4784f5d75bf4e0cb452a483cff64692"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"2e737bda64cd73cf54a127a07f6271ef24b120f6","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        parser.add_argument(\u0027--keystone-user\u0027, required\u003drunning_as_root)"},{"line_number":98,"context_line":"        parser.add_argument(\u0027--keystone-group\u0027, required\u003drunning_as_root)"},{"line_number":99,"context_line":"        parser.add_argument(\u0027--rebuild\u0027, default\u003dFalse, action\u003d\u0027store_true\u0027,"},{"line_number":100,"context_line":"                            help\u003d(\u0027Rebuild the configure files.\u0027))"},{"line_number":101,"context_line":"        return parser"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_8815fc3e","line":100,"updated":"2014-07-24 17:53:56.000000000","message":"Should add to the help text of this argument explaining that this will erase previous configuration files and regenerate them.","commit_id":"824229eed85dadd13d735a03e3f3ebf55b4140d5"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"5d107ce472f26dd24576126946ecde439d0f86e4","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        parser.add_argument(\u0027--keystone-user\u0027, required\u003drunning_as_root)"},{"line_number":98,"context_line":"        parser.add_argument(\u0027--keystone-group\u0027, required\u003drunning_as_root)"},{"line_number":99,"context_line":"        parser.add_argument(\u0027--rebuild\u0027, default\u003dFalse, action\u003d\u0027store_true\u0027,"},{"line_number":100,"context_line":"                            help\u003d(\u0027Rebuild the configuration files. \u0027"},{"line_number":101,"context_line":"                                  \u0027Certificate_setup will erase previous \u0027"},{"line_number":102,"context_line":"                                  \u0027configuration files and regenerate them.\u0027))"},{"line_number":103,"context_line":"        return parser"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_7af85cc4","line":100,"updated":"2014-07-25 04:33:43.000000000","message":"Same issue with using \u0027configuration files\u0027. What is Certificate_setup?","commit_id":"4c671b6ba9825223915fb1cefdaee6b2ea70f85a"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4021f1b8880c74cc36bc49936655d14207fd92b8","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        parser.add_argument(\u0027--keystone-user\u0027, required\u003drunning_as_root)"},{"line_number":98,"context_line":"        parser.add_argument(\u0027--keystone-group\u0027, required\u003drunning_as_root)"},{"line_number":99,"context_line":"        parser.add_argument(\u0027--rebuild\u0027, default\u003dFalse, action\u003d\u0027store_true\u0027,"},{"line_number":100,"context_line":"                            help\u003d(\u0027Rebuild the configuration files: \u0027"},{"line_number":101,"context_line":"                                  \u0027erase previous configuration files and \u0027"},{"line_number":102,"context_line":"                                  \u0027regenerate them.\u0027))"},{"line_number":103,"context_line":"        return parser"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_039a1863","line":100,"updated":"2014-08-14 14:14:10.000000000","message":"When I think of \u0027configuration files\u0027, I think of files that are necessary to run the application. Not sure that these certificates fit that category. I believe @dstanek had a comment on this in patch set 5 as well.\n\nAs a new user, I would read this and think this option would regenerate my keystone.conf or paste.ini.","commit_id":"b632af467ceb312a80ec76242247d520bb008164"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"974f52d6b1f13338d122ffaeea23875dbb157f53","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        parser.add_argument(\u0027--keystone-user\u0027, required\u003drunning_as_root)"},{"line_number":105,"context_line":"        parser.add_argument(\u0027--keystone-group\u0027, required\u003drunning_as_root)"},{"line_number":106,"context_line":"        parser.add_argument(\u0027--rebuild\u0027, default\u003dFalse, action\u003d\u0027store_true\u0027,"},{"line_number":107,"context_line":"                            help\u003d(\u0027Rebuild the certificate configuration files\u0027"},{"line_number":108,"context_line":"                                  \u0027: erase previous configuration files and \u0027"},{"line_number":109,"context_line":"                                  \u0027regenerate them.\u0027))"},{"line_number":110,"context_line":"        return parser"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_fde8a5b4","line":107,"updated":"2014-09-15 01:05:08.000000000","message":"these aren\u0027t configuration files.\n\nChange this to \"Rebuild certificate files\"","commit_id":"4c2421c5da019f60f45089a53ebca35da6f106c1"}],"keystone/common/openssl.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"00b9a970d48a72036751014c67ced8adc2eb7710","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    return os.path.exists(file_path)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def remove_path_by_file(file_name):"},{"line_number":38,"context_line":"    path \u003d os.path.dirname(file_name)"},{"line_number":39,"context_line":"    if os.path.exists(path):"},{"line_number":40,"context_line":"        shutil.rmtree(path)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FdY8%3D","line":37,"updated":"2014-04-21 16:03:47.000000000","message":"This seems overly invasive. Why not just delete the file they want deleted? If they happen to put their cert in a directory with other files, you will wipe those out too?","commit_id":"de2f9c59bedf77289d8fb87d7270b395a156f416"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"145930824fcdaacfc51e691d40adc7defd988f34","unresolved":false,"context_lines":[{"line_number":37,"context_line":"def remove_path_by_file(file_name):"},{"line_number":38,"context_line":"    path \u003d os.path.dirname(file_name)"},{"line_number":39,"context_line":"    if os.path.exists(path):"},{"line_number":40,"context_line":"        shutil.rmtree(path)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"class BaseCertificateConfigure(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FTRk%3D","line":40,"updated":"2014-04-22 16:35:21.000000000","message":"\"i store my certs at /\", says the very sad user.","commit_id":"de2f9c59bedf77289d8fb87d7270b395a156f416"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"12938e8bbeef1e60b672fb1ae97cb1a3ee70c25a","unresolved":false,"context_lines":[{"line_number":37,"context_line":"def remove_path_by_file(file_name):"},{"line_number":38,"context_line":"    path \u003d os.path.dirname(file_name)"},{"line_number":39,"context_line":"    if os.path.exists(path):"},{"line_number":40,"context_line":"        shutil.rmtree(path)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"class BaseCertificateConfigure(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_342664b8","line":40,"in_reply_to":"AAAAXH%2F%2FTRk%3D","updated":"2014-05-27 21:05:31.000000000","message":"++ Please be surgical about deleting files specifically that must be removed to make this work.","commit_id":"de2f9c59bedf77289d8fb87d7270b395a156f416"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"d1774e6319168c4f0762d655d85ee3bff712a7ab","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                               \u0027-infiles\u0027, \u0027%(request_file)s\u0027])"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def run(self):"},{"line_number":197,"context_line":"        self.clean_files()"},{"line_number":198,"context_line":"        self.build_ssl_config_file()"},{"line_number":199,"context_line":"        self.build_ca_cert()"},{"line_number":200,"context_line":"        self.build_private_key()"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_0bf4d059","line":197,"updated":"2014-05-09 14:05:19.000000000","message":"Hmmm...should not do this, as it will leave you in an unstable state if you try to install and don\u0027t succeed in generating the new files.  Why does overwriting not work?","commit_id":"de2f9c59bedf77289d8fb87d7270b395a156f416"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"12938e8bbeef1e60b672fb1ae97cb1a3ee70c25a","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                               \u0027-infiles\u0027, \u0027%(request_file)s\u0027])"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def run(self):"},{"line_number":197,"context_line":"        self.clean_files()"},{"line_number":198,"context_line":"        self.build_ssl_config_file()"},{"line_number":199,"context_line":"        self.build_ca_cert()"},{"line_number":200,"context_line":"        self.build_private_key()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_f42b1c80","line":197,"updated":"2014-05-27 21:05:31.000000000","message":"Instead of forcing a cleanup, suggest warning that a cleanup is needed and instead require an explicit \"cleanup\" command \"ssl_cleanup\" from keystone-manage to do the deletion.","commit_id":"de2f9c59bedf77289d8fb87d7270b395a156f416"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7daeed38424ef41aa8eb18471e462e78c28dd0f3","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                               \u0027-infiles\u0027, \u0027%(request_file)s\u0027])"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def run(self):"},{"line_number":197,"context_line":"        self.clean_files()"},{"line_number":198,"context_line":"        self.build_ssl_config_file()"},{"line_number":199,"context_line":"        self.build_ca_cert()"},{"line_number":200,"context_line":"        self.build_private_key()"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_99bf30fb","line":197,"in_reply_to":"3ae8d1ca_c35e3345","updated":"2014-07-02 20:19:01.000000000","message":"ssl_setup is a development tool, in that case would it be OK to just print a list of files the developer should clean up manually before rerunning again? For example, we run ssl_setup and we detect that there is some clean up that needs to be done, present that information to the user, and gracefully exit?","commit_id":"de2f9c59bedf77289d8fb87d7270b395a156f416"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"27141c377db09cfb2d8de10ae515cc9aa836bbfd","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                               \u0027-infiles\u0027, \u0027%(request_file)s\u0027])"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def run(self):"},{"line_number":197,"context_line":"        self.clean_files()"},{"line_number":198,"context_line":"        self.build_ssl_config_file()"},{"line_number":199,"context_line":"        self.build_ca_cert()"},{"line_number":200,"context_line":"        self.build_private_key()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_c35e3345","line":197,"in_reply_to":"3ae8d1ca_f42b1c80","updated":"2014-05-29 04:55:13.000000000","message":"ssl_setup should be able to take options no? (we take options for db_sync) So couldn\u0027t an option be --cleanup","commit_id":"de2f9c59bedf77289d8fb87d7270b395a156f416"},{"author":{"_account_id":11333,"name":"David J Hu","email":"david.hu@hpe.com","username":"dhu"},"change_message_id":"bed22f180e560da4aa24b7fd1427e9dba2efbc27","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                               \u0027-infiles\u0027, \u0027%(request_file)s\u0027])"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def run(self):"},{"line_number":197,"context_line":"        self.clean_files()"},{"line_number":198,"context_line":"        self.build_ssl_config_file()"},{"line_number":199,"context_line":"        self.build_ca_cert()"},{"line_number":200,"context_line":"        self.build_private_key()"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_f92f4cf4","line":197,"in_reply_to":"baada198_99bf30fb","updated":"2014-07-02 20:31:44.000000000","message":"++ or prompt user before removal.","commit_id":"de2f9c59bedf77289d8fb87d7270b395a156f416"},{"author":{"_account_id":11333,"name":"David J Hu","email":"david.hu@hpe.com","username":"dhu"},"change_message_id":"a972f956ac9df4110ae4ce335ccb9fb61a0609d6","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    \"\"\""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def __init__(self, conf_obj, keystone_user, keystone_group,"},{"line_number":49,"context_line":"                 is_rebuild, **kwargs):"},{"line_number":50,"context_line":"        self.conf_dir \u003d os.path.dirname(conf_obj.ca_certs)"},{"line_number":51,"context_line":"        self.use_keystone_user \u003d keystone_user"},{"line_number":52,"context_line":"        self.use_keystone_group \u003d keystone_group"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_dd98a91d","line":49,"updated":"2014-07-10 23:24:41.000000000","message":"Instead of \"is_rebuild\", I would rename it to something more meaningful such as \"rebuild\" or \"rebuild_config_file\"","commit_id":"384de463e4784f5d75bf4e0cb452a483cff64692"},{"author":{"_account_id":11333,"name":"David J Hu","email":"david.hu@hpe.com","username":"dhu"},"change_message_id":"a972f956ac9df4110ae4ce335ccb9fb61a0609d6","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.conf_dir \u003d os.path.dirname(conf_obj.ca_certs)"},{"line_number":51,"context_line":"        self.use_keystone_user \u003d keystone_user"},{"line_number":52,"context_line":"        self.use_keystone_group \u003d keystone_group"},{"line_number":53,"context_line":"        self.is_rebuild \u003d is_rebuild"},{"line_number":54,"context_line":"        self.ssl_config_file_name \u003d os.path.join(self.conf_dir, \"openssl.conf\")"},{"line_number":55,"context_line":"        self.request_file_name \u003d os.path.join(self.conf_dir, \"req.pem\")"},{"line_number":56,"context_line":"        self.ssl_dictionary \u003d {\u0027conf_dir\u0027: self.conf_dir,"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_9d539138","line":53,"updated":"2014-07-10 23:24:41.000000000","message":"Same comment as above.","commit_id":"384de463e4784f5d75bf4e0cb452a483cff64692"},{"author":{"_account_id":11333,"name":"David J Hu","email":"david.hu@hpe.com","username":"dhu"},"change_message_id":"a972f956ac9df4110ae4ce335ccb9fb61a0609d6","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        if (file_exists(ca_key_file) or file_exists(ca_cert) or"},{"line_number":94,"context_line":"                file_exists(signing_keyfile) or file_exists(signing_cert)):"},{"line_number":95,"context_line":"            if not self.is_rebuild:"},{"line_number":96,"context_line":"                print(\u0027Configure files have been generated already, take\u0027"},{"line_number":97,"context_line":"                      \u0027 --rebuild option to rebuild.\u0027)"},{"line_number":98,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_fd12cd60","line":95,"updated":"2014-07-10 23:24:41.000000000","message":"Same comment as above.","commit_id":"384de463e4784f5d75bf4e0cb452a483cff64692"},{"author":{"_account_id":11333,"name":"David J Hu","email":"david.hu@hpe.com","username":"dhu"},"change_message_id":"a972f956ac9df4110ae4ce335ccb9fb61a0609d6","unresolved":false,"context_lines":[{"line_number":229,"context_line":"    def __init__(self, keystone_user, keystone_group, is_rebuild\u003dFalse):"},{"line_number":230,"context_line":"        super(ConfigurePKI, self).__init__(CONF.signing,"},{"line_number":231,"context_line":"                                           keystone_user, keystone_group,"},{"line_number":232,"context_line":"                                           is_rebuild\u003dis_rebuild)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"class ConfigureSSL(BaseCertificateConfigure):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_dd3429fd","line":232,"updated":"2014-07-10 23:24:41.000000000","message":"Same comment as above.","commit_id":"384de463e4784f5d75bf4e0cb452a483cff64692"},{"author":{"_account_id":11333,"name":"David J Hu","email":"david.hu@hpe.com","username":"dhu"},"change_message_id":"a972f956ac9df4110ae4ce335ccb9fb61a0609d6","unresolved":false,"context_lines":[{"line_number":242,"context_line":"    def __init__(self, keystone_user, keystone_group, is_rebuild\u003dFalse):"},{"line_number":243,"context_line":"        super(ConfigureSSL, self).__init__(CONF.ssl,"},{"line_number":244,"context_line":"                                           keystone_user, keystone_group,"},{"line_number":245,"context_line":"                                           is_rebuild\u003dis_rebuild)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"BaseCertificateConfigure.sslconfig \u003d \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_3d2525c2","line":245,"updated":"2014-07-10 23:24:41.000000000","message":"Same comment as above.","commit_id":"384de463e4784f5d75bf4e0cb452a483cff64692"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5cb90a5e8fa28d900ee323b20e05307da7af3907","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        LOG.info(\u0027 \u0027.join(to_exec))"},{"line_number":85,"context_line":"        environment.subprocess.check_call(to_exec)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def try_clean_up_exist_files(self):"},{"line_number":88,"context_line":"        ca_key_file \u003d self.ssl_dictionary[\u0027ca_private_key\u0027]"},{"line_number":89,"context_line":"        ca_cert \u003d self.ssl_dictionary[\u0027ca_cert\u0027]"},{"line_number":90,"context_line":"        signing_keyfile \u003d self.ssl_dictionary[\u0027signing_key\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_71df6866","line":87,"updated":"2014-07-21 17:51:20.000000000","message":"suggest: \n\n    def clean_up_existing_files():","commit_id":"b96cdc8e444756839095e73f0e947929d7c90d9c"},{"author":{"_account_id":11333,"name":"David J Hu","email":"david.hu@hpe.com","username":"dhu"},"change_message_id":"0875620c98d6a68b76d7f286497bc6b4ea6df37f","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                file_exists(signing_keyfile) or file_exists(signing_cert)):"},{"line_number":95,"context_line":"            if not self.rebuild:"},{"line_number":96,"context_line":"                print(\u0027Configure files have been generated already, take\u0027"},{"line_number":97,"context_line":"                      \u0027 --rebuild option to rebuild.\u0027)"},{"line_number":98,"context_line":"                return False"},{"line_number":99,"context_line":"            else:"},{"line_number":100,"context_line":"                delete_file(ca_key_file)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_893134ef","line":97,"updated":"2014-07-21 18:38:38.000000000","message":"I would say \"Configuration files exist,  use --rebuild option to rebuild.\"","commit_id":"b96cdc8e444756839095e73f0e947929d7c90d9c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5cb90a5e8fa28d900ee323b20e05307da7af3907","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                delete_file(ca_key_file)"},{"line_number":101,"context_line":"                delete_file(ca_cert)"},{"line_number":102,"context_line":"                delete_file(signing_keyfile)"},{"line_number":103,"context_line":"                delete_file(signing_cert)"},{"line_number":104,"context_line":"                return True"},{"line_number":105,"context_line":"        else:"},{"line_number":106,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_7143e83e","line":103,"updated":"2014-07-21 17:51:20.000000000","message":"what about something like http://paste.openstack.org/show/87450/","commit_id":"b96cdc8e444756839095e73f0e947929d7c90d9c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5cb90a5e8fa28d900ee323b20e05307da7af3907","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    def run(self):"},{"line_number":211,"context_line":"        if not self.try_clean_up_exist_files():"},{"line_number":212,"context_line":"            # Configure files exist but users do not want to rebuild"},{"line_number":213,"context_line":"            return"},{"line_number":214,"context_line":"        self.build_ssl_config_file()"},{"line_number":215,"context_line":"        self.build_ca_cert()"},{"line_number":216,"context_line":"        self.build_private_key()"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_31ab30d7","line":213,"updated":"2014-07-21 17:51:20.000000000","message":"from above paste, we could change this to be: \n\n    return_code \u003d self.try_clean_up_exist_files()\n    if return_code !\u003d 0:\n        # The `return_code` in this case would be the number of files the user\n        # is overwriting without passing --rebuild\n        return","commit_id":"b96cdc8e444756839095e73f0e947929d7c90d9c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"644ce588cbbea3012c1a40d126fd14fed61d214c","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        exist_file_num \u003d 0"},{"line_number":89,"context_line":"        for file_path in files_to_clean:"},{"line_number":90,"context_line":"            if file_exists(file_path) and self.rebuild:"},{"line_number":91,"context_line":"                # The file exists but users want to rebuild it, so blow it away"},{"line_number":92,"context_line":"                os.remove(file_path)"},{"line_number":93,"context_line":"            elif file_exists(file_path) and not self.rebuild:"},{"line_number":94,"context_line":"                exist_file_num +\u003d 1"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_e5f94183","line":91,"updated":"2014-07-24 17:51:52.000000000","message":"the user*","commit_id":"824229eed85dadd13d735a03e3f3ebf55b4140d5"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"644ce588cbbea3012c1a40d126fd14fed61d214c","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            elif file_exists(file_path) and not self.rebuild:"},{"line_number":94,"context_line":"                exist_file_num +\u003d 1"},{"line_number":95,"context_line":"            else:"},{"line_number":96,"context_line":"                # If we hit this the file doesn\u0027t exist and needs to be"},{"line_number":97,"context_line":"                # created regardless"},{"line_number":98,"context_line":"                continue"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_a55f4974","line":96,"updated":"2014-07-24 17:51:52.000000000","message":"nit: add a comma after \u0027this\u0027.\n\n    # If we hit this,","commit_id":"824229eed85dadd13d735a03e3f3ebf55b4140d5"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"644ce588cbbea3012c1a40d126fd14fed61d214c","unresolved":false,"context_lines":[{"line_number":204,"context_line":"    def run(self):"},{"line_number":205,"context_line":"        exist_file_num \u003d self.clean_up_exist_files()"},{"line_number":206,"context_line":"        if exist_file_num !\u003d 0:"},{"line_number":207,"context_line":"            print(\u0027Configuration files exist, use --rebuild option to\u0027"},{"line_number":208,"context_line":"                  \u0027 rebuild.\u0027)"},{"line_number":209,"context_line":"            return"},{"line_number":210,"context_line":"        self.build_ssl_config_file()"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_05ac759e","line":207,"updated":"2014-07-24 17:51:52.000000000","message":"use LOG instead.","commit_id":"824229eed85dadd13d735a03e3f3ebf55b4140d5"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"836289afdd28ad9e4746417ab213fb16fb730a5b","unresolved":false,"context_lines":[{"line_number":204,"context_line":"    def run(self):"},{"line_number":205,"context_line":"        exist_file_num \u003d self.clean_up_exist_files()"},{"line_number":206,"context_line":"        if exist_file_num !\u003d 0:"},{"line_number":207,"context_line":"            print(\u0027Configuration files exist, use --rebuild option to\u0027"},{"line_number":208,"context_line":"                  \u0027 rebuild.\u0027)"},{"line_number":209,"context_line":"            return"},{"line_number":210,"context_line":"        self.build_ssl_config_file()"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_d715c13d","line":207,"in_reply_to":"baada198_05ac759e","updated":"2014-07-25 02:59:09.000000000","message":"Here, we want to show clearly prompt information to the users. If use LOG, the uses do not know what happened until they check the logs.","commit_id":"824229eed85dadd13d735a03e3f3ebf55b4140d5"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"5d107ce472f26dd24576126946ecde439d0f86e4","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            if file_exists(file_path) and self.rebuild:"},{"line_number":91,"context_line":"                # The file exists but the user want to rebuild it, so blow it"},{"line_number":92,"context_line":"                # away"},{"line_number":93,"context_line":"                os.remove(file_path)"},{"line_number":94,"context_line":"            elif file_exists(file_path) and not self.rebuild:"},{"line_number":95,"context_line":"                exist_file_num +\u003d 1"},{"line_number":96,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_dafb28bc","line":93,"updated":"2014-07-25 04:33:43.000000000","message":"What happens when this fails? Seems like it would result in a traceback.","commit_id":"4c671b6ba9825223915fb1cefdaee6b2ea70f85a"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"5d107ce472f26dd24576126946ecde439d0f86e4","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            else:"},{"line_number":97,"context_line":"                # If we hit this, the file doesn\u0027t exist and needs to be"},{"line_number":98,"context_line":"                # created regardless"},{"line_number":99,"context_line":"                continue"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        return exist_file_num"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_9ae37004","line":99,"updated":"2014-07-25 04:33:43.000000000","message":"This else block can be deleted since the code will naturally go to the top of the loop anyway.","commit_id":"4c671b6ba9825223915fb1cefdaee6b2ea70f85a"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"4ba1ab843338f18ea3e94819cba5cfe6b50e1156","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            else:"},{"line_number":97,"context_line":"                # If we hit this, the file doesn\u0027t exist and needs to be"},{"line_number":98,"context_line":"                # created regardless"},{"line_number":99,"context_line":"                continue"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        return exist_file_num"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_d66aeab3","line":99,"in_reply_to":"baada198_48d63dc4","updated":"2014-07-28 03:58:47.000000000","message":"If I\u0027m reading this correctly it will fall into this block and then just continue to the top of the \u0027for\u0027 loop again. If that\u0027s the case what use is it to have the else here?","commit_id":"4c671b6ba9825223915fb1cefdaee6b2ea70f85a"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"ce9ee935176ccd2e638579cbff6e050ab3aea1aa","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            else:"},{"line_number":97,"context_line":"                # If we hit this, the file doesn\u0027t exist and needs to be"},{"line_number":98,"context_line":"                # created regardless"},{"line_number":99,"context_line":"                continue"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        return exist_file_num"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_48d63dc4","line":99,"in_reply_to":"baada198_9ae37004","updated":"2014-07-28 02:39:31.000000000","message":"If the file does not exist, the code will go to this block.","commit_id":"4c671b6ba9825223915fb1cefdaee6b2ea70f85a"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"5d107ce472f26dd24576126946ecde439d0f86e4","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                # created regardless"},{"line_number":99,"context_line":"                continue"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        return exist_file_num"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def build_ssl_config_file(self):"},{"line_number":104,"context_line":"        utils.make_dirs(os.path.dirname(self.ssl_config_file_name),"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_7ae69c17","line":101,"updated":"2014-07-25 04:33:43.000000000","message":"Why are we keeping a count? This could simply be a boolean and then instead or the +1 on line 95 you can return.\n\nThe other option is to keep a list of files that already exist so you can print them out, but I suspect that if they have one the have them all.","commit_id":"4c671b6ba9825223915fb1cefdaee6b2ea70f85a"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"5d107ce472f26dd24576126946ecde439d0f86e4","unresolved":false,"context_lines":[{"line_number":205,"context_line":"    def run(self):"},{"line_number":206,"context_line":"        exist_file_num \u003d self.clean_up_exist_files()"},{"line_number":207,"context_line":"        if exist_file_num !\u003d 0:"},{"line_number":208,"context_line":"            print(\u0027Configuration files exist, use --rebuild option to\u0027"},{"line_number":209,"context_line":"                  \u0027 rebuild.\u0027)"},{"line_number":210,"context_line":"            return"},{"line_number":211,"context_line":"        self.build_ssl_config_file()"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_1abf60d1","line":208,"updated":"2014-07-25 04:33:43.000000000","message":"I agree with Lance that this should be a LOG statement. Maybe a LOG.error?\n\nThis is just a thought....looking for core dev input...\nMaybe one of the things that needs to happen is that this actually raises an exception and the print happens in bin/keystone-manage. I\u0027m a little uncomfortable having a print in \"library\" code.","commit_id":"4c671b6ba9825223915fb1cefdaee6b2ea70f85a"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"057de2286132fbb1e7750e6b04d6afaca8d217db","unresolved":false,"context_lines":[{"line_number":205,"context_line":"    def run(self):"},{"line_number":206,"context_line":"        exist_file_num \u003d self.clean_up_exist_files()"},{"line_number":207,"context_line":"        if exist_file_num !\u003d 0:"},{"line_number":208,"context_line":"            print(\u0027Configuration files exist, use --rebuild option to\u0027"},{"line_number":209,"context_line":"                  \u0027 rebuild.\u0027)"},{"line_number":210,"context_line":"            return"},{"line_number":211,"context_line":"        self.build_ssl_config_file()"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_76d1e5cc","line":208,"in_reply_to":"baada198_1abf60d1","updated":"2014-08-14 03:49:21.000000000","message":"agreed","commit_id":"4c671b6ba9825223915fb1cefdaee6b2ea70f85a"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1c35604360e82469ed19327bddf99a7595907c5b","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                    # it away"},{"line_number":93,"context_line":"                    try:"},{"line_number":94,"context_line":"                        os.remove(file_path)"},{"line_number":95,"context_line":"                    except OSError as exc:"},{"line_number":96,"context_line":"                        LOG.error(\u0027Remove file (%s) failed: %s\u0027 %"},{"line_number":97,"context_line":"                                  (file_path, exc.strerror))"},{"line_number":98,"context_line":"                        return False"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_8fba9f6c","line":95,"updated":"2014-08-15 14:37:58.000000000","message":"is this path tested? Can we mock out the os.remove method and return an exception so we can test this case?","commit_id":"b632af467ceb312a80ec76242247d520bb008164"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"8fadd3bc6935ae20a395ccd5ab0296b33aeaff78","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                else:"},{"line_number":100,"context_line":"                    return False"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        return True"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def build_ssl_config_file(self):"},{"line_number":105,"context_line":"        utils.make_dirs(os.path.dirname(self.ssl_config_file_name),"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_cf4f37bd","line":102,"updated":"2014-08-15 14:37:06.000000000","message":"Something else that might be helpful here would be to log which certs already exist to the user with logic similar to; \n\nhttp://pasteraw.com/pt8sgwep003onp43xn9v03k7fk95m5p\n\nand give the following as output. \n\nhttp://pasteraw.com/p15bf0pspy5cmu3yf8v2lpi5ckzgwuh","commit_id":"b632af467ceb312a80ec76242247d520bb008164"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"6ac28c340b2cd049168b62911024e09ee3def094","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                else:"},{"line_number":100,"context_line":"                    return False"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        return True"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def build_ssl_config_file(self):"},{"line_number":105,"context_line":"        utils.make_dirs(os.path.dirname(self.ssl_config_file_name),"}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_327939fd","line":102,"in_reply_to":"7ac7a964_cf4f37bd","updated":"2014-08-18 02:59:14.000000000","message":"Nice! Thank you.","commit_id":"b632af467ceb312a80ec76242247d520bb008164"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"bf1dc19a18f896d412777bc68c854a8a4af8d426","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        files_to_clean \u003d [self.ssl_dictionary[\u0027ca_private_key\u0027],"},{"line_number":84,"context_line":"                          self.ssl_dictionary[\u0027ca_cert\u0027],"},{"line_number":85,"context_line":"                          self.ssl_dictionary[\u0027signing_key\u0027],"},{"line_number":86,"context_line":"                          self.ssl_dictionary[\u0027signing_cert\u0027]]"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        existing_files \u003d []"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_5db92614","line":86,"updated":"2014-08-26 16:03:33.000000000","message":"can this same thing be done for the pki_setup files?","commit_id":"03809a345ae43fd150309283f40bf988e1242d14"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"24d9d0ca94b6ac257f013d0a1b42cfe62f8e129a","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        files_to_clean \u003d [self.ssl_dictionary[\u0027ca_private_key\u0027],"},{"line_number":84,"context_line":"                          self.ssl_dictionary[\u0027ca_cert\u0027],"},{"line_number":85,"context_line":"                          self.ssl_dictionary[\u0027signing_key\u0027],"},{"line_number":86,"context_line":"                          self.ssl_dictionary[\u0027signing_cert\u0027]]"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        existing_files \u003d []"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_3908e390","line":86,"in_reply_to":"1abeadc6_5db92614","updated":"2014-08-27 06:26:17.000000000","message":"Yes.","commit_id":"03809a345ae43fd150309283f40bf988e1242d14"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"d99fa4fe8f9a9ca3f199492d860684b15c30426f","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            e.output \u003d output"},{"line_number":101,"context_line":"            raise e"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def clean_up_exist_files(self):"},{"line_number":104,"context_line":"        files_to_clean \u003d [self.ssl_dictionary[\u0027ca_private_key\u0027],"},{"line_number":105,"context_line":"                          self.ssl_dictionary[\u0027ca_cert\u0027],"},{"line_number":106,"context_line":"                          self.ssl_dictionary[\u0027signing_key\u0027],"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_d5c9a7ad","line":103,"updated":"2014-09-08 16:38:32.000000000","message":"_existing_","commit_id":"4c2421c5da019f60f45089a53ebca35da6f106c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"974f52d6b1f13338d122ffaeea23875dbb157f53","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        files_to_clean \u003d [self.ssl_dictionary[\u0027ca_private_key\u0027],"},{"line_number":105,"context_line":"                          self.ssl_dictionary[\u0027ca_cert\u0027],"},{"line_number":106,"context_line":"                          self.ssl_dictionary[\u0027signing_key\u0027],"},{"line_number":107,"context_line":"                          self.ssl_dictionary[\u0027signing_cert\u0027]]"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        existing_files \u003d []"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_5df0d190","line":107,"updated":"2014-09-15 01:05:08.000000000","message":"leave the trailing , so that this is easier to extend.","commit_id":"4c2421c5da019f60f45089a53ebca35da6f106c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"974f52d6b1f13338d122ffaeea23875dbb157f53","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        for file_path in files_to_clean:"},{"line_number":112,"context_line":"            if file_exists(file_path):"},{"line_number":113,"context_line":"                if self.rebuild:"},{"line_number":114,"context_line":"                    # The file exists but the user want to rebuild it, so blow"},{"line_number":115,"context_line":"                    # it away"},{"line_number":116,"context_line":"                    try:"},{"line_number":117,"context_line":"                        os.remove(file_path)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_ddfcc174","line":114,"updated":"2014-09-15 01:05:08.000000000","message":"change \"want\" to \"wants\"","commit_id":"4c2421c5da019f60f45089a53ebca35da6f106c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"974f52d6b1f13338d122ffaeea23875dbb157f53","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                    try:"},{"line_number":117,"context_line":"                        os.remove(file_path)"},{"line_number":118,"context_line":"                    except OSError as exc:"},{"line_number":119,"context_line":"                        LOG.error(\u0027Remove file (%s) failed: %s\u0027 %"},{"line_number":120,"context_line":"                                  (file_path, exc.strerror))"},{"line_number":121,"context_line":"                        existing_files.append(file_path)"},{"line_number":122,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_fdffc563","line":119,"updated":"2014-09-15 01:05:08.000000000","message":"use , rather than %","commit_id":"4c2421c5da019f60f45089a53ebca35da6f106c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"974f52d6b1f13338d122ffaeea23875dbb157f53","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def run(self):"},{"line_number":230,"context_line":"        existing_files \u003d self.clean_up_exist_files()"},{"line_number":231,"context_line":"        if len(existing_files) \u003e 0:"},{"line_number":232,"context_line":"            LOG.error(\u0027The following cert files already exist, use --rebuild\u0027"},{"line_number":233,"context_line":"                      \u0027 to regenerate:\u0027)"},{"line_number":234,"context_line":"            for f in existing_files:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_9d2dd900","line":231,"updated":"2014-09-15 01:05:08.000000000","message":"no need to use len since a list is false if it\u0027s empty:\n\n if existing_files:","commit_id":"4c2421c5da019f60f45089a53ebca35da6f106c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"974f52d6b1f13338d122ffaeea23875dbb157f53","unresolved":false,"context_lines":[{"line_number":229,"context_line":"    def run(self):"},{"line_number":230,"context_line":"        existing_files \u003d self.clean_up_exist_files()"},{"line_number":231,"context_line":"        if len(existing_files) \u003e 0:"},{"line_number":232,"context_line":"            LOG.error(\u0027The following cert files already exist, use --rebuild\u0027"},{"line_number":233,"context_line":"                      \u0027 to regenerate:\u0027)"},{"line_number":234,"context_line":"            for f in existing_files:"},{"line_number":235,"context_line":"                LOG.error(\u0027%s already exists\u0027, f)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_3df5cd82","line":232,"updated":"2014-09-15 01:05:08.000000000","message":"If I use --rebuild and a file can\u0027t be deleted, this is going to say I should use --rebuild to regenerate it, so this is going to be confusing. The command shouldn\u0027t tell me to rebuild when I\u0027m already using rebuild.","commit_id":"4c2421c5da019f60f45089a53ebca35da6f106c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"974f52d6b1f13338d122ffaeea23875dbb157f53","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        existing_files \u003d self.clean_up_exist_files()"},{"line_number":231,"context_line":"        if len(existing_files) \u003e 0:"},{"line_number":232,"context_line":"            LOG.error(\u0027The following cert files already exist, use --rebuild\u0027"},{"line_number":233,"context_line":"                      \u0027 to regenerate:\u0027)"},{"line_number":234,"context_line":"            for f in existing_files:"},{"line_number":235,"context_line":"                LOG.error(\u0027%s already exists\u0027, f)"},{"line_number":236,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_dd33e15f","line":233,"updated":"2014-09-15 01:05:08.000000000","message":"This shouldn\u0027t be logged, it should be printed to stderr as a normal error message.","commit_id":"4c2421c5da019f60f45089a53ebca35da6f106c1"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"393d54a46b8fbd67b772fbeb6ff7c8184b50008e","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                    try:"},{"line_number":118,"context_line":"                        os.remove(file_path)"},{"line_number":119,"context_line":"                    except OSError as exc:"},{"line_number":120,"context_line":"                        LOG.error(_LE(\u0027Remove file %(file_path)s failed: \u0027"},{"line_number":121,"context_line":"                                      \u0027%(error)s\u0027),"},{"line_number":122,"context_line":"                                  {\u0027file_path\u0027: file_path,"},{"line_number":123,"context_line":"                                   \u0027error\u0027: exc.strerror})"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa98f980_cb6bc6ef","line":120,"updated":"2014-09-17 15:37:37.000000000","message":"This sounds awkward. Maybe something more like:\n\n%(file_path)r can\u0027t be removed: %(error)s\n\nor:\n\nFailed to remove file %(file_path)r: %(error)s","commit_id":"d40b9afe6b83d10b78a7113bde61ac9f7e5bfe18"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"393d54a46b8fbd67b772fbeb6ff7c8184b50008e","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        try:"},{"line_number":234,"context_line":"            existing_files \u003d self.clean_up_existing_files()"},{"line_number":235,"context_line":"        except OSError:"},{"line_number":236,"context_line":"            print(\u0027One error occurs during rebuild cert files.\u0027)"},{"line_number":237,"context_line":"            return"},{"line_number":238,"context_line":"        if existing_files:"},{"line_number":239,"context_line":"            print(\u0027The following cert files already exist, use --rebuild to \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa98f980_6e44a8b7","line":236,"updated":"2014-09-17 15:37:37.000000000","message":"This is also awkward. Maybe:\n\nAn error occurred when rebuilding cert files.","commit_id":"d40b9afe6b83d10b78a7113bde61ac9f7e5bfe18"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"393d54a46b8fbd67b772fbeb6ff7c8184b50008e","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            return"},{"line_number":238,"context_line":"        if existing_files:"},{"line_number":239,"context_line":"            print(\u0027The following cert files already exist, use --rebuild to \u0027"},{"line_number":240,"context_line":"                  \u0027regenerate:\u0027)"},{"line_number":241,"context_line":"            for f in existing_files:"},{"line_number":242,"context_line":"                print(\u0027%s already exists\u0027 % f)"},{"line_number":243,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa98f980_8e770c08","line":240,"updated":"2014-09-17 15:37:37.000000000","message":"I think we want to be more explicit with this message.\n\n... use --rebuild to remove the existing files before regenerating","commit_id":"d40b9afe6b83d10b78a7113bde61ac9f7e5bfe18"}],"keystone/tests/test_cert_setup.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"974f52d6b1f13338d122ffaeea23875dbb157f53","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        self.assertTrue(os.path.exists(CONF.ssl.keyfile))"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def test_fetch_signing_cert(self, rebuild\u003dFalse):"},{"line_number":106,"context_line":"        pki \u003d openssl.ConfigurePKI(None, None, rebuild\u003drebuild)"},{"line_number":107,"context_line":"        pki.run()"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        # NOTE(jamielennox): Use request directly because certificate"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_5d47f1bb","line":106,"updated":"2014-09-15 01:05:08.000000000","message":"Why change this test? It doesn\u0027t make sense to me to change it.","commit_id":"4c2421c5da019f60f45089a53ebca35da6f106c1"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"bb94140ff1496e15c32dc9662fecddecf3593f20","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        self.assertTrue(os.path.exists(CONF.ssl.keyfile))"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def test_fetch_signing_cert(self, rebuild\u003dFalse):"},{"line_number":106,"context_line":"        pki \u003d openssl.ConfigurePKI(None, None, rebuild\u003drebuild)"},{"line_number":107,"context_line":"        pki.run()"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        # NOTE(jamielennox): Use request directly because certificate"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_c39dbbbd","line":106,"in_reply_to":"fa98f980_5d47f1bb","updated":"2014-09-15 07:32:10.000000000","message":"This test is used by test_fetch_signing_cert_when_rebuild in line 138.","commit_id":"4c2421c5da019f60f45089a53ebca35da6f106c1"}]}
