)]}'
{"nova/network/quantumv2/api.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bb3de292c842b3b721098e7fdda0657a0e432b9d","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        nets \u003d self._get_available_networks(context, instance[\u0027project_id\u0027],"},{"line_number":186,"context_line":"                                            net_ids)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        if len(nets) \u003d\u003d 0:"},{"line_number":189,"context_line":"            LOG.warn(_(\"No network configured!\"), instance\u003dinstance)"},{"line_number":190,"context_line":"            return nets"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPn%2F%2FrUE%3D","line":188,"updated":"2013-06-25 13:48:35.000000000","message":"consider: if not nets:","commit_id":"49c5efdbd5fb4ffa67c874f1779f50b4143a2953"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cddebdcadfd611ea4f60e57799443b72ac9d234d","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        nets \u003d self._get_available_networks(context, instance[\u0027project_id\u0027],"},{"line_number":186,"context_line":"                                            net_ids)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        if len(nets) \u003d\u003d 0:"},{"line_number":189,"context_line":"            LOG.warn(_(\"No network configured!\"), instance\u003dinstance)"},{"line_number":190,"context_line":"            return nets"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPn%2F%2FrSU%3D","line":188,"in_reply_to":"AAAAPn%2F%2FrUE%3D","updated":"2013-06-25 13:55:41.000000000","message":"Agree, please :)","commit_id":"49c5efdbd5fb4ffa67c874f1779f50b4143a2953"},{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"unresolved":false,"context_lines":[{"line_number":185,"context_line":"        nets \u003d self._get_available_networks(context, instance[\u0027project_id\u0027],"},{"line_number":186,"context_line":"                                            net_ids)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        if len(nets) \u003d\u003d 0:"},{"line_number":189,"context_line":"            LOG.warn(_(\"No network configured!\"), instance\u003dinstance)"},{"line_number":190,"context_line":"            return nets"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPn%2F%2FrR0%3D","line":188,"in_reply_to":"AAAAPn%2F%2FrUE%3D","updated":"2013-06-25 14:04:11.000000000","message":"Oh yes, I like that better. Changing.","commit_id":"49c5efdbd5fb4ffa67c874f1779f50b4143a2953"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bb3de292c842b3b721098e7fdda0657a0e432b9d","unresolved":false,"context_lines":[{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        if len(nets) \u003d\u003d 0:"},{"line_number":189,"context_line":"            LOG.warn(_(\"No network configured!\"), instance\u003dinstance)"},{"line_number":190,"context_line":"            return nets"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        security_groups \u003d kwargs.get(\u0027security_groups\u0027, [])"},{"line_number":193,"context_line":"        security_group_ids \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPn%2F%2FrUM%3D","line":190,"updated":"2013-06-25 13:48:35.000000000","message":"This is a bit confusing as the method return network_model.NetworkInfo for a ports. Should the method return None or []?\n\nHow does it behave if this is received?","commit_id":"49c5efdbd5fb4ffa67c874f1779f50b4143a2953"},{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"unresolved":false,"context_lines":[{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        if len(nets) \u003d\u003d 0:"},{"line_number":189,"context_line":"            LOG.warn(_(\"No network configured!\"), instance\u003dinstance)"},{"line_number":190,"context_line":"            return nets"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        security_groups \u003d kwargs.get(\u0027security_groups\u0027, [])"},{"line_number":193,"context_line":"        security_group_ids \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPn%2F%2FrQ8%3D","line":190,"in_reply_to":"AAAAPn%2F%2FrUM%3D","updated":"2013-06-25 14:04:11.000000000","message":"Hmm.. I agree. I\u0027ll change this to return []. Returning None was my first choice but required a few changes in the caller and I ended up with an error in the data model code that I could not quite get my head around. It seems pretty happy with an empty list (which had been my second choice and tried to be clever by return nets instead). The \"if not nets\" and returning and empty list is actually the proper combination now that I think of it a bit more. The \"if not X\" is robust if _get_available_networks is ever modified to return None or empty lists and the returning [] will be digestible by any iterative code in the caller. \n\nFWIW: I had considered wrapping the loop and having a single return point, but the indentation seemed to be getting a bit out of hand. I hadn\u0027t originally considered it because... well, I blame it on the former C-programming colleagues who tormented that practice out of me ;)","commit_id":"49c5efdbd5fb4ffa67c874f1779f50b4143a2953"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cddebdcadfd611ea4f60e57799443b72ac9d234d","unresolved":false,"context_lines":[{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        if len(nets) \u003d\u003d 0:"},{"line_number":189,"context_line":"            LOG.warn(_(\"No network configured!\"), instance\u003dinstance)"},{"line_number":190,"context_line":"            return nets"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        security_groups \u003d kwargs.get(\u0027security_groups\u0027, [])"},{"line_number":193,"context_line":"        security_group_ids \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPn%2F%2FrSE%3D","line":190,"in_reply_to":"AAAAPn%2F%2FrUM%3D","updated":"2013-06-25 13:55:41.000000000","message":"I think that returning [] is probably reasonable in this case.\n\nBrent, please make sure to run the quantum interface_attach tests in tempest. They don\u0027t get run as part of the regular gate on quantum right now.","commit_id":"49c5efdbd5fb4ffa67c874f1779f50b4143a2953"}]}
