)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":9,"context_line":"Blueprint l3-ext-gw-modes"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This patch introduces an API extension for enabling or disabling"},{"line_number":12,"context_line":"source/destination NAT on the router gateway interface, and implements"},{"line_number":13,"context_line":"support for this extension in the l3 agent, which has also been"},{"line_number":14,"context_line":"refactored in order to ensure SNAT rules are applied (or removed)"},{"line_number":15,"context_line":"in a single place in the process_router routine."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"AAAAPH%2F%2F63Q%3D","line":12,"updated":"2013-05-20 10:11:25.000000000","message":"This patch  introduces only SNAT enabling/disabling now.","commit_id":"98913027184bf6ee49f62f8ac235c7e181ca7f5b"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":9,"context_line":"Blueprint l3-ext-gw-modes"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This patch introduces an API extension for enabling or disabling"},{"line_number":12,"context_line":"source/destination NAT on the router gateway interface, and implements"},{"line_number":13,"context_line":"support for this extension in the l3 agent, which has also been"},{"line_number":14,"context_line":"refactored in order to ensure SNAT rules are applied (or removed)"},{"line_number":15,"context_line":"in a single place in the process_router routine."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"AAAAPH%2F%2Fz28%3D","line":12,"in_reply_to":"AAAAPH%2F%2F63Q%3D","updated":"2013-05-22 15:10:52.000000000","message":"ah thanks for spotting al this references to the old code","commit_id":"98913027184bf6ee49f62f8ac235c7e181ca7f5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":20,"context_line":"The resource extension process is also slightly changed so that an"},{"line_number":21,"context_line":"API extension can specify which extension should be processed before"},{"line_number":22,"context_line":"its attributes can be processed. This is needed to ensure the"},{"line_number":23,"context_line":"proper validator for external_gateway_info is installed."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: Ia80cb56135229366b1706dd3c6d366e40cde1500"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"AAAAPH%2F%2F63M%3D","line":23,"updated":"2013-05-20 10:11:25.000000000","message":"L.20-23 is split into the separate patch and it needs to be removed.","commit_id":"98913027184bf6ee49f62f8ac235c7e181ca7f5b"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":20,"context_line":"The resource extension process is also slightly changed so that an"},{"line_number":21,"context_line":"API extension can specify which extension should be processed before"},{"line_number":22,"context_line":"its attributes can be processed. This is needed to ensure the"},{"line_number":23,"context_line":"proper validator for external_gateway_info is installed."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: Ia80cb56135229366b1706dd3c6d366e40cde1500"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"AAAAPH%2F%2Fz24%3D","line":23,"in_reply_to":"AAAAPH%2F%2F63M%3D","updated":"2013-05-22 15:10:52.000000000","message":"Done","commit_id":"98913027184bf6ee49f62f8ac235c7e181ca7f5b"}],"quantum/agent/l3_agent.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"534851bd7f79b85a30203bc9754b78d0e72b9943","unresolved":false,"context_lines":[{"line_number":338,"context_line":"                self._handle_router_snat_rules("},{"line_number":339,"context_line":"                    ri, ex_gw_port, internal_cidrs,"},{"line_number":340,"context_line":"                    interface_name, action\u003d\u0027remove_rule\u0027)"},{"line_number":341,"context_line":"        elif ri.ex_gw_port and not ex_gw_port:"},{"line_number":342,"context_line":"                # Remove SNAT rules"},{"line_number":343,"context_line":"                self._handle_router_snat_rules("},{"line_number":344,"context_line":"                    ri, ri.ex_gw_port, internal_cidrs,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FyVM%3D","line":341,"updated":"2013-03-27 16:37:33.000000000","message":"Isn\u0027t ex_gw_port guaranteed to be false, from above if?","commit_id":"5e527045e13e37046733469943992f4f9976aa06"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":338,"context_line":"                self._handle_router_snat_rules("},{"line_number":339,"context_line":"                    ri, ex_gw_port, internal_cidrs,"},{"line_number":340,"context_line":"                    interface_name, action\u003d\u0027remove_rule\u0027)"},{"line_number":341,"context_line":"        elif ri.ex_gw_port and not ex_gw_port:"},{"line_number":342,"context_line":"                # Remove SNAT rules"},{"line_number":343,"context_line":"                self._handle_router_snat_rules("},{"line_number":344,"context_line":"                    ri, ri.ex_gw_port, internal_cidrs,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FxqU%3D","line":341,"in_reply_to":"AAAAOH%2F%2FyVM%3D","updated":"2013-03-27 22:30:57.000000000","message":"Done","commit_id":"5e527045e13e37046733469943992f4f9976aa06"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":349,"context_line":"            self.process_router_floating_ips(ri, ex_gw_port)"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        ri.ex_gw_port \u003d ex_gw_port"},{"line_number":352,"context_line":"        ri.enable_snat \u003d ri.router.get(\u0027enable_snat\u0027)"},{"line_number":353,"context_line":"        self.routes_updated(ri)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def _handle_router_snat_rules(self, ri, ex_gw_port, internal_cidrs,"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FwO4%3D","line":352,"updated":"2013-05-23 20:31:47.000000000","message":"seems odd to be assigning a value to a property of the object that owns both properties.  Can we encapsulate the logic within RouterInfo?  Maybe something that sets an action flag that can be used and then cleared?  This would also allow us to only call _handle_router_snat_rules once with the action if set.  Maybe something like:\n\nif ri.snat_action:\n    self._handle_router_snat_rules(...)\n    ri.clear_snat_action()","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":349,"context_line":"            self.process_router_floating_ips(ri, ex_gw_port)"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        ri.ex_gw_port \u003d ex_gw_port"},{"line_number":352,"context_line":"        ri.enable_snat \u003d ri.router.get(\u0027enable_snat\u0027)"},{"line_number":353,"context_line":"        self.routes_updated(ri)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def _handle_router_snat_rules(self, ri, ex_gw_port, internal_cidrs,"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FrZc%3D","line":352,"in_reply_to":"AAAAPH%2F%2FwO4%3D","updated":"2013-05-27 14:57:47.000000000","message":"Done","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":355,"context_line":"    def _handle_router_snat_rules(self, ri, ex_gw_port, internal_cidrs,"},{"line_number":356,"context_line":"                                  interface_name, action):"},{"line_number":357,"context_line":"        ex_gw_ip \u003d ex_gw_port[\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]"},{"line_number":358,"context_line":"        for (c, r) in self.external_gateway_nat_rules(ex_gw_ip,"},{"line_number":359,"context_line":"                                                      internal_cidrs,"},{"line_number":360,"context_line":"                                                      interface_name):"},{"line_number":361,"context_line":"            # This is an internal method so we can assume the caller"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FwOc%3D","line":358,"updated":"2013-05-23 20:31:47.000000000","message":"for rule in self.external_gateway_nat_rules(ex_gw_ip,","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":355,"context_line":"    def _handle_router_snat_rules(self, ri, ex_gw_port, internal_cidrs,"},{"line_number":356,"context_line":"                                  interface_name, action):"},{"line_number":357,"context_line":"        ex_gw_ip \u003d ex_gw_port[\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]"},{"line_number":358,"context_line":"        for (c, r) in self.external_gateway_nat_rules(ex_gw_ip,"},{"line_number":359,"context_line":"                                                      internal_cidrs,"},{"line_number":360,"context_line":"                                                      interface_name):"},{"line_number":361,"context_line":"            # This is an internal method so we can assume the caller"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FrZs%3D","line":358,"in_reply_to":"AAAAPH%2F%2FwOc%3D","updated":"2013-05-27 14:57:47.000000000","message":"Done","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":360,"context_line":"                                                      interface_name):"},{"line_number":361,"context_line":"            # This is an internal method so we can assume the caller"},{"line_number":362,"context_line":"            # knows which actions are valid and which not"},{"line_number":363,"context_line":"            getattr(ri.iptables_manager.ipv4[\u0027nat\u0027], action)(c, r)"},{"line_number":364,"context_line":"        ri.iptables_manager.apply()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def process_router_floating_ips(self, ri, ex_gw_port):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FwOI%3D","line":363,"updated":"2013-05-23 20:31:47.000000000","message":"getattr(ri.iptables_manager.ipv4[\u0027nat\u0027], action)(*rule)","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":360,"context_line":"                                                      interface_name):"},{"line_number":361,"context_line":"            # This is an internal method so we can assume the caller"},{"line_number":362,"context_line":"            # knows which actions are valid and which not"},{"line_number":363,"context_line":"            getattr(ri.iptables_manager.ipv4[\u0027nat\u0027], action)(c, r)"},{"line_number":364,"context_line":"        ri.iptables_manager.apply()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def process_router_floating_ips(self, ri, ex_gw_port):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FrZw%3D","line":363,"in_reply_to":"AAAAPH%2F%2FwOI%3D","updated":"2013-05-27 14:57:47.000000000","message":"Done","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"}],"quantum/api/extensions.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":457,"context_line":"            for ext_name in exts_to_process.keys():"},{"line_number":458,"context_line":"                ext \u003d exts_to_process[ext_name]"},{"line_number":459,"context_line":"                if not hasattr(ext, \u0027get_extended_resources\u0027):"},{"line_number":460,"context_line":"                    continue"},{"line_number":461,"context_line":"                if hasattr(ext, \u0027update_attributes_map\u0027):"},{"line_number":462,"context_line":"                    update_exts.append(ext)"},{"line_number":463,"context_line":"                if hasattr(ext, \u0027get_required_extensions\u0027):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAOn%2F%2FVhc%3D","line":460,"updated":"2013-05-14 09:34:10.000000000","message":"Can\u0027t we remove \"del exts_to_process[ext_name]\" here? extensions without get_extended_resources is not removed forever in this loop.","commit_id":"895bfa0096613a3744bcfb2484ce6283207bd00a"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":459,"context_line":"                if not hasattr(ext, \u0027get_extended_resources\u0027):"},{"line_number":460,"context_line":"                    continue"},{"line_number":461,"context_line":"                if hasattr(ext, \u0027update_attributes_map\u0027):"},{"line_number":462,"context_line":"                    update_exts.append(ext)"},{"line_number":463,"context_line":"                if hasattr(ext, \u0027get_required_extensions\u0027):"},{"line_number":464,"context_line":"                    # Process extension only if all required extensions"},{"line_number":465,"context_line":"                    # have been processed already"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAOn%2F%2FVh4%3D","line":462,"updated":"2013-05-14 09:34:10.000000000","message":"This patch adds dependency support for extensions. get_required_extensions approach is easy to understand.\n\n[Question] update_attributes_map is introduced to extend attributes of extension resources. Can we remove update_attributes_map by defining get_required_extension. I feel update_attributes_map approach is a little difficult to know the dependencies since update_attributes_map needs to be defined in extensions to be extended.","commit_id":"895bfa0096613a3744bcfb2484ce6283207bd00a"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":459,"context_line":"                if not hasattr(ext, \u0027get_extended_resources\u0027):"},{"line_number":460,"context_line":"                    continue"},{"line_number":461,"context_line":"                if hasattr(ext, \u0027update_attributes_map\u0027):"},{"line_number":462,"context_line":"                    update_exts.append(ext)"},{"line_number":463,"context_line":"                if hasattr(ext, \u0027get_required_extensions\u0027):"},{"line_number":464,"context_line":"                    # Process extension only if all required extensions"},{"line_number":465,"context_line":"                    # have been processed already"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAO3%2F%2F%2FdI%3D","line":462,"in_reply_to":"AAAAOn%2F%2FVh4%3D","updated":"2013-05-15 13:13:35.000000000","message":"We can, but let\u0027s deal with each bit separately.\nThe extension framework unfortunately it\u0027s one of those bits of quantum which have been hacked a lot, so it\u0027s often not easy to understand what\u0027s going on.","commit_id":"895bfa0096613a3744bcfb2484ce6283207bd00a"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":485,"context_line":"                # Exit loop as no progress was made"},{"line_number":486,"context_line":"                break"},{"line_number":487,"context_line":"        if exts_to_process:"},{"line_number":488,"context_line":"            # NOTE(salv-orlando): Consider wheter this error should be fatal"},{"line_number":489,"context_line":"            LOG.error(_(\"It was impossible to process the following \""},{"line_number":490,"context_line":"                        \"extensions: %s because of missing requirements.\"),"},{"line_number":491,"context_line":"                      \u0027,\u0027.join(exts_to_process.keys()))"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAOn%2F%2FVj8%3D","line":488,"updated":"2013-05-14 09:34:10.000000000","message":"When a critical error is detected in quantum-server, are there any consensus how the server behaves: the server dies, just a error log is printed or others?\n\nwheter -\u003e whether","commit_id":"895bfa0096613a3744bcfb2484ce6283207bd00a"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":485,"context_line":"                # Exit loop as no progress was made"},{"line_number":486,"context_line":"                break"},{"line_number":487,"context_line":"        if exts_to_process:"},{"line_number":488,"context_line":"            # NOTE(salv-orlando): Consider wheter this error should be fatal"},{"line_number":489,"context_line":"            LOG.error(_(\"It was impossible to process the following \""},{"line_number":490,"context_line":"                        \"extensions: %s because of missing requirements.\"),"},{"line_number":491,"context_line":"                      \u0027,\u0027.join(exts_to_process.keys()))"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAO3%2F%2F%2Fc4%3D","line":488,"in_reply_to":"AAAAOn%2F%2FVj8%3D","updated":"2013-05-15 13:13:35.000000000","message":"thanks for noticing the typo.\n\nThe consensus for critical configuration errors is to die.\nIn this case I\u0027m not sure the error is really critical.\nThis means that an extension can\u0027t be loaded because a prerequisite extension is missing.\n\nThe server won\u0027t work as expected (some extensions won\u0027t be available), but the core should still work fine.","commit_id":"895bfa0096613a3744bcfb2484ce6283207bd00a"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":454,"context_line":"        # is made in a whole iteration"},{"line_number":455,"context_line":"        while exts_to_process:"},{"line_number":456,"context_line":"            processed_ext_count \u003d len(processed_exts)"},{"line_number":457,"context_line":"            for ext_name in exts_to_process.keys():"},{"line_number":458,"context_line":"                ext \u003d exts_to_process[ext_name]"},{"line_number":459,"context_line":"                if not hasattr(ext, \u0027get_extended_resources\u0027):"},{"line_number":460,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FwNU%3D","line":457,"updated":"2013-05-23 20:31:47.000000000","message":"Replace 457-458:\nfor ext_name, ext in exts_to_process.items():","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":454,"context_line":"        # is made in a whole iteration"},{"line_number":455,"context_line":"        while exts_to_process:"},{"line_number":456,"context_line":"            processed_ext_count \u003d len(processed_exts)"},{"line_number":457,"context_line":"            for ext_name in exts_to_process.keys():"},{"line_number":458,"context_line":"                ext \u003d exts_to_process[ext_name]"},{"line_number":459,"context_line":"                if not hasattr(ext, \u0027get_extended_resources\u0027):"},{"line_number":460,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FrZA%3D","line":457,"in_reply_to":"AAAAPH%2F%2FwNU%3D","updated":"2013-05-27 14:57:47.000000000","message":"Done","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":464,"context_line":"                    # Process extension only if all required extensions"},{"line_number":465,"context_line":"                    # have been processed already"},{"line_number":466,"context_line":"                    required_exts \u003d ext.get_required_extensions()"},{"line_number":467,"context_line":"                    if not all([x in processed_exts for x in required_exts]):"},{"line_number":468,"context_line":"                        continue"},{"line_number":469,"context_line":"                try:"},{"line_number":470,"context_line":"                    extended_attrs \u003d ext.get_extended_resources(version)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FwMw%3D","line":467,"updated":"2013-05-23 20:31:47.000000000","message":"I wonder if we can turn this into set math.  Otherwise we\u0027re at N^4 runtime for this method.","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":464,"context_line":"                    # Process extension only if all required extensions"},{"line_number":465,"context_line":"                    # have been processed already"},{"line_number":466,"context_line":"                    required_exts \u003d ext.get_required_extensions()"},{"line_number":467,"context_line":"                    if not all([x in processed_exts for x in required_exts]):"},{"line_number":468,"context_line":"                        continue"},{"line_number":469,"context_line":"                try:"},{"line_number":470,"context_line":"                    extended_attrs \u003d ext.get_extended_resources(version)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FrZM%3D","line":467,"in_reply_to":"AAAAPH%2F%2FwMw%3D","updated":"2013-05-27 14:57:47.000000000","message":"I\u0027ll see what I can do.","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"}],"quantum/api/v2/attributes.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":473,"context_line":"              \u0027type:uuid_or_none\u0027: _validate_uuid_or_none,"},{"line_number":474,"context_line":"              \u0027type:uuid_list\u0027: _validate_uuid_list,"},{"line_number":475,"context_line":"              \u0027type:values\u0027: _validate_values,"},{"line_number":476,"context_line":"              \u0027type:boolean\u0027: _validate_boolean}"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"# Define constants for base resource name"},{"line_number":479,"context_line":"NETWORK \u003d \u0027network\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2FnFI%3D","line":476,"updated":"2013-05-29 12:55:00.000000000","message":"i think that this was here an then it was removed with a convert to boolean :)","commit_id":"9f1d2e0c51ba47610f30d56de356f301c22e0dcd"}],"quantum/db/l3_db.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"534851bd7f79b85a30203bc9754b78d0e72b9943","unresolved":false,"context_lines":[{"line_number":513,"context_line":"            port_id\u003dinternal_port[\u0027id\u0027])"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"    def _internal_fip_assoc_data(self, context, fip):"},{"line_number":516,"context_line":"        \"\"\"Retrieve information concerning the internal port where"},{"line_number":517,"context_line":"        the a floating should be associated to."},{"line_number":518,"context_line":"        \"\"\""},{"line_number":519,"context_line":"        internal_port \u003d self._get_port(context, fip[\u0027port_id\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2Fhnc%3D","line":516,"updated":"2013-05-06 21:25:14.000000000","message":"Nit: PEP257 format","commit_id":"bec0ca4e76d02f6b3ec73b2893568ee3335b4994"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"534851bd7f79b85a30203bc9754b78d0e72b9943","unresolved":false,"context_lines":[{"line_number":558,"context_line":"            internal_subnet_id \u003d internal_port[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]"},{"line_number":559,"context_line":"        return internal_port, internal_subnet_id, internal_ip_address"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"    def get_assoc_data(self, context, fip, floating_network_id):"},{"line_number":562,"context_line":"        \"\"\"When a floating IP is associated with an internal port,"},{"line_number":563,"context_line":"        we need to extract/determine some data associated with the"},{"line_number":564,"context_line":"        internal port, including the internal_ip_address, and router_id."}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FhnQ%3D","line":561,"updated":"2013-05-06 21:25:14.000000000","message":"Ditto PEP 257","commit_id":"bec0ca4e76d02f6b3ec73b2893568ee3335b4994"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"534851bd7f79b85a30203bc9754b78d0e72b9943","unresolved":false,"context_lines":[{"line_number":854,"context_line":"    def _build_routers_list(self, routers, gw_ports):"},{"line_number":855,"context_line":"        gw_port_id_gw_port_dict \u003d {}"},{"line_number":856,"context_line":"        for gw_port in gw_ports:"},{"line_number":857,"context_line":"            gw_port_id_gw_port_dict[gw_port[\u0027id\u0027]] \u003d gw_port"},{"line_number":858,"context_line":"        for router in routers:"},{"line_number":859,"context_line":"            gw_port_id \u003d router[\u0027gw_port_id\u0027]"},{"line_number":860,"context_line":"            if gw_port_id:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FhnI%3D","line":857,"updated":"2013-05-06 21:25:14.000000000","message":"Consider using dict comprehension for this and next lines?","commit_id":"bec0ca4e76d02f6b3ec73b2893568ee3335b4994"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":854,"context_line":"    def _build_routers_list(self, routers, gw_ports):"},{"line_number":855,"context_line":"        gw_port_id_gw_port_dict \u003d {}"},{"line_number":856,"context_line":"        for gw_port in gw_ports:"},{"line_number":857,"context_line":"            gw_port_id_gw_port_dict[gw_port[\u0027id\u0027]] \u003d gw_port"},{"line_number":858,"context_line":"        for router in routers:"},{"line_number":859,"context_line":"            gw_port_id \u003d router[\u0027gw_port_id\u0027]"},{"line_number":860,"context_line":"            if gw_port_id:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2Fg7g%3D","line":857,"in_reply_to":"AAAAOn%2F%2FhnI%3D","updated":"2013-05-07 07:57:08.000000000","message":"Sorry about that, I just limited myself to moving existing code.","commit_id":"bec0ca4e76d02f6b3ec73b2893568ee3335b4994"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":54,"context_line":"    \"\"\"Represents a v2 quantum router.\"\"\""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":57,"context_line":"    tenant_id \u003d sa.Column(sa.String(255))"},{"line_number":58,"context_line":"    status \u003d sa.Column(sa.String(16))"},{"line_number":59,"context_line":"    admin_state_up \u003d sa.Column(sa.Boolean)"},{"line_number":60,"context_line":"    gw_port_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027))"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAOn%2F%2FXps%3D","line":57,"updated":"2013-05-13 13:15:14.000000000","message":"Is this change needed to use joined table inheritance? If so, it is better to add a comment why HasTenant cannot be used here.","commit_id":"e18deba985239eac5922e147e23b92aae2d08a65"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":54,"context_line":"    \"\"\"Represents a v2 quantum router.\"\"\""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":57,"context_line":"    tenant_id \u003d sa.Column(sa.String(255))"},{"line_number":58,"context_line":"    status \u003d sa.Column(sa.String(16))"},{"line_number":59,"context_line":"    admin_state_up \u003d sa.Column(sa.Boolean)"},{"line_number":60,"context_line":"    gw_port_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027))"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAO3%2F%2F%2FX0%3D","line":57,"in_reply_to":"AAAAOn%2F%2FXps%3D","updated":"2013-05-15 13:17:44.000000000","message":"Done","commit_id":"e18deba985239eac5922e147e23b92aae2d08a65"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":49,"context_line":"API_TO_DB_COLUMN_MAP \u003d {\u0027port_id\u0027: \u0027fixed_port_id\u0027}"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"class Router(model_base.BASEV2, models_v2.HasId):"},{"line_number":53,"context_line":"    \"\"\"Represents a v2 quantum router.\"\"\""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    name \u003d sa.Column(sa.String(255))"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FwL4%3D","line":52,"updated":"2013-05-23 20:31:47.000000000","message":"Why are we dropping HasTenant mixin?","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":49,"context_line":"API_TO_DB_COLUMN_MAP \u003d {\u0027port_id\u0027: \u0027fixed_port_id\u0027}"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"class Router(model_base.BASEV2, models_v2.HasId):"},{"line_number":53,"context_line":"    \"\"\"Represents a v2 quantum router.\"\"\""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    name \u003d sa.Column(sa.String(255))"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FrY4%3D","line":52,"in_reply_to":"AAAAPH%2F%2FwL4%3D","updated":"2013-05-27 14:57:47.000000000","message":"I thought I added a comment for that... but obviously is not there.\nI am using joined inheritance, and for some reason when SqlAlchemy translates the model into tables adds the tenant_id attribute to both \u0027routers\u0027 and the table inheriting from it.\n\nI\u0027ve investigated it briefly and it seems it has to do with the fact that the attribute is not primary key, but I do not have other details.","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"}],"quantum/db/l3_gwmode_db.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"534851bd7f79b85a30203bc9754b78d0e72b9943","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    # NOTE(salvatore-orlando): assess whether this is dangerous or clever"},{"line_number":51,"context_line":"    l3_db.Router \u003d RouterNatInfo"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _make_router_dict(self, router, fields\u003dNone):"},{"line_number":54,"context_line":"        res \u003d {\u0027id\u0027: router[\u0027id\u0027],"},{"line_number":55,"context_line":"               \u0027name\u0027: router[\u0027name\u0027],"},{"line_number":56,"context_line":"               \u0027tenant_id\u0027: router[\u0027tenant_id\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FyOE%3D","line":53,"updated":"2013-03-27 16:37:33.000000000","message":"I recall seeing this function in l3_db.py. Is it possible to do some reuse?","commit_id":"5e527045e13e37046733469943992f4f9976aa06"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"    # NOTE(salvatore-orlando): assess whether this is dangerous or clever"},{"line_number":51,"context_line":"    l3_db.Router \u003d RouterNatInfo"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _make_router_dict(self, router, fields\u003dNone):"},{"line_number":54,"context_line":"        res \u003d {\u0027id\u0027: router[\u0027id\u0027],"},{"line_number":55,"context_line":"               \u0027name\u0027: router[\u0027name\u0027],"},{"line_number":56,"context_line":"               \u0027tenant_id\u0027: router[\u0027tenant_id\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2Fxqc%3D","line":53,"in_reply_to":"AAAAOH%2F%2FyOE%3D","updated":"2013-03-27 22:30:57.000000000","message":"You\u0027re right I forgot to do that.","commit_id":"5e527045e13e37046733469943992f4f9976aa06"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"534851bd7f79b85a30203bc9754b78d0e72b9943","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        super(L3_NAT_db_mixin, self)._update_router_gw_info("},{"line_number":81,"context_line":"            context, router_id, info, router\u003drouter)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def _build_routers_list(self, routers, gw_ports):"},{"line_number":84,"context_line":"        gw_port_id_gw_port_dict \u003d {}"},{"line_number":85,"context_line":"        for gw_port in gw_ports:"},{"line_number":86,"context_line":"            gw_port_id_gw_port_dict[gw_port[\u0027id\u0027]] \u003d gw_port"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOH%2F%2FxCg%3D","line":83,"updated":"2013-03-28 12:34:22.000000000","message":"Would it make sense to use dict comprehensions for gw_port_id_gw_port_dict and router_id_gw_port_dict (performance)?","commit_id":"043d9ff1ebb1aa762c529a71657aa66f82542da4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":80,"context_line":"        super(L3_NAT_db_mixin, self)._update_router_gw_info("},{"line_number":81,"context_line":"            context, router_id, info, router\u003drouter)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def _build_routers_list(self, routers, gw_ports):"},{"line_number":84,"context_line":"        gw_port_id_gw_port_dict \u003d {}"},{"line_number":85,"context_line":"        for gw_port in gw_ports:"},{"line_number":86,"context_line":"            gw_port_id_gw_port_dict[gw_port[\u0027id\u0027]] \u003d gw_port"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOH%2F%2Fw4s%3D","line":83,"in_reply_to":"AAAAOH%2F%2FxCg%3D","updated":"2013-03-28 14:32:54.000000000","message":"I am not sure about the performance gains of this approach versus the one you suggest.\nthis was a topic of discussion when this code was first written during G-1.\n\nI think it\u0027s worth investigating - but in my opinion is a better target for a different patch. what you see here is pretty much a refactor of pre-existing code, which is augmented to add the enable_snat and enable_dnat attributes.","commit_id":"043d9ff1ebb1aa762c529a71657aa66f82542da4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"534851bd7f79b85a30203bc9754b78d0e72b9943","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        super(L3_NAT_db_mixin, self)._update_router_gw_info("},{"line_number":81,"context_line":"            context, router_id, info, router\u003drouter)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def _build_routers_list(self, routers, gw_ports):"},{"line_number":84,"context_line":"        gw_port_id_gw_port_dict \u003d {}"},{"line_number":85,"context_line":"        for gw_port in gw_ports:"},{"line_number":86,"context_line":"            gw_port_id_gw_port_dict[gw_port[\u0027id\u0027]] \u003d gw_port"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2Fhm8%3D","line":83,"updated":"2013-05-06 21:25:14.000000000","message":"This is very similar to the one in l3_db.py (except for setting enables). Can there be some reuse?","commit_id":"bec0ca4e76d02f6b3ec73b2893568ee3335b4994"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":80,"context_line":"        super(L3_NAT_db_mixin, self)._update_router_gw_info("},{"line_number":81,"context_line":"            context, router_id, info, router\u003drouter)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def _build_routers_list(self, routers, gw_ports):"},{"line_number":84,"context_line":"        gw_port_id_gw_port_dict \u003d {}"},{"line_number":85,"context_line":"        for gw_port in gw_ports:"},{"line_number":86,"context_line":"            gw_port_id_gw_port_dict[gw_port[\u0027id\u0027]] \u003d gw_port"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2Fg7Y%3D","line":83,"in_reply_to":"AAAAOn%2F%2Fhm8%3D","updated":"2013-05-07 07:57:08.000000000","message":"It\u0027s similar but it adds the attribute for enable_snat.\nThis is why I did that refactoring.\n\nThere are ways which allow further reuse of code, I will explore them.","commit_id":"bec0ca4e76d02f6b3ec73b2893568ee3335b4994"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"534851bd7f79b85a30203bc9754b78d0e72b9943","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _update_fip_assoc(self, context, fip, floatingip_db, external_port):"},{"line_number":97,"context_line":"        if \u0027port_id\u0027 in fip and fip[\u0027port_id\u0027]:"},{"line_number":98,"context_line":"            _1, _2, router_id \u003d self.get_assoc_data("},{"line_number":99,"context_line":"                context, fip, floatingip_db[\u0027floating_network_id\u0027])"},{"line_number":100,"context_line":"            router \u003d self._get_router(context, router_id)"},{"line_number":101,"context_line":"            if not router.enable_dnat:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2Fhm0%3D","line":98,"updated":"2013-05-06 21:25:14.000000000","message":"Since you only want last of tuple, could you just use [-1] in call?","commit_id":"bec0ca4e76d02f6b3ec73b2893568ee3335b4994"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _update_fip_assoc(self, context, fip, floatingip_db, external_port):"},{"line_number":97,"context_line":"        if \u0027port_id\u0027 in fip and fip[\u0027port_id\u0027]:"},{"line_number":98,"context_line":"            _1, _2, router_id \u003d self.get_assoc_data("},{"line_number":99,"context_line":"                context, fip, floatingip_db[\u0027floating_network_id\u0027])"},{"line_number":100,"context_line":"            router \u003d self._get_router(context, router_id)"},{"line_number":101,"context_line":"            if not router.enable_dnat:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2Fg7U%3D","line":98,"in_reply_to":"AAAAOn%2F%2Fhm0%3D","updated":"2013-05-07 07:57:08.000000000","message":"Yes I can. I do apologise for this style of doing things.","commit_id":"bec0ca4e76d02f6b3ec73b2893568ee3335b4994"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2012 Nicira Networks, Inc.  All rights reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":6,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAOn%2F%2FXqQ%3D","line":3,"updated":"2013-05-13 13:15:14.000000000","message":"2013","commit_id":"e18deba985239eac5922e147e23b92aae2d08a65"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2012 Nicira Networks, Inc.  All rights reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":6,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAO3%2F%2F%2FXw%3D","line":3,"in_reply_to":"AAAAOn%2F%2FXqQ%3D","updated":"2013-05-15 13:17:44.000000000","message":"Done","commit_id":"e18deba985239eac5922e147e23b92aae2d08a65"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":"#"},{"line_number":17,"context_line":"# @author: Dan Wendlandt, Nicira, Inc"},{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import sqlalchemy as sa"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAOn%2F%2FXqg%3D","line":17,"updated":"2013-05-13 13:15:14.000000000","message":"Dan -\u003e Salvatore","commit_id":"e18deba985239eac5922e147e23b92aae2d08a65"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":"#"},{"line_number":17,"context_line":"# @author: Dan Wendlandt, Nicira, Inc"},{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import sqlalchemy as sa"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAO3%2F%2F%2FXo%3D","line":17,"in_reply_to":"AAAAOn%2F%2FXqg%3D","updated":"2013-05-15 13:17:44.000000000","message":"Done","commit_id":"e18deba985239eac5922e147e23b92aae2d08a65"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":41,"context_line":"class L3_NAT_db_mixin(l3_db.L3_NAT_db_mixin):"},{"line_number":42,"context_line":"    \"\"\"Mixin class to add configurable gateway modes.\"\"\""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    # Ensure the superclass too uses RouterNatInfo when querying"},{"line_number":45,"context_line":"    l3_db.Router \u003d RouterNatInfo"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def _make_router_dict(self, router, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FwLQ%3D","line":44,"updated":"2013-05-23 20:31:47.000000000","message":"importing this file will cause this line to execute.  Not sure this should be within the class definition.","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":41,"context_line":"class L3_NAT_db_mixin(l3_db.L3_NAT_db_mixin):"},{"line_number":42,"context_line":"    \"\"\"Mixin class to add configurable gateway modes.\"\"\""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    # Ensure the superclass too uses RouterNatInfo when querying"},{"line_number":45,"context_line":"    l3_db.Router \u003d RouterNatInfo"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def _make_router_dict(self, router, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FrYs%3D","line":44,"in_reply_to":"AAAAPH%2F%2FwLQ%3D","updated":"2013-05-27 14:57:47.000000000","message":"The original comment indeed was\n\"I\u0027m not sure if this clever or dumb\"\n\nIt looks clever but then if somebody imports this module for some random reason it will have unexpected side effects.\n\nChanging this will need some restructuring.","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":56,"context_line":"        router \u003d self._get_router(context, router_id)"},{"line_number":57,"context_line":"        # if enable_snat is not specified use the value"},{"line_number":58,"context_line":"        # stored in the database (default:True)"},{"line_number":59,"context_line":"        enable_snat \u003d (info.get(\u0027enable_snat\u0027, router.enable_snat)"},{"line_number":60,"context_line":"                       if info else True)"},{"line_number":61,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":62,"context_line":"            router.enable_snat \u003d enable_snat"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FwKw%3D","line":59,"updated":"2013-05-23 20:31:47.000000000","message":"enable_snat \u003d not info or info.get(\u0027enable_snat\u0027, router.enable_snat)","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":56,"context_line":"        router \u003d self._get_router(context, router_id)"},{"line_number":57,"context_line":"        # if enable_snat is not specified use the value"},{"line_number":58,"context_line":"        # stored in the database (default:True)"},{"line_number":59,"context_line":"        enable_snat \u003d (info.get(\u0027enable_snat\u0027, router.enable_snat)"},{"line_number":60,"context_line":"                       if info else True)"},{"line_number":61,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":62,"context_line":"            router.enable_snat \u003d enable_snat"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FrYo%3D","line":59,"in_reply_to":"AAAAPH%2F%2FwKw%3D","updated":"2013-05-27 14:57:47.000000000","message":"Done","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"}],"quantum/db/migration/alembic_migrations/versions/128e042a2b68_ext_gw_mode.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":53,"context_line":"        \u0027routernatinfos\u0027,"},{"line_number":54,"context_line":"        sa.Column(\u0027id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":55,"context_line":"        sa.Column(\u0027enable_snat\u0027, sa.Boolean(), nullable\u003dTrue),"},{"line_number":56,"context_line":"        sa.Column(\u0027enable_dnat\u0027, sa.Boolean(), nullable\u003dTrue),"},{"line_number":57,"context_line":"        sa.ForeignKeyConstraint([\u0027id\u0027], [\u0027routers.id\u0027], ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":58,"context_line":"        sa.PrimaryKeyConstraint(\u0027id\u0027))"},{"line_number":59,"context_line":"    # Initiailize data in routernatinfo"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAOn%2F%2FWGM%3D","line":56,"updated":"2013-05-14 09:34:10.000000000","message":"Needs to remove enable_dnat.","commit_id":"895bfa0096613a3744bcfb2484ce6283207bd00a"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":53,"context_line":"        \u0027routernatinfos\u0027,"},{"line_number":54,"context_line":"        sa.Column(\u0027id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":55,"context_line":"        sa.Column(\u0027enable_snat\u0027, sa.Boolean(), nullable\u003dTrue),"},{"line_number":56,"context_line":"        sa.Column(\u0027enable_dnat\u0027, sa.Boolean(), nullable\u003dTrue),"},{"line_number":57,"context_line":"        sa.ForeignKeyConstraint([\u0027id\u0027], [\u0027routers.id\u0027], ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":58,"context_line":"        sa.PrimaryKeyConstraint(\u0027id\u0027))"},{"line_number":59,"context_line":"    # Initiailize data in routernatinfo"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAO3%2F%2F%2Fc0%3D","line":56,"in_reply_to":"AAAAOn%2F%2FWGM%3D","updated":"2013-05-15 13:13:35.000000000","message":"thanks.\nI also noticed this needs to be changed as another migration went in the meanwhile.","commit_id":"895bfa0096613a3744bcfb2484ce6283207bd00a"}],"quantum/extensions/l3.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":109,"context_line":"                      \u0027required_by_policy\u0027: True,"},{"line_number":110,"context_line":"                      \u0027validate\u0027: {\u0027type:string\u0027: None},"},{"line_number":111,"context_line":"                      \u0027is_visible\u0027: True},"},{"line_number":112,"context_line":"        constants.EXTERNAL_GW_INFO: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":113,"context_line":"                                     \u0027is_visible\u0027: True, \u0027default\u0027: None}"},{"line_number":114,"context_line":"    },"},{"line_number":115,"context_line":"    \u0027floatingips\u0027: {"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAOn%2F%2FXrg%3D","line":112,"updated":"2013-05-13 13:15:14.000000000","message":"How about defining EXTERNAL_GW_INFO in this file? This attribute is defined in this file, so IMO it looks better to defining it here rather than in constants.py. secgroup ext uses this approach.","commit_id":"e18deba985239eac5922e147e23b92aae2d08a65"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":109,"context_line":"                      \u0027required_by_policy\u0027: True,"},{"line_number":110,"context_line":"                      \u0027validate\u0027: {\u0027type:string\u0027: None},"},{"line_number":111,"context_line":"                      \u0027is_visible\u0027: True},"},{"line_number":112,"context_line":"        constants.EXTERNAL_GW_INFO: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":113,"context_line":"                                     \u0027is_visible\u0027: True, \u0027default\u0027: None}"},{"line_number":114,"context_line":"    },"},{"line_number":115,"context_line":"    \u0027floatingips\u0027: {"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAO3%2F%2F%2FW4%3D","line":112,"in_reply_to":"AAAAOn%2F%2FXrg%3D","updated":"2013-05-15 13:17:44.000000000","message":"Personally I prefer an approach where all the constants are in a single place.\nHowever, as you point out, I will prioritize consistency with other extension and do as you suggest.\n\nI might dare think we should do a refactoring where all the constants from all the module ends in a single place, but this is beyond the scope of this review.","commit_id":"e18deba985239eac5922e147e23b92aae2d08a65"}],"quantum/extensions/l3_ext_gw_mode.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2012 Nicira Networks, Inc."},{"line_number":4,"context_line":"# All rights reserved."},{"line_number":5,"context_line":"#"},{"line_number":6,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAOn%2F%2FXrM%3D","line":3,"updated":"2013-05-13 13:15:14.000000000","message":"2013","commit_id":"e18deba985239eac5922e147e23b92aae2d08a65"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2012 Nicira Networks, Inc."},{"line_number":4,"context_line":"# All rights reserved."},{"line_number":5,"context_line":"#"},{"line_number":6,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAO3%2F%2F%2FXk%3D","line":3,"in_reply_to":"AAAAOn%2F%2FXrM%3D","updated":"2013-05-15 13:17:44.000000000","message":"Done","commit_id":"e18deba985239eac5922e147e23b92aae2d08a65"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":"#"},{"line_number":18,"context_line":"# @author: Dan Wendlandt, Nicira, Inc"},{"line_number":19,"context_line":"#"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from quantum.api import extensions"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAOn%2F%2FXrQ%3D","line":18,"updated":"2013-05-13 13:15:14.000000000","message":"Salvatore?","commit_id":"e18deba985239eac5922e147e23b92aae2d08a65"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":"#"},{"line_number":18,"context_line":"# @author: Dan Wendlandt, Nicira, Inc"},{"line_number":19,"context_line":"#"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from quantum.api import extensions"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAO3%2F%2F%2FXc%3D","line":18,"in_reply_to":"AAAAOn%2F%2FXrQ%3D","updated":"2013-05-15 13:17:44.000000000","message":"Yeah I just did copy \u0026 paste","commit_id":"e18deba985239eac5922e147e23b92aae2d08a65"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":27,"context_line":"    message \u003d _(\"DNat is disabled for the router %(router_id)s. Floating IPs \""},{"line_number":28,"context_line":"                \"cannot be associated.\")"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"EXTERNAL \u003d \u0027router:external\u0027"},{"line_number":31,"context_line":"EXTENDED_ATTRIBUTES_2_0 \u003d {"},{"line_number":32,"context_line":"    \u0027routers\u0027: {constants.EXTERNAL_GW_INFO:"},{"line_number":33,"context_line":"                {\u0027allow_post\u0027: True,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAOn%2F%2FXrU%3D","line":30,"updated":"2013-05-13 13:15:14.000000000","message":"It is already defined in extension/l3.py and seems unnecessary.","commit_id":"e18deba985239eac5922e147e23b92aae2d08a65"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":27,"context_line":"    message \u003d _(\"DNat is disabled for the router %(router_id)s. Floating IPs \""},{"line_number":28,"context_line":"                \"cannot be associated.\")"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"EXTERNAL \u003d \u0027router:external\u0027"},{"line_number":31,"context_line":"EXTENDED_ATTRIBUTES_2_0 \u003d {"},{"line_number":32,"context_line":"    \u0027routers\u0027: {constants.EXTERNAL_GW_INFO:"},{"line_number":33,"context_line":"                {\u0027allow_post\u0027: True,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAO3%2F%2F%2FXM%3D","line":30,"in_reply_to":"AAAAOn%2F%2FXrU%3D","updated":"2013-05-15 13:17:44.000000000","message":"It\u0027s strange that flake8 did not pick it","commit_id":"e18deba985239eac5922e147e23b92aae2d08a65"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":36,"context_line":"                 \u0027validate\u0027:"},{"line_number":37,"context_line":"                 {\u0027type:dict_or_nodata\u0027:"},{"line_number":38,"context_line":"                  {\u0027network_id\u0027: {\u0027type:uuid\u0027: None, \u0027required\u0027: True},"},{"line_number":39,"context_line":"                   \u0027enable_snat\u0027: {\u0027type:boolean\u0027: None, \u0027required\u0027: False}}"},{"line_number":40,"context_line":"                  }}}}"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2FnEk%3D","line":39,"updated":"2013-05-29 12:55:00.000000000","message":"\u0027convert_to\u0027: convert_to_boolean,\n\nBut I am ok with this.","commit_id":"9f1d2e0c51ba47610f30d56de356f301c22e0dcd"}],"quantum/tests/unit/metaplugin/test_basic.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"class TestMetaL3NatDBTestCase(test_l3_plugin.L3NatDBTestCase,"},{"line_number":71,"context_line":"                              MetaPluginV2DBTestCase):"},{"line_number":72,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FwKk%3D","line":72,"updated":"2013-05-23 20:31:47.000000000","message":"indent is too big","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"class TestMetaL3NatDBTestCase(test_l3_plugin.L3NatDBTestCase,"},{"line_number":71,"context_line":"                              MetaPluginV2DBTestCase):"},{"line_number":72,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FrYk%3D","line":72,"in_reply_to":"AAAAPH%2F%2FwKk%3D","updated":"2013-05-27 14:57:47.000000000","message":"Done","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"}],"quantum/tests/unit/test_extension_ext_gw_mode.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":145,"context_line":"            self.router.gw_port_id \u003d self.router_gw_port.id"},{"line_number":146,"context_line":"            self.context.session.add(self.router)"},{"line_number":147,"context_line":"            self.context.session.add(self.router_gw_port)"},{"line_number":148,"context_line":"        with self.context.session.begin():"},{"line_number":149,"context_line":"            self.fip_ext_port \u003d models_v2.Port("},{"line_number":150,"context_line":"                id\u003dFAKE_FIP_EXT_PORT_ID,"},{"line_number":151,"context_line":"                tenant_id\u003dself.tenant_id,"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FwJI%3D","line":148,"updated":"2013-05-23 20:31:47.000000000","message":"Why do we need so many transactions?  Would flush() not work in the cases where you need the uuid generated?","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":145,"context_line":"            self.router.gw_port_id \u003d self.router_gw_port.id"},{"line_number":146,"context_line":"            self.context.session.add(self.router)"},{"line_number":147,"context_line":"            self.context.session.add(self.router_gw_port)"},{"line_number":148,"context_line":"        with self.context.session.begin():"},{"line_number":149,"context_line":"            self.fip_ext_port \u003d models_v2.Port("},{"line_number":150,"context_line":"                id\u003dFAKE_FIP_EXT_PORT_ID,"},{"line_number":151,"context_line":"                tenant_id\u003dself.tenant_id,"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPH%2F%2FrYg%3D","line":148,"in_reply_to":"AAAAPH%2F%2FwJI%3D","updated":"2013-05-27 14:57:47.000000000","message":"Done","commit_id":"725c2642d1ff2fbc60d5004ce7b4ed0042f9e905"}]}
