)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"cb5261ca605e02ebc0eaad31abd1a612f4ce281f","unresolved":false,"context_lines":[{"line_number":10,"context_line":"exception informtion."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"In addition to this mad a minor tweak to first check a variable"},{"line_number":13,"context_line":"and then check if a value exists in a set. Fast fail :)"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I101e909af8ffa890ffe67f4577454e4e855d7214"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a57f1b5_ccf38709","line":13,"updated":"2016-02-10 17:34:07.000000000","message":"I can buy in the fail fast argument, the same way I verified that default external network existed ahead of the provisioning.\n\nTo me that was enough of a safeguard to alert the admin to check he/she had done things properly.","commit_id":"1faa5724a7d5714b7492197c3dccb4a286a2e97a"}],"neutron/services/auto_allocate/db.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2d40e335fa7b7c8f80ed4291bb4c0c7a7fa35a84","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    resource, event, trigger, context, request, network):"},{"line_number":53,"context_line":"    \"\"\"Ensure the is_default db field matches the create/update request.\"\"\""},{"line_number":54,"context_line":"    is_default \u003d request.get(IS_DEFAULT)"},{"line_number":55,"context_line":"    if is_default and event in (events.BEFORE_CREATE, events.BEFORE_UPDATE):"},{"line_number":56,"context_line":"        # ensure there is only one default external network at any given time"},{"line_number":57,"context_line":"        obj \u003d (context.session.query(external_net_db.ExternalNetwork)."},{"line_number":58,"context_line":"            filter_by(is_default\u003dTrue)).first()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_4683f5cc","line":55,"updated":"2016-02-10 17:29:15.000000000","message":"we could agree to disagree, but this doesn\u0027t make any difference to me, and I\u0027d rather you leave it the way it was.","commit_id":"1faa5724a7d5714b7492197c3dccb4a286a2e97a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"708af59e29790f18fe1aba5e256c1677c5108151","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    resource, event, trigger, context, request, network):"},{"line_number":53,"context_line":"    \"\"\"Ensure the is_default db field matches the create/update request.\"\"\""},{"line_number":54,"context_line":"    is_default \u003d request.get(IS_DEFAULT)"},{"line_number":55,"context_line":"    if is_default and event in (events.BEFORE_CREATE, events.BEFORE_UPDATE):"},{"line_number":56,"context_line":"        # ensure there is only one default external network at any given time"},{"line_number":57,"context_line":"        obj \u003d (context.session.query(external_net_db.ExternalNetwork)."},{"line_number":58,"context_line":"            filter_by(is_default\u003dTrue)).first()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_90b4a0d1","line":55,"in_reply_to":"3a57f1b5_4683f5cc","updated":"2016-02-11 07:50:06.000000000","message":"what is more efficient? that is a serious question.\ni am dropping this change","commit_id":"1faa5724a7d5714b7492197c3dccb4a286a2e97a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"cd73063996229906edc0464d2d6803cb8512cc90","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    resource, event, trigger, context, request, network):"},{"line_number":53,"context_line":"    \"\"\"Ensure the is_default db field matches the create/update request.\"\"\""},{"line_number":54,"context_line":"    is_default \u003d request.get(IS_DEFAULT)"},{"line_number":55,"context_line":"    if is_default and event in (events.BEFORE_CREATE, events.BEFORE_UPDATE):"},{"line_number":56,"context_line":"        # ensure there is only one default external network at any given time"},{"line_number":57,"context_line":"        obj \u003d (context.session.query(external_net_db.ExternalNetwork)."},{"line_number":58,"context_line":"            filter_by(is_default\u003dTrue)).first()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_ef04e318","line":55,"in_reply_to":"3a57f1b5_90b4a0d1","updated":"2016-02-12 00:12:08.000000000","message":"moving is_default to be the first factor of the predicate is more efficient, but we\u0027re not coding in assembly are we? We have a gigantic software stack under our feet, are we arguing on saving nanoseconds?","commit_id":"1faa5724a7d5714b7492197c3dccb4a286a2e97a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2d40e335fa7b7c8f80ed4291bb4c0c7a7fa35a84","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _provision_tenant_private_network(self, context, tenant_id):"},{"line_number":194,"context_line":"        \"\"\"Create a tenant private network/subnets.\"\"\""},{"line_number":195,"context_line":"        supported_versions \u003d self._get_supported_versions(context)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        network_args \u003d {"},{"line_number":198,"context_line":"            \u0027name\u0027: \u0027auto_allocated_network\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_465a1585","line":195,"updated":"2016-02-10 17:29:15.000000000","message":"I usually tend to define variables closest to where I use them, hence it used to be like it was.","commit_id":"1faa5724a7d5714b7492197c3dccb4a286a2e97a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"cd73063996229906edc0464d2d6803cb8512cc90","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _provision_tenant_private_network(self, context, tenant_id):"},{"line_number":194,"context_line":"        \"\"\"Create a tenant private network/subnets.\"\"\""},{"line_number":195,"context_line":"        supported_versions \u003d self._get_supported_versions(context)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        network_args \u003d {"},{"line_number":198,"context_line":"            \u0027name\u0027: \u0027auto_allocated_network\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_3a68f7b8","line":195,"in_reply_to":"3a57f1b5_10ef50b1","updated":"2016-02-12 00:12:08.000000000","message":"I do, I wrote that logic :)","commit_id":"1faa5724a7d5714b7492197c3dccb4a286a2e97a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"708af59e29790f18fe1aba5e256c1677c5108151","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _provision_tenant_private_network(self, context, tenant_id):"},{"line_number":194,"context_line":"        \"\"\"Create a tenant private network/subnets.\"\"\""},{"line_number":195,"context_line":"        supported_versions \u003d self._get_supported_versions(context)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        network_args \u003d {"},{"line_number":198,"context_line":"            \u0027name\u0027: \u0027auto_allocated_network\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_10ef50b1","line":195,"in_reply_to":"3a57f1b5_465a1585","updated":"2016-02-11 07:50:06.000000000","message":"_get_supported_versions can raise n_exc.NotFound(). So if you leave it where it was then if this raises that then you have waited the creation and the cleanup of the network. Do you follow that logic?","commit_id":"1faa5724a7d5714b7492197c3dccb4a286a2e97a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2d40e335fa7b7c8f80ed4291bb4c0c7a7fa35a84","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        try:"},{"line_number":204,"context_line":"            network \u003d p_utils.create_network("},{"line_number":205,"context_line":"                self.core_plugin, context, {\u0027network\u0027: network_args})"},{"line_number":206,"context_line":"        except (ValueError, n_exc.BadRequest, n_exc.NotFound):"},{"line_number":207,"context_line":"            raise exceptions.AutoAllocationFailure("},{"line_number":208,"context_line":"                reason\u003d_(\"Unable to provide tenant private network\"))"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_66edd18a","line":206,"updated":"2016-02-10 17:29:15.000000000","message":"NotFound won\u0027t be raised here.","commit_id":"1faa5724a7d5714b7492197c3dccb4a286a2e97a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"708af59e29790f18fe1aba5e256c1677c5108151","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        try:"},{"line_number":204,"context_line":"            network \u003d p_utils.create_network("},{"line_number":205,"context_line":"                self.core_plugin, context, {\u0027network\u0027: network_args})"},{"line_number":206,"context_line":"        except (ValueError, n_exc.BadRequest, n_exc.NotFound):"},{"line_number":207,"context_line":"            raise exceptions.AutoAllocationFailure("},{"line_number":208,"context_line":"                reason\u003d_(\"Unable to provide tenant private network\"))"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_7036c453","line":206,"in_reply_to":"3a57f1b5_66edd18a","updated":"2016-02-11 07:50:06.000000000","message":"Correct - it will be raised above. My bad.","commit_id":"1faa5724a7d5714b7492197c3dccb4a286a2e97a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2d40e335fa7b7c8f80ed4291bb4c0c7a7fa35a84","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        except (ValueError, n_exc.BadRequest, n_exc.NotFound):"},{"line_number":223,"context_line":"            self._cleanup(context, network[\u0027id\u0027])"},{"line_number":224,"context_line":"            raise exceptions.AutoAllocationFailure("},{"line_number":225,"context_line":"                reason\u003d_(\"Unable to provide tenant private subnet\"))"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def _provision_external_connectivity("},{"line_number":228,"context_line":"        self, context, default_external_network, subnets, tenant_id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_864a4d82","line":225,"updated":"2016-02-10 17:29:15.000000000","message":"I am honestly not convinced this is cleaner, on the contrary, it looks busier. Besides, I was intentionally \u0027opaque\u0027 on the error message because from the user\u0027s point of view a failure to allocate the topology is a failure irrespective of the underlying issues that are down to the admin to resolve.\n\nShould we, for whatever reason, decide to move away from subnetpools than this failure mode is practically impossible to occur.","commit_id":"1faa5724a7d5714b7492197c3dccb4a286a2e97a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"cd73063996229906edc0464d2d6803cb8512cc90","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        except (ValueError, n_exc.BadRequest, n_exc.NotFound):"},{"line_number":223,"context_line":"            self._cleanup(context, network[\u0027id\u0027])"},{"line_number":224,"context_line":"            raise exceptions.AutoAllocationFailure("},{"line_number":225,"context_line":"                reason\u003d_(\"Unable to provide tenant private subnet\"))"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def _provision_external_connectivity("},{"line_number":228,"context_line":"        self, context, default_external_network, subnets, tenant_id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_0f2b7f95","line":225,"in_reply_to":"3a57f1b5_864a4d82","updated":"2016-02-12 00:12:08.000000000","message":"Did you accidentally forgot to read this one?","commit_id":"1faa5724a7d5714b7492197c3dccb4a286a2e97a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"559ec3b539fb4fa012fe765eeb4447dc0b8495e0","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                    self.core_plugin, context, {\u0027subnet\u0027: subnet_args}))"},{"line_number":215,"context_line":"            return subnets"},{"line_number":216,"context_line":"        except (ValueError, n_exc.BadRequest, n_exc.NotFound):"},{"line_number":217,"context_line":"            LOG.error(_LE(\"Unable to auto allocate topology for tenant \""},{"line_number":218,"context_line":"                          \"%s due to missing requirements, e.g. default \""},{"line_number":219,"context_line":"                          \"or shared subnetpools\"), tenant_id)"},{"line_number":220,"context_line":"            if network:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_7a5bcff6","side":"PARENT","line":217,"updated":"2016-02-12 00:16:44.000000000","message":"we lost this, and we should not.","commit_id":"65eda0eacd36e3859b857704f620cfe6b515ad7c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"559ec3b539fb4fa012fe765eeb4447dc0b8495e0","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _provision_tenant_private_network(self, context, tenant_id):"},{"line_number":194,"context_line":"        \"\"\"Create a tenant private network/subnets.\"\"\""},{"line_number":195,"context_line":"        supported_versions \u003d self._get_supported_versions(context)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        network_args \u003d {"},{"line_number":198,"context_line":"            \u0027name\u0027: \u0027auto_allocated_network\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_3a4b172c","line":195,"updated":"2016-02-12 00:16:44.000000000","message":"if you leave this unprotected the user would get NotFound with no explanation, how is this any better?","commit_id":"edf5feaf4ecedb9aac0b7722ee3387b7c640d64a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"559ec3b539fb4fa012fe765eeb4447dc0b8495e0","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        except (ValueError, n_exc.BadRequest):"},{"line_number":223,"context_line":"            self._cleanup(context, network[\u0027id\u0027])"},{"line_number":224,"context_line":"            raise exceptions.AutoAllocationFailure("},{"line_number":225,"context_line":"                reason\u003d_(\"Unable to provide tenant private subnet\"))"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def _provision_external_connectivity("},{"line_number":228,"context_line":"        self, context, default_external_network, subnets, tenant_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_9a07abc9","line":225,"updated":"2016-02-12 00:16:44.000000000","message":"As mentioned on previous PS that I wanted to treat both failure modes identically, especially in the eyes of the end-user.","commit_id":"edf5feaf4ecedb9aac0b7722ee3387b7c640d64a"}]}
