)]}'
{"neutron/plugins/vmware/dbexts/networkgw_db.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"653e05e8c2dd725dfc58782c669efcc278fe80cd","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    message \u003d _(\"Network Gateway Device %(device_id)s could not be found.\")"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"class InvalidSecurityCertificate(exceptions.BadRequest):"},{"line_number":65,"context_line":"    message \u003d _(\"An invalid security certificate was specified for the \""},{"line_number":66,"context_line":"                \"gateway device %(device_id)s. Certificates must be \""},{"line_number":67,"context_line":"                \"enclosed between \u0027-----BEGIN CERTIFICATE-----\u0027 and \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FfLM%3D","line":64,"updated":"2014-03-17 16:03:55.000000000","message":"have you considered using the fault map to avoid creating this exception class? This does not really add anything more than the other one.","commit_id":"e3ecb50d73f85f913842ff744ed283af340c72b7"}],"neutron/plugins/vmware/nsxlib/__init__.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a73e4b30d7b9a66497667675e839b3863846542e","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        raise exception.NotFound()"},{"line_number":101,"context_line":"    except api_exc.ReadOnlyMode:"},{"line_number":102,"context_line":"        raise nsx_exc.MaintenanceInProgress()"},{"line_number":103,"context_line":"    except api_exc.InvalidSecurityCertificate:"},{"line_number":104,"context_line":"        raise nsx_exc.InvalidSecurityCertificate()"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2FUzY%3D","line":103,"updated":"2014-03-18 16:05:43.000000000","message":"this does not feel right here, as it can only be raised by a subset of the API\u0027s being called, and hence does not really belong here. I\u0027d suggest to catch api_exc.InvalidSecurityCertificate and reraising nsx_exc.InvalidSecurityCertificate in the plugin methods for the l2 gateway management.","commit_id":"3c6d41a87df20318db6410d70b85baf17ce9b57e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c9b95288bd2bbe6dbf1bbbdeb046edec3a452801","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        raise exception.NotFound()"},{"line_number":101,"context_line":"    except api_exc.ReadOnlyMode:"},{"line_number":102,"context_line":"        raise nsx_exc.MaintenanceInProgress()"},{"line_number":103,"context_line":"    except api_exc.InvalidSecurityCertificate:"},{"line_number":104,"context_line":"        raise nsx_exc.InvalidSecurityCertificate()"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2FRYU%3D","line":103,"in_reply_to":"AAAAWH%2F%2FUzY%3D","updated":"2014-03-18 23:41:00.000000000","message":"meh","commit_id":"3c6d41a87df20318db6410d70b85baf17ce9b57e"}],"neutron/plugins/vmware/plugins/base.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"1ea7a81e6d9ec5f6b826520c5d50a998a8ddbe8e","unresolved":false,"context_lines":[{"line_number":2152,"context_line":"                       \u0027status\u0027: device_status})"},{"line_number":2153,"context_line":"            return device_status"},{"line_number":2154,"context_line":"        except api_exc.InvalidSecurityCertificate:"},{"line_number":2155,"context_line":"            LOG.info(_(\"The request contains an invalid security certificate.\""},{"line_number":2156,"context_line":"                       \"Gateway device:%s will be rolled back\"), neutron_id)"},{"line_number":2157,"context_line":"            self._rollback_gw_device(context, neutron_id, is_create\u003dTrue)"},{"line_number":2158,"context_line":"            raise networkgw_db.InvalidSecurityCertificate(device_id\u003dneutron_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FhRM%3D","line":2155,"updated":"2014-03-17 11:32:09.000000000","message":"space after period","commit_id":"7c51de4934d03ed4aa13894fc05476f9159d98c6"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"1ea7a81e6d9ec5f6b826520c5d50a998a8ddbe8e","unresolved":false,"context_lines":[{"line_number":2198,"context_line":"                       \u0027status\u0027: device_status})"},{"line_number":2199,"context_line":"            return device_status"},{"line_number":2200,"context_line":"        except api_exc.InvalidSecurityCertificate:"},{"line_number":2201,"context_line":"            LOG.info(_(\"The request contains an invalid security certificate.\""},{"line_number":2202,"context_line":"                       \"Gateway device:%s will be rolled back\"), neutron_id)"},{"line_number":2203,"context_line":"            self._rollback_gw_device(context, neutron_id,"},{"line_number":2204,"context_line":"                                     gw_data\u003dold_gateway_device_data)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FhRI%3D","line":2201,"updated":"2014-03-17 11:32:09.000000000","message":"ditto","commit_id":"7c51de4934d03ed4aa13894fc05476f9159d98c6"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"653e05e8c2dd725dfc58782c669efcc278fe80cd","unresolved":false,"context_lines":[{"line_number":2151,"context_line":"                       \u0027nsx_id\u0027: nsx_res[\u0027uuid\u0027],"},{"line_number":2152,"context_line":"                       \u0027status\u0027: device_status})"},{"line_number":2153,"context_line":"            return device_status"},{"line_number":2154,"context_line":"        except api_exc.InvalidSecurityCertificate:"},{"line_number":2155,"context_line":"            LOG.info(_(\"The request contains an invalid security certificate. \""},{"line_number":2156,"context_line":"                       \"Gateway device:%s will be rolled back\"), neutron_id)"},{"line_number":2157,"context_line":"            self._rollback_gw_device(context, neutron_id, is_create\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FfKA%3D","line":2154,"updated":"2014-03-17 16:03:55.000000000","message":"if you followed my suggestion in networkgw_db.py you could unitfy these excepts into one.","commit_id":"e3ecb50d73f85f913842ff744ed283af340c72b7"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"653e05e8c2dd725dfc58782c669efcc278fe80cd","unresolved":false,"context_lines":[{"line_number":2197,"context_line":"                       \u0027nsx_id\u0027: nsx_id,"},{"line_number":2198,"context_line":"                       \u0027status\u0027: device_status})"},{"line_number":2199,"context_line":"            return device_status"},{"line_number":2200,"context_line":"        except api_exc.InvalidSecurityCertificate:"},{"line_number":2201,"context_line":"            LOG.info(_(\"The request contains an invalid security certificate. \""},{"line_number":2202,"context_line":"                       \"Gateway device:%s will be rolled back\"), neutron_id)"},{"line_number":2203,"context_line":"            self._rollback_gw_device(context, neutron_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FfJo%3D","line":2200,"updated":"2014-03-17 16:03:55.000000000","message":"so here","commit_id":"e3ecb50d73f85f913842ff744ed283af340c72b7"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a73e4b30d7b9a66497667675e839b3863846542e","unresolved":false,"context_lines":[{"line_number":2154,"context_line":"                       \u0027status\u0027: device_status})"},{"line_number":2155,"context_line":"            return device_status"},{"line_number":2156,"context_line":"        except nsx_exc.InvalidSecurityCertificate:"},{"line_number":2157,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2158,"context_line":"                LOG.info(_(\"The request contains an invalid security \""},{"line_number":2159,"context_line":"                           \"certificate. Gateway device:%s will be \""},{"line_number":2160,"context_line":"                           \"rolled back\"), neutron_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2FUyo%3D","line":2157,"updated":"2014-03-18 16:05:43.000000000","message":"if we want to keep these exception handlers separated I\u0027d suggest to move move the logging logic into _rollback_gw_device to reduce code duplication and hence reduce the chance of introducing code errors later on.","commit_id":"3c6d41a87df20318db6410d70b85baf17ce9b57e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c9b95288bd2bbe6dbf1bbbdeb046edec3a452801","unresolved":false,"context_lines":[{"line_number":2154,"context_line":"                       \u0027status\u0027: device_status})"},{"line_number":2155,"context_line":"            return device_status"},{"line_number":2156,"context_line":"        except nsx_exc.InvalidSecurityCertificate:"},{"line_number":2157,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2158,"context_line":"                LOG.info(_(\"The request contains an invalid security \""},{"line_number":2159,"context_line":"                           \"certificate. Gateway device:%s will be \""},{"line_number":2160,"context_line":"                           \"rolled back\"), neutron_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2FRYY%3D","line":2157,"in_reply_to":"AAAAWH%2F%2FUyo%3D","updated":"2014-03-18 23:41:00.000000000","message":"I think you\u0027re actually suggesting to merge the exception handlers. That\u0027s fine by me, the exception would be raised anyway so exception specific logging is not needed.","commit_id":"3c6d41a87df20318db6410d70b85baf17ce9b57e"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a73e4b30d7b9a66497667675e839b3863846542e","unresolved":false,"context_lines":[{"line_number":2200,"context_line":"                       \u0027nsx_id\u0027: nsx_id,"},{"line_number":2201,"context_line":"                       \u0027status\u0027: device_status})"},{"line_number":2202,"context_line":"            return device_status"},{"line_number":2203,"context_line":"        except nsx_exc.InvalidSecurityCertificate:"},{"line_number":2204,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2205,"context_line":"                LOG.info(_(\"The request contains an invalid security \""},{"line_number":2206,"context_line":"                           \"certificate. Gateway device:%s will be \""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2FUyE%3D","line":2203,"updated":"2014-03-18 16:05:43.000000000","message":"same thing here","commit_id":"3c6d41a87df20318db6410d70b85baf17ce9b57e"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e0e7914bfd859ef37599ec6b5a49e60e9aa36d9b","unresolved":false,"context_lines":[{"line_number":2103,"context_line":"    def _rollback_gw_device(self, context, device_id,"},{"line_number":2104,"context_line":"                            gw_data\u003dNone, new_status\u003dNone,"},{"line_number":2105,"context_line":"                            is_create\u003dFalse):"},{"line_number":2106,"context_line":"        LOG.info(_(\"Rolling back database changes for gateway device %s \""},{"line_number":2107,"context_line":"                   \"because of an error in the NSX backend\"), device_id)"},{"line_number":2108,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":2109,"context_line":"            query \u003d self._model_query("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2FM74%3D","line":2106,"updated":"2014-03-19 13:54:34.000000000","message":"is this the right log level for an error message (we don\u0027t know if it has been induced by bad input)? You could pass the right log level to the method (LOG.info, LOG.warn, LOG.error) as an input.","commit_id":"1d97dcdc881a05235a27229b84b12313c6e0a4fe"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"f6d8632924c99d3e60cc4b3231f562037a7e3101","unresolved":false,"context_lines":[{"line_number":2103,"context_line":"    def _rollback_gw_device(self, context, device_id,"},{"line_number":2104,"context_line":"                            gw_data\u003dNone, new_status\u003dNone,"},{"line_number":2105,"context_line":"                            is_create\u003dFalse):"},{"line_number":2106,"context_line":"        LOG.info(_(\"Rolling back database changes for gateway device %s \""},{"line_number":2107,"context_line":"                   \"because of an error in the NSX backend\"), device_id)"},{"line_number":2108,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":2109,"context_line":"            query \u003d self._model_query("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B04Q%3D","line":2106,"in_reply_to":"AAAAWH%2F%2FM74%3D","updated":"2014-03-24 00:16:25.000000000","message":"My opinion is that this method has the only task to rollback a DB change. Whether it\u0027s because of an error or not, it\u0027s none this method should be concerned about.\n\nIt\u0027s up to the callers, which might be reacting to error conditions to choose the appropriate logging level.","commit_id":"1d97dcdc881a05235a27229b84b12313c6e0a4fe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e0e7914bfd859ef37599ec6b5a49e60e9aa36d9b","unresolved":false,"context_lines":[{"line_number":2194,"context_line":"                       \u0027status\u0027: device_status})"},{"line_number":2195,"context_line":"            return device_status"},{"line_number":2196,"context_line":"        except (nsx_exc.InvalidSecurityCertificate, api_exc.NsxApiException):"},{"line_number":2197,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2198,"context_line":"                self._rollback_gw_device(context, neutron_id,"},{"line_number":2199,"context_line":"                                         gw_data\u003dold_gateway_device_data)"},{"line_number":2200,"context_line":"        except n_exc.NotFound:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2FM6g%3D","line":2197,"updated":"2014-03-19 13:54:34.000000000","message":"why don\u0027t we move the clause with within the roolback_gw_device method?","commit_id":"1d97dcdc881a05235a27229b84b12313c6e0a4fe"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"d362413e919ceba4d17c4767174be00a24c084c5","unresolved":false,"context_lines":[{"line_number":2194,"context_line":"                       \u0027status\u0027: device_status})"},{"line_number":2195,"context_line":"            return device_status"},{"line_number":2196,"context_line":"        except (nsx_exc.InvalidSecurityCertificate, api_exc.NsxApiException):"},{"line_number":2197,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2198,"context_line":"                self._rollback_gw_device(context, neutron_id,"},{"line_number":2199,"context_line":"                                         gw_data\u003dold_gateway_device_data)"},{"line_number":2200,"context_line":"        except n_exc.NotFound:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B00Q%3D","line":2197,"in_reply_to":"AAAAWH%2F%2B014%3D","updated":"2014-03-24 00:35:49.000000000","message":"After mehing a while I\u0027ve decided against following your suggestion.\n\nsave_and_reraise_exception has an __exit__ hook which will turn out invoking six.reraise in any cause (well unless self.reraise is set to False explicitly).\n\nI want to keep an option to be able to use _rollback_gw_device even if there is no exception to handle.\n\nanyway, this is a \"meh\" answer. If you feel differently just let me know.","commit_id":"1d97dcdc881a05235a27229b84b12313c6e0a4fe"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"0f7e261ded3658d17003e44e2d2ac8c1ecebf66b","unresolved":false,"context_lines":[{"line_number":2194,"context_line":"                       \u0027status\u0027: device_status})"},{"line_number":2195,"context_line":"            return device_status"},{"line_number":2196,"context_line":"        except (nsx_exc.InvalidSecurityCertificate, api_exc.NsxApiException):"},{"line_number":2197,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2198,"context_line":"                self._rollback_gw_device(context, neutron_id,"},{"line_number":2199,"context_line":"                                         gw_data\u003dold_gateway_device_data)"},{"line_number":2200,"context_line":"        except n_exc.NotFound:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B014%3D","line":2197,"in_reply_to":"AAAAWH%2F%2B04E%3D","updated":"2014-03-24 00:28:59.000000000","message":"meh","commit_id":"1d97dcdc881a05235a27229b84b12313c6e0a4fe"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"f6d8632924c99d3e60cc4b3231f562037a7e3101","unresolved":false,"context_lines":[{"line_number":2194,"context_line":"                       \u0027status\u0027: device_status})"},{"line_number":2195,"context_line":"            return device_status"},{"line_number":2196,"context_line":"        except (nsx_exc.InvalidSecurityCertificate, api_exc.NsxApiException):"},{"line_number":2197,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2198,"context_line":"                self._rollback_gw_device(context, neutron_id,"},{"line_number":2199,"context_line":"                                         gw_data\u003dold_gateway_device_data)"},{"line_number":2200,"context_line":"        except n_exc.NotFound:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B04E%3D","line":2197,"in_reply_to":"AAAAWH%2F%2FM6g%3D","updated":"2014-03-24 00:16:25.000000000","message":"because in the case below the code rolls back but does not raise","commit_id":"1d97dcdc881a05235a27229b84b12313c6e0a4fe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e0e7914bfd859ef37599ec6b5a49e60e9aa36d9b","unresolved":false,"context_lines":[{"line_number":2202,"context_line":"            # The DB change should be rolled back and the status must"},{"line_number":2203,"context_line":"            # be put in error"},{"line_number":2204,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2205,"context_line":"                LOG.exception(_(\"Unable to update gateway device: %s on NSX \""},{"line_number":2206,"context_line":"                                \"backend, as the gateway was not found on \""},{"line_number":2207,"context_line":"                                \"the NSX backend.\"), neutron_id)"},{"line_number":2208,"context_line":"                self._rollback_gw_device(context, neutron_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2FM7E%3D","line":2205,"updated":"2014-03-19 13:54:34.000000000","message":"any reason why this is left here?","commit_id":"1d97dcdc881a05235a27229b84b12313c6e0a4fe"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"f6d8632924c99d3e60cc4b3231f562037a7e3101","unresolved":false,"context_lines":[{"line_number":2202,"context_line":"            # The DB change should be rolled back and the status must"},{"line_number":2203,"context_line":"            # be put in error"},{"line_number":2204,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2205,"context_line":"                LOG.exception(_(\"Unable to update gateway device: %s on NSX \""},{"line_number":2206,"context_line":"                                \"backend, as the gateway was not found on \""},{"line_number":2207,"context_line":"                                \"the NSX backend.\"), neutron_id)"},{"line_number":2208,"context_line":"                self._rollback_gw_device(context, neutron_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B038%3D","line":2205,"in_reply_to":"AAAAWH%2F%2FM7E%3D","updated":"2014-03-24 00:16:25.000000000","message":"no reason that any reasonable human being can think of","commit_id":"1d97dcdc881a05235a27229b84b12313c6e0a4fe"}]}
