)]}'
{"doc/api_samples/os-attach-interfaces/attach-interfaces-create-req.json":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"acbd13a0041a61a48dbaf7c8bd20eb4f12ea7d16","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"interfaceAttachment\": {"},{"line_number":3,"context_line":"        \"networkId\": \"3cb9bc59-5699-4588-a4b1-b87f96708bc6\","},{"line_number":4,"context_line":"        \"portId\": \"ce531f90-199f-48c0-816c-13e38010b442\""},{"line_number":5,"context_line":"    }"},{"line_number":6,"context_line":"}"}],"source_content_type":"application/json","patch_set":6,"id":"AAAAM3%2F%2B0%2Bw%3D","line":4,"updated":"2013-02-18 11:59:22.000000000","message":"When both network_id and port_id are passed, allocate_for_instance in quantumv2/api.py uses port_id.\nThis example is a little confusing from this point of view.","commit_id":"fa2a1116a1a78a10350ee21b2db0c6ed9be4cef4"}],"doc/api_samples/os-attach-interfaces/attach-interfaces-create-resp.json":[{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"a558ee1ec644502976be346cc656202797492cb5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"interfaceAttachment\": {"},{"line_number":3,"context_line":"        \"fixed_ips\": {"},{"line_number":4,"context_line":"            \"enabled\": 1, "},{"line_number":5,"context_line":"            \"gateway\": \"192.168.1.254\", "},{"line_number":6,"context_line":"            \"ip\": \"192.168.1.3\", "},{"line_number":7,"context_line":"            \"netmask\": \"255.255.255.0\""}],"source_content_type":"application/json","patch_set":5,"id":"AAAAM3%2F%2B37I%3D","line":4,"updated":"2013-02-15 20:44:11.000000000","message":"Are these trailing spaces an artifact of the json generator, or can they be cleaned up?","commit_id":"09d0b568fd3d579fb9b539f83912298ebeabbc83"}],"nova/api/openstack/compute/contrib/attach_interfaces.py":[{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"945b2a289052b561f9a6960867482948b7dfde51","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    def show(self, req, server_id, id):"},{"line_number":87,"context_line":"        \"\"\"Return data about the given interface attachment.\"\"\""},{"line_number":88,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":89,"context_line":"       # authorize(context)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        port_id \u003d id"},{"line_number":92,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2B%2BAA%3D","line":89,"updated":"2013-02-12 22:37:23.000000000","message":"What\u0027s with this comment?","commit_id":"5fdb38007f0f9408f4836126452e1b5dc199b26c"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"945b2a289052b561f9a6960867482948b7dfde51","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            port_id \u003d body[\u0027interfaceAttachment\u0027].get(\u0027portId\u0027, None)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        msg \u003d _(\"Attach interface to instance %s\") % server_id"},{"line_number":118,"context_line":"        LOG.audit(msg, context\u003dcontext)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        try:"},{"line_number":121,"context_line":"            instance \u003d self.compute_api.get(context, server_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2B9%2FU%3D","line":118,"updated":"2013-02-12 22:37:23.000000000","message":"Shouldn\u0027t this log message include an instance\u003dserver_id arg?","commit_id":"5fdb38007f0f9408f4836126452e1b5dc199b26c"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"945b2a289052b561f9a6960867482948b7dfde51","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        authorize(context)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        port_id \u003d id"},{"line_number":147,"context_line":"        LOG.audit(_(\"Detach interface %s\"), port_id, context\u003dcontext)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        try:"},{"line_number":150,"context_line":"            instance \u003d self.compute_api.get(context, server_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2B9%2FA%3D","line":147,"updated":"2013-02-12 22:37:23.000000000","message":"Ditto for including the server_id in the log message call.","commit_id":"5fdb38007f0f9408f4836126452e1b5dc199b26c"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"db770467b17649d5327d3572e37be37b5fa0d0ae","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\"The intance interfaces extension.\"\"\""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import webob"},{"line_number":19,"context_line":"from webob import exc"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B8A4%3D","line":16,"updated":"2013-02-13 21:29:29.000000000","message":"Typo - instance. Might be worth a sentence or two about the extension here as well.","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"9ef064cf6b3f20fb618d97e4df1cd16392abfad4","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        elem \u003d xmlutil.SubTemplateElement(root, \u0027interfaceAttachment\u0027,"},{"line_number":66,"context_line":"                                          selector\u003d\u0027interfaceAttachments\u0027)"},{"line_number":67,"context_line":"        make_attachment(elem)"},{"line_number":68,"context_line":"        return xmlutil.MasterTemplate(root, 1)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"class InterfaceAttachmentController(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2B5Oc%3D","line":68,"updated":"2013-02-15 08:13:07.000000000","message":"I don\u0027t is still needed to create XML template for an API extension.\nNova API seems to generate automatically the XML like it\u0027s done an the compute API extension \u0027os_networks\u0027 https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/os_networks.py","commit_id":"88981436a2be8b4ee25f0b4ba28d689ea79d55b5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"dbc9710fd593112e2909cd45d0f8a68c69622e24","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 SINA Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B1Ag%3D","line":1,"updated":"2013-02-18 11:47:59.000000000","message":"2013","commit_id":"09d0b568fd3d579fb9b539f83912298ebeabbc83"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"dbc9710fd593112e2909cd45d0f8a68c69622e24","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def _translate_interface_attachment_view(port_info):"},{"line_number":33,"context_line":"    \"\"\"Maps keys for interface attachment details view.\"\"\""},{"line_number":34,"context_line":"    d \u003d {}"},{"line_number":35,"context_line":"    d[\u0027net_id\u0027] \u003d port_info[\u0027network_id\u0027]"},{"line_number":36,"context_line":"    d[\u0027port_id\u0027] \u003d port_info[\u0027id\u0027]"},{"line_number":37,"context_line":"    d[\u0027mac_addr\u0027] \u003d port_info[\u0027mac_address\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B1Ac%3D","line":34,"updated":"2013-02-18 11:47:59.000000000","message":"Consider:\nreturn {\n    \u0027net_id\u0027: port_info[\u0027network_id\u0027],\n    \u0027port_id\u0027: port_info[\u0027id\u0027],\n    \u0027mac_addr\u0027: port_info[\u0027mac_address\u0027],\n    \u0027port_state\u0027: port_info[\u0027status\u0027],\n    \u0027fixed_ips\u0027: port_info.get(\u0027fixed_ips\u0027, None)\n}","commit_id":"09d0b568fd3d579fb9b539f83912298ebeabbc83"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"a558ee1ec644502976be346cc656202797492cb5","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    def show(self, req, server_id, id):"},{"line_number":65,"context_line":"        \"\"\"Return data about the given interface attachment.\"\"\""},{"line_number":66,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":67,"context_line":"       # authorize(context)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        port_id \u003d id"},{"line_number":70,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B364%3D","line":67,"updated":"2013-02-15 20:44:11.000000000","message":"This is still commented out. Either add it back or remove it please.","commit_id":"09d0b568fd3d579fb9b539f83912298ebeabbc83"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"dbc9710fd593112e2909cd45d0f8a68c69622e24","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        except exception.NotFound:"},{"line_number":73,"context_line":"            raise exc.HTTPNotFound()"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            port_info \u003d quantumv2.get_client(context).show_port(port_id)"},{"line_number":77,"context_line":"        except exception.NotFound:"},{"line_number":78,"context_line":"            raise exc.HTTPNotFound()"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B1AQ%3D","line":75,"updated":"2013-02-18 11:47:59.000000000","message":"There are two options:\n1. Traditional networking\n2. Quantum\nHow do you differentiate between the two?\n\nPlease look at https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/servers.py#L607 for an example.","commit_id":"09d0b568fd3d579fb9b539f83912298ebeabbc83"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"dbc9710fd593112e2909cd45d0f8a68c69622e24","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            port_info \u003d quantumv2.get_client(context).show_port(port_id)"},{"line_number":77,"context_line":"        except exception.NotFound:"},{"line_number":78,"context_line":"            raise exc.HTTPNotFound()"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        return {\u0027interfaceAttachment\u0027: _translate_interface_attachment_view("}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B1AM%3D","line":77,"updated":"2013-02-18 11:47:59.000000000","message":"You should take into account other exceptions - for example the port_id is invalid.","commit_id":"09d0b568fd3d579fb9b539f83912298ebeabbc83"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"dbc9710fd593112e2909cd45d0f8a68c69622e24","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        results \u003d []"},{"line_number":147,"context_line":"        search_opts \u003d {\u0027device_id\u0027: instance[\u0027uuid\u0027]}"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        try:"},{"line_number":150,"context_line":"            data \u003d quantumv2.get_client(context).list_ports(**search_opts)"},{"line_number":151,"context_line":"        except exception.NotFound:"},{"line_number":152,"context_line":"            raise exc.HTTPNotFound()"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B1AA%3D","line":149,"updated":"2013-02-18 11:47:59.000000000","message":"Sam point as above - the differentiation between Nova networking and Quantum.","commit_id":"09d0b568fd3d579fb9b539f83912298ebeabbc83"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"acbd13a0041a61a48dbaf7c8bd20eb4f12ea7d16","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            raise exc.HTTPNotFound()"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            port_info \u003d quantumv2.get_client(context).show_port(port_id)"},{"line_number":77,"context_line":"        except exception.NotFound:"},{"line_number":78,"context_line":"            raise exc.HTTPNotFound()"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2B0%2Bg%3D","line":76,"updated":"2013-02-18 11:59:22.000000000","message":"I think we need to take care of non-quantum env.","commit_id":"fa2a1116a1a78a10350ee21b2db0c6ed9be4cef4"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"acbd13a0041a61a48dbaf7c8bd20eb4f12ea7d16","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        search_opts \u003d {\u0027device_id\u0027: instance[\u0027uuid\u0027]}"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        try:"},{"line_number":150,"context_line":"            data \u003d quantumv2.get_client(context).list_ports(**search_opts)"},{"line_number":151,"context_line":"        except exception.NotFound:"},{"line_number":152,"context_line":"            raise exc.HTTPNotFound()"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2B0%2Bo%3D","line":150,"updated":"2013-02-18 11:59:22.000000000","message":"Don\u0027t we need to take care non quantum environment?","commit_id":"fa2a1116a1a78a10350ee21b2db0c6ed9be4cef4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f81099db19659a09e7cd08845c9fba1e735945d7","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        search_opts \u003d {\u0027device_id\u0027: instance[\u0027uuid\u0027]}"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        try:"},{"line_number":150,"context_line":"            data \u003d quantumv2.get_client(context).list_ports(**search_opts)"},{"line_number":151,"context_line":"        except exception.NotFound:"},{"line_number":152,"context_line":"            raise exc.HTTPNotFound()"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2B0uM%3D","line":150,"in_reply_to":"AAAAM3%2F%2B0%2Bo%3D","updated":"2013-02-18 14:50:58.000000000","message":"I\u0027m not sure it\u0027s feasible at this point...","commit_id":"fa2a1116a1a78a10350ee21b2db0c6ed9be4cef4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"702577dafc5a1e0334ebc2dd0a717904a184da55","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 SINA Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bzmg%3D","line":1,"updated":"2013-02-18 21:35:51.000000000","message":"2013","commit_id":"32df642af082823fc9bed03aa2fd949de4ab78e9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"47e18419fe30d5177d47c5248deb39a32416447d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 SINA Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BzQs%3D","line":1,"in_reply_to":"AAAAM3%2F%2Bzmg%3D","updated":"2013-02-18 23:07:29.000000000","message":"No, actually 2012 :)","commit_id":"32df642af082823fc9bed03aa2fd949de4ab78e9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"702577dafc5a1e0334ebc2dd0a717904a184da55","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def _translate_interface_attachment_view(port_info):"},{"line_number":33,"context_line":"    \"\"\"Maps keys for interface attachment details view.\"\"\""},{"line_number":34,"context_line":"    d \u003d {}"},{"line_number":35,"context_line":"    d[\u0027net_id\u0027] \u003d port_info[\u0027network_id\u0027]"},{"line_number":36,"context_line":"    d[\u0027port_id\u0027] \u003d port_info[\u0027id\u0027]"},{"line_number":37,"context_line":"    d[\u0027mac_addr\u0027] \u003d port_info[\u0027mac_address\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BzmY%3D","line":34,"updated":"2013-02-18 21:35:51.000000000","message":"Consider:\nreturn {\n\u0027net_id\u0027: port_info[\u0027network_id\u0027],\n\u0027port_id\u0027: port_info[\u0027id\u0027],\n\u0027mac_addr\u0027: port_info[\u0027mac_address\u0027],\n\u0027port_state\u0027: port_info[\u0027status\u0027],\n\u0027fixed_ips\u0027: port_info.get(\u0027fixed_ips\u0027, None)\n}","commit_id":"32df642af082823fc9bed03aa2fd949de4ab78e9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"47e18419fe30d5177d47c5248deb39a32416447d","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def _translate_interface_attachment_view(port_info):"},{"line_number":33,"context_line":"    \"\"\"Maps keys for interface attachment details view.\"\"\""},{"line_number":34,"context_line":"    d \u003d {}"},{"line_number":35,"context_line":"    d[\u0027net_id\u0027] \u003d port_info[\u0027network_id\u0027]"},{"line_number":36,"context_line":"    d[\u0027port_id\u0027] \u003d port_info[\u0027id\u0027]"},{"line_number":37,"context_line":"    d[\u0027mac_addr\u0027] \u003d port_info[\u0027mac_address\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BzQk%3D","line":34,"in_reply_to":"AAAAM3%2F%2BzmY%3D","updated":"2013-02-18 23:07:29.000000000","message":"This was not my style, and didn\u0027t make a point of changing it when I adopted this. I\u0027ll make theis change since I\u0027m about to submit an update, but I really don\u0027t think it\u0027s important to obsess over such things :)","commit_id":"32df642af082823fc9bed03aa2fd949de4ab78e9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"702577dafc5a1e0334ebc2dd0a717904a184da55","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            raise exc.HTTPNotFound()"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            port_info \u003d quantumv2.get_client(context).show_port(port_id)"},{"line_number":77,"context_line":"        except exception.NotFound:"},{"line_number":78,"context_line":"            raise exc.HTTPNotFound()"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BzmI%3D","line":76,"updated":"2013-02-18 21:35:51.000000000","message":"what if this is traditional nova networking - did anyone look at the comments i had on patch set 5?","commit_id":"32df642af082823fc9bed03aa2fd949de4ab78e9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4e10f744a6aa0592c04525337b81ced6737c4d1d","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            raise exc.HTTPNotFound()"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        # The attach is async"},{"line_number":104,"context_line":"        attachment \u003d {}"},{"line_number":105,"context_line":"        network, mapping \u003d network_info"},{"line_number":106,"context_line":"        attachment[\u0027mac_address\u0027] \u003d mapping[\u0027mac\u0027]"},{"line_number":107,"context_line":"        attachment[\u0027network_id\u0027] \u003d network[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bzhc%3D","line":104,"updated":"2013-02-18 21:59:28.000000000","message":"do not need this","commit_id":"32df642af082823fc9bed03aa2fd949de4ab78e9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4e10f744a6aa0592c04525337b81ced6737c4d1d","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        # The attach is async"},{"line_number":104,"context_line":"        attachment \u003d {}"},{"line_number":105,"context_line":"        network, mapping \u003d network_info"},{"line_number":106,"context_line":"        attachment[\u0027mac_address\u0027] \u003d mapping[\u0027mac\u0027]"},{"line_number":107,"context_line":"        attachment[\u0027network_id\u0027] \u003d network[\u0027id\u0027]"},{"line_number":108,"context_line":"        attachment[\u0027fixed_ips\u0027] \u003d mapping[\u0027ips\u0027]"},{"line_number":109,"context_line":"        attachment[\u0027port_id\u0027] \u003d mapping[\u0027vif_uuid\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bzg8%3D","line":106,"updated":"2013-02-18 21:59:28.000000000","message":"consider:\n\nattachment \u003d {\n    \u0027mac_address\u0027]: mapping[\u0027mac\u0027],\n    \u0027network_id\u0027]: network[\u0027id\u0027],\n    \u0027fixed_ips\u0027]: mapping[\u0027ips\u0027],\n   \u0027port_id\u0027]: mapping[\u0027vif_uuid\u0027]\n}","commit_id":"32df642af082823fc9bed03aa2fd949de4ab78e9"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"598682100abd7d1be612b3df2297c6aed724276f","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    elem.set(\u0027port_id\u0027)"},{"line_number":47,"context_line":"    elem.set(\u0027mac_addr\u0027)"},{"line_number":48,"context_line":"    elem.set(\u0027fixed_ips\u0027)"},{"line_number":49,"context_line":"    elem.set(\u0027port_state\u0027)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"class InterfaceAttachmentController(object):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2ByZ8%3D","line":49,"updated":"2013-02-19 07:40:00.000000000","message":"This function is no more useful","commit_id":"a26ccb0aef9b6e7e92a625f709f8c53bc6a038be"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"f24ec855a7122cfecd4ab867ec2bf7925ba25f05","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            raise exc.HTTPNotFound()"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        try:"},{"line_number":77,"context_line":"            port_info \u003d self.network_api.show_port(context, port_id)"},{"line_number":78,"context_line":"        except exception.NotFound:"},{"line_number":79,"context_line":"            raise exc.HTTPNotFound()"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2ByvQ%3D","line":77,"updated":"2013-02-19 04:12:09.000000000","message":"this call confirms that server_id is a valid server and the port_id is a valid port, but it does not confirm that server_id actually has an interface that users port_id.  To do this, you should check the device_id field of the returned port to make sure it has the valid server_id.","commit_id":"a26ccb0aef9b6e7e92a625f709f8c53bc6a038be"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f260c545f41b407864e2faec5dfbe7ac428fcf61","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            raise exc.HTTPNotFound()"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        try:"},{"line_number":77,"context_line":"            port_info \u003d self.network_api.show_port(context, port_id)"},{"line_number":78,"context_line":"        except exception.NotFound:"},{"line_number":79,"context_line":"            raise exc.HTTPNotFound()"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2BxPM%3D","line":77,"in_reply_to":"AAAAM3%2F%2ByvQ%3D","updated":"2013-02-19 16:57:42.000000000","message":"Nice, done.","commit_id":"a26ccb0aef9b6e7e92a625f709f8c53bc6a038be"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"f24ec855a7122cfecd4ab867ec2bf7925ba25f05","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        port_id \u003d None"},{"line_number":91,"context_line":"        if body:"},{"line_number":92,"context_line":"            network_id \u003d body[\u0027interfaceAttachment\u0027].get(\u0027networkId\u0027, None)"},{"line_number":93,"context_line":"            port_id \u003d body[\u0027interfaceAttachment\u0027].get(\u0027portId\u0027, None)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        try:"},{"line_number":96,"context_line":"            instance \u003d self.compute_api.get(context, server_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2Byuw%3D","line":93,"updated":"2013-02-19 04:12:09.000000000","message":"note: last I checked, if port_id is specified, the quantum logic will use the network_id of the port, ignoring the network_id entirely.  As a result, you may want to check and error here if both are provided, or if you want to be able to pass in both as long as the network_id passed in is the same as the network_id of the port, you could add a check to quantumv2/api.py","commit_id":"a26ccb0aef9b6e7e92a625f709f8c53bc6a038be"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f260c545f41b407864e2faec5dfbe7ac428fcf61","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        port_id \u003d None"},{"line_number":91,"context_line":"        if body:"},{"line_number":92,"context_line":"            network_id \u003d body[\u0027interfaceAttachment\u0027].get(\u0027networkId\u0027, None)"},{"line_number":93,"context_line":"            port_id \u003d body[\u0027interfaceAttachment\u0027].get(\u0027portId\u0027, None)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        try:"},{"line_number":96,"context_line":"            instance \u003d self.compute_api.get(context, server_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2BxPI%3D","line":93,"in_reply_to":"AAAAM3%2F%2Byuw%3D","updated":"2013-02-19 16:57:42.000000000","message":"Cha man.","commit_id":"a26ccb0aef9b6e7e92a625f709f8c53bc6a038be"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"1f9f8834e83176c6a2d6dc50f6b96c0625d27f5f","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        if body:"},{"line_number":92,"context_line":"            network_id \u003d body[\u0027interfaceAttachment\u0027].get(\u0027networkId\u0027, None)"},{"line_number":93,"context_line":"            port_id \u003d body[\u0027interfaceAttachment\u0027].get(\u0027portId\u0027, None)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        try:"},{"line_number":96,"context_line":"            instance \u003d self.compute_api.get(context, server_id)"},{"line_number":97,"context_line":"            LOG.audit(_(\"Attach interface\"), instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2BxNc%3D","line":94,"updated":"2013-02-19 17:04:30.000000000","message":"sorry, one more comment: \n\nwhen booting a VM, we allow the user to optionally specify a fixed-ip, see: https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/servers.py#L282\n\nideally, for consistency we would do the same here.  I think the code change would be minor, since you\u0027d just have to pass it to allocate_for_instance rather than always passing None, but since today is the last day of G-3, I\u0027ll understand if you don\u0027t :)","commit_id":"a26ccb0aef9b6e7e92a625f709f8c53bc6a038be"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"f24ec855a7122cfecd4ab867ec2bf7925ba25f05","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                \u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":114,"context_line":"                \u0027fixed_ips\u0027: mapping[\u0027ips\u0027],"},{"line_number":115,"context_line":"                \u0027port_id\u0027: mapping[\u0027vif_uuid\u0027],"},{"line_number":116,"context_line":"                }"},{"line_number":117,"context_line":"            }"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def update(self, req, server_id, id, body):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2ByvY%3D","line":116,"updated":"2013-02-19 04:12:09.000000000","message":"why does this dict has a subtly different format than the dict returned by other calls that use _translate_interface_attachment_view ? \n\nnet_id vs. network_id\n\nmac_addr vs. mac_address \n\nexistence of port state.","commit_id":"a26ccb0aef9b6e7e92a625f709f8c53bc6a038be"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f260c545f41b407864e2faec5dfbe7ac428fcf61","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                \u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":114,"context_line":"                \u0027fixed_ips\u0027: mapping[\u0027ips\u0027],"},{"line_number":115,"context_line":"                \u0027port_id\u0027: mapping[\u0027vif_uuid\u0027],"},{"line_number":116,"context_line":"                }"},{"line_number":117,"context_line":"            }"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def update(self, req, server_id, id, body):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2BxO4%3D","line":116,"in_reply_to":"AAAAM3%2F%2ByvY%3D","updated":"2013-02-19 16:57:42.000000000","message":"Yikes! I cleaned this all up for the next one.","commit_id":"a26ccb0aef9b6e7e92a625f709f8c53bc6a038be"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"f24ec855a7122cfecd4ab867ec2bf7925ba25f05","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def update(self, req, server_id, id, body):"},{"line_number":120,"context_line":"        \"\"\"Update a interface attachment.  We don\u0027t currently support this.\"\"\""},{"line_number":121,"context_line":"        raise exc.HTTPBadRequest()"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def delete(self, req, server_id, id):"},{"line_number":124,"context_line":"        \"\"\"Detach an interface from an instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2Byvo%3D","line":121,"updated":"2013-02-19 04:12:09.000000000","message":"I would use HTTPNotImplemented. \n\nHTTPBadRequest usually implies something in the content passed by the client was malformed and could be corrected to make a valid request.","commit_id":"a26ccb0aef9b6e7e92a625f709f8c53bc6a038be"}],"nova/compute/manager.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"db770467b17649d5327d3572e37be37b5fa0d0ae","unresolved":false,"context_lines":[{"line_number":2674,"context_line":"            pass"},{"line_number":2675,"context_line":""},{"line_number":2676,"context_line":"    def attach_interface(self, context, instance, network_id, port_id):"},{"line_number":2677,"context_line":"        \"\"\"use hotplug to add an network adapter to an instance.\"\"\""},{"line_number":2678,"context_line":"        if not CONF.network_api_class \u003d\u003d \u0027nova.network.quantumv2.api.API\u0027:"},{"line_number":2679,"context_line":"            # TODO(ethuleau): Add support for other network driver"},{"line_number":2680,"context_line":"            raise NotImplementedError"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B8Ag%3D","line":2677,"updated":"2013-02-13 21:29:29.000000000","message":"Capital U :). [yes, I know its trivial.]","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"db770467b17649d5327d3572e37be37b5fa0d0ae","unresolved":false,"context_lines":[{"line_number":2675,"context_line":""},{"line_number":2676,"context_line":"    def attach_interface(self, context, instance, network_id, port_id):"},{"line_number":2677,"context_line":"        \"\"\"use hotplug to add an network adapter to an instance.\"\"\""},{"line_number":2678,"context_line":"        if not CONF.network_api_class \u003d\u003d \u0027nova.network.quantumv2.api.API\u0027:"},{"line_number":2679,"context_line":"            # TODO(ethuleau): Add support for other network driver"},{"line_number":2680,"context_line":"            raise NotImplementedError"},{"line_number":2681,"context_line":"        requested_networks \u003d [(network_id, None, port_id)]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B8AY%3D","line":2678,"updated":"2013-02-13 21:29:29.000000000","message":"I don\u0027t think this is needed or appropriate - the network_api implementation will raise NotImplementedError anyway, and checking this here will prevent third party network implementations from supporting this.","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"db770467b17649d5327d3572e37be37b5fa0d0ae","unresolved":false,"context_lines":[{"line_number":2680,"context_line":"            raise NotImplementedError"},{"line_number":2681,"context_line":"        requested_networks \u003d [(network_id, None, port_id)]"},{"line_number":2682,"context_line":"        network_info \u003d self.network_api.allocate_for_instance("},{"line_number":2683,"context_line":"            context, instance, requested_networks\u003drequested_networks)"},{"line_number":2684,"context_line":"        legacy_net_info \u003d self._legacy_nw_info(network_info)"},{"line_number":2685,"context_line":"        for (network, mapping) in legacy_net_info:"},{"line_number":2686,"context_line":"            if network[\u0027id\u0027] \u003d\u003d network_id:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B8AM%3D","line":2683,"updated":"2013-02-13 21:29:29.000000000","message":"Calling allocate_for_instance may be problematic, as it currently assumes it is doing full allocation, not incremental.","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"db770467b17649d5327d3572e37be37b5fa0d0ae","unresolved":false,"context_lines":[{"line_number":2681,"context_line":"        requested_networks \u003d [(network_id, None, port_id)]"},{"line_number":2682,"context_line":"        network_info \u003d self.network_api.allocate_for_instance("},{"line_number":2683,"context_line":"            context, instance, requested_networks\u003drequested_networks)"},{"line_number":2684,"context_line":"        legacy_net_info \u003d self._legacy_nw_info(network_info)"},{"line_number":2685,"context_line":"        for (network, mapping) in legacy_net_info:"},{"line_number":2686,"context_line":"            if network[\u0027id\u0027] \u003d\u003d network_id:"},{"line_number":2687,"context_line":"                self.driver.attach_interface(instance, [(network, mapping)])"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B8AU%3D","line":2684,"updated":"2013-02-13 21:29:29.000000000","message":"This is using the legacy API - why? Its deprecated and something we\u0027re trying to remove.","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a08e14d93dd160097c368c8e87d7f95a2ee56d6b","unresolved":false,"context_lines":[{"line_number":2681,"context_line":"        requested_networks \u003d [(network_id, None, port_id)]"},{"line_number":2682,"context_line":"        network_info \u003d self.network_api.allocate_for_instance("},{"line_number":2683,"context_line":"            context, instance, requested_networks\u003drequested_networks)"},{"line_number":2684,"context_line":"        legacy_net_info \u003d self._legacy_nw_info(network_info)"},{"line_number":2685,"context_line":"        for (network, mapping) in legacy_net_info:"},{"line_number":2686,"context_line":"            if network[\u0027id\u0027] \u003d\u003d network_id:"},{"line_number":2687,"context_line":"                self.driver.attach_interface(instance, [(network, mapping)])"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B6es%3D","line":2684,"in_reply_to":"AAAAM3%2F%2B8AU%3D","updated":"2013-02-14 17:04:45.000000000","message":"Looks like legacy_nwinfo is still used pervasively in compute manager and the vif drivers. I think it\u0027s reasonable to leave this as it is here to avoid confusion in this change, and let this get swept into a legacyectomy cleanup later.","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"db770467b17649d5327d3572e37be37b5fa0d0ae","unresolved":false,"context_lines":[{"line_number":2690,"context_line":"    def detach_interface(self, context, instance, port_id):"},{"line_number":2691,"context_line":"        \"\"\"Detach an network adapter from an instance.\"\"\""},{"line_number":2692,"context_line":"        if not CONF.network_api_class \u003d\u003d \u0027nova.network.quantumv2.api.API\u0027:"},{"line_number":2693,"context_line":"            # TODO(ethuleau): Add support for other network driver"},{"line_number":2694,"context_line":"            raise NotImplementedError"},{"line_number":2695,"context_line":"        network_info \u003d self.network_api.deallocate_for_instance("},{"line_number":2696,"context_line":"            context, instance, port_id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B8AE%3D","line":2693,"updated":"2013-02-13 21:29:29.000000000","message":"Ditto here on this being inappropriate.","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"db770467b17649d5327d3572e37be37b5fa0d0ae","unresolved":false,"context_lines":[{"line_number":2693,"context_line":"            # TODO(ethuleau): Add support for other network driver"},{"line_number":2694,"context_line":"            raise NotImplementedError"},{"line_number":2695,"context_line":"        network_info \u003d self.network_api.deallocate_for_instance("},{"line_number":2696,"context_line":"            context, instance, port_id\u003dport_id)"},{"line_number":2697,"context_line":"        legacy_net_info \u003d self._legacy_nw_info(network_info)"},{"line_number":2698,"context_line":"        self.driver.detach_interface(instance, legacy_net_info)"},{"line_number":2699,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B8AA%3D","line":2696,"updated":"2013-02-13 21:29:29.000000000","message":"and here on calling the existing deallocate API.","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"db770467b17649d5327d3572e37be37b5fa0d0ae","unresolved":false,"context_lines":[{"line_number":2695,"context_line":"        network_info \u003d self.network_api.deallocate_for_instance("},{"line_number":2696,"context_line":"            context, instance, port_id\u003dport_id)"},{"line_number":2697,"context_line":"        legacy_net_info \u003d self._legacy_nw_info(network_info)"},{"line_number":2698,"context_line":"        self.driver.detach_interface(instance, legacy_net_info)"},{"line_number":2699,"context_line":""},{"line_number":2700,"context_line":"    def _get_compute_info(self, context, host):"},{"line_number":2701,"context_line":"        compute_node_ref \u003d self.conductor_api.service_get_by_compute_host("}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B7%2F8%3D","line":2698,"updated":"2013-02-13 21:29:29.000000000","message":"And here on using legacy representation.","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"}],"nova/exception.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"db770467b17649d5327d3572e37be37b5fa0d0ae","unresolved":false,"context_lines":[{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":""},{"line_number":1087,"context_line":"class InterfaceDetachFailed(Invalid):"},{"line_number":1088,"context_line":"    message \u003d _(\"Failed to detach network adapter device to %(instance)s\")"},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":""},{"line_number":1091,"context_line":"class InterfaceDetachFailed(Invalid):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B7%2Fw%3D","line":1088,"updated":"2013-02-13 21:29:29.000000000","message":"This is duplicate with the next class (and has a typo compared to the next one which is right).","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"9ef064cf6b3f20fb618d97e4df1cd16392abfad4","unresolved":false,"context_lines":[{"line_number":497,"context_line":""},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"class PortNotFound(NotFound):"},{"line_number":500,"context_line":"    message \u003d _(\"Port id %(port_id)s could not be found.\")"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"class NetworkNotFoundForBridge(NetworkNotFound):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2B5OQ%3D","line":500,"updated":"2013-02-15 08:13:07.000000000","message":"Class already defined line 536","commit_id":"88981436a2be8b4ee25f0b4ba28d689ea79d55b5"}],"nova/network/api.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"acbd13a0041a61a48dbaf7c8bd20eb4f12ea7d16","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        args[\u0027project_id\u0027] \u003d instance[\u0027project_id\u0027]"},{"line_number":283,"context_line":"        args[\u0027host\u0027] \u003d instance[\u0027host\u0027]"},{"line_number":284,"context_line":"        self.network_rpcapi.deallocate_for_instance(context, **args)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    @wrap_check_policy"},{"line_number":287,"context_line":"    def deallocate_port_for_instance(self, context, instance, port_id,"},{"line_number":288,"context_line":"                                     conductor_api\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2B094%3D","line":285,"updated":"2013-02-18 11:59:22.000000000","message":"Though allocate_for_instance works for adding a new port,\nI prefer to adding allocate_port_for_instance() to keep symmetry of API.","commit_id":"fa2a1116a1a78a10350ee21b2db0c6ed9be4cef4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f81099db19659a09e7cd08845c9fba1e735945d7","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        args[\u0027project_id\u0027] \u003d instance[\u0027project_id\u0027]"},{"line_number":283,"context_line":"        args[\u0027host\u0027] \u003d instance[\u0027host\u0027]"},{"line_number":284,"context_line":"        self.network_rpcapi.deallocate_for_instance(context, **args)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    @wrap_check_policy"},{"line_number":287,"context_line":"    def deallocate_port_for_instance(self, context, instance, port_id,"},{"line_number":288,"context_line":"                                     conductor_api\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2B0uU%3D","line":285,"in_reply_to":"AAAAM3%2F%2B094%3D","updated":"2013-02-18 14:50:58.000000000","message":"Yes, ideally.","commit_id":"fa2a1116a1a78a10350ee21b2db0c6ed9be4cef4"}],"nova/network/quantumv2/api.py":[{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"945b2a289052b561f9a6960867482948b7dfde51","unresolved":false,"context_lines":[{"line_number":659,"context_line":"            #_ensure_requested_network_ordering("},{"line_number":660,"context_line":"            #    lambda x: x[\u0027network_id\u0027],"},{"line_number":661,"context_line":"            #    ports,"},{"line_number":662,"context_line":"            #    [n[\u0027id\u0027] for n in networks])"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"        nw_info \u003d network_model.NetworkInfo()"},{"line_number":665,"context_line":"        for port in ports:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2B9%2BQ%3D","line":662,"updated":"2013-02-12 22:37:23.000000000","message":"What\u0027s with this comment block?","commit_id":"5fdb38007f0f9408f4836126452e1b5dc199b26c"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"db770467b17649d5327d3572e37be37b5fa0d0ae","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        return nets"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def allocate_for_instance(self, context, instance, **kwargs):"},{"line_number":113,"context_line":"        \"\"\"Allocate network resources for the instance."},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        TODO(someone): document the rest of these parameters."},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B7%2Fg%3D","line":113,"updated":"2013-02-13 21:29:29.000000000","message":"The docstring change is insufficient - I\u0027m pretty sure the function will misbehave for baremetal when run on an already allocated instance, for example. We\u0027ll need tests around the use of macs with allocated instances.","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"db770467b17649d5327d3572e37be37b5fa0d0ae","unresolved":false,"context_lines":[{"line_number":215,"context_line":"                conductor_api\u003dkwargs.get(\u0027conductor_api\u0027))"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def deallocate_for_instance(self, context, instance, **kwargs):"},{"line_number":218,"context_line":"        \"\"\"Deallocate network resources related to the instance.\"\"\""},{"line_number":219,"context_line":"        LOG.debug(_(\u0027deallocate_for_instance() for %s\u0027),"},{"line_number":220,"context_line":"                  instance[\u0027display_name\u0027])"},{"line_number":221,"context_line":"        port_id \u003d kwargs.get(\u0027port_id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B7%2FQ%3D","line":218,"updated":"2013-02-13 21:29:29.000000000","message":"I think this would be cleaner as two separate methods, one to remove a single port and one to free everything.","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a08e14d93dd160097c368c8e87d7f95a2ee56d6b","unresolved":false,"context_lines":[{"line_number":215,"context_line":"                conductor_api\u003dkwargs.get(\u0027conductor_api\u0027))"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def deallocate_for_instance(self, context, instance, **kwargs):"},{"line_number":218,"context_line":"        \"\"\"Deallocate network resources related to the instance.\"\"\""},{"line_number":219,"context_line":"        LOG.debug(_(\u0027deallocate_for_instance() for %s\u0027),"},{"line_number":220,"context_line":"                  instance[\u0027display_name\u0027])"},{"line_number":221,"context_line":"        port_id \u003d kwargs.get(\u0027port_id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B6g4%3D","line":218,"in_reply_to":"AAAAM3%2F%2B7%2FQ%3D","updated":"2013-02-14 17:04:45.000000000","message":"Are you proposing that I add a new api point that can be used to remove a single port (as would be the case in the interface detach), which would be used by the deallocate-all case? Presumably this would only be supported for quantum_api and not nova-network, right?","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"db770467b17649d5327d3572e37be37b5fa0d0ae","unresolved":false,"context_lines":[{"line_number":652,"context_line":"        data \u003d quantumv2.get_client(context,"},{"line_number":653,"context_line":"                                    admin\u003dTrue).list_ports(**search_opts)"},{"line_number":654,"context_line":"        ports \u003d data.get(\u0027ports\u0027, [])"},{"line_number":655,"context_line":"        if networks is None:"},{"line_number":656,"context_line":"            networks \u003d self._get_available_networks(context,"},{"line_number":657,"context_line":"                                                    instance[\u0027project_id\u0027])"},{"line_number":658,"context_line":"        #else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B7%2B4%3D","line":655,"updated":"2013-02-13 21:29:29.000000000","message":"Doesn\u0027t this mean that an empty network list will not get populated now?","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a08e14d93dd160097c368c8e87d7f95a2ee56d6b","unresolved":false,"context_lines":[{"line_number":652,"context_line":"        data \u003d quantumv2.get_client(context,"},{"line_number":653,"context_line":"                                    admin\u003dTrue).list_ports(**search_opts)"},{"line_number":654,"context_line":"        ports \u003d data.get(\u0027ports\u0027, [])"},{"line_number":655,"context_line":"        if networks is None:"},{"line_number":656,"context_line":"            networks \u003d self._get_available_networks(context,"},{"line_number":657,"context_line":"                                                    instance[\u0027project_id\u0027])"},{"line_number":658,"context_line":"        #else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B6gE%3D","line":655,"in_reply_to":"AAAAM3%2F%2B7%2B4%3D","updated":"2013-02-14 17:04:45.000000000","message":"I have to claim ignorance here, I guess. Would we ever get here with an empty list (i.e. not None) and expect to get anything other than an emptyish nw_info?","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"9ef064cf6b3f20fb618d97e4df1cd16392abfad4","unresolved":false,"context_lines":[{"line_number":215,"context_line":"                conductor_api\u003dkwargs.get(\u0027conductor_api\u0027))"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def deallocate_port_for_instance(self, context, instance, port_id,"},{"line_number":218,"context_line":"                                     **kwargs):"},{"line_number":219,"context_line":"        data \u003d quantumv2.get_client(context).list_ports({\u0027id\u0027: port_id})"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2B5Os%3D","line":218,"updated":"2013-02-15 08:13:07.000000000","message":"- If you create a new api point for deallocate a port of an instance, it will be better to create a new api point for allocate a port to an instance. What do you think  ?\n\n- kwargs no more needed in function call if the port_id is an other attribute.","commit_id":"88981436a2be8b4ee25f0b4ba28d689ea79d55b5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"14c550ea752697d9506aec791d5d7fdfc31b0b21","unresolved":false,"context_lines":[{"line_number":215,"context_line":"                conductor_api\u003dkwargs.get(\u0027conductor_api\u0027))"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def deallocate_port_for_instance(self, context, instance, port_id,"},{"line_number":218,"context_line":"                                     **kwargs):"},{"line_number":219,"context_line":"        data \u003d quantumv2.get_client(context).list_ports({\u0027id\u0027: port_id})"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2B44s%3D","line":218,"in_reply_to":"AAAAM3%2F%2B5Os%3D","updated":"2013-02-15 14:37:45.000000000","message":"I use kwargs for the conductor_api, and mirrored that from the original function. However, I could make it a specific keyword arg, I just didn\u0027t know if that was convention here.\n\nI can create the attach port, but the allocate_for_instance() case looks like it is much more complicated to break apart :/","commit_id":"88981436a2be8b4ee25f0b4ba28d689ea79d55b5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6b17093c0b3e019ec672977962db05607ffc5054","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        self.trigger_instance_remove_security_group_refresh(context, instance)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        return self.get_instance_nw_info(context, instance,"},{"line_number":237,"context_line":"                conductor_api\u003dkwargs.get(\u0027conductor_api\u0027))"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def deallocate_for_instance(self, context, instance, **kwargs):"},{"line_number":240,"context_line":"        \"\"\"Deallocate all network resources related to the instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2B6LM%3D","line":237,"updated":"2013-02-14 19:10:57.000000000","message":"Note that I made this new method return (I think) all the network info about the instance, which I would expect is what we want. The previous version of the patch returned only information about networks with the network_id of the port we deleted, which doesn\u0027t make any sense to me. Comments on this are appreciated :)","commit_id":"88981436a2be8b4ee25f0b4ba28d689ea79d55b5"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"9ef064cf6b3f20fb618d97e4df1cd16392abfad4","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        self.trigger_instance_remove_security_group_refresh(context, instance)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        return self.get_instance_nw_info(context, instance,"},{"line_number":237,"context_line":"                conductor_api\u003dkwargs.get(\u0027conductor_api\u0027))"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def deallocate_for_instance(self, context, instance, **kwargs):"},{"line_number":240,"context_line":"        \"\"\"Deallocate all network resources related to the instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2B5O4%3D","line":237,"in_reply_to":"AAAAM3%2F%2B6LM%3D","updated":"2013-02-15 08:13:07.000000000","message":"Yes, I think it\u0027s better to return all network_info about the instance.","commit_id":"88981436a2be8b4ee25f0b4ba28d689ea79d55b5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"dbc9710fd593112e2909cd45d0f8a68c69622e24","unresolved":false,"context_lines":[{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def deallocate_port_for_instance(self, context, instance, port_id,"},{"line_number":218,"context_line":"                                     conductor_api\u003dNone):"},{"line_number":219,"context_line":"        data \u003d quantumv2.get_client(context).list_ports({\u0027id\u0027: port_id})"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        try:"},{"line_number":222,"context_line":"            port \u003d data.get(\u0027ports\u0027, [])[0]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B0%2Fg%3D","line":219,"updated":"2013-02-18 11:47:59.000000000","message":"Why do we need the list ports. You could do the delete port directly (worst case it does not exist)","commit_id":"09d0b568fd3d579fb9b539f83912298ebeabbc83"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4e10f744a6aa0592c04525337b81ced6737c4d1d","unresolved":false,"context_lines":[{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def deallocate_port_for_instance(self, context, instance, port_id,"},{"line_number":218,"context_line":"                                     conductor_api\u003dNone):"},{"line_number":219,"context_line":"        data \u003d quantumv2.get_client(context).list_ports(**{\u0027id\u0027: port_id})"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        try:"},{"line_number":222,"context_line":"            port \u003d data.get(\u0027ports\u0027, [])[0]"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bzgg%3D","line":219,"updated":"2013-02-18 21:59:28.000000000","message":"we do not need the list - we can try and delete the port directly: you can delete line 219-226 abd just change the delete parameter to port_id\nsaves a call to quantum","commit_id":"32df642af082823fc9bed03aa2fd949de4ab78e9"}],"nova/tests/api/openstack/compute/contrib/test_attach_interfaces.py":[{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"945b2a289052b561f9a6960867482948b7dfde51","unresolved":false,"context_lines":[{"line_number":109,"context_line":"             \u0027ips\u0027: {\u0027ip\u0027:\u0027192.168.1.3\u0027,"},{"line_number":110,"context_line":"                     \u0027enabled\u0027:1,"},{"line_number":111,"context_line":"                     \u0027netmask\u0027:\u0027255.255.255.0\u0027,"},{"line_number":112,"context_line":"                     \u0027gateway\u0027:\u0027192.168.1.254\u0027}"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"             }"},{"line_number":115,"context_line":"    ]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2B9%2BI%3D","line":112,"updated":"2013-02-12 22:37:23.000000000","message":"I\u0027d prefer this block was formatted like other dicts -- left align the first character of the key name.","commit_id":"5fdb38007f0f9408f4836126452e1b5dc199b26c"},{"author":{"_account_id":1313,"name":"yaguang","display_name":"Yaguang Tang","email":"heut2008@gmail.com","username":"heut2008"},"change_message_id":"dc99ac35dd9b414c20cdf09c28e413bdbe57787b","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        attachments \u003d attach_interfaces.InterfaceAttachmentController()"},{"line_number":194,"context_line":"        req \u003d webob.Request.blank(\u0027/v2/fake/os-interfaces/attach\u0027)"},{"line_number":195,"context_line":"        req.method \u003d \u0027POST\u0027"},{"line_number":196,"context_line":"        body \u003d {}"},{"line_number":197,"context_line":"        req.body \u003d jsonutils.dumps({})"},{"line_number":198,"context_line":"        req.headers[\u0027content-type\u0027] \u003d \u0027application/json\u0027"},{"line_number":199,"context_line":"        req.environ[\u0027nova.context\u0027] \u003d self.context"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2B5do%3D","line":196,"updated":"2013-02-15 04:37:23.000000000","message":"The request body should include port uuid body \u003d {\u0027interfaceAttachment\u0027: {\u0027portId\u0027: FAKE_PORT_ID1}}","commit_id":"88981436a2be8b4ee25f0b4ba28d689ea79d55b5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"dbc9710fd593112e2909cd45d0f8a68c69622e24","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 SINA Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B0%2Fc%3D","line":1,"updated":"2013-02-18 11:47:59.000000000","message":"2013","commit_id":"09d0b568fd3d579fb9b539f83912298ebeabbc83"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"dbc9710fd593112e2909cd45d0f8a68c69622e24","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from nova.openstack.common import cfg"},{"line_number":21,"context_line":"from nova.openstack.common import jsonutils"},{"line_number":22,"context_line":"from nova import test"},{"line_number":23,"context_line":"import quantumclient"},{"line_number":24,"context_line":"import webob"},{"line_number":25,"context_line":"from webob import exc"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B0%2FY%3D","line":23,"updated":"2013-02-18 11:47:59.000000000","message":"Not sure what the nova HACKING rules are. line 23 - 25 should be in a separate section above the nova imports","commit_id":"09d0b568fd3d579fb9b539f83912298ebeabbc83"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"a558ee1ec644502976be346cc656202797492cb5","unresolved":false,"context_lines":[{"line_number":39,"context_line":"FAKE_NET_ID3 \u003d \u002766666666-6666-6666-6666-666666666666\u0027"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"port_data1 \u003d {"},{"line_number":42,"context_line":"  \"id\": FAKE_PORT_ID1,"},{"line_number":43,"context_line":"  \"network_id\": FAKE_NET_ID1,"},{"line_number":44,"context_line":"  \"admin_state_up\": True,"},{"line_number":45,"context_line":"  \"status\": \"ACTIVE\","}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B36g%3D","line":42,"updated":"2013-02-15 20:44:11.000000000","message":"Why two space tab stops for these?","commit_id":"09d0b568fd3d579fb9b539f83912298ebeabbc83"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"a558ee1ec644502976be346cc656202797492cb5","unresolved":false,"context_lines":[{"line_number":49,"context_line":"}"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"port_data2 \u003d {"},{"line_number":52,"context_line":"  \"id\": FAKE_PORT_ID2,"},{"line_number":53,"context_line":"  \"network_id\": FAKE_NET_ID2,"},{"line_number":54,"context_line":"  \"admin_state_up\": True,"},{"line_number":55,"context_line":"  \"status\": \"ACTIVE\","}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B36Y%3D","line":52,"updated":"2013-02-15 20:44:11.000000000","message":"Ditto","commit_id":"09d0b568fd3d579fb9b539f83912298ebeabbc83"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"a558ee1ec644502976be346cc656202797492cb5","unresolved":false,"context_lines":[{"line_number":59,"context_line":"}"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"port_data3 \u003d {"},{"line_number":62,"context_line":"  \"id\": FAKE_PORT_ID3,"},{"line_number":63,"context_line":"  \"network_id\": FAKE_NET_ID3,"},{"line_number":64,"context_line":"  \"admin_state_up\": True,"},{"line_number":65,"context_line":"  \"status\": \"ACTIVE\","}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B36U%3D","line":62,"updated":"2013-02-15 20:44:11.000000000","message":"Ditto","commit_id":"09d0b568fd3d579fb9b539f83912298ebeabbc83"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4e10f744a6aa0592c04525337b81ced6737c4d1d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 SINA Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BzgA%3D","line":1,"updated":"2013-02-18 21:59:28.000000000","message":"2013","commit_id":"32df642af082823fc9bed03aa2fd949de4ab78e9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4e10f744a6aa0592c04525337b81ced6737c4d1d","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from nova.openstack.common import cfg"},{"line_number":21,"context_line":"from nova.openstack.common import jsonutils"},{"line_number":22,"context_line":"from nova import test"},{"line_number":23,"context_line":"import quantumclient"},{"line_number":24,"context_line":"import webob"},{"line_number":25,"context_line":"from webob import exc"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bzf4%3D","line":23,"updated":"2013-02-18 21:59:28.000000000","message":"lines 23 -25 should be separate (third party imports)","commit_id":"32df642af082823fc9bed03aa2fd949de4ab78e9"}],"nova/tests/integrated/api_samples/os-attach-interfaces/attach-interfaces-create-resp.json.tpl":[{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"a558ee1ec644502976be346cc656202797492cb5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"interfaceAttachment\": {"},{"line_number":3,"context_line":"        \"fixed_ips\": {"},{"line_number":4,"context_line":"            \"enabled\": 1, "},{"line_number":5,"context_line":"            \"gateway\": \"192.168.1.254\", "},{"line_number":6,"context_line":"            \"ip\": \"192.168.1.3\", "},{"line_number":7,"context_line":"            \"netmask\": \"255.255.255.0\""}],"source_content_type":"text/x-smarty","patch_set":5,"id":"AAAAM3%2F%2B36I%3D","line":4,"updated":"2013-02-15 20:44:11.000000000","message":"More trailing spaces in this file.","commit_id":"09d0b568fd3d579fb9b539f83912298ebeabbc83"}],"nova/tests/integrated/api_samples/os-attach-interfaces/attach-interfaces-list-resp.xml.tpl":[{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"a558ee1ec644502976be346cc656202797492cb5","unresolved":false,"context_lines":[{"line_number":5,"context_line":"     \u003cport_state\u003e%(port_state)s\u003c/port_state\u003e"},{"line_number":6,"context_line":"     \u003cfixed_ips\u003e"},{"line_number":7,"context_line":"       \u003cfixed_ip\u003e"},{"line_number":8,"context_line":"\t \u003csubnet_id\u003e%(subnet_id)s\u003c/subnet_id\u003e"},{"line_number":9,"context_line":"\t \u003cip_address\u003e%(ip_address)s\u003c/ip_address\u003e"},{"line_number":10,"context_line":"       \u003c/fixed_ip\u003e"},{"line_number":11,"context_line":"     \u003c/fixed_ips\u003e"}],"source_content_type":"text/x-smarty","patch_set":5,"id":"AAAAM3%2F%2B36E%3D","line":8,"updated":"2013-02-15 20:44:11.000000000","message":"Tabs instead of spaces here and the next line.","commit_id":"09d0b568fd3d579fb9b539f83912298ebeabbc83"}],"nova/tests/network/test_quantumv2.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"db770467b17649d5327d3572e37be37b5fa0d0ae","unresolved":false,"context_lines":[{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def tearDown(self):"},{"line_number":233,"context_line":"        try:"},{"line_number":234,"context_line":"            self.stubs.UnsetAll()"},{"line_number":235,"context_line":"            self.mox.UnsetStubs()"},{"line_number":236,"context_line":"            self.mox.VerifyAll()"},{"line_number":237,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B7%2Bs%3D","line":234,"updated":"2013-02-13 21:29:29.000000000","message":"I thought stubs was a mox thing already, and covered by self.mox.UnsetStubs ?\n\nnevertheless, if this is being changed, it should be moved to a cleanup - something like the following at the end of setUp\n\nself.addCleanup(CONF.reset)\nself.addCleanup(self.mox.VerifyAll)\nself.addCleanup(self.mox.UnsetStubs)\nself.addCleanup((self.stubs.UnsetAll)","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"db770467b17649d5327d3572e37be37b5fa0d0ae","unresolved":false,"context_lines":[{"line_number":631,"context_line":"        # NOTE(danms): I don\u0027t know how to fool mock other than this"},{"line_number":632,"context_line":"        quantumv2.get_client(\u0027foo\u0027)"},{"line_number":633,"context_line":"        self.stubs.Set(quantumv2, \u0027get_client\u0027,"},{"line_number":634,"context_line":"                       lambda *a, **k: self.moxed_client)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        api \u003d quantumapi.API()"},{"line_number":637,"context_line":"        api.deallocate_for_instance(self.context, self.instance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B7%2Bo%3D","line":634,"updated":"2013-02-13 21:29:29.000000000","message":"This should just be moved up above the self.mox.ReplayAll I think.. Replay mode is when mox starts expecting actual calls).","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"37e2d8d9ec3a597dc9c0f773a3c07cb3be85572c","unresolved":false,"context_lines":[{"line_number":631,"context_line":"        # NOTE(danms): I don\u0027t know how to fool mock other than this"},{"line_number":632,"context_line":"        quantumv2.get_client(\u0027foo\u0027)"},{"line_number":633,"context_line":"        self.stubs.Set(quantumv2, \u0027get_client\u0027,"},{"line_number":634,"context_line":"                       lambda *a, **k: self.moxed_client)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        api \u003d quantumapi.API()"},{"line_number":637,"context_line":"        api.deallocate_for_instance(self.context, self.instance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B6V8%3D","line":634,"in_reply_to":"AAAAM3%2F%2B6fA%3D","updated":"2013-02-14 18:00:40.000000000","message":"Scratch that, I was being an idiot.","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a08e14d93dd160097c368c8e87d7f95a2ee56d6b","unresolved":false,"context_lines":[{"line_number":631,"context_line":"        # NOTE(danms): I don\u0027t know how to fool mock other than this"},{"line_number":632,"context_line":"        quantumv2.get_client(\u0027foo\u0027)"},{"line_number":633,"context_line":"        self.stubs.Set(quantumv2, \u0027get_client\u0027,"},{"line_number":634,"context_line":"                       lambda *a, **k: self.moxed_client)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        api \u003d quantumapi.API()"},{"line_number":637,"context_line":"        api.deallocate_for_instance(self.context, self.instance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B6fA%3D","line":634,"in_reply_to":"AAAAM3%2F%2B7%2Bo%3D","updated":"2013-02-14 17:04:45.000000000","message":"Yeah, precisely. The problem being that the base setUp() expects one get_client call with a single argument. The path we\u0027re about to take will call get_client several times with two arguments. I couldn\u0027t figure out how to make mock ignore the one and two argument cases, so I left the common case in place and hacked this (and then promptly forgot to go back and figure out if there was a better way :)","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"db770467b17649d5327d3572e37be37b5fa0d0ae","unresolved":false,"context_lines":[{"line_number":634,"context_line":"                       lambda *a, **k: self.moxed_client)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        api \u003d quantumapi.API()"},{"line_number":637,"context_line":"        api.deallocate_for_instance(self.context, self.instance)"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"    def test_deallocate_for_instance_1(self):"},{"line_number":640,"context_line":"        # Test to deallocate in one port env."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B7%2Bk%3D","line":637,"updated":"2013-02-13 21:29:29.000000000","message":"We need new tests here that check partial deallocation does not deallocate everything.\n\nAnd we\u0027ll new tests that partial allocation doesn\u0027t mess up already allocated things.","commit_id":"283a09648af716a69ddf1eb920f06ee4688f1f18"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"48cac5665a53e7e6dcdb95652d4e945c045d3d61","unresolved":false,"context_lines":[{"line_number":771,"context_line":"            self.vif_driver.plug(instance, (network, mapping))"},{"line_number":772,"context_line":"            self.firewall_driver.setup_basic_filtering(instance,"},{"line_number":773,"context_line":"                                                       [(network, mapping)])"},{"line_number":774,"context_line":"            cfg \u003d self.vif_driver.get_config(instance, network, mapping)"},{"line_number":775,"context_line":"            try:"},{"line_number":776,"context_line":"                virt_dom.attachDevice(cfg.to_xml())"},{"line_number":777,"context_line":"            except libvirt.libvirtError as ex:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2B86I%3D","line":774,"updated":"2013-02-13 13:51:09.000000000","message":"The following change added the ability to override the default NIC model using glance image properties:\n\n  https://review.openstack.org/#/c/21527/\n\nSo this VIF hotplug code will need to honour this setting too, somehow.","commit_id":"5fdb38007f0f9408f4836126452e1b5dc199b26c"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"05e306735ff20e7bb59216d511a94c26a2286579","unresolved":false,"context_lines":[{"line_number":774,"context_line":"            self.vif_driver.plug(instance, (network, mapping))"},{"line_number":775,"context_line":"            self.firewall_driver.setup_basic_filtering(instance,"},{"line_number":776,"context_line":"                                                       [(network, mapping)])"},{"line_number":777,"context_line":"            cfg \u003d self.vif_driver.get_config(instance, network, mapping)"},{"line_number":778,"context_line":"            try:"},{"line_number":779,"context_line":"                virt_dom.attachDevice(cfg.to_xml())"},{"line_number":780,"context_line":"            except libvirt.libvirtError as ex:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2B5Io%3D","line":777,"updated":"2013-02-15 10:08:54.000000000","message":"This is still missing code for using the user defined NIC model from glance image meta properties. Without this, the NIC uses here will be different from that used at initial boot. This will likely cause problems when Nova re-generates XML after a snapshot restore, since it may pick a different NIC model \u0026 guest OS don\u0027t like hardware changing under their feet.","commit_id":"88981436a2be8b4ee25f0b4ba28d689ea79d55b5"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"35e117f5dff16501cbdf03a119b1714c90632a4d","unresolved":false,"context_lines":[{"line_number":774,"context_line":"            self.vif_driver.plug(instance, (network, mapping))"},{"line_number":775,"context_line":"            self.firewall_driver.setup_basic_filtering(instance,"},{"line_number":776,"context_line":"                                                       [(network, mapping)])"},{"line_number":777,"context_line":"            cfg \u003d self.vif_driver.get_config(instance, network, mapping)"},{"line_number":778,"context_line":"            try:"},{"line_number":779,"context_line":"                virt_dom.attachDevice(cfg.to_xml())"},{"line_number":780,"context_line":"            except libvirt.libvirtError as ex:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2B5IE%3D","line":777,"updated":"2013-02-15 10:23:31.000000000","message":"Yes, I forget that.\nI correct this in my review by retrieves the glance image meta properties in functions [attach|detach]_interface of compute manger to pass them to the [attach|detach]_interface functions in libvirt driver :\n\nimage_meta \u003d _get_image_meta(context, instance[\u0027image_ref\u0027])","commit_id":"88981436a2be8b4ee25f0b4ba28d689ea79d55b5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"14c550ea752697d9506aec791d5d7fdfc31b0b21","unresolved":false,"context_lines":[{"line_number":774,"context_line":"            self.vif_driver.plug(instance, (network, mapping))"},{"line_number":775,"context_line":"            self.firewall_driver.setup_basic_filtering(instance,"},{"line_number":776,"context_line":"                                                       [(network, mapping)])"},{"line_number":777,"context_line":"            cfg \u003d self.vif_driver.get_config(instance, network, mapping)"},{"line_number":778,"context_line":"            try:"},{"line_number":779,"context_line":"                virt_dom.attachDevice(cfg.to_xml())"},{"line_number":780,"context_line":"            except libvirt.libvirtError as ex:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2B444%3D","line":777,"in_reply_to":"AAAAM3%2F%2B5IE%3D","updated":"2013-02-15 14:37:45.000000000","message":"Yes, I\u0027ve already got this done in my current changes, just not submitted here yet,","commit_id":"88981436a2be8b4ee25f0b4ba28d689ea79d55b5"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"9ef064cf6b3f20fb618d97e4df1cd16392abfad4","unresolved":false,"context_lines":[{"line_number":796,"context_line":"                    flags |\u003d libvirt.VIR_DOMAIN_AFFECT_LIVE"},{"line_number":797,"context_line":"                virt_dom.detachDeviceFlags(cfg.to_xml(), flags)"},{"line_number":798,"context_line":"            except libvirt.libvirtError as ex:"},{"line_number":799,"context_line":"                if error_code \u003d\u003d libvirt.VIR_ERR_NO_DOMAIN:"},{"line_number":800,"context_line":"                    LOG.warn(_(\"During detach_interface, \""},{"line_number":801,"context_line":"                               \"instance disappeared.\"))"},{"line_number":802,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2B5OY%3D","line":799,"updated":"2013-02-15 08:13:07.000000000","message":"error_code not defined : error_code \u003d ex.get_error_code()","commit_id":"88981436a2be8b4ee25f0b4ba28d689ea79d55b5"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"a558ee1ec644502976be346cc656202797492cb5","unresolved":false,"context_lines":[{"line_number":800,"context_line":"                error_code \u003d ex.get_error_code()"},{"line_number":801,"context_line":"                if error_code \u003d\u003d libvirt.VIR_ERR_NO_DOMAIN:"},{"line_number":802,"context_line":"                    LOG.warn(_(\"During detach_interface, \""},{"line_number":803,"context_line":"                               \"instance disappeared.\"))"},{"line_number":804,"context_line":"                else:"},{"line_number":805,"context_line":"                    LOG.error(_(\u0027detaching network adapter failed.\u0027),"},{"line_number":806,"context_line":"                             instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B35s%3D","line":803,"updated":"2013-02-15 20:44:11.000000000","message":"Pass instance to this log message please.","commit_id":"09d0b568fd3d579fb9b539f83912298ebeabbc83"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"6f73a304090f311d37fe8861876a592375341e30","unresolved":false,"context_lines":[{"line_number":777,"context_line":"            cfg \u003d self.vif_driver.get_config(instance, network, mapping,"},{"line_number":778,"context_line":"                                             image_meta)"},{"line_number":779,"context_line":"            try:"},{"line_number":780,"context_line":"                virt_dom.attachDevice(cfg.to_xml())"},{"line_number":781,"context_line":"            except libvirt.libvirtError as ex:"},{"line_number":782,"context_line":"                LOG.error(_(\u0027attaching network adapter failed.\u0027),"},{"line_number":783,"context_line":"                         instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2B2%2FY%3D","line":780,"updated":"2013-02-16 11:18:07.000000000","message":"Wondering why here you\u0027re not passing any flags (meaning it affects the running state, but not the config).","commit_id":"fa2a1116a1a78a10350ee21b2db0c6ed9be4cef4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f81099db19659a09e7cd08845c9fba1e735945d7","unresolved":false,"context_lines":[{"line_number":777,"context_line":"            cfg \u003d self.vif_driver.get_config(instance, network, mapping,"},{"line_number":778,"context_line":"                                             image_meta)"},{"line_number":779,"context_line":"            try:"},{"line_number":780,"context_line":"                virt_dom.attachDevice(cfg.to_xml())"},{"line_number":781,"context_line":"            except libvirt.libvirtError as ex:"},{"line_number":782,"context_line":"                LOG.error(_(\u0027attaching network adapter failed.\u0027),"},{"line_number":783,"context_line":"                         instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2B0uY%3D","line":780,"in_reply_to":"AAAAM3%2F%2B2%2FY%3D","updated":"2013-02-18 14:50:58.000000000","message":"Yeah, I dunno why the _original_ author didn\u0027t do that :)\n\nLooks correct to me to make this look like the detach case.","commit_id":"fa2a1116a1a78a10350ee21b2db0c6ed9be4cef4"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"6f73a304090f311d37fe8861876a592375341e30","unresolved":false,"context_lines":[{"line_number":795,"context_line":"                state \u003d LIBVIRT_POWER_STATE[virt_dom.info()[0]]"},{"line_number":796,"context_line":"                if state \u003d\u003d power_state.RUNNING:"},{"line_number":797,"context_line":"                    flags |\u003d libvirt.VIR_DOMAIN_AFFECT_LIVE"},{"line_number":798,"context_line":"                virt_dom.detachDeviceFlags(cfg.to_xml(), flags)"},{"line_number":799,"context_line":"            except libvirt.libvirtError as ex:"},{"line_number":800,"context_line":"                error_code \u003d ex.get_error_code()"},{"line_number":801,"context_line":"                if error_code \u003d\u003d libvirt.VIR_ERR_NO_DOMAIN:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2B2%2FU%3D","line":798,"updated":"2013-02-16 11:18:07.000000000","message":"while here you\u0027re updating both running state and config. Naively I\u0027d expect both to be follow the same pattern","commit_id":"fa2a1116a1a78a10350ee21b2db0c6ed9be4cef4"}]}
