)]}'
{"nova/network/neutronv2/api.py":[{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"36e9baf078afbcad4bb194c113e4f35e08509817","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            # message to distinguish exceptions such as"},{"line_number":181,"context_line":"            # OverQuota and NoMoreFixedIP"},{"line_number":182,"context_line":"            if e.status_code \u003d\u003d 409:"},{"line_number":183,"context_line":"                if (e.message and \u0027Quota\u0027 in e.message):"},{"line_number":184,"context_line":"                    raise exception.PortLimitExceeded()"},{"line_number":185,"context_line":"                elif (e.message and \u0027No more\u0027 in e.message):"},{"line_number":186,"context_line":"                    raise exception.NoMoreFixedIps()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F9aP4%3D","line":183,"updated":"2014-02-07 04:11:25.000000000","message":"It would seem like this line could go away. Why not just\n\nif (e.message and \u0027No more\u0027 in e.message):\n    raise exception.NoMoreFixedIps()\nraise exception.PortLimitExceeded()","commit_id":"f141f09b0be1c369907d7a1b3212c5392202081f"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"d8b2d248ecf020426e095b89a5f86fc38abbb7d7","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            # message to distinguish exceptions such as"},{"line_number":181,"context_line":"            # OverQuota and NoMoreFixedIP"},{"line_number":182,"context_line":"            if e.status_code \u003d\u003d 409:"},{"line_number":183,"context_line":"                if (e.message and \u0027Quota\u0027 in e.message):"},{"line_number":184,"context_line":"                    raise exception.PortLimitExceeded()"},{"line_number":185,"context_line":"                elif (e.message and \u0027No more\u0027 in e.message):"},{"line_number":186,"context_line":"                    raise exception.NoMoreFixedIps()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2FFcU%3D","line":183,"in_reply_to":"AAAAUH%2F9aP4%3D","updated":"2014-03-10 02:35:24.000000000","message":"Because there are multiple reasons, and this fix leads to 3 possible states:\na) 409 + No more -\u003e raise NoMoreFixedIps\nb) 409 + Quota -\u003e raise PortLimitExceeded\nc) all other cases -\u003e raise","commit_id":"f141f09b0be1c369907d7a1b3212c5392202081f"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"8c1a7e5e685380abc83448dee253be5f8e072737","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            # NeutronClientException might be enough to indicate"},{"line_number":181,"context_line":"            # Neutron exception, nova side can use status_code and"},{"line_number":182,"context_line":"            # message to distinguish exceptions such as"},{"line_number":183,"context_line":"            # OverQuota and NoMoreFixedIP"},{"line_number":184,"context_line":"            if e.status_code \u003d\u003d 409:"},{"line_number":185,"context_line":"                LOG.warning(_(\u0027Neutron error: quota exceeded or\u0027"},{"line_number":186,"context_line":"                              \u0027no more floating IP\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2B6ok%3D","line":183,"updated":"2014-03-11 10:32:40.000000000","message":"unnecessary comment imho, only echoes the code","commit_id":"f98b1163578b66146715d28540710299f33481ae"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"3e745f8d3b0d1b7bbea541984bb15cdfd5df33be","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            # NeutronClientException might be enough to indicate"},{"line_number":181,"context_line":"            # Neutron exception, nova side can use status_code and"},{"line_number":182,"context_line":"            # message to distinguish exceptions such as"},{"line_number":183,"context_line":"            # OverQuota and NoMoreFixedIP"},{"line_number":184,"context_line":"            if e.status_code \u003d\u003d 409:"},{"line_number":185,"context_line":"                LOG.warning(_(\u0027Neutron error: quota exceeded or\u0027"},{"line_number":186,"context_line":"                              \u0027no more floating IP\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2ByIA%3D","line":183,"in_reply_to":"AAAAVn%2F%2B6ok%3D","updated":"2014-03-12 07:11:24.000000000","message":"Done","commit_id":"f98b1163578b66146715d28540710299f33481ae"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"8c1a7e5e685380abc83448dee253be5f8e072737","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                if (e.message and \u0027Quota\u0027 in e.message):"},{"line_number":188,"context_line":"                    raise exception.PortLimitExceeded()"},{"line_number":189,"context_line":"                elif (e.message and \u0027No more\u0027 in e.message):"},{"line_number":190,"context_line":"                    raise exception.NoMoreFixedIps()"},{"line_number":191,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":192,"context_line":"                LOG.exception(_(\u0027Neutron error creating port on network %s\u0027),"},{"line_number":193,"context_line":"                              network_id, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2B6og%3D","line":190,"updated":"2014-03-11 10:32:40.000000000","message":"I\u0027d prefer:\n\nif e.status_code \u003d\u003d 409 and e.message:\n    if e.message.startswith(\"Quota exceeded for resources\"):\n        raise exception.PortLimitExceeded()\n    if e.message.startswith(\"No more IP addresses available on network\"):\n        raise exception.NoMoreFixedIps()\n\n1) tighter message tests avoid false positives\n\n2) Not sure on OpenStack policy here, but I don\u0027t like logging and raising an exception. The code which handles the exception should log the event, if appropriate. Log+throw leads to redundant logging and large log files.","commit_id":"f98b1163578b66146715d28540710299f33481ae"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"3e745f8d3b0d1b7bbea541984bb15cdfd5df33be","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                if (e.message and \u0027Quota\u0027 in e.message):"},{"line_number":188,"context_line":"                    raise exception.PortLimitExceeded()"},{"line_number":189,"context_line":"                elif (e.message and \u0027No more\u0027 in e.message):"},{"line_number":190,"context_line":"                    raise exception.NoMoreFixedIps()"},{"line_number":191,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":192,"context_line":"                LOG.exception(_(\u0027Neutron error creating port on network %s\u0027),"},{"line_number":193,"context_line":"                              network_id, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2ByIE%3D","line":190,"in_reply_to":"AAAAVn%2F%2B6og%3D","updated":"2014-03-12 07:11:24.000000000","message":"I agree with your suggestions here, looks better \n\nalso, remove logs might be helpful since it\u0027s not something that need to be \u0027warning\u0027","commit_id":"f98b1163578b66146715d28540710299f33481ae"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"b299c5923f22cb50bb77e30d7b784a9c776814bb","unresolved":false,"context_lines":[{"line_number":177,"context_line":"            return port_id"},{"line_number":178,"context_line":"        except neutron_client_exc.NeutronClientException as e:"},{"line_number":179,"context_line":"            # NOTE(mriedem): OverQuota in neutron is a 409"},{"line_number":180,"context_line":"            if e.status_code \u003d\u003d 409 and e.message:"},{"line_number":181,"context_line":"                if e.message.startswith(\"Quota exceeded for resources\"):"},{"line_number":182,"context_line":"                    raise exception.PortLimitExceeded()"},{"line_number":183,"context_line":"                elif e.message.startswith(\"No more IP addresses\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2BEkE%3D","line":180,"updated":"2014-03-31 05:14:49.000000000","message":"Is this \"and e.message\" necessary?\n\nThe previous code could cover \"not e.message\" case also, but this code does not. So the coverage seems shrank.","commit_id":"7938c4efc4d64c95cc3934f0f3df3759fa2d5567"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"3f3a0f08cfbb2f848add0d5f47ac8199615e4259","unresolved":false,"context_lines":[{"line_number":177,"context_line":"            return port_id"},{"line_number":178,"context_line":"        except neutron_client_exc.NeutronClientException as e:"},{"line_number":179,"context_line":"            # NOTE(mriedem): OverQuota in neutron is a 409"},{"line_number":180,"context_line":"            if e.status_code \u003d\u003d 409 and e.message:"},{"line_number":181,"context_line":"                if e.message.startswith(\"Quota exceeded for resources\"):"},{"line_number":182,"context_line":"                    raise exception.PortLimitExceeded()"},{"line_number":183,"context_line":"                elif e.message.startswith(\"No more IP addresses\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F98d8%3D","line":180,"in_reply_to":"AAAAWH%2F%2BEkE%3D","updated":"2014-04-01 02:50:51.000000000","message":"Thanks, I guess previous code should check e.message\nsince 409 can\u0027t be guaranteed to be overquota,\n\nprevious code should be changed to following (without my changes for No more IP) \n\nif e.status_code \u003d\u003d 409 and e.message:\n       if e.message.startswith(\"Quota exceeded for resources\"):\n                 xxxxx\n\nyour opinion?","commit_id":"7938c4efc4d64c95cc3934f0f3df3759fa2d5567"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"65c9811c3c7ab919ed785fac42f7f196d716b509","unresolved":false,"context_lines":[{"line_number":177,"context_line":"            return port_id"},{"line_number":178,"context_line":"        except neutron_client_exc.NeutronClientException as e:"},{"line_number":179,"context_line":"            # NOTE(mriedem): OverQuota in neutron is a 409"},{"line_number":180,"context_line":"            if e.status_code \u003d\u003d 409 and e.message:"},{"line_number":181,"context_line":"                if e.message.startswith(\"Quota exceeded for resources\"):"},{"line_number":182,"context_line":"                    raise exception.PortLimitExceeded()"},{"line_number":183,"context_line":"                elif e.message.startswith(\"No more IP addresses\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F9vHg%3D","line":180,"in_reply_to":"AAAAWH%2F98d8%3D","updated":"2014-04-02 13:41:50.000000000","message":"From neutronclient/common/exceptions.py of python-neutronclient, e.message is set always. \"An unknown exception occurred.\" is set as the default value at least. So \"and e.message\" is not very necessary, I feel.","commit_id":"7938c4efc4d64c95cc3934f0f3df3759fa2d5567"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"fc568da9c3a347e498660a126763e3f326b9b6ad","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        except neutron_client_exc.NeutronClientException as e:"},{"line_number":181,"context_line":"            # NOTE(mriedem): OverQuota in neutron is a 409"},{"line_number":182,"context_line":"            if e.status_code \u003d\u003d 409 and e.message:"},{"line_number":183,"context_line":"                if e.message.startswith(\"Quota exceeded for resources\"):"},{"line_number":184,"context_line":"                    raise exception.PortLimitExceeded()"},{"line_number":185,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":186,"context_line":"                LOG.exception(_(\u0027Neutron error creating port on network %s\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAW3%2F%2F%2B2I%3D","line":183,"updated":"2014-04-09 03:51:47.000000000","message":"So rather than basing this on message content and 409 I think we need to enhance neutron/neutronclient to raise a specific exception for this case. If you need a hand, please feel free to ping me and I can point you to some examples where we\u0027ve done this before in neutron/neutronclient","commit_id":"079488cbd389d65a440349615a85860d23ea9e25"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"75609c135ddf32118746667ef986d7d1d5ea6d68","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        except neutron_client_exc.NeutronClientException as e:"},{"line_number":181,"context_line":"            # NOTE(mriedem): OverQuota in neutron is a 409"},{"line_number":182,"context_line":"            if e.status_code \u003d\u003d 409 and e.message:"},{"line_number":183,"context_line":"                if e.message.startswith(\"Quota exceeded for resources\"):"},{"line_number":184,"context_line":"                    raise exception.PortLimitExceeded()"},{"line_number":185,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":186,"context_line":"                LOG.exception(_(\u0027Neutron error creating port on network %s\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAW3%2F%2F9QY%3D","line":183,"in_reply_to":"AAAAW3%2F%2F%2B2I%3D","updated":"2014-04-09 08:59:16.000000000","message":"I agree with Chris here.","commit_id":"079488cbd389d65a440349615a85860d23ea9e25"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"66e3fabfa1008bbf8562c564f869cdebca110431","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            # NOTE(mriedem): OverQuota in neutron is a 409"},{"line_number":182,"context_line":"            if e.status_code \u003d\u003d 409 and e.message:"},{"line_number":183,"context_line":"                if e.message.startswith(\"Quota exceeded for resources\"):"},{"line_number":184,"context_line":"                    raise exception.PortLimitExceeded()"},{"line_number":185,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":186,"context_line":"                LOG.exception(_(\u0027Neutron error creating port on network %s\u0027),"},{"line_number":187,"context_line":"                              network_id, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F9vDY%3D","line":184,"updated":"2014-04-02 13:45:33.000000000","message":"Previous patch separates exceptions from the cases, why did you remove them?","commit_id":"079488cbd389d65a440349615a85860d23ea9e25"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"604c09ea3601b1008d424851ab332c2df946ac70","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from nova.network.security_group import openstack_driver"},{"line_number":32,"context_line":"from nova.openstack.common import excutils"},{"line_number":33,"context_line":"from nova.openstack.common.gettextutils import _"},{"line_number":34,"context_line":"from nova.openstack.common.gettextutils import _LW"},{"line_number":35,"context_line":"from nova.openstack.common import log as logging"},{"line_number":36,"context_line":"from nova.openstack.common import uuidutils"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_4203fdbd","line":34,"updated":"2014-06-25 05:34:35.000000000","message":"Why do you import same library twice using different names?","commit_id":"93ab021d3a98114cbf7f68588c2c8399e97112b4"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"e3730b18d1828f035bee09710a88935b844e8836","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from nova.network.security_group import openstack_driver"},{"line_number":32,"context_line":"from nova.openstack.common import excutils"},{"line_number":33,"context_line":"from nova.openstack.common.gettextutils import _"},{"line_number":34,"context_line":"from nova.openstack.common.gettextutils import _LW"},{"line_number":35,"context_line":"from nova.openstack.common import log as logging"},{"line_number":36,"context_line":"from nova.openstack.common import uuidutils"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_cb32c1f1","line":34,"in_reply_to":"1ae5cdf2_4203fdbd","updated":"2014-06-25 10:06:46.000000000","message":"please refer to libvirt/driver.py\n\nfrom nova.openstack.common.gettextutils import _\nfrom nova.openstack.common.gettextutils import _LE\nfrom nova.openstack.common.gettextutils import _LI\nfrom nova.openstack.common.gettextutils import _LW\n\nit\u0027s new guide for log method ...","commit_id":"93ab021d3a98114cbf7f68588c2c8399e97112b4"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"55f12700f1409f366ed025d67f407b5174315007","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from nova.network.security_group import openstack_driver"},{"line_number":32,"context_line":"from nova.openstack.common import excutils"},{"line_number":33,"context_line":"from nova.openstack.common.gettextutils import _"},{"line_number":34,"context_line":"from nova.openstack.common.gettextutils import _LW"},{"line_number":35,"context_line":"from nova.openstack.common import log as logging"},{"line_number":36,"context_line":"from nova.openstack.common import uuidutils"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_315bed55","line":34,"in_reply_to":"1ae5cdf2_cb32c1f1","updated":"2014-07-01 04:49:22.000000000","message":"Sorry for my mistake. Please ignore this my comment.\nPlease check other 2 comments.","commit_id":"93ab021d3a98114cbf7f68588c2c8399e97112b4"}],"nova/tests/network/test_neutronv2.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"d8b2d248ecf020426e095b89a5f86fc38abbb7d7","unresolved":false,"context_lines":[{"line_number":851,"context_line":""},{"line_number":852,"context_line":"        Mox to raise NoMoreFixedIps when creating the first port."},{"line_number":853,"context_line":"        In this case, the code should not delete any ports."},{"line_number":854,"context_line":"        \"\"\""},{"line_number":855,"context_line":"        api \u003d neutronapi.API()"},{"line_number":856,"context_line":"        self.mox.StubOutWithMock(api, \u0027_populate_neutron_extension_values\u0027)"},{"line_number":857,"context_line":"        self.mox.StubOutWithMock(api, \u0027_has_port_binding_extension\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2FFcI%3D","line":854,"updated":"2014-03-10 02:35:24.000000000","message":"This doesn\u0027t make a good docstring - I suggest comments spread through the test instead.","commit_id":"f141f09b0be1c369907d7a1b3212c5392202081f"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"0caba6d978350f521026475e81bcd6959fb40085","unresolved":false,"context_lines":[{"line_number":851,"context_line":""},{"line_number":852,"context_line":"        Mox to raise NoMoreFixedIps when creating the first port."},{"line_number":853,"context_line":"        In this case, the code should not delete any ports."},{"line_number":854,"context_line":"        \"\"\""},{"line_number":855,"context_line":"        api \u003d neutronapi.API()"},{"line_number":856,"context_line":"        self.mox.StubOutWithMock(api, \u0027_populate_neutron_extension_values\u0027)"},{"line_number":857,"context_line":"        self.mox.StubOutWithMock(api, \u0027_has_port_binding_extension\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2B9Wc%3D","line":854,"in_reply_to":"AAAAVn%2F%2FFcI%3D","updated":"2014-03-11 02:11:51.000000000","message":"I copied from previous test cases :)\nthanks for your suggestion, will take action ..","commit_id":"f141f09b0be1c369907d7a1b3212c5392202081f"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"61c83a290e4867600a3098bfae85dd34c26cc695","unresolved":false,"context_lines":[{"line_number":930,"context_line":"        api \u003d neutronapi.API()"},{"line_number":931,"context_line":"        self.mox.StubOutWithMock(api, \u0027_populate_neutron_extension_values\u0027)"},{"line_number":932,"context_line":"        self.mox.StubOutWithMock(api, \u0027_has_port_binding_extension\u0027)"},{"line_number":933,"context_line":"        api._has_port_binding_extension().MultipleTimes().AndReturn(False)"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        # prepare for request body "},{"line_number":936,"context_line":"        self.moxed_client.list_networks("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2B79c%3D","line":933,"updated":"2014-03-11 06:50:27.000000000","message":"It seems parameter for _has_port_binding_extension() will be needed.","commit_id":"2ae4c6a8f493f19691dac2cbdd28c2574ddb4bde"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"61c83a290e4867600a3098bfae85dd34c26cc695","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        self.mox.StubOutWithMock(api, \u0027_has_port_binding_extension\u0027)"},{"line_number":933,"context_line":"        api._has_port_binding_extension().MultipleTimes().AndReturn(False)"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        # prepare for request body "},{"line_number":936,"context_line":"        self.moxed_client.list_networks("},{"line_number":937,"context_line":"            tenant_id\u003dself.instance[\u0027project_id\u0027],"},{"line_number":938,"context_line":"            shared\u003dFalse).AndReturn("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2B7%2B0%3D","line":935,"updated":"2014-03-11 06:50:27.000000000","message":"Tail brank should be deleted.","commit_id":"2ae4c6a8f493f19691dac2cbdd28c2574ddb4bde"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"8c1a7e5e685380abc83448dee253be5f8e072737","unresolved":false,"context_lines":[{"line_number":926,"context_line":"                          self.context, self.instance)"},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"    def test_allocate_for_instance_ex3(self):"},{"line_number":929,"context_line":"        \"\"\"Mox to raise NoMoreFixedIps when creating the first port.\"\"\""},{"line_number":930,"context_line":"        api \u003d neutronapi.API()"},{"line_number":931,"context_line":"        self.mox.StubOutWithMock(api, \u0027_populate_neutron_extension_values\u0027)"},{"line_number":932,"context_line":"        self.mox.StubOutWithMock(api, \u0027_has_port_binding_extension\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2B6n4%3D","line":929,"updated":"2014-03-11 10:32:40.000000000","message":"For Py3 compatibility and as this is a new test, it\u0027d be better if you used the mock library instead of mox.","commit_id":"f98b1163578b66146715d28540710299f33481ae"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"604c09ea3601b1008d424851ab332c2df946ac70","unresolved":false,"context_lines":[{"line_number":1021,"context_line":"                },"},{"line_number":1022,"context_line":"            }"},{"line_number":1023,"context_line":"        port_req_body[\u0027port\u0027].update(binding_port_req_body[\u0027port\u0027])"},{"line_number":1024,"context_line":"        port \u003d {\u0027id\u0027: \u0027portid_\u0027 + self.nets2[0][\u0027id\u0027]}"},{"line_number":1025,"context_line":""},{"line_number":1026,"context_line":"        api._populate_neutron_extension_values(self.context,"},{"line_number":1027,"context_line":"            self.instance, binding_port_req_body).AndReturn(None)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_02bc9505","line":1024,"updated":"2014-06-25 05:34:35.000000000","message":"port will not be used.","commit_id":"93ab021d3a98114cbf7f68588c2c8399e97112b4"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"604c09ea3601b1008d424851ab332c2df946ac70","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"        self.moxed_client.create_port("},{"line_number":1032,"context_line":"            MyComparator(port_req_body)).AndRaise(OverQuotaException)"},{"line_number":1033,"context_line":"        self.mox.ReplayAll()"},{"line_number":1034,"context_line":"        self.assertRaises(exception.PortLimitExceeded, api.allocate_for_instance,"},{"line_number":1035,"context_line":"                          self.context, self.instance)"},{"line_number":1036,"context_line":""},{"line_number":1037,"context_line":"    def test_allocate_for_instance_no_port_or_network(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_4235bda6","line":1034,"updated":"2014-06-25 05:34:35.000000000","message":"too long as 1 line.","commit_id":"93ab021d3a98114cbf7f68588c2c8399e97112b4"}]}
