)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"2d6bbfe83f783639ba32d9ef9f5ceef2a64af874","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make OS::Nova::Server networks property updatable"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch add abality for updating networks property."},{"line_number":10,"context_line":"Update process is contained two simple steps:"},{"line_number":11,"context_line":"    1. detaching all old interfaces"},{"line_number":12,"context_line":"    2. attaching all new interfaces."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAUX%2F%2B2vw%3D","line":9,"updated":"2014-02-18 15:54:50.000000000","message":"s/add abality for updating/adds ability to update/","commit_id":"c5a2a389eaadcbf9e69b252d461b67eef35429ca"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"b8797658bfcdc4de55b7bbe1ecc8b1de4fcda17e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make OS::Nova::Server networks property updatable"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch add abality for updating networks property."},{"line_number":10,"context_line":"Update process is contained two simple steps:"},{"line_number":11,"context_line":"    1. detaching all old interfaces"},{"line_number":12,"context_line":"    2. attaching all new interfaces."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAUX%2F%2B2VA%3D","line":9,"in_reply_to":"AAAAUX%2F%2B2vw%3D","updated":"2014-02-18 16:35:04.000000000","message":"Done","commit_id":"c5a2a389eaadcbf9e69b252d461b67eef35429ca"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"2d6bbfe83f783639ba32d9ef9f5ceef2a64af874","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Make OS::Nova::Server networks property updatable"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch add abality for updating networks property."},{"line_number":10,"context_line":"Update process is contained two simple steps:"},{"line_number":11,"context_line":"    1. detaching all old interfaces"},{"line_number":12,"context_line":"    2. attaching all new interfaces."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAUX%2F%2B2vY%3D","line":10,"updated":"2014-02-18 15:54:50.000000000","message":"s/is contained/consists of/","commit_id":"c5a2a389eaadcbf9e69b252d461b67eef35429ca"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"b8797658bfcdc4de55b7bbe1ecc8b1de4fcda17e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Make OS::Nova::Server networks property updatable"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch add abality for updating networks property."},{"line_number":10,"context_line":"Update process is contained two simple steps:"},{"line_number":11,"context_line":"    1. detaching all old interfaces"},{"line_number":12,"context_line":"    2. attaching all new interfaces."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAUX%2F%2B2U8%3D","line":10,"in_reply_to":"AAAAUX%2F%2B2vY%3D","updated":"2014-02-18 16:35:04.000000000","message":"Done","commit_id":"c5a2a389eaadcbf9e69b252d461b67eef35429ca"},{"author":{"_account_id":7253,"name":"Jason Dunsmore","email":"jasondunsmore@gmail.com","username":"jbd"},"change_message_id":"74d776abb972699e517a7c5832f0d88416fef47a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make OS::Nova::Server networks property updatable"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds abality to update networks property."},{"line_number":10,"context_line":"Update process consists of two simple steps:"},{"line_number":11,"context_line":"    1. detaching all old interfaces"},{"line_number":12,"context_line":"    2. attaching all new interfaces."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAUX%2F%2B1ZE%3D","line":9,"updated":"2014-02-18 18:07:14.000000000","message":"I would suggest:\n\n This patch adds the ability to update the networks property.","commit_id":"dcdb5e9171f795ba3d6613379e7f8c9842207fbb"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"1693a2d308842494317de9740fed28a02b31dd4e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make OS::Nova::Server networks property updatable"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds abality to update networks property."},{"line_number":10,"context_line":"Update process consists of two simple steps:"},{"line_number":11,"context_line":"    1. detaching all old interfaces"},{"line_number":12,"context_line":"    2. attaching all new interfaces."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAUX%2F%2B1HU%3D","line":9,"in_reply_to":"AAAAUX%2F%2B1ZE%3D","updated":"2014-02-18 18:45:18.000000000","message":"Will fix","commit_id":"dcdb5e9171f795ba3d6613379e7f8c9842207fbb"}],"heat/engine/resources/server.py":[{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"2d6bbfe83f783639ba32d9ef9f5ceef2a64af874","unresolved":false,"context_lines":[{"line_number":510,"context_line":"            # will be deleted"},{"line_number":511,"context_line":"            for iface in interfaces:"},{"line_number":512,"context_line":"                server.interface_detach(getattr(iface, \u0027port_id\u0027))"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"            for net in new_networks:"},{"line_number":515,"context_line":"                if net.get(\u0027port\u0027):"},{"line_number":516,"context_line":"                    server.interface_attach(net[\u0027port\u0027], None, None)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B2w0%3D","line":513,"updated":"2014-02-18 15:54:50.000000000","message":"I would suggest adding a test here that interfaces are actually detached, as it might take some time. Also not sure, but check if the same testing should be done with nova too (I\u0027ve had such problems with VolumeAttachment)","commit_id":"c5a2a389eaadcbf9e69b252d461b67eef35429ca"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"b8797658bfcdc4de55b7bbe1ecc8b1de4fcda17e","unresolved":false,"context_lines":[{"line_number":510,"context_line":"            # will be deleted"},{"line_number":511,"context_line":"            for iface in interfaces:"},{"line_number":512,"context_line":"                server.interface_detach(getattr(iface, \u0027port_id\u0027))"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"            for net in new_networks:"},{"line_number":515,"context_line":"                if net.get(\u0027port\u0027):"},{"line_number":516,"context_line":"                    server.interface_attach(net[\u0027port\u0027], None, None)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B2V8%3D","line":513,"in_reply_to":"AAAAUX%2F%2B2w0%3D","updated":"2014-02-18 16:35:04.000000000","message":"I will check it and if you are right, I will add it in patch set #3","commit_id":"c5a2a389eaadcbf9e69b252d461b67eef35429ca"},{"author":{"_account_id":7253,"name":"Jason Dunsmore","email":"jasondunsmore@gmail.com","username":"jbd"},"change_message_id":"74d776abb972699e517a7c5832f0d88416fef47a","unresolved":false,"context_lines":[{"line_number":501,"context_line":"        if self.NETWORKS in prop_diff:"},{"line_number":502,"context_line":"            new_networks \u003d prop_diff.get(self.NETWORKS)"},{"line_number":503,"context_line":""},{"line_number":504,"context_line":"            existed_networks \u003d [getattr(net, \u0027id\u0027)"},{"line_number":505,"context_line":"                                for net in self.nova().networks.list()]"},{"line_number":506,"context_line":"            server \u003d self.nova().servers.get(self.resource_id)"},{"line_number":507,"context_line":"            interfaces \u003d server.interface_list()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2B1ag%3D","line":504,"updated":"2014-02-18 18:07:14.000000000","message":"This variable name is not grammatically correct. It should be \"existing_networks\".","commit_id":"dcdb5e9171f795ba3d6613379e7f8c9842207fbb"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"1693a2d308842494317de9740fed28a02b31dd4e","unresolved":false,"context_lines":[{"line_number":501,"context_line":"        if self.NETWORKS in prop_diff:"},{"line_number":502,"context_line":"            new_networks \u003d prop_diff.get(self.NETWORKS)"},{"line_number":503,"context_line":""},{"line_number":504,"context_line":"            existed_networks \u003d [getattr(net, \u0027id\u0027)"},{"line_number":505,"context_line":"                                for net in self.nova().networks.list()]"},{"line_number":506,"context_line":"            server \u003d self.nova().servers.get(self.resource_id)"},{"line_number":507,"context_line":"            interfaces \u003d server.interface_list()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2B1KA%3D","line":504,"in_reply_to":"AAAAUX%2F%2B1ag%3D","updated":"2014-02-18 18:45:18.000000000","message":"Will fix","commit_id":"dcdb5e9171f795ba3d6613379e7f8c9842207fbb"},{"author":{"_account_id":7253,"name":"Jason Dunsmore","email":"jasondunsmore@gmail.com","username":"jbd"},"change_message_id":"74d776abb972699e517a7c5832f0d88416fef47a","unresolved":false,"context_lines":[{"line_number":519,"context_line":"                        server.interface_attach(None, net[\u0027network\u0027],"},{"line_number":520,"context_line":"                                                net.get(\u0027fixed_ip\u0027))"},{"line_number":521,"context_line":"                    else:"},{"line_number":522,"context_line":"                        logger.error(_(\u0027Network %(net)s does not exist\u0027) %"},{"line_number":523,"context_line":"                                     {\u0027net\u0027: net[\u0027network\u0027]})"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"        # Optimization: make sure the first task is started before"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2B1YU%3D","line":522,"updated":"2014-02-18 18:07:14.000000000","message":"Should we raise an error here instead of logging an error?","commit_id":"dcdb5e9171f795ba3d6613379e7f8c9842207fbb"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"1693a2d308842494317de9740fed28a02b31dd4e","unresolved":false,"context_lines":[{"line_number":519,"context_line":"                        server.interface_attach(None, net[\u0027network\u0027],"},{"line_number":520,"context_line":"                                                net.get(\u0027fixed_ip\u0027))"},{"line_number":521,"context_line":"                    else:"},{"line_number":522,"context_line":"                        logger.error(_(\u0027Network %(net)s does not exist\u0027) %"},{"line_number":523,"context_line":"                                     {\u0027net\u0027: net[\u0027network\u0027]})"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"        # Optimization: make sure the first task is started before"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2B1Hg%3D","line":522,"in_reply_to":"AAAAUX%2F%2B1YU%3D","updated":"2014-02-18 18:45:18.000000000","message":"I am not sure what will be better. \nAnyway it will fail stack. Possibly raise an error looks more informatively, because we can set correct message. (In case with neutron Error it may be not so clear).\nI will replace logging on raise.","commit_id":"dcdb5e9171f795ba3d6613379e7f8c9842207fbb"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"564766c14f0cac9533008f9d549771f613ea1247","unresolved":false,"context_lines":[{"line_number":498,"context_line":"            for iface in interfaces:"},{"line_number":499,"context_line":"                checker \u003d scheduler.TaskRunner(server.interface_detach,"},{"line_number":500,"context_line":"                                               getattr(iface, \u0027port_id\u0027))"},{"line_number":501,"context_line":"                checkers.append(checker)"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"            for net in new_networks:"},{"line_number":504,"context_line":"                if net.get(\u0027port\u0027):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2F35w%3D","line":501,"updated":"2014-02-24 11:13:04.000000000","message":"Isn\u0027t this going to iterate over all existing interfaces, even those which haven\u0027t changed?\n\nThe resource.update_template_diff_properties code doesn\u0027t recurse into the nested MAP schema, so you probably need to compare the existing_networks and new_networks, and only detach the subset which exists in existing_networks but not new_networks?","commit_id":"9c2aca099c46c826edb866def2d124878411151f"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"8a1f15d7bb149451480ee1e8b09f07755c94c578","unresolved":false,"context_lines":[{"line_number":498,"context_line":"            for iface in interfaces:"},{"line_number":499,"context_line":"                checker \u003d scheduler.TaskRunner(server.interface_detach,"},{"line_number":500,"context_line":"                                               getattr(iface, \u0027port_id\u0027))"},{"line_number":501,"context_line":"                checkers.append(checker)"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"            for net in new_networks:"},{"line_number":504,"context_line":"                if net.get(\u0027port\u0027):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVX%2F%2F8u0%3D","line":501,"in_reply_to":"AAAAU3%2F%2F35w%3D","updated":"2014-02-27 07:27:53.000000000","message":"Done","commit_id":"9c2aca099c46c826edb866def2d124878411151f"},{"author":{"_account_id":8289,"name":"huangtianhua","email":"tiantian223@163.com","username":"huangtianhua"},"change_message_id":"8c7801388b60f9117681aa70e203697543f5a5bb","unresolved":false,"context_lines":[{"line_number":491,"context_line":""},{"line_number":492,"context_line":"            existing_networks \u003d [getattr(net, \u0027id\u0027)"},{"line_number":493,"context_line":"                                 for net in self.nova().networks.list()]"},{"line_number":494,"context_line":"            server \u003d self.nova().servers.get(self.resource_id)"},{"line_number":495,"context_line":"            interfaces \u003d server.interface_list()"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"            not_updated_networks \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F8MA%3D","line":494,"updated":"2014-02-27 08:36:21.000000000","message":"If the server has got , it\u0027s no need to get again.","commit_id":"a5540b1f6a9d386bf90e9e7bd179ac009c83a87b"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"c62702c4cedff7ef9f204638e7486bf2d794a965","unresolved":false,"context_lines":[{"line_number":491,"context_line":""},{"line_number":492,"context_line":"            existing_networks \u003d [getattr(net, \u0027id\u0027)"},{"line_number":493,"context_line":"                                 for net in self.nova().networks.list()]"},{"line_number":494,"context_line":"            server \u003d self.nova().servers.get(self.resource_id)"},{"line_number":495,"context_line":"            interfaces \u003d server.interface_list()"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"            not_updated_networks \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F8HI%3D","line":494,"in_reply_to":"AAAAVX%2F%2F8MA%3D","updated":"2014-02-27 08:48:35.000000000","message":"Done","commit_id":"a5540b1f6a9d386bf90e9e7bd179ac009c83a87b"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"0316974ab9cfcaf91052f8bdb173808228f08e50","unresolved":false,"context_lines":[{"line_number":501,"context_line":"                if net in new_networks:"},{"line_number":502,"context_line":"                    old_networks.remove(net)"},{"line_number":503,"context_line":"                    new_networks.remove(net)"},{"line_number":504,"context_line":"                    not_updated_networks.append(net)"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"            def find_equal(port, net_id, ip, nets):"},{"line_number":507,"context_line":"                for net in nets:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2F8E4%3D","line":504,"updated":"2014-03-03 09:55:46.000000000","message":"This section is untested.","commit_id":"55b46e7de4ad6f7a2fe313ff234f71a5d9e00935"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"9330bf3b73c726cf341f3ba0f2b28dfd8de6c5a5","unresolved":false,"context_lines":[{"line_number":501,"context_line":"                if net in new_networks:"},{"line_number":502,"context_line":"                    old_networks.remove(net)"},{"line_number":503,"context_line":"                    new_networks.remove(net)"},{"line_number":504,"context_line":"                    not_updated_networks.append(net)"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"            def find_equal(port, net_id, ip, nets):"},{"line_number":507,"context_line":"                for net in nets:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2Fw%2B0%3D","line":504,"in_reply_to":"AAAAVn%2F%2F8E4%3D","updated":"2014-03-04 08:06:52.000000000","message":"Ok, will add special tests.","commit_id":"55b46e7de4ad6f7a2fe313ff234f71a5d9e00935"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"0316974ab9cfcaf91052f8bdb173808228f08e50","unresolved":false,"context_lines":[{"line_number":511,"context_line":"                    if net.get(\u0027fixed_ip\u0027) \u003d\u003d ip and \\"},{"line_number":512,"context_line":"                            net.get(\u0027network\u0027) \u003d\u003d net_id:"},{"line_number":513,"context_line":"                        nets.remove(net)"},{"line_number":514,"context_line":"                        return net"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"            def find_poor_net(net_id, nets):"},{"line_number":517,"context_line":"                net \u003d {\u0027port_id\u0027: None, \u0027network\u0027: net_id, \u0027fixed_ip\u0027: None}"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2F8FA%3D","line":514,"updated":"2014-03-03 09:55:46.000000000","message":"This is untested.","commit_id":"55b46e7de4ad6f7a2fe313ff234f71a5d9e00935"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"9330bf3b73c726cf341f3ba0f2b28dfd8de6c5a5","unresolved":false,"context_lines":[{"line_number":511,"context_line":"                    if net.get(\u0027fixed_ip\u0027) \u003d\u003d ip and \\"},{"line_number":512,"context_line":"                            net.get(\u0027network\u0027) \u003d\u003d net_id:"},{"line_number":513,"context_line":"                        nets.remove(net)"},{"line_number":514,"context_line":"                        return net"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"            def find_poor_net(net_id, nets):"},{"line_number":517,"context_line":"                net \u003d {\u0027port_id\u0027: None, \u0027network\u0027: net_id, \u0027fixed_ip\u0027: None}"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2Fw%2Bw%3D","line":514,"in_reply_to":"AAAAVn%2F%2F8FA%3D","updated":"2014-03-04 08:06:52.000000000","message":"Look answer above","commit_id":"55b46e7de4ad6f7a2fe313ff234f71a5d9e00935"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"0316974ab9cfcaf91052f8bdb173808228f08e50","unresolved":false,"context_lines":[{"line_number":517,"context_line":"                net \u003d {\u0027port_id\u0027: None, \u0027network\u0027: net_id, \u0027fixed_ip\u0027: None}"},{"line_number":518,"context_line":"                if net in nets:"},{"line_number":519,"context_line":"                    nets.remove(net)"},{"line_number":520,"context_line":"                    return net"},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"            detach_port_ids \u003d []"},{"line_number":523,"context_line":"            for iface in interfaces:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2F8GY%3D","line":520,"updated":"2014-03-03 09:55:46.000000000","message":"I think this is untested. Nothing fails it I remove the logic here.","commit_id":"55b46e7de4ad6f7a2fe313ff234f71a5d9e00935"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"9330bf3b73c726cf341f3ba0f2b28dfd8de6c5a5","unresolved":false,"context_lines":[{"line_number":517,"context_line":"                net \u003d {\u0027port_id\u0027: None, \u0027network\u0027: net_id, \u0027fixed_ip\u0027: None}"},{"line_number":518,"context_line":"                if net in nets:"},{"line_number":519,"context_line":"                    nets.remove(net)"},{"line_number":520,"context_line":"                    return net"},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"            detach_port_ids \u003d []"},{"line_number":523,"context_line":"            for iface in interfaces:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2Fw%2Bs%3D","line":520,"in_reply_to":"AAAAVn%2F%2F8GY%3D","updated":"2014-03-04 08:06:52.000000000","message":"Look answer above","commit_id":"55b46e7de4ad6f7a2fe313ff234f71a5d9e00935"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"0316974ab9cfcaf91052f8bdb173808228f08e50","unresolved":false,"context_lines":[{"line_number":541,"context_line":"                net \u003d find_poor_net(props[\u0027net_id\u0027], old_networks)"},{"line_number":542,"context_line":"                if net is not None:"},{"line_number":543,"context_line":"                    detach_port_ids.append(props[\u0027port\u0027])"},{"line_number":544,"context_line":"                    continue"},{"line_number":545,"context_line":"                # detach other interfaces"},{"line_number":546,"context_line":"                detach_port_ids.append(props[\u0027port\u0027])"},{"line_number":547,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2F8Eg%3D","line":544,"updated":"2014-03-03 09:55:46.000000000","message":"I can removeall the continue and append without anything failing.","commit_id":"55b46e7de4ad6f7a2fe313ff234f71a5d9e00935"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"9330bf3b73c726cf341f3ba0f2b28dfd8de6c5a5","unresolved":false,"context_lines":[{"line_number":541,"context_line":"                net \u003d find_poor_net(props[\u0027net_id\u0027], old_networks)"},{"line_number":542,"context_line":"                if net is not None:"},{"line_number":543,"context_line":"                    detach_port_ids.append(props[\u0027port\u0027])"},{"line_number":544,"context_line":"                    continue"},{"line_number":545,"context_line":"                # detach other interfaces"},{"line_number":546,"context_line":"                detach_port_ids.append(props[\u0027port\u0027])"},{"line_number":547,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2Fw98%3D","line":544,"in_reply_to":"AAAAVn%2F%2F8Eg%3D","updated":"2014-03-04 08:06:52.000000000","message":"Look answer above","commit_id":"55b46e7de4ad6f7a2fe313ff234f71a5d9e00935"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"0316974ab9cfcaf91052f8bdb173808228f08e50","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                    else:"},{"line_number":566,"context_line":"                        msg \u003d (_(\u0027Network %(net)s does not exist\u0027)"},{"line_number":567,"context_line":"                               % {\u0027net\u0027: net[\u0027network\u0027]})"},{"line_number":568,"context_line":"                        raise exception.Error(message\u003dmsg)"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"        # Optimization: make sure the first task is started before"},{"line_number":571,"context_line":"        # check_update_complete."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2F8A8%3D","line":568,"updated":"2014-03-03 09:55:46.000000000","message":"Is this really necessary? I would expect interface_attach to fail properly here if the network doesn\u0027t exist, so that we don\u0027t have to check it manually ourselves.","commit_id":"55b46e7de4ad6f7a2fe313ff234f71a5d9e00935"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"9330bf3b73c726cf341f3ba0f2b28dfd8de6c5a5","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                    else:"},{"line_number":566,"context_line":"                        msg \u003d (_(\u0027Network %(net)s does not exist\u0027)"},{"line_number":567,"context_line":"                               % {\u0027net\u0027: net[\u0027network\u0027]})"},{"line_number":568,"context_line":"                        raise exception.Error(message\u003dmsg)"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"        # Optimization: make sure the first task is started before"},{"line_number":571,"context_line":"        # check_update_complete."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2Fw%2Fk%3D","line":568,"in_reply_to":"AAAAVn%2F%2F8A8%3D","updated":"2014-03-04 08:06:52.000000000","message":"Hm.. I thought, that it gives more understandable Error message.\nWithout this check we should find reason of Update _failed in logs or in list of events.\nBut if it is really  superfluous, I can remove it.","commit_id":"55b46e7de4ad6f7a2fe313ff234f71a5d9e00935"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"a061515213c7a69c5e720ba7d3f7964fe863345d","unresolved":false,"context_lines":[{"line_number":456,"context_line":"        if name \u003d\u003d \u0027show\u0027:"},{"line_number":457,"context_line":"            return server._info"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    def get_matches(self, old_networks, new_networks):"},{"line_number":460,"context_line":"        # make new_networks similar on old_networks"},{"line_number":461,"context_line":"        for net in new_networks:"},{"line_number":462,"context_line":"            for key in (\u0027port\u0027, \u0027network\u0027, \u0027fixed_ip\u0027):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOyY%3D","line":459,"updated":"2014-03-07 13:05:10.000000000","message":"I\u0027d rename the method _get_network_matches","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ce1a9f7d3ab6639f15c04d01aa7433e26600cfec","unresolved":false,"context_lines":[{"line_number":456,"context_line":"        if name \u003d\u003d \u0027show\u0027:"},{"line_number":457,"context_line":"            return server._info"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    def get_matches(self, old_networks, new_networks):"},{"line_number":460,"context_line":"        # make new_networks similar on old_networks"},{"line_number":461,"context_line":"        for net in new_networks:"},{"line_number":462,"context_line":"            for key in (\u0027port\u0027, \u0027network\u0027, \u0027fixed_ip\u0027):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOow%3D","line":459,"in_reply_to":"AAAAVn%2F%2FOyY%3D","updated":"2014-03-07 14:00:56.000000000","message":"Done","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"a061515213c7a69c5e720ba7d3f7964fe863345d","unresolved":false,"context_lines":[{"line_number":460,"context_line":"        # make new_networks similar on old_networks"},{"line_number":461,"context_line":"        for net in new_networks:"},{"line_number":462,"context_line":"            for key in (\u0027port\u0027, \u0027network\u0027, \u0027fixed_ip\u0027):"},{"line_number":463,"context_line":"                net[key] \u003d net.get(key)"},{"line_number":464,"context_line":"        # find matches and remove them from old and new networks"},{"line_number":465,"context_line":"        not_updated_networks \u003d []"},{"line_number":466,"context_line":"        for net in old_networks:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOyU%3D","line":463,"updated":"2014-03-07 13:05:10.000000000","message":"You can use net.setdefault(key)","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ce1a9f7d3ab6639f15c04d01aa7433e26600cfec","unresolved":false,"context_lines":[{"line_number":460,"context_line":"        # make new_networks similar on old_networks"},{"line_number":461,"context_line":"        for net in new_networks:"},{"line_number":462,"context_line":"            for key in (\u0027port\u0027, \u0027network\u0027, \u0027fixed_ip\u0027):"},{"line_number":463,"context_line":"                net[key] \u003d net.get(key)"},{"line_number":464,"context_line":"        # find matches and remove them from old and new networks"},{"line_number":465,"context_line":"        not_updated_networks \u003d []"},{"line_number":466,"context_line":"        for net in old_networks:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOos%3D","line":463,"in_reply_to":"AAAAVn%2F%2FOyU%3D","updated":"2014-03-07 14:00:56.000000000","message":"Done","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"a061515213c7a69c5e720ba7d3f7964fe863345d","unresolved":false,"context_lines":[{"line_number":490,"context_line":"            # get interface properties"},{"line_number":491,"context_line":"            props \u003d {\u0027port\u0027: getattr(iface, \u0027port_id\u0027),"},{"line_number":492,"context_line":"                     \u0027net_id\u0027: getattr(iface, \u0027net_id\u0027),"},{"line_number":493,"context_line":"                     \u0027ip\u0027: getattr(iface, \u0027fixed_ips\u0027)[0][\u0027ip_address\u0027],"},{"line_number":494,"context_line":"                     \u0027nets\u0027: nets}"},{"line_number":495,"context_line":"            # try to match by port or network_id with fixed_ip"},{"line_number":496,"context_line":"            net \u003d find_equal(**props)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOyA%3D","line":493,"updated":"2014-03-07 13:05:10.000000000","message":"Why do you use getattr? You should access the attribute directly.","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ce1a9f7d3ab6639f15c04d01aa7433e26600cfec","unresolved":false,"context_lines":[{"line_number":490,"context_line":"            # get interface properties"},{"line_number":491,"context_line":"            props \u003d {\u0027port\u0027: getattr(iface, \u0027port_id\u0027),"},{"line_number":492,"context_line":"                     \u0027net_id\u0027: getattr(iface, \u0027net_id\u0027),"},{"line_number":493,"context_line":"                     \u0027ip\u0027: getattr(iface, \u0027fixed_ips\u0027)[0][\u0027ip_address\u0027],"},{"line_number":494,"context_line":"                     \u0027nets\u0027: nets}"},{"line_number":495,"context_line":"            # try to match by port or network_id with fixed_ip"},{"line_number":496,"context_line":"            net \u003d find_equal(**props)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOcI%3D","line":493,"in_reply_to":"AAAAVn%2F%2FOyA%3D","updated":"2014-03-07 14:00:56.000000000","message":"Done","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"a061515213c7a69c5e720ba7d3f7964fe863345d","unresolved":false,"context_lines":[{"line_number":566,"context_line":"                server \u003d self.nova().servers.get(self.resource_id)"},{"line_number":567,"context_line":"            interfaces \u003d server.interface_list()"},{"line_number":568,"context_line":""},{"line_number":569,"context_line":"            # if old networks is None, it mean, that server got first"},{"line_number":570,"context_line":"            # free port. so we should clear all (this one) interfaces."},{"line_number":571,"context_line":"            if old_networks is None:"},{"line_number":572,"context_line":"                for iface in interfaces:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOxw%3D","line":569,"updated":"2014-03-07 13:05:10.000000000","message":"\"It means that the server\"","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ce1a9f7d3ab6639f15c04d01aa7433e26600cfec","unresolved":false,"context_lines":[{"line_number":566,"context_line":"                server \u003d self.nova().servers.get(self.resource_id)"},{"line_number":567,"context_line":"            interfaces \u003d server.interface_list()"},{"line_number":568,"context_line":""},{"line_number":569,"context_line":"            # if old networks is None, it mean, that server got first"},{"line_number":570,"context_line":"            # free port. so we should clear all (this one) interfaces."},{"line_number":571,"context_line":"            if old_networks is None:"},{"line_number":572,"context_line":"                for iface in interfaces:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOoc%3D","line":569,"in_reply_to":"AAAAVn%2F%2FOxw%3D","updated":"2014-03-07 14:00:56.000000000","message":"Done","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"a061515213c7a69c5e720ba7d3f7964fe863345d","unresolved":false,"context_lines":[{"line_number":571,"context_line":"            if old_networks is None:"},{"line_number":572,"context_line":"                for iface in interfaces:"},{"line_number":573,"context_line":"                    checker \u003d scheduler.TaskRunner(server.interface_detach,"},{"line_number":574,"context_line":"                                                   getattr(iface, \u0027port_id\u0027))"},{"line_number":575,"context_line":"                    checkers.append(checker)"},{"line_number":576,"context_line":"            # if we have any information in networks field, we will find"},{"line_number":577,"context_line":"            # old and new settings and then detach, attach their accordingly"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOxI%3D","line":574,"updated":"2014-03-07 13:05:10.000000000","message":"Same here, don\u0027t use getattr.","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ce1a9f7d3ab6639f15c04d01aa7433e26600cfec","unresolved":false,"context_lines":[{"line_number":571,"context_line":"            if old_networks is None:"},{"line_number":572,"context_line":"                for iface in interfaces:"},{"line_number":573,"context_line":"                    checker \u003d scheduler.TaskRunner(server.interface_detach,"},{"line_number":574,"context_line":"                                                   getattr(iface, \u0027port_id\u0027))"},{"line_number":575,"context_line":"                    checkers.append(checker)"},{"line_number":576,"context_line":"            # if we have any information in networks field, we will find"},{"line_number":577,"context_line":"            # old and new settings and then detach, attach their accordingly"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOao%3D","line":574,"in_reply_to":"AAAAVn%2F%2FOxI%3D","updated":"2014-03-07 14:00:56.000000000","message":"Done","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"a061515213c7a69c5e720ba7d3f7964fe863345d","unresolved":false,"context_lines":[{"line_number":574,"context_line":"                                                   getattr(iface, \u0027port_id\u0027))"},{"line_number":575,"context_line":"                    checkers.append(checker)"},{"line_number":576,"context_line":"            # if we have any information in networks field, we will find"},{"line_number":577,"context_line":"            # old and new settings and then detach, attach their accordingly"},{"line_number":578,"context_line":"            else:"},{"line_number":579,"context_line":"                # remove not updated networks from old and new networks lists,"},{"line_number":580,"context_line":"                # also get list these networks"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOxk%3D","line":577,"updated":"2014-03-07 13:05:10.000000000","message":"Typo: their. I\u0027m not sure what you meant here.","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ce1a9f7d3ab6639f15c04d01aa7433e26600cfec","unresolved":false,"context_lines":[{"line_number":574,"context_line":"                                                   getattr(iface, \u0027port_id\u0027))"},{"line_number":575,"context_line":"                    checkers.append(checker)"},{"line_number":576,"context_line":"            # if we have any information in networks field, we will find"},{"line_number":577,"context_line":"            # old and new settings and then detach, attach their accordingly"},{"line_number":578,"context_line":"            else:"},{"line_number":579,"context_line":"                # remove not updated networks from old and new networks lists,"},{"line_number":580,"context_line":"                # also get list these networks"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOoY%3D","line":577,"in_reply_to":"AAAAVn%2F%2FOxk%3D","updated":"2014-03-07 14:00:56.000000000","message":"Done","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"a061515213c7a69c5e720ba7d3f7964fe863345d","unresolved":false,"context_lines":[{"line_number":606,"context_line":"                    checkers.append(checker)"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"            # if new_networks is None, we should create first free port,"},{"line_number":609,"context_line":"            # according similar behaviuor during instance create process"},{"line_number":610,"context_line":"            if attach_first_free_port:"},{"line_number":611,"context_line":"                    checker \u003d scheduler.TaskRunner(server.interface_attach,"},{"line_number":612,"context_line":"                                                   None, None, None)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOw0%3D","line":609,"updated":"2014-03-07 13:05:10.000000000","message":"Typo: behaviuor","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ce1a9f7d3ab6639f15c04d01aa7433e26600cfec","unresolved":false,"context_lines":[{"line_number":606,"context_line":"                    checkers.append(checker)"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"            # if new_networks is None, we should create first free port,"},{"line_number":609,"context_line":"            # according similar behaviuor during instance create process"},{"line_number":610,"context_line":"            if attach_first_free_port:"},{"line_number":611,"context_line":"                    checker \u003d scheduler.TaskRunner(server.interface_attach,"},{"line_number":612,"context_line":"                                                   None, None, None)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOoQ%3D","line":609,"in_reply_to":"AAAAVn%2F%2FOw0%3D","updated":"2014-03-07 14:00:56.000000000","message":"Done","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"a061515213c7a69c5e720ba7d3f7964fe863345d","unresolved":false,"context_lines":[{"line_number":611,"context_line":"                    checker \u003d scheduler.TaskRunner(server.interface_attach,"},{"line_number":612,"context_line":"                                                   None, None, None)"},{"line_number":613,"context_line":"                    checkers.append(checker)"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"        # Optimization: make sure the first task is started before"},{"line_number":616,"context_line":"        # check_update_complete."},{"line_number":617,"context_line":"        if checkers:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOwk%3D","line":614,"updated":"2014-03-07 13:05:10.000000000","message":"Indentation is too deep here.","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ce1a9f7d3ab6639f15c04d01aa7433e26600cfec","unresolved":false,"context_lines":[{"line_number":611,"context_line":"                    checker \u003d scheduler.TaskRunner(server.interface_attach,"},{"line_number":612,"context_line":"                                                   None, None, None)"},{"line_number":613,"context_line":"                    checkers.append(checker)"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"        # Optimization: make sure the first task is started before"},{"line_number":616,"context_line":"        # check_update_complete."},{"line_number":617,"context_line":"        if checkers:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOoM%3D","line":614,"in_reply_to":"AAAAVn%2F%2FOwk%3D","updated":"2014-03-07 14:00:56.000000000","message":"Done","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":7253,"name":"Jason Dunsmore","email":"jasondunsmore@gmail.com","username":"jbd"},"change_message_id":"e4aaf465a7cc4cbe9ca60c009f9463e89a945158","unresolved":false,"context_lines":[{"line_number":493,"context_line":"            old_networks.remove(net)"},{"line_number":494,"context_line":"        return not_updated_networks"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"    def match_iface_port_with_network(self, nets, interfaces):"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        def find_equal(port, net_id, ip, nets):"},{"line_number":499,"context_line":"            for net in nets:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2FBkY%3D","line":496,"updated":"2014-03-10 16:30:52.000000000","message":"This should be renamed to indicate it\u0027s destructiveness.  Something like \"update_networks_matching_iface_port\".","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ef32b8178866be95f0d8b576637e2e8558ccaf9d","unresolved":false,"context_lines":[{"line_number":493,"context_line":"            old_networks.remove(net)"},{"line_number":494,"context_line":"        return not_updated_networks"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"    def match_iface_port_with_network(self, nets, interfaces):"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        def find_equal(port, net_id, ip, nets):"},{"line_number":499,"context_line":"            for net in nets:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2B8HY%3D","line":496,"in_reply_to":"AAAAVn%2F%2FBkY%3D","updated":"2014-03-11 06:30:54.000000000","message":"Done","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":7253,"name":"Jason Dunsmore","email":"jasondunsmore@gmail.com","username":"jbd"},"change_message_id":"e4aaf465a7cc4cbe9ca60c009f9463e89a945158","unresolved":false,"context_lines":[{"line_number":588,"context_line":"            interfaces \u003d server.interface_list()"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"            # if old networks is None, it means that the server got first"},{"line_number":591,"context_line":"            # free port. so we should clear all (this one) interfaces."},{"line_number":592,"context_line":"            if old_networks is None:"},{"line_number":593,"context_line":"                for iface in interfaces:"},{"line_number":594,"context_line":"                    checker \u003d scheduler.TaskRunner(server.interface_detach,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2FBfU%3D","line":591,"updated":"2014-03-10 16:30:52.000000000","message":"I don\u0027t understand the meaning of \"we should clear all (this one) interfaces\"","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ef32b8178866be95f0d8b576637e2e8558ccaf9d","unresolved":false,"context_lines":[{"line_number":588,"context_line":"            interfaces \u003d server.interface_list()"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"            # if old networks is None, it means that the server got first"},{"line_number":591,"context_line":"            # free port. so we should clear all (this one) interfaces."},{"line_number":592,"context_line":"            if old_networks is None:"},{"line_number":593,"context_line":"                for iface in interfaces:"},{"line_number":594,"context_line":"                    checker \u003d scheduler.TaskRunner(server.interface_detach,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2B8HA%3D","line":591,"in_reply_to":"AAAAVn%2F%2FBfU%3D","updated":"2014-03-11 06:30:54.000000000","message":"Done","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":7253,"name":"Jason Dunsmore","email":"jasondunsmore@gmail.com","username":"jbd"},"change_message_id":"e4aaf465a7cc4cbe9ca60c009f9463e89a945158","unresolved":false,"context_lines":[{"line_number":595,"context_line":"                                                   iface.port_id)"},{"line_number":596,"context_line":"                    checkers.append(checker)"},{"line_number":597,"context_line":"            # if we have any information in networks field, we should:"},{"line_number":598,"context_line":"            # 1. find similar networks, if they are existed"},{"line_number":599,"context_line":"            # 2. remove these networks from new_networks and old_networks"},{"line_number":600,"context_line":"            #    lists"},{"line_number":601,"context_line":"            # 3. detach not matched networks, which presented in old_networks"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2FBgY%3D","line":598,"updated":"2014-03-10 16:30:52.000000000","message":"if they exist","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ef32b8178866be95f0d8b576637e2e8558ccaf9d","unresolved":false,"context_lines":[{"line_number":595,"context_line":"                                                   iface.port_id)"},{"line_number":596,"context_line":"                    checkers.append(checker)"},{"line_number":597,"context_line":"            # if we have any information in networks field, we should:"},{"line_number":598,"context_line":"            # 1. find similar networks, if they are existed"},{"line_number":599,"context_line":"            # 2. remove these networks from new_networks and old_networks"},{"line_number":600,"context_line":"            #    lists"},{"line_number":601,"context_line":"            # 3. detach not matched networks, which presented in old_networks"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2B8GY%3D","line":598,"in_reply_to":"AAAAVn%2F%2FBgY%3D","updated":"2014-03-11 06:30:54.000000000","message":"Done","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":7253,"name":"Jason Dunsmore","email":"jasondunsmore@gmail.com","username":"jbd"},"change_message_id":"e4aaf465a7cc4cbe9ca60c009f9463e89a945158","unresolved":false,"context_lines":[{"line_number":598,"context_line":"            # 1. find similar networks, if they are existed"},{"line_number":599,"context_line":"            # 2. remove these networks from new_networks and old_networks"},{"line_number":600,"context_line":"            #    lists"},{"line_number":601,"context_line":"            # 3. detach not matched networks, which presented in old_networks"},{"line_number":602,"context_line":"            # 3. attach not matched networks, which presented in new_networks"},{"line_number":603,"context_line":"            else:"},{"line_number":604,"context_line":"                # remove not updated networks from old and new networks lists,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2FBf8%3D","line":601,"updated":"2014-03-10 16:30:52.000000000","message":"s/not matched/unmatched/\n\ns/presented/were present/","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ef32b8178866be95f0d8b576637e2e8558ccaf9d","unresolved":false,"context_lines":[{"line_number":598,"context_line":"            # 1. find similar networks, if they are existed"},{"line_number":599,"context_line":"            # 2. remove these networks from new_networks and old_networks"},{"line_number":600,"context_line":"            #    lists"},{"line_number":601,"context_line":"            # 3. detach not matched networks, which presented in old_networks"},{"line_number":602,"context_line":"            # 3. attach not matched networks, which presented in new_networks"},{"line_number":603,"context_line":"            else:"},{"line_number":604,"context_line":"                # remove not updated networks from old and new networks lists,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2B8Fw%3D","line":601,"in_reply_to":"AAAAVn%2F%2FBf8%3D","updated":"2014-03-11 06:30:54.000000000","message":"Done","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":7253,"name":"Jason Dunsmore","email":"jasondunsmore@gmail.com","username":"jbd"},"change_message_id":"e4aaf465a7cc4cbe9ca60c009f9463e89a945158","unresolved":false,"context_lines":[{"line_number":599,"context_line":"            # 2. remove these networks from new_networks and old_networks"},{"line_number":600,"context_line":"            #    lists"},{"line_number":601,"context_line":"            # 3. detach not matched networks, which presented in old_networks"},{"line_number":602,"context_line":"            # 3. attach not matched networks, which presented in new_networks"},{"line_number":603,"context_line":"            else:"},{"line_number":604,"context_line":"                # remove not updated networks from old and new networks lists,"},{"line_number":605,"context_line":"                # also get list these networks"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2FBjU%3D","line":602,"updated":"2014-03-10 16:30:52.000000000","message":"Should be 4 instead of 3\n\ns/not matched/unmatched/\n\ns/presented/were present/","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ef32b8178866be95f0d8b576637e2e8558ccaf9d","unresolved":false,"context_lines":[{"line_number":599,"context_line":"            # 2. remove these networks from new_networks and old_networks"},{"line_number":600,"context_line":"            #    lists"},{"line_number":601,"context_line":"            # 3. detach not matched networks, which presented in old_networks"},{"line_number":602,"context_line":"            # 3. attach not matched networks, which presented in new_networks"},{"line_number":603,"context_line":"            else:"},{"line_number":604,"context_line":"                # remove not updated networks from old and new networks lists,"},{"line_number":605,"context_line":"                # also get list these networks"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2B8Fs%3D","line":602,"in_reply_to":"AAAAVn%2F%2FBjU%3D","updated":"2014-03-11 06:30:54.000000000","message":"Done","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":7253,"name":"Jason Dunsmore","email":"jasondunsmore@gmail.com","username":"jbd"},"change_message_id":"e4aaf465a7cc4cbe9ca60c009f9463e89a945158","unresolved":false,"context_lines":[{"line_number":609,"context_line":"                self.match_iface_port_with_network("},{"line_number":610,"context_line":"                    old_networks + not_updated_networks, interfaces)"},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"                # according nova interface-detach command detached port"},{"line_number":613,"context_line":"                # will be deleted"},{"line_number":614,"context_line":"                for net in old_networks:"},{"line_number":615,"context_line":"                    checker \u003d scheduler.TaskRunner(server.interface_detach,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2FBiE%3D","line":612,"updated":"2014-03-10 16:30:52.000000000","message":"according to","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ef32b8178866be95f0d8b576637e2e8558ccaf9d","unresolved":false,"context_lines":[{"line_number":609,"context_line":"                self.match_iface_port_with_network("},{"line_number":610,"context_line":"                    old_networks + not_updated_networks, interfaces)"},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"                # according nova interface-detach command detached port"},{"line_number":613,"context_line":"                # will be deleted"},{"line_number":614,"context_line":"                for net in old_networks:"},{"line_number":615,"context_line":"                    checker \u003d scheduler.TaskRunner(server.interface_detach,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2B8Fc%3D","line":612,"in_reply_to":"AAAAVn%2F%2FBiE%3D","updated":"2014-03-11 06:30:54.000000000","message":"Done","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":7253,"name":"Jason Dunsmore","email":"jasondunsmore@gmail.com","username":"jbd"},"change_message_id":"e4aaf465a7cc4cbe9ca60c009f9463e89a945158","unresolved":false,"context_lines":[{"line_number":616,"context_line":"                                                   net.get(\u0027port\u0027))"},{"line_number":617,"context_line":"                    checkers.append(checker)"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"            # attach section similar for both variants, that"},{"line_number":620,"context_line":"            # were mentioned above"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"            for net in new_networks:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2FBhE%3D","line":619,"updated":"2014-03-10 16:30:52.000000000","message":"no comma is necessary","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ef32b8178866be95f0d8b576637e2e8558ccaf9d","unresolved":false,"context_lines":[{"line_number":616,"context_line":"                                                   net.get(\u0027port\u0027))"},{"line_number":617,"context_line":"                    checkers.append(checker)"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"            # attach section similar for both variants, that"},{"line_number":620,"context_line":"            # were mentioned above"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"            for net in new_networks:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2B8FY%3D","line":619,"in_reply_to":"AAAAVn%2F%2FBhE%3D","updated":"2014-03-11 06:30:54.000000000","message":"Done","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":7253,"name":"Jason Dunsmore","email":"jasondunsmore@gmail.com","username":"jbd"},"change_message_id":"e4aaf465a7cc4cbe9ca60c009f9463e89a945158","unresolved":false,"context_lines":[{"line_number":630,"context_line":"                                                   net.get(\u0027fixed_ip\u0027))"},{"line_number":631,"context_line":"                    checkers.append(checker)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"            # if new_networks is None, we should create first free port,"},{"line_number":634,"context_line":"            # according similar behavior during instance create process"},{"line_number":635,"context_line":"            if attach_first_free_port:"},{"line_number":636,"context_line":"                checker \u003d scheduler.TaskRunner(server.interface_attach,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2FBeo%3D","line":633,"updated":"2014-03-10 16:30:52.000000000","message":"Should \"create\" be \"attach\"?","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ef32b8178866be95f0d8b576637e2e8558ccaf9d","unresolved":false,"context_lines":[{"line_number":630,"context_line":"                                                   net.get(\u0027fixed_ip\u0027))"},{"line_number":631,"context_line":"                    checkers.append(checker)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"            # if new_networks is None, we should create first free port,"},{"line_number":634,"context_line":"            # according similar behavior during instance create process"},{"line_number":635,"context_line":"            if attach_first_free_port:"},{"line_number":636,"context_line":"                checker \u003d scheduler.TaskRunner(server.interface_attach,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2B8FI%3D","line":633,"in_reply_to":"AAAAVn%2F%2FBeo%3D","updated":"2014-03-11 06:30:54.000000000","message":"Done","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":7253,"name":"Jason Dunsmore","email":"jasondunsmore@gmail.com","username":"jbd"},"change_message_id":"e4aaf465a7cc4cbe9ca60c009f9463e89a945158","unresolved":false,"context_lines":[{"line_number":631,"context_line":"                    checkers.append(checker)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"            # if new_networks is None, we should create first free port,"},{"line_number":634,"context_line":"            # according similar behavior during instance create process"},{"line_number":635,"context_line":"            if attach_first_free_port:"},{"line_number":636,"context_line":"                checker \u003d scheduler.TaskRunner(server.interface_attach,"},{"line_number":637,"context_line":"                                               None, None, None)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2FBd8%3D","line":634,"updated":"2014-03-10 16:30:52.000000000","message":"\"according to similar behavior during instance creation\"","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ef32b8178866be95f0d8b576637e2e8558ccaf9d","unresolved":false,"context_lines":[{"line_number":631,"context_line":"                    checkers.append(checker)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"            # if new_networks is None, we should create first free port,"},{"line_number":634,"context_line":"            # according similar behavior during instance create process"},{"line_number":635,"context_line":"            if attach_first_free_port:"},{"line_number":636,"context_line":"                checker \u003d scheduler.TaskRunner(server.interface_attach,"},{"line_number":637,"context_line":"                                               None, None, None)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2B8FM%3D","line":634,"in_reply_to":"AAAAVn%2F%2FBd8%3D","updated":"2014-03-11 06:30:54.000000000","message":"Done","commit_id":"98c4f03d260fe50ddd06807d020e160ce2fb296b"},{"author":{"_account_id":8289,"name":"huangtianhua","email":"tiantian223@163.com","username":"huangtianhua"},"change_message_id":"de036529b258f682c9a39ff31670743c2fc0fe1b","unresolved":false,"context_lines":[{"line_number":578,"context_line":"        if self.NETWORKS in prop_diff:"},{"line_number":579,"context_line":"            new_networks \u003d prop_diff.get(self.NETWORKS)"},{"line_number":580,"context_line":"            attach_first_free_port \u003d False"},{"line_number":581,"context_line":"            if new_networks is None:"},{"line_number":582,"context_line":"                new_networks \u003d []"},{"line_number":583,"context_line":"                attach_first_free_port \u003d True"},{"line_number":584,"context_line":"            old_networks \u003d self.properties.get(self.NETWORKS)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAVn%2F%2B6wU%3D","line":581,"updated":"2014-03-11 09:59:19.000000000","message":"What about the [] situation?\n\nI took a test, and I think may be it\u0027s incorrect here:)\n1.create a stack with template:\n   {\n  \"AWSTemplateFormatVersion\" : \"2010-09-09\",\n\"Description\" : \"Sample Stack\",\n\n\"Resources\" : {\n\n        \"instance-port\" : {\n            \"Type\" : \"OS::Neutron::Port\",\n            \"Properties\" : {\n               \"network_id\" : \"3acd1b78-afce-408a-bc2e-35b327efabaa\"\n            }\n        },\n        \"instance\" : {\n            \"Type\" : \"OS::Nova::Server\",\n            \"Properties\" : {\n                \"flavor\" : \"1\",\n                \"image\" : \"3bcc3c45-db54-4ddb-a40e-6eb4cba79eb2\",\n                \"networks\" : [{ \"port\" : { \"Ref\" : \"instance-port\" }}]\n            }\n        }\n    },\n\n\"Outputs\" : {}\n}\n\n2. update a stack with template:\n{\n    \"AWSTemplateFormatVersion\" : \"2010-09-09\",\n    \"Description\" : \"Sample Stack\",\n\n    \"Resources\" : {\n        \"instance\" : {\n            \"Type\" : \"OS::Nova::Server\",\n            \"Properties\" : {\n                \"flavor\" : \"1\",\n                \"image\" : \"3bcc3c45-db54-4ddb-a40e-6eb4cba79eb2\",\n                \"networks\" : []\n            }\n        }\n    },\n\n    \"Outputs\" : {}\n}\n\n3. then the server has no port, because attach_first_free_port \u003d False.","commit_id":"65d5bace759a6766cd908ce257a7615e4444e208"},{"author":{"_account_id":8289,"name":"huangtianhua","email":"tiantian223@163.com","username":"huangtianhua"},"change_message_id":"e50b27bbb1af4280091337da526086e6effcf951","unresolved":false,"context_lines":[{"line_number":578,"context_line":"        if self.NETWORKS in prop_diff:"},{"line_number":579,"context_line":"            new_networks \u003d prop_diff.get(self.NETWORKS)"},{"line_number":580,"context_line":"            attach_first_free_port \u003d False"},{"line_number":581,"context_line":"            if new_networks is None:"},{"line_number":582,"context_line":"                new_networks \u003d []"},{"line_number":583,"context_line":"                attach_first_free_port \u003d True"},{"line_number":584,"context_line":"            old_networks \u003d self.properties.get(self.NETWORKS)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAVn%2F%2BzRc%3D","line":581,"in_reply_to":"AAAAVn%2F%2B6oE%3D","updated":"2014-03-12 03:07:46.000000000","message":"But when stack-create, see handle_create():\nnics \u003d self._build_nics(self.properties.get(self.NETWORKS))\n\nBoth networks is None and networks is [], heat pass \nnics \u003d None to novaclient after _build_nics, and then novaclient pass the body without \u0027networks\u0027 to nova. So the behavior of the two situation is the same.\n\nWhat do think about it?","commit_id":"65d5bace759a6766cd908ce257a7615e4444e208"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"6cd567e8c841f30391c4c9e9d60cf5425cae1135","unresolved":false,"context_lines":[{"line_number":578,"context_line":"        if self.NETWORKS in prop_diff:"},{"line_number":579,"context_line":"            new_networks \u003d prop_diff.get(self.NETWORKS)"},{"line_number":580,"context_line":"            attach_first_free_port \u003d False"},{"line_number":581,"context_line":"            if new_networks is None:"},{"line_number":582,"context_line":"                new_networks \u003d []"},{"line_number":583,"context_line":"                attach_first_free_port \u003d True"},{"line_number":584,"context_line":"            old_networks \u003d self.properties.get(self.NETWORKS)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAVn%2F%2B6oE%3D","line":581,"in_reply_to":"AAAAVn%2F%2B6wU%3D","updated":"2014-03-11 10:21:58.000000000","message":"Hi huangtianhua. Currently it\u0027s correct, because in neutron networks we have three different situation:\n\n1. when network is None - it means, that server will get first free ip adrress\n\n2. when network\u003d\u003cnet_id\u003e,\u003cip\u003e or \u003cport\u003e - in this case will be used provided values\n\n3. when network is [] - it\u0027s mean that server has not any network interfaces.\n\nI think, that we have same situations for server network properties. for more details you could look  bug 1271597","commit_id":"65d5bace759a6766cd908ce257a7615e4444e208"},{"author":{"_account_id":8289,"name":"huangtianhua","email":"tiantian223@163.com","username":"huangtianhua"},"change_message_id":"04541bafaee787c380ab309934f5d2e1fc221197","unresolved":false,"context_lines":[{"line_number":578,"context_line":"        if self.NETWORKS in prop_diff:"},{"line_number":579,"context_line":"            new_networks \u003d prop_diff.get(self.NETWORKS)"},{"line_number":580,"context_line":"            attach_first_free_port \u003d False"},{"line_number":581,"context_line":"            if new_networks is None:"},{"line_number":582,"context_line":"                new_networks \u003d []"},{"line_number":583,"context_line":"                attach_first_free_port \u003d True"},{"line_number":584,"context_line":"            old_networks \u003d self.properties.get(self.NETWORKS)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAVn%2F%2Bxvc%3D","line":581,"in_reply_to":"AAAAVn%2F%2Bx38%3D","updated":"2014-03-12 08:22:35.000000000","message":"I have the similar patch about the ec2 instance, \nhttps://bugs.launchpad.net/heat/+bug/1280151\nyour patch helps me so much. And I know it\u0027s not easy, at least to me:)","commit_id":"65d5bace759a6766cd908ce257a7615e4444e208"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"2fe8252e344e127955f78960470e65f2dd36b038","unresolved":false,"context_lines":[{"line_number":578,"context_line":"        if self.NETWORKS in prop_diff:"},{"line_number":579,"context_line":"            new_networks \u003d prop_diff.get(self.NETWORKS)"},{"line_number":580,"context_line":"            attach_first_free_port \u003d False"},{"line_number":581,"context_line":"            if new_networks is None:"},{"line_number":582,"context_line":"                new_networks \u003d []"},{"line_number":583,"context_line":"                attach_first_free_port \u003d True"},{"line_number":584,"context_line":"            old_networks \u003d self.properties.get(self.NETWORKS)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAVn%2F%2BxqU%3D","line":581,"in_reply_to":"AAAAVn%2F%2Bxvc%3D","updated":"2014-03-12 08:38:26.000000000","message":"Np, I like my work :) And I am glad to do heat better.","commit_id":"65d5bace759a6766cd908ce257a7615e4444e208"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"bede71e388c6e8ffb9d280448528b987c7ee0474","unresolved":false,"context_lines":[{"line_number":578,"context_line":"        if self.NETWORKS in prop_diff:"},{"line_number":579,"context_line":"            new_networks \u003d prop_diff.get(self.NETWORKS)"},{"line_number":580,"context_line":"            attach_first_free_port \u003d False"},{"line_number":581,"context_line":"            if new_networks is None:"},{"line_number":582,"context_line":"                new_networks \u003d []"},{"line_number":583,"context_line":"                attach_first_free_port \u003d True"},{"line_number":584,"context_line":"            old_networks \u003d self.properties.get(self.NETWORKS)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAVn%2F%2Bx38%3D","line":581,"in_reply_to":"AAAAVn%2F%2BzRc%3D","updated":"2014-03-12 08:02:03.000000000","message":"Hm. I have checked your suggestion and it\u0027s true. I will fix it. thanks","commit_id":"65d5bace759a6766cd908ce257a7615e4444e208"},{"author":{"_account_id":8289,"name":"huangtianhua","email":"tiantian223@163.com","username":"huangtianhua"},"change_message_id":"60001221f96330799a376d2fbd61424b9820277b","unresolved":false,"context_lines":[{"line_number":589,"context_line":""},{"line_number":590,"context_line":"            # if old networks is None, it means that the server got first"},{"line_number":591,"context_line":"            # free port. so we should detach this interface."},{"line_number":592,"context_line":"            if old_networks is None:"},{"line_number":593,"context_line":"                for iface in interfaces:"},{"line_number":594,"context_line":"                    checker \u003d scheduler.TaskRunner(server.interface_detach,"},{"line_number":595,"context_line":"                                                   iface.port_id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAWH%2F%2F6Eo%3D","line":592,"updated":"2014-03-13 01:31:01.000000000","message":"I am think a situation, the network is [] while create and the network is None while update, is it need to detach the first free port and then to attach the first free port? Of course, may be the port is different, but what\u0027s the user want? Perhaps don\u0027t want to modify in this situation.\n\nWhat do you think about?","commit_id":"59c6a0a988986a1fa817bac5649e79b0254ea516"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"29845735c8ae43c1d3239b913689d0b9e95d2856","unresolved":false,"context_lines":[{"line_number":589,"context_line":""},{"line_number":590,"context_line":"            # if old networks is None, it means that the server got first"},{"line_number":591,"context_line":"            # free port. so we should detach this interface."},{"line_number":592,"context_line":"            if old_networks is None:"},{"line_number":593,"context_line":"                for iface in interfaces:"},{"line_number":594,"context_line":"                    checker \u003d scheduler.TaskRunner(server.interface_detach,"},{"line_number":595,"context_line":"                                                   iface.port_id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAWH%2F%2F4a8%3D","line":592,"in_reply_to":"AAAAWH%2F%2F6Eo%3D","updated":"2014-03-14 06:01:53.000000000","message":"I think, that it works correct now, because when user do some changes in template heat should react on it. Also current approach gives ability change port without passing additional information (just use None or [] values). \nI understand, that these situation have same behavior, but if user change template he should know what he is doing. About case when user wants have same port after update - my answer - he should not change section networks at all.","commit_id":"59c6a0a988986a1fa817bac5649e79b0254ea516"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"24cb429dcb61d8ff0cfc9c19b9a7dc9a3f192eff","unresolved":false,"context_lines":[{"line_number":929,"context_line":"            pass"},{"line_number":930,"context_line":"        else:"},{"line_number":931,"context_line":"            delete \u003d scheduler.TaskRunner(nova_utils.delete_server, server)"},{"line_number":932,"context_line":"            delete(wait_time\u003d0.2)"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"        self.resource_id_set(None)"},{"line_number":935,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAWH%2F%2Fg9Q%3D","line":932,"updated":"2014-03-17 12:27:09.000000000","message":"you should also delete resource_data somewhere in this method","commit_id":"13e39a3553fe6930799d8970ecdcd7ab83a9a192"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"728d8cbfb85118607ffba837eadc05f59e7a5e03","unresolved":false,"context_lines":[{"line_number":929,"context_line":"            pass"},{"line_number":930,"context_line":"        else:"},{"line_number":931,"context_line":"            delete \u003d scheduler.TaskRunner(nova_utils.delete_server, server)"},{"line_number":932,"context_line":"            delete(wait_time\u003d0.2)"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"        self.resource_id_set(None)"},{"line_number":935,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAWH%2F%2Fgak%3D","line":932,"in_reply_to":"AAAAWH%2F%2Fg9Q%3D","updated":"2014-03-17 13:54:07.000000000","message":"Done","commit_id":"13e39a3553fe6930799d8970ecdcd7ab83a9a192"},{"author":{"_account_id":4571,"name":"Steve Baker","email":"sbaker@redhat.com","username":"steve-stevebaker"},"change_message_id":"de2aac07048adb12476c0d8567fe316033c98e85","unresolved":false,"context_lines":[{"line_number":493,"context_line":"            instance_meta \u003d nova_utils.meta_serialize(instance_meta)"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"        scheduler_hints \u003d self.properties.get(self.SCHEDULER_HINTS)"},{"line_number":496,"context_line":"        db_api.resource_data_set(self, self.NETWORKS,"},{"line_number":497,"context_line":"                                 json.dumps(self.properties.get("},{"line_number":498,"context_line":"                                     self.NETWORKS)))"},{"line_number":499,"context_line":"        nics \u003d self._build_nics(self.properties.get(self.NETWORKS))"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAWH%2F%2Fb34%3D","line":496,"updated":"2014-03-17 22:30:30.000000000","message":"I don\u0027t like storing the current networks property as resource data just to support update. Doesn\u0027t self.properties contain the previous state that you are looking for? If it doesn\u0027t because of bug 1292495 I\u0027d rather see that bug fixed.","commit_id":"2d1687ccabe2e68971c30e570c49c50d0cd21fd4"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"3e993419a2f59f68f6283406882a56281111b330","unresolved":false,"context_lines":[{"line_number":493,"context_line":"            instance_meta \u003d nova_utils.meta_serialize(instance_meta)"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"        scheduler_hints \u003d self.properties.get(self.SCHEDULER_HINTS)"},{"line_number":496,"context_line":"        db_api.resource_data_set(self, self.NETWORKS,"},{"line_number":497,"context_line":"                                 json.dumps(self.properties.get("},{"line_number":498,"context_line":"                                     self.NETWORKS)))"},{"line_number":499,"context_line":"        nics \u003d self._build_nics(self.properties.get(self.NETWORKS))"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAWH%2F%2FbZE%3D","line":496,"in_reply_to":"AAAAWH%2F%2Fb34%3D","updated":"2014-03-17 23:36:17.000000000","message":"More likely to be bug 1291411, but yes, I\u0027m inclined to agree. Resource data is evil and should be avoided at almost any cost. Can this information not be obtained from the Nova/Neutron API? That\u0027s the appropriate place to get it.","commit_id":"2d1687ccabe2e68971c30e570c49c50d0cd21fd4"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"d710f50f84c90bcca0af1df3d31cce1532729148","unresolved":false,"context_lines":[{"line_number":493,"context_line":"            instance_meta \u003d nova_utils.meta_serialize(instance_meta)"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"        scheduler_hints \u003d self.properties.get(self.SCHEDULER_HINTS)"},{"line_number":496,"context_line":"        db_api.resource_data_set(self, self.NETWORKS,"},{"line_number":497,"context_line":"                                 json.dumps(self.properties.get("},{"line_number":498,"context_line":"                                     self.NETWORKS)))"},{"line_number":499,"context_line":"        nics \u003d self._build_nics(self.properties.get(self.NETWORKS))"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAWH%2F%2FYi4%3D","line":496,"in_reply_to":"AAAAWH%2F%2FbOI%3D","updated":"2014-03-18 08:32:19.000000000","message":"Ok. I revert this changes in next patch.\nProblem is introduced in bug 1292495 have solution with using self.properties.\nBut Zane is right - the main point of using db for storing networks properties is bug 1291411. I hope, that it will be fixed soon.","commit_id":"2d1687ccabe2e68971c30e570c49c50d0cd21fd4"},{"author":{"_account_id":4571,"name":"Steve Baker","email":"sbaker@redhat.com","username":"steve-stevebaker"},"change_message_id":"0ac99466ccb05bfdfa5d8a6a1069ec6d70745ea4","unresolved":false,"context_lines":[{"line_number":493,"context_line":"            instance_meta \u003d nova_utils.meta_serialize(instance_meta)"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"        scheduler_hints \u003d self.properties.get(self.SCHEDULER_HINTS)"},{"line_number":496,"context_line":"        db_api.resource_data_set(self, self.NETWORKS,"},{"line_number":497,"context_line":"                                 json.dumps(self.properties.get("},{"line_number":498,"context_line":"                                     self.NETWORKS)))"},{"line_number":499,"context_line":"        nics \u003d self._build_nics(self.properties.get(self.NETWORKS))"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAWH%2F%2FbOI%3D","line":496,"in_reply_to":"AAAAWH%2F%2FbZE%3D","updated":"2014-03-17 23:49:05.000000000","message":"I don\u0027t think reconstituting this from neutron API calls will be practical.","commit_id":"2d1687ccabe2e68971c30e570c49c50d0cd21fd4"}],"heat/tests/test_server.py":[{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"564766c14f0cac9533008f9d549771f613ea1247","unresolved":false,"context_lines":[{"line_number":1613,"context_line":"        self.assertEqual((server.UPDATE, server.COMPLETE), server.state)"},{"line_number":1614,"context_line":"        self.m.VerifyAll()"},{"line_number":1615,"context_line":""},{"line_number":1616,"context_line":"    def test_server_update_networks_error_unknow_network(self):"},{"line_number":1617,"context_line":"        return_server \u003d self.fc.servers.list()[3]"},{"line_number":1618,"context_line":"        return_server.id \u003d 9102"},{"line_number":1619,"context_line":"        server \u003d self._create_test_server(return_server, \u0027networks_update\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2F35k%3D","line":1616,"updated":"2014-02-24 11:13:04.000000000","message":"typo s/unknow/unknown","commit_id":"9c2aca099c46c826edb866def2d124878411151f"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"8a1f15d7bb149451480ee1e8b09f07755c94c578","unresolved":false,"context_lines":[{"line_number":1613,"context_line":"        self.assertEqual((server.UPDATE, server.COMPLETE), server.state)"},{"line_number":1614,"context_line":"        self.m.VerifyAll()"},{"line_number":1615,"context_line":""},{"line_number":1616,"context_line":"    def test_server_update_networks_error_unknow_network(self):"},{"line_number":1617,"context_line":"        return_server \u003d self.fc.servers.list()[3]"},{"line_number":1618,"context_line":"        return_server.id \u003d 9102"},{"line_number":1619,"context_line":"        server \u003d self._create_test_server(return_server, \u0027networks_update\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVX%2F%2F8uk%3D","line":1616,"in_reply_to":"AAAAU3%2F%2F35k%3D","updated":"2014-02-27 07:27:53.000000000","message":"Done","commit_id":"9c2aca099c46c826edb866def2d124878411151f"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"a061515213c7a69c5e720ba7d3f7964fe863345d","unresolved":false,"context_lines":[{"line_number":1655,"context_line":"        matched_nets \u003d server.get_matches(old_nets, new_nets)"},{"line_number":1656,"context_line":"        self.assertEqual(old_nets_copy[:-1], matched_nets)"},{"line_number":1657,"context_line":"        self.assertEqual([old_nets_copy[2]], old_nets)"},{"line_number":1658,"context_line":"        self.assertEqual([new_nets_copy[2]], new_nets)"},{"line_number":1659,"context_line":""},{"line_number":1660,"context_line":"    def test_match_iface_port_with_network(self):"},{"line_number":1661,"context_line":"        return_server \u003d self.fc.servers.list()[3]"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOwQ%3D","line":1658,"updated":"2014-03-07 13:05:10.000000000","message":"I think the asserts arguments are inverted here.","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ce1a9f7d3ab6639f15c04d01aa7433e26600cfec","unresolved":false,"context_lines":[{"line_number":1655,"context_line":"        matched_nets \u003d server.get_matches(old_nets, new_nets)"},{"line_number":1656,"context_line":"        self.assertEqual(old_nets_copy[:-1], matched_nets)"},{"line_number":1657,"context_line":"        self.assertEqual([old_nets_copy[2]], old_nets)"},{"line_number":1658,"context_line":"        self.assertEqual([new_nets_copy[2]], new_nets)"},{"line_number":1659,"context_line":""},{"line_number":1660,"context_line":"    def test_match_iface_port_with_network(self):"},{"line_number":1661,"context_line":"        return_server \u003d self.fc.servers.list()[3]"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FOpE%3D","line":1658,"in_reply_to":"AAAAVn%2F%2FOwQ%3D","updated":"2014-03-07 14:00:56.000000000","message":"No, It\u0027s correct order. Code is mentioned at 1647- 1653 lines need for assert.\nI check changes in old_nets and new_nets lists which were used in function get_matches.\nIf it is really necessary I could define expected lists. What do you think about it?","commit_id":"bdd188c53ebe7f84c614f7e7d114f36870f833c1"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"5f1e83d327c2c0cdbf34f2185662a871d3378f06","unresolved":false,"context_lines":[{"line_number":2100,"context_line":"        update_template \u003d copy.deepcopy(server.t)"},{"line_number":2101,"context_line":"        update_template[\u0027Properties\u0027][\u0027networks\u0027] \u003d new_networks"},{"line_number":2102,"context_line":""},{"line_number":2103,"context_line":"        self.m.StubOutWithMock(db_api, \u0027resource_data_get\u0027)"},{"line_number":2104,"context_line":"        db_api.resource_data_get(mox.IgnoreArg(), mox.IgnoreArg()).AndReturn("},{"line_number":2105,"context_line":"            json.dumps(old_networks))"},{"line_number":2106,"context_line":"        self.m.StubOutWithMock(db_api, \u0027resource_data_set\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAWH%2F%2FgFw%3D","line":2103,"updated":"2014-03-17 14:27:46.000000000","message":"I think this mock here is not needed - db_api.resource_data will do its job on faked db just fine. Unless you want to test that it is actually called, but then you should probably check for that in other tests involving creation, deletion and update. Might be worth though to test that the new values are correctly stored in resource_data as the result of the update.","commit_id":"2d1687ccabe2e68971c30e570c49c50d0cd21fd4"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"e427f03d70d83cbdd6828018e90f9714a405536b","unresolved":false,"context_lines":[{"line_number":2100,"context_line":"        update_template \u003d copy.deepcopy(server.t)"},{"line_number":2101,"context_line":"        update_template[\u0027Properties\u0027][\u0027networks\u0027] \u003d new_networks"},{"line_number":2102,"context_line":""},{"line_number":2103,"context_line":"        self.m.StubOutWithMock(db_api, \u0027resource_data_get\u0027)"},{"line_number":2104,"context_line":"        db_api.resource_data_get(mox.IgnoreArg(), mox.IgnoreArg()).AndReturn("},{"line_number":2105,"context_line":"            json.dumps(old_networks))"},{"line_number":2106,"context_line":"        self.m.StubOutWithMock(db_api, \u0027resource_data_set\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAWH%2F%2FfrU%3D","line":2103,"in_reply_to":"AAAAWH%2F%2Ff0k%3D","updated":"2014-03-17 15:13:11.000000000","message":"thanks for clarification","commit_id":"2d1687ccabe2e68971c30e570c49c50d0cd21fd4"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"d7e8052d5384f61fe7c421dab3e36dcb81c799e1","unresolved":false,"context_lines":[{"line_number":2100,"context_line":"        update_template \u003d copy.deepcopy(server.t)"},{"line_number":2101,"context_line":"        update_template[\u0027Properties\u0027][\u0027networks\u0027] \u003d new_networks"},{"line_number":2102,"context_line":""},{"line_number":2103,"context_line":"        self.m.StubOutWithMock(db_api, \u0027resource_data_get\u0027)"},{"line_number":2104,"context_line":"        db_api.resource_data_get(mox.IgnoreArg(), mox.IgnoreArg()).AndReturn("},{"line_number":2105,"context_line":"            json.dumps(old_networks))"},{"line_number":2106,"context_line":"        self.m.StubOutWithMock(db_api, \u0027resource_data_set\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAWH%2F%2Ff0k%3D","line":2103,"in_reply_to":"AAAAWH%2F%2FgFw%3D","updated":"2014-03-17 14:54:38.000000000","message":"The main reason for this mock is not testing request, because I think, that this functionality is works well without my test. The cause, why I do it, is that in function _create_test_server  we does not call handle_create method. So the data in the db is not existing and I have to mock it here for simulating correct answer from db.","commit_id":"2d1687ccabe2e68971c30e570c49c50d0cd21fd4"}]}
