)]}'
{"quantum/db/securitygroups_db.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"1ab97cf6b56745ff1188f3134389f333eedb535c","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        s \u003d security_group[\u0027security_group\u0027]"},{"line_number":97,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, s)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        if not default_sg:"},{"line_number":100,"context_line":"            self._ensure_default_security_group(context, tenant_id)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FqCo%3D","line":99,"updated":"2013-04-30 11:19:50.000000000","message":"Do we need to check for and create a default security group at every create call, especially if we are checking at get_security_group()?","commit_id":"82f71bef5a7ccd238ca6658deb13dc05c8af2b26"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":96,"context_line":"        s \u003d security_group[\u0027security_group\u0027]"},{"line_number":97,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, s)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        if not default_sg:"},{"line_number":100,"context_line":"            self._ensure_default_security_group(context, tenant_id)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FpKQ%3D","line":99,"in_reply_to":"AAAAOn%2F%2FqCo%3D","updated":"2013-04-30 20:54:26.000000000","message":"yes.. if a user runs create before list.","commit_id":"82f71bef5a7ccd238ca6658deb13dc05c8af2b26"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"0a1f0b5018bb8d6aea52dddf1f3a94c92c6f12a0","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                            sorts\u003dNone, limit\u003dNone,"},{"line_number":131,"context_line":"                            marker\u003dNone, page_reverse\u003dFalse, default_sg\u003dFalse):"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        # If default_sg is True do not call _ensure_default_security_group()"},{"line_number":134,"context_line":"        # so this can be done recursively. Context.tenant_id is checked"},{"line_number":135,"context_line":"        # because all the unit tests do not explicitly set the context on"},{"line_number":136,"context_line":"        # GETS. TODO(arosen)  context handling can probably be improved here."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FqUw%3D","line":133,"updated":"2013-04-30 04:26:00.000000000","message":"(Suggestion only) Consider renaming the \u0027default_sg\u0027 parameter to document its intent without having to provide a comment block.  maybe \u0027create_default_sg\u0027 and reverse the logic?","commit_id":"82f71bef5a7ccd238ca6658deb13dc05c8af2b26"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":130,"context_line":"                            sorts\u003dNone, limit\u003dNone,"},{"line_number":131,"context_line":"                            marker\u003dNone, page_reverse\u003dFalse, default_sg\u003dFalse):"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        # If default_sg is True do not call _ensure_default_security_group()"},{"line_number":134,"context_line":"        # so this can be done recursively. Context.tenant_id is checked"},{"line_number":135,"context_line":"        # because all the unit tests do not explicitly set the context on"},{"line_number":136,"context_line":"        # GETS. TODO(arosen)  context handling can probably be improved here."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FhtM%3D","line":133,"in_reply_to":"AAAAOn%2F%2FqT8%3D","updated":"2013-05-07 03:30:50.000000000","message":"actually since default_sg is used in several places I think we should do this in it\u0027s own patch.","commit_id":"82f71bef5a7ccd238ca6658deb13dc05c8af2b26"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"ec42d7fd08c9001068af327efeb4ef1fa535b0bc","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                            sorts\u003dNone, limit\u003dNone,"},{"line_number":131,"context_line":"                            marker\u003dNone, page_reverse\u003dFalse, default_sg\u003dFalse):"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        # If default_sg is True do not call _ensure_default_security_group()"},{"line_number":134,"context_line":"        # so this can be done recursively. Context.tenant_id is checked"},{"line_number":135,"context_line":"        # because all the unit tests do not explicitly set the context on"},{"line_number":136,"context_line":"        # GETS. TODO(arosen)  context handling can probably be improved here."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FqT8%3D","line":133,"in_reply_to":"AAAAOn%2F%2FqUw%3D","updated":"2013-04-30 05:07:53.000000000","message":"Done","commit_id":"82f71bef5a7ccd238ca6658deb13dc05c8af2b26"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":134,"context_line":"        # so this can be done recursively. Context.tenant_id is checked"},{"line_number":135,"context_line":"        # because all the unit tests do not explicitly set the context on"},{"line_number":136,"context_line":"        # GETS. TODO(arosen)  context handling can probably be improved here."},{"line_number":137,"context_line":"        if not default_sg and context.tenant_id:"},{"line_number":138,"context_line":"            self._ensure_default_security_group(context, context.tenant_id)"},{"line_number":139,"context_line":"        marker_obj \u003d self._get_marker_obj(context, \u0027security_group\u0027, limit,"},{"line_number":140,"context_line":"                                          marker)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FqI4%3D","line":137,"updated":"2013-04-30 08:49:37.000000000","message":"this double calling might do the work but it sure sounds like a hack in my view. I wonder if they combination of methods get_security_groups/_ensure_default_security_group could be simplified altogether in order to provide a default security group and avoid changing the method signatures.","commit_id":"82f71bef5a7ccd238ca6658deb13dc05c8af2b26"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"1ab97cf6b56745ff1188f3134389f333eedb535c","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        # so this can be done recursively. Context.tenant_id is checked"},{"line_number":135,"context_line":"        # because all the unit tests do not explicitly set the context on"},{"line_number":136,"context_line":"        # GETS. TODO(arosen)  context handling can probably be improved here."},{"line_number":137,"context_line":"        if not default_sg and context.tenant_id:"},{"line_number":138,"context_line":"            self._ensure_default_security_group(context, context.tenant_id)"},{"line_number":139,"context_line":"        marker_obj \u003d self._get_marker_obj(context, \u0027security_group\u0027, limit,"},{"line_number":140,"context_line":"                                          marker)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FqCs%3D","line":137,"in_reply_to":"AAAAOn%2F%2FqI4%3D","updated":"2013-04-30 11:19:50.000000000","message":"+1 about the calling. From what I see, we check for the default every time we get the security groups and every time we create a security group. \n\nCan we have a flag (maintain state) to indicate whether or not there is a default group, rather than checking at get and create?\n\nIf we can\u0027t maintain state, can we do the get_security_groups and if the collection is empty, create the default group and return that?","commit_id":"82f71bef5a7ccd238ca6658deb13dc05c8af2b26"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":134,"context_line":"        # so this can be done recursively. Context.tenant_id is checked"},{"line_number":135,"context_line":"        # because all the unit tests do not explicitly set the context on"},{"line_number":136,"context_line":"        # GETS. TODO(arosen)  context handling can probably be improved here."},{"line_number":137,"context_line":"        if not default_sg and context.tenant_id:"},{"line_number":138,"context_line":"            self._ensure_default_security_group(context, context.tenant_id)"},{"line_number":139,"context_line":"        marker_obj \u003d self._get_marker_obj(context, \u0027security_group\u0027, limit,"},{"line_number":140,"context_line":"                                          marker)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FpJ4%3D","line":137,"in_reply_to":"AAAAOn%2F%2FqI4%3D","updated":"2013-04-30 20:54:26.000000000","message":"I\u0027m open to seeing how that would work. I don\u0027t think we want to combine them because we use _ensure_default_security_group() in a lot of other places.","commit_id":"82f71bef5a7ccd238ca6658deb13dc05c8af2b26"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":139,"context_line":"                            marker\u003dNone, page_reverse\u003dFalse, default_sg\u003dFalse):"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        # If default_sg is True do not call _ensure_default_security_group()"},{"line_number":142,"context_line":"        # so this can be done recursively. Context.tenant_id is checked"},{"line_number":143,"context_line":"        # because all the unit tests do not explicitly set the context on"},{"line_number":144,"context_line":"        # GETS. TODO(arosen)  context handling can probably be improved here."},{"line_number":145,"context_line":"        if not default_sg and context.tenant_id:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FglY%3D","line":142,"updated":"2013-05-07 13:10:35.000000000","message":"Can you please clarify more about the recursion here?","commit_id":"acf44dba26ca8dca47bfb5fb2916807f9f4e2060"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":139,"context_line":"                            marker\u003dNone, page_reverse\u003dFalse, default_sg\u003dFalse):"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        # If default_sg is True do not call _ensure_default_security_group()"},{"line_number":142,"context_line":"        # so this can be done recursively. Context.tenant_id is checked"},{"line_number":143,"context_line":"        # because all the unit tests do not explicitly set the context on"},{"line_number":144,"context_line":"        # GETS. TODO(arosen)  context handling can probably be improved here."},{"line_number":145,"context_line":"        if not default_sg and context.tenant_id:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2Fe%2FM%3D","line":142,"in_reply_to":"AAAAOn%2F%2FglY%3D","updated":"2013-05-08 08:17:42.000000000","message":"_ensure_default_security_group() calls get_security_groups() line 433 thus this is needed to break out of the recursion loop.","commit_id":"acf44dba26ca8dca47bfb5fb2916807f9f4e2060"}]}
