)]}'
{"nova/network/manager.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"1624befe26690b0561c4d80d1f40d3217ca8c1a7","unresolved":false,"context_lines":[{"line_number":502,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":503,"context_line":"                # If we fail to allocate any one mac address, clean up all"},{"line_number":504,"context_line":"                # allocated VIFs"},{"line_number":505,"context_line":"                vif_obj.VirtualInterface.delete_by_instance_uuid(context,"},{"line_number":506,"context_line":"                        instance_uuid)"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        self._allocate_fixed_ips(admin_context, instance_uuid,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FNgg%3D","line":505,"updated":"2014-01-16 10:57:09.000000000","message":"I see how you are using this (I -1ed the patch that adds the object because of this method) - but imho - this is ugly code.\n\nThe method that creates the vif (in this case _allocate_mac_address by calling _add_virtual_interface) should be responsible for cleaning up the data in the db if something goes wrong. if we do this, then there is no need to have this method, and also it makes the code more object-y unlike now when they are just structures with static db methods.","commit_id":"00d23053349f21b56195b0eaf4241175231a837c"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"07d9761d72ce8801c40221767ba1cbe379a3a6fd","unresolved":false,"context_lines":[{"line_number":502,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":503,"context_line":"                # If we fail to allocate any one mac address, clean up all"},{"line_number":504,"context_line":"                # allocated VIFs"},{"line_number":505,"context_line":"                vif_obj.VirtualInterface.delete_by_instance_uuid(context,"},{"line_number":506,"context_line":"                        instance_uuid)"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        self._allocate_fixed_ips(admin_context, instance_uuid,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FLwY%3D","line":505,"in_reply_to":"AAAAUH%2F%2FNgg%3D","updated":"2014-01-16 16:58:58.000000000","message":"I\u0027m all for making this better ... but ...\n\nkeep in mind that the motivation for doing all this is primarily performance (ability to use conductor).  So, I opt for getting this moved to objects quickly, and then coming back later for refactoring.","commit_id":"00d23053349f21b56195b0eaf4241175231a837c"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"1624befe26690b0561c4d80d1f40d3217ca8c1a7","unresolved":false,"context_lines":[{"line_number":1371,"context_line":"        #             we major version the network_rpcapi to 2.0."},{"line_number":1372,"context_line":"        instance \u003d instance_obj.Instance.get_by_id(context, instance_id)"},{"line_number":1373,"context_line":"        # NOTE(russellb) No need to object-ify this since"},{"line_number":1374,"context_line":"        # get_vifs_by_instance() is unused and set to be removed."},{"line_number":1375,"context_line":"        vifs \u003d self.db.virtual_interface_get_by_instance(context,"},{"line_number":1376,"context_line":"                                                         instance.uuid)"},{"line_number":1377,"context_line":"        for vif in vifs:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FNf8%3D","line":1374,"updated":"2014-01-16 10:57:09.000000000","message":"Thanks for these comments!","commit_id":"00d23053349f21b56195b0eaf4241175231a837c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8db93d141959a3a1508e7bfdb421625232c2f281","unresolved":false,"context_lines":[{"line_number":576,"context_line":"        networks \u003d {}"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"        for vif in vifs:"},{"line_number":579,"context_line":"            if vif.network_id is not None:"},{"line_number":580,"context_line":"                network \u003d self._get_network_by_id(context, vif.network_id)"},{"line_number":581,"context_line":"                networks[vif.uuid] \u003d network"},{"line_number":582,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FLLo%3D","line":579,"updated":"2014-01-16 18:29:40.000000000","message":"Hmm, okay, maybe this makes my network nullable comment moot.","commit_id":"aad2a396884c9506a928b490f1f04a966d31d5e0"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"5d4629c336d6d068c3e06714eb7e3882406998a9","unresolved":false,"context_lines":[{"line_number":743,"context_line":""},{"line_number":744,"context_line":"    def _add_virtual_interface(self, context, instance_uuid, network_id,"},{"line_number":745,"context_line":"                              mac\u003dNone):"},{"line_number":746,"context_line":"        attempts \u003d 1 if mac else CONF.create_unique_mac_address_attempts"},{"line_number":747,"context_line":"        for i in range(attempts):"},{"line_number":748,"context_line":"            try:"},{"line_number":749,"context_line":"                vif \u003d vif_obj.VirtualInterface()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2B%2B9c%3D","line":746,"updated":"2014-01-20 04:47:17.000000000","message":"I\u0027m guessing it\u0027s fine to treat a mac of \"\" as None :)  I only point it out because it\u0027s a slight behavior difference depending on input  to this method.","commit_id":"7ba6138be0e0f2306e457c420d98a6c70891a509"}]}
