)]}'
{"etc/nova/nova.conf.sample":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a4be3f37bd71243d1f5c669c8f190eddda3f5e78","unresolved":false,"context_lines":[{"line_number":583,"context_line":""},{"line_number":584,"context_line":"# nova or the full class name of the security API class (string value)"},{"line_number":585,"context_line":"#security_group_api\u003dnova.compute.api.SecurityGroupAPI"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":""},{"line_number":588,"context_line":"#"},{"line_number":589,"context_line":"# Options defined in nova.compute.instance_types"}],"source_content_type":"application/octet-stream","patch_set":10,"id":"AAAAM3%2F%2ByZA%3D","line":586,"updated":"2013-02-19 08:18:37.000000000","message":"This file is auto-generated","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f3af5c3ca0b1409832994c70087d9c09ab8fabae","unresolved":false,"context_lines":[{"line_number":583,"context_line":""},{"line_number":584,"context_line":"# nova or the full class name of the security API class (string value)"},{"line_number":585,"context_line":"#security_group_api\u003dnova.compute.api.SecurityGroupAPI"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":""},{"line_number":588,"context_line":"#"},{"line_number":589,"context_line":"# Options defined in nova.compute.instance_types"}],"source_content_type":"application/octet-stream","patch_set":10,"id":"AAAAM3%2F%2ByW0%3D","line":586,"in_reply_to":"AAAAM3%2F%2ByZA%3D","updated":"2013-02-19 17:34:26.000000000","message":"Done","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"}],"nova/api/ec2/cloud.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a4be3f37bd71243d1f5c669c8f190eddda3f5e78","unresolved":false,"context_lines":[{"line_number":1668,"context_line":""},{"line_number":1669,"context_line":"    @staticmethod"},{"line_number":1670,"context_line":"    def raise_group_already_exists(msg):"},{"line_number":1671,"context_line":"        raise exception.EC2APIError(message\u003dmsg)"},{"line_number":1672,"context_line":""},{"line_number":1673,"context_line":"    @staticmethod"},{"line_number":1674,"context_line":"    def raise_invalid_group(msg):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByY8%3D","side":"PARENT","line":1671,"updated":"2013-02-19 08:18:37.000000000","message":"Raising EC2 errors is a detail of the EC2 API - it makes sense to me that it would live under nova/api/ec2","commit_id":"90ac3270a8bfe4b94e49cd4c2504b6c85dca14a5"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f3af5c3ca0b1409832994c70087d9c09ab8fabae","unresolved":false,"context_lines":[{"line_number":1668,"context_line":""},{"line_number":1669,"context_line":"    @staticmethod"},{"line_number":1670,"context_line":"    def raise_group_already_exists(msg):"},{"line_number":1671,"context_line":"        raise exception.EC2APIError(message\u003dmsg)"},{"line_number":1672,"context_line":""},{"line_number":1673,"context_line":"    @staticmethod"},{"line_number":1674,"context_line":"    def raise_invalid_group(msg):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByV8%3D","side":"PARENT","line":1671,"in_reply_to":"AAAAM3%2F%2ByY8%3D","updated":"2013-02-19 17:34:26.000000000","message":"Done","commit_id":"90ac3270a8bfe4b94e49cd4c2504b6c85dca14a5"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"47abce465c008eee2f91e937157a8e065b0be8c4","unresolved":false,"context_lines":[{"line_number":1696,"context_line":"    pass"},{"line_number":1697,"context_line":""},{"line_number":1698,"context_line":""},{"line_number":1699,"context_line":"def get_cloud_security_group_api():"},{"line_number":1700,"context_line":"    if cfg.CONF.security_group_api.lower() \u003d\u003d \u0027nova\u0027:"},{"line_number":1701,"context_line":"        return CloudSecurityGroupNovaAPI()"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAM3%2F%2BuGQ%3D","line":1699,"updated":"2013-02-20 19:11:45.000000000","message":"The desire is to transition away from this way of loading classes and into one based on entrypoints, perhaps using stevedore.  I don\u0027t think nova\u0027s consistent on that, yet—not anywhere close, in fact—so I\u0027m not raising a stink about it, just making a note on some future work that will be needed.","commit_id":"671118e659773dd19874b933ec84b419b8bc0778"}],"nova/api/openstack/compute/contrib/security_groups.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"8e500a85a22d481a802f0a0642ab8539c0722855","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        for rule in group[\u0027rules\u0027]:"},{"line_number":209,"context_line":"            security_group[\u0027rules\u0027] +\u003d [self._format_security_group_rule("},{"line_number":210,"context_line":"                    context, rule)]"},{"line_number":211,"context_line":"        return security_group"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def _authorize_context(self, req):"},{"line_number":214,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzXA%3D","side":"PARENT","line":211,"updated":"2013-02-18 22:46:16.000000000","message":"This seems wrong ...\n\nThe security group abstraction was previously about keeping the EC2 and OpenStack API details in their respective implementations under nova/api/\n\nFormatting a security group for the API return clearly belongs in that category, yet you\u0027ve moved the OS API implementation down into the security group base class yet left the EC2 formatting implementation where it was?\n\nWhy does formatting differ between normal Nova and Quantum?\n\nIf you really need different OpenStack API formatting for Nova vs Quantum, you should add OpenStackSecurityGroupFormatter and EC2SecurityGroupFormatter with an implementation for each .. but uggh!","commit_id":"9e2b990f2260dbbe1b207e853b37f6261e594fbd"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"df5eb2d34e155a6c57ae09d1925876314a3f49fa","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        for rule in group[\u0027rules\u0027]:"},{"line_number":209,"context_line":"            security_group[\u0027rules\u0027] +\u003d [self._format_security_group_rule("},{"line_number":210,"context_line":"                    context, rule)]"},{"line_number":211,"context_line":"        return security_group"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def _authorize_context(self, req):"},{"line_number":214,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzP0%3D","side":"PARENT","line":211,"in_reply_to":"AAAAM3%2F%2BzXA%3D","updated":"2013-02-18 23:21:19.000000000","message":"Thanks for pointing this out. I\u0027ll move the EC2 one to the EC2 driver. The reason why this is done is because the response from quantum is passed to these functions and quantums security group api uses different fields.","commit_id":"9e2b990f2260dbbe1b207e853b37f6261e594fbd"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"8e500a85a22d481a802f0a0642ab8539c0722855","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        id \u003d self.security_group_api._validate_id(id)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        rule \u003d self.security_group_api.get_rule(context, id)"},{"line_number":333,"context_line":"        group_id \u003d rule[\u0027parent_group_id\u0027]"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        security_group \u003d self.security_group_api.get(context, None, group_id,"},{"line_number":336,"context_line":"                                                     map_exception\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzWQ%3D","line":333,"updated":"2013-02-18 22:46:16.000000000","message":"Will conflict with Ia3e4f6c233e014024d35b1735d43d9bacc4e0c49","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"8e500a85a22d481a802f0a0642ab8539c0722855","unresolved":false,"context_lines":[{"line_number":464,"context_line":""},{"line_number":465,"context_line":"        if instance_sgs:"},{"line_number":466,"context_line":"            for server in servers:"},{"line_number":467,"context_line":"                server[\u0027security_groups\u0027] \u003d instance_sgs"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def _show(self, req, resp_obj):"},{"line_number":470,"context_line":"        if not softauth(req.environ[\u0027nova.context\u0027]):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzWM%3D","line":467,"updated":"2013-02-18 22:46:16.000000000","message":"This stuff should be in the quantum patch, not the refactoring patch","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"df5eb2d34e155a6c57ae09d1925876314a3f49fa","unresolved":false,"context_lines":[{"line_number":464,"context_line":""},{"line_number":465,"context_line":"        if instance_sgs:"},{"line_number":466,"context_line":"            for server in servers:"},{"line_number":467,"context_line":"                server[\u0027security_groups\u0027] \u003d instance_sgs"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def _show(self, req, resp_obj):"},{"line_number":470,"context_line":"        if not softauth(req.environ[\u0027nova.context\u0027]):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzPs%3D","line":467,"in_reply_to":"AAAAM3%2F%2BzWM%3D","updated":"2013-02-18 23:21:19.000000000","message":"This is done in the this patch because this change was needed in order to make nova more pluggable. Previously it accessed the db here so I removed that bit so that this could be pluggable.","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a4be3f37bd71243d1f5c669c8f190eddda3f5e78","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        for rule in group[\u0027rules\u0027]:"},{"line_number":209,"context_line":"            security_group[\u0027rules\u0027] +\u003d [self._format_security_group_rule("},{"line_number":210,"context_line":"                    context, rule)]"},{"line_number":211,"context_line":"        return security_group"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def _authorize_context(self, req):"},{"line_number":214,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByZI%3D","side":"PARENT","line":211,"updated":"2013-02-19 08:18:37.000000000","message":"I still think this code fundamentally belongs here since it\u0027s about translating the entities into the OpenStack REST API specific representation","commit_id":"90ac3270a8bfe4b94e49cd4c2504b6c85dca14a5"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f3af5c3ca0b1409832994c70087d9c09ab8fabae","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        for rule in group[\u0027rules\u0027]:"},{"line_number":209,"context_line":"            security_group[\u0027rules\u0027] +\u003d [self._format_security_group_rule("},{"line_number":210,"context_line":"                    context, rule)]"},{"line_number":211,"context_line":"        return security_group"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def _authorize_context(self, req):"},{"line_number":214,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByVs%3D","side":"PARENT","line":211,"in_reply_to":"AAAAM3%2F%2ByZI%3D","updated":"2013-02-19 17:34:26.000000000","message":"Done","commit_id":"90ac3270a8bfe4b94e49cd4c2504b6c85dca14a5"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a4be3f37bd71243d1f5c669c8f190eddda3f5e78","unresolved":false,"context_lines":[{"line_number":466,"context_line":""},{"line_number":467,"context_line":"        if instance_sgs:"},{"line_number":468,"context_line":"            for server in servers:"},{"line_number":469,"context_line":"                server[\u0027security_groups\u0027] \u003d instance_sgs"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def _show(self, req, resp_obj):"},{"line_number":472,"context_line":"        if not softauth(req.environ[\u0027nova.context\u0027]):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByZE%3D","line":469,"updated":"2013-02-19 08:18:37.000000000","message":"Again, this belongs in the quantum patch","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f3af5c3ca0b1409832994c70087d9c09ab8fabae","unresolved":false,"context_lines":[{"line_number":466,"context_line":""},{"line_number":467,"context_line":"        if instance_sgs:"},{"line_number":468,"context_line":"            for server in servers:"},{"line_number":469,"context_line":"                server[\u0027security_groups\u0027] \u003d instance_sgs"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def _show(self, req, resp_obj):"},{"line_number":472,"context_line":"        if not softauth(req.environ[\u0027nova.context\u0027]):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByVk%3D","line":469,"in_reply_to":"AAAAM3%2F%2ByZE%3D","updated":"2013-02-19 17:34:26.000000000","message":"in order to make the security groups more pluggable so that they are not dependent on the db this is done here. Do you not agree after my comment? I will remove this and move it to my next patch if you disagree.","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"28e8e7355d1c23b5437dd661d069dd5c813d3e2c","unresolved":false,"context_lines":[{"line_number":32,"context_line":"from nova.openstack.common import log as logging"},{"line_number":33,"context_line":"from nova import utils"},{"line_number":34,"context_line":"from nova.virt import netutils"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"from nova.network.security_group import openstack_driver"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2Bwxo%3D","line":35,"updated":"2013-02-19 19:31:58.000000000","message":"will fix..","commit_id":"b6a6bf6a388dc4ee1539515157e488b44d009879"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"ab3954c61284c28772cbe082c4fb94c97ec7f53f","unresolved":false,"context_lines":[{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        return {\u0027security_group\u0027:"},{"line_number":245,"context_line":"                    self.security_group_api._format_security_group("},{"line_number":246,"context_line":"                        context, security_group)}"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def delete(self, req, id):"},{"line_number":249,"context_line":"        \"\"\"Delete a security group.\"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BwwM%3D","line":246,"updated":"2013-02-19 19:38:25.000000000","message":"removed self.security_group_api.","commit_id":"b6a6bf6a388dc4ee1539515157e488b44d009879"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"ab3954c61284c28772cbe082c4fb94c97ec7f53f","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                                                  search_opts\u003dsearch_opts)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        limited_list \u003d common.limited(raw_groups, req)"},{"line_number":273,"context_line":"        result \u003d [self.security_group_api._format_security_group("},{"line_number":274,"context_line":"                    context, group) for group in limited_list]"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        return {\u0027security_groups\u0027:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BwwI%3D","line":273,"updated":"2013-02-19 19:38:25.000000000","message":"ditto","commit_id":"b6a6bf6a388dc4ee1539515157e488b44d009879"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"d5138a82a4ab591787fdc4424fbe6f1670660d34","unresolved":false,"context_lines":[{"line_number":471,"context_line":"    def _extend_servers(self, req, servers):"},{"line_number":472,"context_line":"        key \u003d \"security_groups\""},{"line_number":473,"context_line":"        for server in servers:"},{"line_number":474,"context_line":"            instance \u003d req.get_db_instance(server[\u0027id\u0027])"},{"line_number":475,"context_line":"            groups \u003d instance.get(key)"},{"line_number":476,"context_line":"            if groups:"},{"line_number":477,"context_line":"                server[key] \u003d [{\"name\": group[\"name\"]} for group in groups]"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2BwBw%3D","side":"PARENT","line":474,"updated":"2013-02-20 00:06:30.000000000","message":"Couldn\u0027t the quantum driver somehow set the rules in instance cached on this request?\n\nThat way you\u0027d have a quantum driver specific hack which wouldn\u0027t affect the nova code","commit_id":"f237685e8a2f63c697c60adfe8206abbe5beca45"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"d5138a82a4ab591787fdc4424fbe6f1670660d34","unresolved":false,"context_lines":[{"line_number":468,"context_line":"        # If method is a POST we get the security groups intended for an"},{"line_number":469,"context_line":"        # instance from the request. The reason for this is if using quantum"},{"line_number":470,"context_line":"        # security groups the requested security groups for the instance are"},{"line_number":471,"context_line":"        # not in the db and have not been sent to quantum yet."},{"line_number":472,"context_line":"        instance_sgs \u003d []"},{"line_number":473,"context_line":"        if req.method !\u003d \u0027POST\u0027:"},{"line_number":474,"context_line":"            for server in servers:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2BwEE%3D","line":471,"updated":"2013-02-20 00:06:30.000000000","message":"See, the nice thing about this patch is that it\u0027s pure refactoring ... apart from this change\n\nThis change is a much more substantial/risky change than pure refactoring","commit_id":"17e38fec95b034e4226bfc6cae56f827c322ee6f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"d5138a82a4ab591787fdc4424fbe6f1670660d34","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                # Add security group to server, if no security group was in"},{"line_number":484,"context_line":"                # request add \u0027default\u0027 since that is the group it is part of"},{"line_number":485,"context_line":"                instance_sgs \u003d req_obj[\u0027server\u0027].get("},{"line_number":486,"context_line":"                    \u0027security_groups\u0027, [{\u0027name\u0027: \u0027default\u0027}])"},{"line_number":487,"context_line":"            except ValueError:"},{"line_number":488,"context_line":"                root \u003d minidom.parseString(req.body)"},{"line_number":489,"context_line":"                sg_root \u003d root.getElementsByTagName(\u0027security_groups\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2BwDc%3D","line":486,"updated":"2013-02-20 00:06:30.000000000","message":"What concerns me about this is that previously a POST would have returned all the security groups data from the DB ... now we just return the partial data supplied by the caller\n\nI think I\u0027d be ok with a hack like this if it was just for the quantum driver, but this really smells to me like it\u0027s an API behaviour change\n\nFor example, the result won\u0027t contain tenant_id ... but it previously would have contained this, right?","commit_id":"17e38fec95b034e4226bfc6cae56f827c322ee6f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"5a87fbcb3eb86f0d52df768308fe89bb4f38c9cc","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                # Add security group to server, if no security group was in"},{"line_number":484,"context_line":"                # request add \u0027default\u0027 since that is the group it is part of"},{"line_number":485,"context_line":"                instance_sgs \u003d req_obj[\u0027server\u0027].get("},{"line_number":486,"context_line":"                    \u0027security_groups\u0027, [{\u0027name\u0027: \u0027default\u0027}])"},{"line_number":487,"context_line":"            except ValueError:"},{"line_number":488,"context_line":"                root \u003d minidom.parseString(req.body)"},{"line_number":489,"context_line":"                sg_root \u003d root.getElementsByTagName(\u0027security_groups\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2Bv9I%3D","line":486,"in_reply_to":"AAAAM3%2F%2BwDc%3D","updated":"2013-02-20 00:31:18.000000000","message":"The result previously did not contain the tenant id. I\u0027ll change this so that it accesses the db when using nova security groups.","commit_id":"17e38fec95b034e4226bfc6cae56f827c322ee6f"}],"nova/compute/api.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"22105c85984c7c454be9ce70db3749f001842d45","unresolved":false,"context_lines":[{"line_number":85,"context_line":"               help\u003d\u0027The full class name of the security group handler class\u0027),"},{"line_number":86,"context_line":"    cfg.StrOpt(\u0027security_group_api\u0027,"},{"line_number":87,"context_line":"               default\u003d\u0027nova.compute.api.SecurityGroupAPI\u0027,"},{"line_number":88,"context_line":"               help\u003d\u0027The full class name of the security API class\u0027),"},{"line_number":89,"context_line":"]"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BzeA%3D","side":"PARENT","line":88,"updated":"2013-02-18 22:06:00.000000000","message":"Ah, I see this isn\u0027t a new config option\n\nWell, we\u0027re breaking backwards compat here anyway ... so I still say we should just make it security_group_api\u003d(nova|quantum)","commit_id":"9e2b990f2260dbbe1b207e853b37f6261e594fbd"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"19c15de4e84656a54fcd2f2cf17f6f44a27a6592","unresolved":false,"context_lines":[{"line_number":85,"context_line":"               help\u003d\u0027The full class name of the security group handler class\u0027),"},{"line_number":86,"context_line":"    cfg.StrOpt(\u0027security_group_api\u0027,"},{"line_number":87,"context_line":"               default\u003d\u0027nova.compute.api.SecurityGroupAPI\u0027,"},{"line_number":88,"context_line":"               help\u003d\u0027The full class name of the security API class\u0027),"},{"line_number":89,"context_line":"]"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BzV0%3D","side":"PARENT","line":88,"in_reply_to":"AAAAM3%2F%2BzeA%3D","updated":"2013-02-18 22:51:28.000000000","message":"Done","commit_id":"9e2b990f2260dbbe1b207e853b37f6261e594fbd"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"8e500a85a22d481a802f0a0642ab8539c0722855","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        self.volume_api \u003d volume_api or volume.API()"},{"line_number":174,"context_line":"        self.security_group_api \u003d (security_group_api or"},{"line_number":175,"context_line":"                                   importutils.import_object("},{"line_number":176,"context_line":"                                   CONF.security_group_api))"},{"line_number":177,"context_line":"        self.sgh \u003d importutils.import_object(CONF.security_group_handler)"},{"line_number":178,"context_line":"        self.consoleauth_rpcapi \u003d consoleauth_rpcapi.ConsoleAuthAPI()"},{"line_number":179,"context_line":"        self.scheduler_rpcapi \u003d scheduler_rpcapi.SchedulerAPI()"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2Bzcc%3D","line":176,"updated":"2013-02-18 22:46:16.000000000","message":"If you\u0027re going to use CONF.security_group_api and CONF.security_group_handler, you should CONF.import_opt() them\n\nHowever, using get_openstack_security_group_driver() for the former is a better option and adding a similar function for sgh would be good too","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"df5eb2d34e155a6c57ae09d1925876314a3f49fa","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        self.volume_api \u003d volume_api or volume.API()"},{"line_number":174,"context_line":"        self.security_group_api \u003d (security_group_api or"},{"line_number":175,"context_line":"                                   importutils.import_object("},{"line_number":176,"context_line":"                                   CONF.security_group_api))"},{"line_number":177,"context_line":"        self.sgh \u003d importutils.import_object(CONF.security_group_handler)"},{"line_number":178,"context_line":"        self.consoleauth_rpcapi \u003d consoleauth_rpcapi.ConsoleAuthAPI()"},{"line_number":179,"context_line":"        self.scheduler_rpcapi \u003d scheduler_rpcapi.SchedulerAPI()"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzPQ%3D","line":176,"in_reply_to":"AAAAM3%2F%2Bzcc%3D","updated":"2013-02-18 23:21:19.000000000","message":"Done.","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"8e500a85a22d481a802f0a0642ab8539c0722855","unresolved":false,"context_lines":[{"line_number":828,"context_line":"            # Do not set security group if the security_group_driver in use"},{"line_number":829,"context_line":"            # does not use the database. This is because setting it above will"},{"line_number":830,"context_line":"            # cause it to saved to the db unnecessarily."},{"line_number":831,"context_line":"            instance[\u0027security_groups\u0027] \u003d []"},{"line_number":832,"context_line":""},{"line_number":833,"context_line":"        return instance"},{"line_number":834,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzaQ%3D","line":831,"updated":"2013-02-18 22:46:16.000000000","message":"This should be encapsulated in a SecurityGroup method e.g.\n\n  def update_instance(self, instance, security_groups):\n      # Use \u0027default\u0027 security group if none specified\n      ....\n\nfor nova and:\n\n  def update_instance(self, instance, security_groups):\n      # Do not set security group if security_group_driver in use\n      ....\n\nfor quantum\n\nThis allows us to get rid of the \u0027use_db\u0027 attribute","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f50af2adb990c98eb38a1a8a841937f6bad788f6","unresolved":false,"context_lines":[{"line_number":828,"context_line":"            # Do not set security group if the security_group_driver in use"},{"line_number":829,"context_line":"            # does not use the database. This is because setting it above will"},{"line_number":830,"context_line":"            # cause it to saved to the db unnecessarily."},{"line_number":831,"context_line":"            instance[\u0027security_groups\u0027] \u003d []"},{"line_number":832,"context_line":""},{"line_number":833,"context_line":"        return instance"},{"line_number":834,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2ByU4%3D","line":831,"in_reply_to":"AAAAM3%2F%2Bylc%3D","updated":"2013-02-19 08:45:09.000000000","message":"nvm I see. Will do. I\u0027ll need to call this method here..","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"cff62d45e53143f33d0a70aede89d7b21c8854fd","unresolved":false,"context_lines":[{"line_number":828,"context_line":"            # Do not set security group if the security_group_driver in use"},{"line_number":829,"context_line":"            # does not use the database. This is because setting it above will"},{"line_number":830,"context_line":"            # cause it to saved to the db unnecessarily."},{"line_number":831,"context_line":"            instance[\u0027security_groups\u0027] \u003d []"},{"line_number":832,"context_line":""},{"line_number":833,"context_line":"        return instance"},{"line_number":834,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2Bylc%3D","line":831,"in_reply_to":"AAAAM3%2F%2BzMM%3D","updated":"2013-02-19 08:32:50.000000000","message":"Sorry Mark, I hear what you are saying but this is within compute.API() I\u0027m still unclear how the security group driver and hide this detail.","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"048c0df98c3b6e24c293465f6f270d3d80a10f9d","unresolved":false,"context_lines":[{"line_number":828,"context_line":"            # Do not set security group if the security_group_driver in use"},{"line_number":829,"context_line":"            # does not use the database. This is because setting it above will"},{"line_number":830,"context_line":"            # cause it to saved to the db unnecessarily."},{"line_number":831,"context_line":"            instance[\u0027security_groups\u0027] \u003d []"},{"line_number":832,"context_line":""},{"line_number":833,"context_line":"        return instance"},{"line_number":834,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzMM%3D","line":831,"in_reply_to":"AAAAM3%2F%2BzO0%3D","updated":"2013-02-18 23:47:26.000000000","message":"Sure, what I\u0027m saying is that you should add a new method to the drivers which hide this implementation detail\n\ni.e. put the code from the use_db\u003dTrue branch in a update_instance() method on the nova driver and the code from the use_db\u003dFalse branch in an update_instance() method on the quantum driver ... and remove the use_db attribute","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"df5eb2d34e155a6c57ae09d1925876314a3f49fa","unresolved":false,"context_lines":[{"line_number":828,"context_line":"            # Do not set security group if the security_group_driver in use"},{"line_number":829,"context_line":"            # does not use the database. This is because setting it above will"},{"line_number":830,"context_line":"            # cause it to saved to the db unnecessarily."},{"line_number":831,"context_line":"            instance[\u0027security_groups\u0027] \u003d []"},{"line_number":832,"context_line":""},{"line_number":833,"context_line":"        return instance"},{"line_number":834,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzO0%3D","line":831,"in_reply_to":"AAAAM3%2F%2BzaQ%3D","updated":"2013-02-18 23:21:19.000000000","message":"Sorry, I don\u0027t follow. This is done here because after this function returns it will populate the nova db and we don\u0027t want security groups to be populated if using the quantum driver.","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a4be3f37bd71243d1f5c669c8f190eddda3f5e78","unresolved":false,"context_lines":[{"line_number":819,"context_line":""},{"line_number":820,"context_line":"        instance[\u0027system_metadata\u0027][\u0027image_base_image_ref\u0027] \u003d base_image_ref"},{"line_number":821,"context_line":""},{"line_number":822,"context_line":"        if self.security_group_api.use_db:"},{"line_number":823,"context_line":"            # Use \u0027default\u0027 security_group if none specified."},{"line_number":824,"context_line":"            if security_groups is None:"},{"line_number":825,"context_line":"                security_groups \u003d [\u0027default\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByY0%3D","line":822,"updated":"2013-02-19 08:18:37.000000000","message":"I don\u0027t like use_db and I suggested a way to remove it.","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f3af5c3ca0b1409832994c70087d9c09ab8fabae","unresolved":false,"context_lines":[{"line_number":819,"context_line":""},{"line_number":820,"context_line":"        instance[\u0027system_metadata\u0027][\u0027image_base_image_ref\u0027] \u003d base_image_ref"},{"line_number":821,"context_line":""},{"line_number":822,"context_line":"        if self.security_group_api.use_db:"},{"line_number":823,"context_line":"            # Use \u0027default\u0027 security_group if none specified."},{"line_number":824,"context_line":"            if security_groups is None:"},{"line_number":825,"context_line":"                security_groups \u003d [\u0027default\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BxFw%3D","line":822,"in_reply_to":"AAAAM3%2F%2ByY0%3D","updated":"2013-02-19 17:34:26.000000000","message":"Yup got this in my next patch. Thanks, I agree your suggestion is definitely better than what i had.","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a4be3f37bd71243d1f5c669c8f190eddda3f5e78","unresolved":false,"context_lines":[{"line_number":2694,"context_line":""},{"line_number":2695,"context_line":""},{"line_number":2696,"context_line":"class SecurityGroupAPI(base.Base, security_group_base.SecurityGroupBase,"},{"line_number":2697,"context_line":"                       security_group_base.NativeSecurityGroupExceptions):"},{"line_number":2698,"context_line":"    \"\"\""},{"line_number":2699,"context_line":"    Sub-set of the Compute API related to managing security groups"},{"line_number":2700,"context_line":"    and security group rules"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByXY%3D","line":2697,"updated":"2013-02-19 08:18:37.000000000","message":"I don\u0027t think we should use a mixin for exceptions\n\nInstead, pass an instance of the exceptions class as a parameter to the constructor\n\nAnd then do e.g.\n\n   self.sg_exceptions.raise_invalid_property(msg)\n\nThat will simplify things a lot. You\u0027ll be able to do:\n\n  def get_security_group_driver(sg_exceptions):\n      if CONF.security_group_api.lower() \u003d\u003d \u0027nova\u0027:\n          return importutils.import_object(NOVA_DRIVER, sg_exceptions)\n\nand use get_security_group_driver() from both the openstack and ec2 code","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f3af5c3ca0b1409832994c70087d9c09ab8fabae","unresolved":false,"context_lines":[{"line_number":2694,"context_line":""},{"line_number":2695,"context_line":""},{"line_number":2696,"context_line":"class SecurityGroupAPI(base.Base, security_group_base.SecurityGroupBase,"},{"line_number":2697,"context_line":"                       security_group_base.NativeSecurityGroupExceptions):"},{"line_number":2698,"context_line":"    \"\"\""},{"line_number":2699,"context_line":"    Sub-set of the Compute API related to managing security groups"},{"line_number":2700,"context_line":"    and security group rules"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BxGQ%3D","line":2697,"in_reply_to":"AAAAM3%2F%2ByXY%3D","updated":"2013-02-19 17:34:26.000000000","message":"I tried doing this but import_object doesn\u0027t allow you to do that. This is basically how it was done before but it was mixed the otherway around previously. https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/security_groups.py#L566\n\nI think i can probably restore it back to how it used to work if you prefer.","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a4be3f37bd71243d1f5c669c8f190eddda3f5e78","unresolved":false,"context_lines":[{"line_number":2932,"context_line":"        self.trigger_handler(\u0027instance_remove_security_group\u0027,"},{"line_number":2933,"context_line":"                context, instance, security_group_name)"},{"line_number":2934,"context_line":""},{"line_number":2935,"context_line":"    def rule_exists(self, security_group, new_rule):"},{"line_number":2936,"context_line":"        \"\"\"Indicates whether the specified rule is already"},{"line_number":2937,"context_line":"           defined in the given security group."},{"line_number":2938,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByYo%3D","line":2935,"updated":"2013-02-19 08:18:37.000000000","message":"If you\u0027re leaving this code in this file, let\u0027s not move it around - it will make the diff much smaller","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f3af5c3ca0b1409832994c70087d9c09ab8fabae","unresolved":false,"context_lines":[{"line_number":2932,"context_line":"        self.trigger_handler(\u0027instance_remove_security_group\u0027,"},{"line_number":2933,"context_line":"                context, instance, security_group_name)"},{"line_number":2934,"context_line":""},{"line_number":2935,"context_line":"    def rule_exists(self, security_group, new_rule):"},{"line_number":2936,"context_line":"        \"\"\"Indicates whether the specified rule is already"},{"line_number":2937,"context_line":"           defined in the given security group."},{"line_number":2938,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BxGM%3D","line":2935,"in_reply_to":"AAAAM3%2F%2ByYo%3D","updated":"2013-02-19 17:34:26.000000000","message":"removing","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a4be3f37bd71243d1f5c669c8f190eddda3f5e78","unresolved":false,"context_lines":[{"line_number":2996,"context_line":"            return int(id)"},{"line_number":2997,"context_line":"        except ValueError:"},{"line_number":2998,"context_line":"            msg \u003d _(\"Security group id should be integer\")"},{"line_number":2999,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":3000,"context_line":""},{"line_number":3001,"context_line":"    def _format_security_group(self, context, group):"},{"line_number":3002,"context_line":"        security_group \u003d {}"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByYQ%3D","line":2999,"updated":"2013-02-19 08:18:37.000000000","message":"nova/compute/api shouldn\u0027t be raising a webob exception - only code under nova/api/openstack should really be doing that","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f3af5c3ca0b1409832994c70087d9c09ab8fabae","unresolved":false,"context_lines":[{"line_number":2996,"context_line":"            return int(id)"},{"line_number":2997,"context_line":"        except ValueError:"},{"line_number":2998,"context_line":"            msg \u003d _(\"Security group id should be integer\")"},{"line_number":2999,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":3000,"context_line":""},{"line_number":3001,"context_line":"    def _format_security_group(self, context, group):"},{"line_number":3002,"context_line":"        security_group \u003d {}"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BxGA%3D","line":2999,"in_reply_to":"AAAAM3%2F%2ByYQ%3D","updated":"2013-02-19 17:34:26.000000000","message":"Done","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a4be3f37bd71243d1f5c669c8f190eddda3f5e78","unresolved":false,"context_lines":[{"line_number":2998,"context_line":"            msg \u003d _(\"Security group id should be integer\")"},{"line_number":2999,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":3000,"context_line":""},{"line_number":3001,"context_line":"    def _format_security_group(self, context, group):"},{"line_number":3002,"context_line":"        security_group \u003d {}"},{"line_number":3003,"context_line":"        security_group[\u0027id\u0027] \u003d group[\u0027id\u0027]"},{"line_number":3004,"context_line":"        security_group[\u0027description\u0027] \u003d group[\u0027description\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByYk%3D","line":3001,"updated":"2013-02-19 08:18:37.000000000","message":"Again, I think this belongs under nova/api/openstack\n\nAlso, if you\u0027re moving it here, the least you need to do is remove the underscore prefix from the method name - it is not a private method","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f3af5c3ca0b1409832994c70087d9c09ab8fabae","unresolved":false,"context_lines":[{"line_number":2998,"context_line":"            msg \u003d _(\"Security group id should be integer\")"},{"line_number":2999,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":3000,"context_line":""},{"line_number":3001,"context_line":"    def _format_security_group(self, context, group):"},{"line_number":3002,"context_line":"        security_group \u003d {}"},{"line_number":3003,"context_line":"        security_group[\u0027id\u0027] \u003d group[\u0027id\u0027]"},{"line_number":3004,"context_line":"        security_group[\u0027description\u0027] \u003d group[\u0027description\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BxMk%3D","line":3001,"in_reply_to":"AAAAM3%2F%2ByYk%3D","updated":"2013-02-19 17:34:26.000000000","message":"Removed and put back in nova/api/openstack","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a4be3f37bd71243d1f5c669c8f190eddda3f5e78","unresolved":false,"context_lines":[{"line_number":3031,"context_line":"        if self.rule_exists(security_group, new_rule):"},{"line_number":3032,"context_line":"            msg \u003d (_(\u0027This rule already exists in group %s\u0027) %"},{"line_number":3033,"context_line":"                   new_rule[\u0027parent_group_id\u0027])"},{"line_number":3034,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":3035,"context_line":"        return self.add_rules(context, new_rule[\u0027parent_group_id\u0027],"},{"line_number":3036,"context_line":"                             security_group[\u0027name\u0027],"},{"line_number":3037,"context_line":"                             [new_rule])[0]"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByYY%3D","line":3034,"updated":"2013-02-19 08:18:37.000000000","message":"nova/compute/api shouldn\u0027t be raising a webob exception - only code under nova/api/openstack should really be doing that","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f3af5c3ca0b1409832994c70087d9c09ab8fabae","unresolved":false,"context_lines":[{"line_number":3031,"context_line":"        if self.rule_exists(security_group, new_rule):"},{"line_number":3032,"context_line":"            msg \u003d (_(\u0027This rule already exists in group %s\u0027) %"},{"line_number":3033,"context_line":"                   new_rule[\u0027parent_group_id\u0027])"},{"line_number":3034,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":3035,"context_line":"        return self.add_rules(context, new_rule[\u0027parent_group_id\u0027],"},{"line_number":3036,"context_line":"                             security_group[\u0027name\u0027],"},{"line_number":3037,"context_line":"                             [new_rule])[0]"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BxF4%3D","line":3034,"in_reply_to":"AAAAM3%2F%2ByYY%3D","updated":"2013-02-19 17:34:26.000000000","message":"Done","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a4be3f37bd71243d1f5c669c8f190eddda3f5e78","unresolved":false,"context_lines":[{"line_number":3079,"context_line":"                instances.add(instance)"},{"line_number":3080,"context_line":""},{"line_number":3081,"context_line":"        # ..then we send a request to refresh the rules for each instance."},{"line_number":3082,"context_line":"        for instance in instances:"},{"line_number":3083,"context_line":"            if instance[\u0027host\u0027]:"},{"line_number":3084,"context_line":"                self.security_group_rpcapi.refresh_instance_security_rules("},{"line_number":3085,"context_line":"                        context, instance[\u0027host\u0027], instance)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByYE%3D","line":3082,"updated":"2013-02-19 08:18:37.000000000","message":"Seems like a reasonable change, but unrelated to what you\u0027re doing in this patch - would prefer if you moved this change into a separate patch","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f3af5c3ca0b1409832994c70087d9c09ab8fabae","unresolved":false,"context_lines":[{"line_number":3079,"context_line":"                instances.add(instance)"},{"line_number":3080,"context_line":""},{"line_number":3081,"context_line":"        # ..then we send a request to refresh the rules for each instance."},{"line_number":3082,"context_line":"        for instance in instances:"},{"line_number":3083,"context_line":"            if instance[\u0027host\u0027]:"},{"line_number":3084,"context_line":"                self.security_group_rpcapi.refresh_instance_security_rules("},{"line_number":3085,"context_line":"                        context, instance[\u0027host\u0027], instance)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BxF0%3D","line":3082,"in_reply_to":"AAAAM3%2F%2ByYE%3D","updated":"2013-02-19 17:34:26.000000000","message":"Done","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"28e8e7355d1c23b5437dd661d069dd5c813d3e2c","unresolved":false,"context_lines":[{"line_number":2933,"context_line":""},{"line_number":2934,"context_line":"    def trigger_rules_refresh(self, context, id):"},{"line_number":2935,"context_line":"        \"\"\"Called when a rule is added to or removed from a security_group.\"\"\""},{"line_number":2936,"context_line":""},{"line_number":2937,"context_line":"        security_group \u003d self.db.security_group_get(context, id)"},{"line_number":2938,"context_line":""},{"line_number":2939,"context_line":"        for instance in security_group[\u0027instances\u0027]:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BwxE%3D","side":"PARENT","line":2936,"updated":"2013-02-19 19:31:58.000000000","message":"will fix.","commit_id":"59933249054bf71ec963585198583fe78050c9d6"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"28e8e7355d1c23b5437dd661d069dd5c813d3e2c","unresolved":false,"context_lines":[{"line_number":60,"context_line":"from nova import servicegroup"},{"line_number":61,"context_line":"from nova import utils"},{"line_number":62,"context_line":"from nova import volume"},{"line_number":63,"context_line":"#from nova.api.openstack.compute.contrib import security_groups"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2Bwxc%3D","line":63,"updated":"2013-02-19 19:31:58.000000000","message":"will fix.","commit_id":"b6a6bf6a388dc4ee1539515157e488b44d009879"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"28e8e7355d1c23b5437dd661d069dd5c813d3e2c","unresolved":false,"context_lines":[{"line_number":2687,"context_line":"    Sub-set of the Compute API related to managing security groups"},{"line_number":2688,"context_line":"    and security group rules"},{"line_number":2689,"context_line":"    \"\"\""},{"line_number":2690,"context_line":""},{"line_number":2691,"context_line":"    def __init__(self, **kwargs):"},{"line_number":2692,"context_line":"        super(SecurityGroupAPI, self).__init__(**kwargs)"},{"line_number":2693,"context_line":"        self.security_group_rpcapi \u003d compute_rpcapi.SecurityGroupAPI()"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BwxU%3D","line":2690,"updated":"2013-02-19 19:31:58.000000000","message":"will fix.","commit_id":"b6a6bf6a388dc4ee1539515157e488b44d009879"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"28e8e7355d1c23b5437dd661d069dd5c813d3e2c","unresolved":false,"context_lines":[{"line_number":2983,"context_line":"            msg \u003d _(\"Security group id should be integer\")"},{"line_number":2984,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":2985,"context_line":""},{"line_number":2986,"context_line":"    def _format_security_group(self, context, group):"},{"line_number":2987,"context_line":"        security_group \u003d {}"},{"line_number":2988,"context_line":"        security_group[\u0027id\u0027] \u003d group[\u0027id\u0027]"},{"line_number":2989,"context_line":"        security_group[\u0027description\u0027] \u003d group[\u0027description\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BwxQ%3D","line":2986,"updated":"2013-02-19 19:31:58.000000000","message":"delete...","commit_id":"b6a6bf6a388dc4ee1539515157e488b44d009879"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"28e8e7355d1c23b5437dd661d069dd5c813d3e2c","unresolved":false,"context_lines":[{"line_number":2995,"context_line":"                    context, rule)]"},{"line_number":2996,"context_line":"        return security_group"},{"line_number":2997,"context_line":""},{"line_number":2998,"context_line":"    def _format_security_group_rule(self, context, rule):"},{"line_number":2999,"context_line":"        sg_rule \u003d {}"},{"line_number":3000,"context_line":"        sg_rule[\u0027id\u0027] \u003d rule[\u0027id\u0027]"},{"line_number":3001,"context_line":"        sg_rule[\u0027parent_group_id\u0027] \u003d rule[\u0027parent_group_id\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BwxM%3D","line":2998,"updated":"2013-02-19 19:31:58.000000000","message":"delete...","commit_id":"b6a6bf6a388dc4ee1539515157e488b44d009879"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"704dbcb38badaa8d345c63d7fd082ee4241ef9c5","unresolved":false,"context_lines":[{"line_number":27,"context_line":"import string"},{"line_number":28,"context_line":"import time"},{"line_number":29,"context_line":"import uuid"},{"line_number":30,"context_line":"from webob import exc"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"from nova import availability_zones"},{"line_number":33,"context_line":"from nova import block_device"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2BwDY%3D","line":30,"updated":"2013-02-19 23:46:42.000000000","message":"oops don\u0027t need this one anymore...","commit_id":"17e38fec95b034e4226bfc6cae56f827c322ee6f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"d5138a82a4ab591787fdc4424fbe6f1670660d34","unresolved":false,"context_lines":[{"line_number":857,"context_line":""},{"line_number":858,"context_line":"        instance[\u0027system_metadata\u0027][\u0027image_base_image_ref\u0027] \u003d base_image_ref"},{"line_number":859,"context_line":"        self.security_group_api.populate_security_groups(instance,"},{"line_number":860,"context_line":"                                                         security_groups)"},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"        return instance"},{"line_number":863,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2BwBg%3D","line":860,"updated":"2013-02-20 00:06:30.000000000","message":"Can we somehow have this update affect the instance cached on the request, so that we don\u0027t have to re-parse the POST body for the security group rules?","commit_id":"17e38fec95b034e4226bfc6cae56f827c322ee6f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"5a87fbcb3eb86f0d52df768308fe89bb4f38c9cc","unresolved":false,"context_lines":[{"line_number":857,"context_line":""},{"line_number":858,"context_line":"        instance[\u0027system_metadata\u0027][\u0027image_base_image_ref\u0027] \u003d base_image_ref"},{"line_number":859,"context_line":"        self.security_group_api.populate_security_groups(instance,"},{"line_number":860,"context_line":"                                                         security_groups)"},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"        return instance"},{"line_number":863,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAM3%2F%2Bv9Q%3D","line":860,"in_reply_to":"AAAAM3%2F%2BwBg%3D","updated":"2013-02-20 00:31:18.000000000","message":"I tried doing that originally but unfortunately wasn\u0027t able to figure out a way to do this. This instance here is a model and used later as a model as well.","commit_id":"17e38fec95b034e4226bfc6cae56f827c322ee6f"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"47abce465c008eee2f91e937157a8e065b0be8c4","unresolved":false,"context_lines":[{"line_number":3004,"context_line":""},{"line_number":3005,"context_line":"        Note: the Nova security group API doesn\u0027t support adding muliple"},{"line_number":3006,"context_line":"        security group rules at once but the EC2 one does. Therefore,"},{"line_number":3007,"context_line":"        this function is writen to support both.\"\"\""},{"line_number":3008,"context_line":""},{"line_number":3009,"context_line":"        count \u003d QUOTAS.count(context, \u0027security_group_rules\u0027, id)"},{"line_number":3010,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAM3%2F%2BuG0%3D","line":3007,"updated":"2013-02-20 19:11:45.000000000","message":"femtonit: The closing triple-quote should be on a line by itself.","commit_id":"671118e659773dd19874b933ec84b419b8bc0778"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"6cb97c236b500bc190e3998ee386e4d6df6ec3d6","unresolved":false,"context_lines":[{"line_number":3004,"context_line":""},{"line_number":3005,"context_line":"        Note: the Nova security group API doesn\u0027t support adding muliple"},{"line_number":3006,"context_line":"        security group rules at once but the EC2 one does. Therefore,"},{"line_number":3007,"context_line":"        this function is writen to support both.\"\"\""},{"line_number":3008,"context_line":""},{"line_number":3009,"context_line":"        count \u003d QUOTAS.count(context, \u0027security_group_rules\u0027, id)"},{"line_number":3010,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAM3%2F%2BuFY%3D","line":3007,"in_reply_to":"AAAAM3%2F%2BuG0%3D","updated":"2013-02-20 19:22:18.000000000","message":"Done","commit_id":"671118e659773dd19874b933ec84b419b8bc0778"}],"nova/network/manager.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"a45085fb9d836762e0666289e9014102c7fb287b","unresolved":false,"context_lines":[{"line_number":292,"context_line":"            sg_driver.get_openstack_security_group_driver())"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"        self.compute_api \u003d compute_api.API("},{"line_number":295,"context_line":"                                   security_group_api\u003dself.security_group_api)"},{"line_number":296,"context_line":"        self.servicegroup_api \u003d servicegroup.API()"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        # NOTE(tr3buchet: unless manager subclassing NetworkManager has"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B1DM%3D","line":295,"updated":"2013-02-18 10:55:02.000000000","message":"Who uses self.compute_api? I could not find where it is used.","commit_id":"bb29eeecc60d799af858d061b19314588f63ed1a"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"dcc98a8b4beb827927e327f1ddc3549cad889f8a","unresolved":false,"context_lines":[{"line_number":292,"context_line":"            sg_driver.get_openstack_security_group_driver())"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"        self.compute_api \u003d compute_api.API("},{"line_number":295,"context_line":"                                   security_group_api\u003dself.security_group_api)"},{"line_number":296,"context_line":"        self.servicegroup_api \u003d servicegroup.API()"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        # NOTE(tr3buchet: unless manager subclassing NetworkManager has"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B0Go%3D","line":295,"in_reply_to":"AAAAM3%2F%2B1DM%3D","updated":"2013-02-18 18:27:12.000000000","message":"Right this is no longer needed. Thanks!","commit_id":"bb29eeecc60d799af858d061b19314588f63ed1a"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"47abce465c008eee2f91e937157a8e065b0be8c4","unresolved":false,"context_lines":[{"line_number":62,"context_line":"from nova.network import model as network_model"},{"line_number":63,"context_line":"from nova.network import rpcapi as network_rpcapi"},{"line_number":64,"context_line":"from nova.network.security_group import openstack_driver"},{"line_number":65,"context_line":"from nova.openstack.common import cfg"},{"line_number":66,"context_line":"from nova.openstack.common import excutils"},{"line_number":67,"context_line":"from nova.openstack.common import importutils"},{"line_number":68,"context_line":"from nova.openstack.common import jsonutils"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAM3%2F%2BuGw%3D","line":65,"updated":"2013-02-20 19:11:45.000000000","message":"Bad merge?  You\u0027re shadowing oslo.config.cfg","commit_id":"671118e659773dd19874b933ec84b419b8bc0778"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"6cb97c236b500bc190e3998ee386e4d6df6ec3d6","unresolved":false,"context_lines":[{"line_number":62,"context_line":"from nova.network import model as network_model"},{"line_number":63,"context_line":"from nova.network import rpcapi as network_rpcapi"},{"line_number":64,"context_line":"from nova.network.security_group import openstack_driver"},{"line_number":65,"context_line":"from nova.openstack.common import cfg"},{"line_number":66,"context_line":"from nova.openstack.common import excutils"},{"line_number":67,"context_line":"from nova.openstack.common import importutils"},{"line_number":68,"context_line":"from nova.openstack.common import jsonutils"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAM3%2F%2BuFI%3D","line":65,"in_reply_to":"AAAAM3%2F%2BuGw%3D","updated":"2013-02-20 19:22:18.000000000","message":"Hrm i\u0027m not sure why this happened in the merge, Removing this line as it\u0027s already done on line 53","commit_id":"671118e659773dd19874b933ec84b419b8bc0778"}],"nova/network/security_group/ec2_driver.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a4be3f37bd71243d1f5c669c8f190eddda3f5e78","unresolved":false,"context_lines":[{"line_number":17,"context_line":"#"},{"line_number":18,"context_line":"# @author: Aaron Rosen, Nicira Networks, Inc."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from nova.compute import api as compute_api"},{"line_number":21,"context_line":"from nova.network.security_group import security_group_base as sg_base"},{"line_number":22,"context_line":"from nova.openstack.common import cfg"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByX4%3D","line":20,"updated":"2013-02-19 08:18:37.000000000","message":"It feels wrong for code under nova.network to be importing code from nova.compute\n\nI think this is another hint that this code should live under nova/api/ec2","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f3af5c3ca0b1409832994c70087d9c09ab8fabae","unresolved":false,"context_lines":[{"line_number":17,"context_line":"#"},{"line_number":18,"context_line":"# @author: Aaron Rosen, Nicira Networks, Inc."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from nova.compute import api as compute_api"},{"line_number":21,"context_line":"from nova.network.security_group import security_group_base as sg_base"},{"line_number":22,"context_line":"from nova.openstack.common import cfg"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BxFo%3D","line":20,"in_reply_to":"AAAAM3%2F%2ByX4%3D","updated":"2013-02-19 17:34:26.000000000","message":"(Still sorting this out).","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"}],"nova/network/security_group/nova_driver.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"8e500a85a22d481a802f0a0642ab8539c0722855","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    # Uses nova database so set to true"},{"line_number":63,"context_line":"    use_db \u003d True"},{"line_number":64,"context_line":"    id_is_uuid \u003d False"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def __init__(self, **kwargs):"},{"line_number":67,"context_line":"        super(SecurityGroup, self).__init__(**kwargs)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzZA%3D","line":64,"updated":"2013-02-18 22:46:16.000000000","message":"id_is_uuid seems to be unused?","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"df5eb2d34e155a6c57ae09d1925876314a3f49fa","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    # Uses nova database so set to true"},{"line_number":63,"context_line":"    use_db \u003d True"},{"line_number":64,"context_line":"    id_is_uuid \u003d False"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def __init__(self, **kwargs):"},{"line_number":67,"context_line":"        super(SecurityGroup, self).__init__(**kwargs)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzOw%3D","line":64,"in_reply_to":"AAAAM3%2F%2BzZA%3D","updated":"2013-02-18 23:21:19.000000000","message":"Right this should be in the next patch set.","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"8e500a85a22d481a802f0a0642ab8539c0722855","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def __init__(self, **kwargs):"},{"line_number":67,"context_line":"        super(SecurityGroup, self).__init__(**kwargs)"},{"line_number":68,"context_line":"        self.security_group_rpcapi \u003d compute_rpcapi.SecurityGroupAPI()"},{"line_number":69,"context_line":"        self.sgh \u003d importutils.import_object(CONF.security_group_handler)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def validate_property(self, value, property, allowed):"},{"line_number":72,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzYo%3D","line":69,"updated":"2013-02-18 22:46:16.000000000","message":"Again, either CONF.import_opt() this or add a new security_group_driver.py function to encapsulate it","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"df5eb2d34e155a6c57ae09d1925876314a3f49fa","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def __init__(self, **kwargs):"},{"line_number":67,"context_line":"        super(SecurityGroup, self).__init__(**kwargs)"},{"line_number":68,"context_line":"        self.security_group_rpcapi \u003d compute_rpcapi.SecurityGroupAPI()"},{"line_number":69,"context_line":"        self.sgh \u003d importutils.import_object(CONF.security_group_handler)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def validate_property(self, value, property, allowed):"},{"line_number":72,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzOk%3D","line":69,"in_reply_to":"AAAAM3%2F%2BzYo%3D","updated":"2013-02-18 23:21:19.000000000","message":"Done","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"8e500a85a22d481a802f0a0642ab8539c0722855","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        if reservations:"},{"line_number":215,"context_line":"            QUOTAS.commit(context, reservations)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def is_associated_with_server(self, security_group, instance_uuid):"},{"line_number":218,"context_line":"        \"\"\"Check if the security group is already associated"},{"line_number":219,"context_line":"           with the instance. If Yes, return True."},{"line_number":220,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2Bza0%3D","line":217,"updated":"2013-02-18 22:46:16.000000000","message":"underscore prefix this to show that it\u0027s private","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"8e500a85a22d481a802f0a0642ab8539c0722855","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        self.trigger_rules_refresh(context, id\u003dsecurity_group[\u0027id\u0027])"},{"line_number":352,"context_line":"        self.trigger_handler(\u0027security_group_rule_destroy\u0027, context, rule_ids)"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    def _validate_id(self, id):"},{"line_number":355,"context_line":"        try:"},{"line_number":356,"context_line":"            return int(id)"},{"line_number":357,"context_line":"        except ValueError:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzWk%3D","line":354,"updated":"2013-02-18 22:46:16.000000000","message":"Shouldn\u0027t be underscore prefixed","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"df5eb2d34e155a6c57ae09d1925876314a3f49fa","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        self.trigger_rules_refresh(context, id\u003dsecurity_group[\u0027id\u0027])"},{"line_number":352,"context_line":"        self.trigger_handler(\u0027security_group_rule_destroy\u0027, context, rule_ids)"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    def _validate_id(self, id):"},{"line_number":355,"context_line":"        try:"},{"line_number":356,"context_line":"            return int(id)"},{"line_number":357,"context_line":"        except ValueError:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzSI%3D","line":354,"in_reply_to":"AAAAM3%2F%2BzWk%3D","updated":"2013-02-18 23:21:19.000000000","message":"Done","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"8e500a85a22d481a802f0a0642ab8539c0722855","unresolved":false,"context_lines":[{"line_number":358,"context_line":"            msg \u003d _(\"Security group id should be integer\")"},{"line_number":359,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def _format_security_group(self, context, group):"},{"line_number":362,"context_line":"        security_group \u003d {}"},{"line_number":363,"context_line":"        security_group[\u0027id\u0027] \u003d group[\u0027id\u0027]"},{"line_number":364,"context_line":"        security_group[\u0027description\u0027] \u003d group[\u0027description\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzWs%3D","line":361,"updated":"2013-02-18 22:46:16.000000000","message":"I don\u0027t think this should be here, but it definitely shouldn\u0027t be underscore prefixed - it\u0027s used in nova/api/openstack","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"048c0df98c3b6e24c293465f6f270d3d80a10f9d","unresolved":false,"context_lines":[{"line_number":358,"context_line":"            msg \u003d _(\"Security group id should be integer\")"},{"line_number":359,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def _format_security_group(self, context, group):"},{"line_number":362,"context_line":"        security_group \u003d {}"},{"line_number":363,"context_line":"        security_group[\u0027id\u0027] \u003d group[\u0027id\u0027]"},{"line_number":364,"context_line":"        security_group[\u0027description\u0027] \u003d group[\u0027description\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzME%3D","line":361,"in_reply_to":"AAAAM3%2F%2BzSg%3D","updated":"2013-02-18 23:47:26.000000000","message":"But if the same code is used for nova and quantum, why did you move it out of the API code at all?\n\nThis is really a OpenStack REST API detail AFAICT ... would prefer if it lived under nova/api/openstack unless I\u0027m missing something","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"df5eb2d34e155a6c57ae09d1925876314a3f49fa","unresolved":false,"context_lines":[{"line_number":358,"context_line":"            msg \u003d _(\"Security group id should be integer\")"},{"line_number":359,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def _format_security_group(self, context, group):"},{"line_number":362,"context_line":"        security_group \u003d {}"},{"line_number":363,"context_line":"        security_group[\u0027id\u0027] \u003d group[\u0027id\u0027]"},{"line_number":364,"context_line":"        security_group[\u0027description\u0027] \u003d group[\u0027description\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzSg%3D","line":361,"in_reply_to":"AAAAM3%2F%2BzWs%3D","updated":"2013-02-18 23:21:19.000000000","message":"This actually can be moved to security_group_driver_base.py since quantum security groups and nova security groups can be converted in the same way here thanks for pointing this out.","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"8e500a85a22d481a802f0a0642ab8539c0722855","unresolved":false,"context_lines":[{"line_number":370,"context_line":"                    context, rule)]"},{"line_number":371,"context_line":"        return security_group"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def _format_security_group_rule(self, context, rule):"},{"line_number":374,"context_line":"        sg_rule \u003d {}"},{"line_number":375,"context_line":"        sg_rule[\u0027id\u0027] \u003d rule[\u0027id\u0027]"},{"line_number":376,"context_line":"        sg_rule[\u0027parent_group_id\u0027] \u003d rule[\u0027parent_group_id\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzWo%3D","line":373,"updated":"2013-02-18 22:46:16.000000000","message":"Ditto","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"048c0df98c3b6e24c293465f6f270d3d80a10f9d","unresolved":false,"context_lines":[{"line_number":370,"context_line":"                    context, rule)]"},{"line_number":371,"context_line":"        return security_group"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def _format_security_group_rule(self, context, rule):"},{"line_number":374,"context_line":"        sg_rule \u003d {}"},{"line_number":375,"context_line":"        sg_rule[\u0027id\u0027] \u003d rule[\u0027id\u0027]"},{"line_number":376,"context_line":"        sg_rule[\u0027parent_group_id\u0027] \u003d rule[\u0027parent_group_id\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzLk%3D","line":373,"in_reply_to":"AAAAM3%2F%2BzS0%3D","updated":"2013-02-18 23:47:26.000000000","message":"the quantum code is:\n\n    def _format_security_group_rule(self, context, rule):\n        sg_rule \u003d {}\n        sg_rule[\u0027id\u0027] \u003d rule[\u0027id\u0027]\n        sg_rule[\u0027parent_group_id\u0027] \u003d rule[\u0027security_group_id\u0027]\n        sg_rule[\u0027ip_protocol\u0027] \u003d rule[\u0027protocol\u0027]\n        if rule[\u0027port_range_min\u0027] is not None:\n            sg_rule[\u0027from_port\u0027] \u003d rule[\u0027port_range_min\u0027]\n        else:\n            sg_rule[\u0027from_port\u0027] \u003d -1\n        if rule[\u0027port_range_max\u0027] is not None:\n            sg_rule[\u0027to_port\u0027] \u003d rule[\u0027port_range_max\u0027]\n        else:\n            sg_rule[\u0027to_port\u0027] \u003d -1\n        sg_rule[\u0027group\u0027] \u003d {}\n        sg_rule[\u0027ip_range\u0027] \u003d {}\n        if rule[\u0027source_group_id\u0027]:\n            source_group \u003d self.get(context, id\u003drule[\u0027source_group_id\u0027])\n            sg_rule[\u0027group\u0027] \u003d {\u0027name\u0027: source_group[\u0027name\u0027],\n                                \u0027tenant_id\u0027: source_group[\u0027tenant_id\u0027]}\n        elif rule[\u0027source_ip_prefix\u0027]:\n            sg_rule[\u0027ip_range\u0027] \u003d {\u0027cidr\u0027: rule[\u0027source_ip_prefix\u0027]}\n        return sg_rule\n\nI\u0027d much prefer the quantum driver to just have code to translate quantum security groups into nova security groups so that the formatting as OpenStack API entity representations happen in one place\n\ne.g. you\u0027ve been careful to have the same JSON representation of a security group rule whether or not the driver is nova or quantum, but it\u0027s quite difficult to audit that\n\nso, something like:\n\n  def translate_sg_rule(self, rule):\n      ...\n      sg_rule[\u0027cidr\u0027] \u003d rule[\u0027source_ip_prefix\u0027]\n\nWith that, there should be no change at all to the _format...() methods in contrib/security_groups.py","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"df5eb2d34e155a6c57ae09d1925876314a3f49fa","unresolved":false,"context_lines":[{"line_number":370,"context_line":"                    context, rule)]"},{"line_number":371,"context_line":"        return security_group"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def _format_security_group_rule(self, context, rule):"},{"line_number":374,"context_line":"        sg_rule \u003d {}"},{"line_number":375,"context_line":"        sg_rule[\u0027id\u0027] \u003d rule[\u0027id\u0027]"},{"line_number":376,"context_line":"        sg_rule[\u0027parent_group_id\u0027] \u003d rule[\u0027parent_group_id\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzS0%3D","line":373,"in_reply_to":"AAAAM3%2F%2BzWo%3D","updated":"2013-02-18 23:21:19.000000000","message":"This is needed because in the next patch quantum needs it\u0027s own _format_security_group_rule() to change the format from quantum security groups to nova security groups.","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"}],"nova/network/security_group/openstack_driver.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a4be3f37bd71243d1f5c669c8f190eddda3f5e78","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from nova.openstack.common import cfg"},{"line_number":21,"context_line":"from nova.openstack.common import importutils"},{"line_number":22,"context_line":"#from nova.compute import api as compute_api"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"security_group_opts \u003d ["},{"line_number":25,"context_line":"    cfg.StrOpt(\u0027security_group_api\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByX0%3D","line":22,"updated":"2013-02-19 08:18:37.000000000","message":"remove","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f3af5c3ca0b1409832994c70087d9c09ab8fabae","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from nova.openstack.common import cfg"},{"line_number":21,"context_line":"from nova.openstack.common import importutils"},{"line_number":22,"context_line":"#from nova.compute import api as compute_api"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"security_group_opts \u003d ["},{"line_number":25,"context_line":"    cfg.StrOpt(\u0027security_group_api\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BxFk%3D","line":22,"in_reply_to":"AAAAM3%2F%2ByX0%3D","updated":"2013-02-19 17:34:26.000000000","message":"Done","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a4be3f37bd71243d1f5c669c8f190eddda3f5e78","unresolved":false,"context_lines":[{"line_number":26,"context_line":"               default\u003d\u0027nova\u0027,"},{"line_number":27,"context_line":"               help\u003d\u0027The full class name of the security API class\u0027),"},{"line_number":28,"context_line":"    cfg.StrOpt(\u0027security_group_handler\u0027,"},{"line_number":29,"context_line":"               default\u003d\u0027null\u0027,"},{"line_number":30,"context_line":"               help\u003d\u0027The full class name of the security group handler class\u0027),"},{"line_number":31,"context_line":"]"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByXw%3D","line":29,"updated":"2013-02-19 08:18:37.000000000","message":"Hmm, no ... there\u0027s no need to break backwards compat for this option. Put this back the way it was","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f3af5c3ca0b1409832994c70087d9c09ab8fabae","unresolved":false,"context_lines":[{"line_number":26,"context_line":"               default\u003d\u0027nova\u0027,"},{"line_number":27,"context_line":"               help\u003d\u0027The full class name of the security API class\u0027),"},{"line_number":28,"context_line":"    cfg.StrOpt(\u0027security_group_handler\u0027,"},{"line_number":29,"context_line":"               default\u003d\u0027null\u0027,"},{"line_number":30,"context_line":"               help\u003d\u0027The full class name of the security group handler class\u0027),"},{"line_number":31,"context_line":"]"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BxFg%3D","line":29,"in_reply_to":"AAAAM3%2F%2ByXw%3D","updated":"2013-02-19 17:34:26.000000000","message":"Done","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"2a124da5c5e4f64245d427e71511915936df4d9f","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from nova.openstack.common import cfg"},{"line_number":21,"context_line":"from nova.openstack.common import importutils"},{"line_number":22,"context_line":"#from nova.compute import api as compute_api"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"security_group_opts \u003d ["},{"line_number":25,"context_line":"    cfg.StrOpt(\u0027security_group_api\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2BwYA%3D","line":22,"updated":"2013-02-19 21:52:06.000000000","message":"oops","commit_id":"000caf758e9311c035a375c738acadf89150992f"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"47abce465c008eee2f91e937157a8e065b0be8c4","unresolved":false,"context_lines":[{"line_number":17,"context_line":"#"},{"line_number":18,"context_line":"# @author: Aaron Rosen, Nicira Networks, Inc."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from nova.openstack.common import cfg"},{"line_number":21,"context_line":"from nova.openstack.common import importutils"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"security_group_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAM3%2F%2BuGo%3D","line":20,"updated":"2013-02-20 19:11:45.000000000","message":"We\u0027re no longer using nova.openstack.common.cfg…","commit_id":"671118e659773dd19874b933ec84b419b8bc0778"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"6cb97c236b500bc190e3998ee386e4d6df6ec3d6","unresolved":false,"context_lines":[{"line_number":17,"context_line":"#"},{"line_number":18,"context_line":"# @author: Aaron Rosen, Nicira Networks, Inc."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from nova.openstack.common import cfg"},{"line_number":21,"context_line":"from nova.openstack.common import importutils"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"security_group_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAM3%2F%2BuFE%3D","line":20,"in_reply_to":"AAAAM3%2F%2BuGo%3D","updated":"2013-02-20 19:22:18.000000000","message":"Done","commit_id":"671118e659773dd19874b933ec84b419b8bc0778"}],"nova/network/security_group/security_group_base.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"2fe64108a429bf871c8694bb203c5b3951ea0a41","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2013 Nicira, Inc."},{"line_number":4,"context_line":"# All Rights Reserved"},{"line_number":5,"context_line":"#"},{"line_number":6,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bzho%3D","line":3,"updated":"2013-02-18 22:01:20.000000000","message":"You should retain the copyright headers from nova/compute/api.py - e.g. I know at least the Red Hat copyright applies to this code","commit_id":"be3081f0bba9814923912c1a123be32de1b17628"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"19c15de4e84656a54fcd2f2cf17f6f44a27a6592","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2013 Nicira, Inc."},{"line_number":4,"context_line":"# All Rights Reserved"},{"line_number":5,"context_line":"#"},{"line_number":6,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bzcw%3D","line":3,"in_reply_to":"AAAAM3%2F%2Bzho%3D","updated":"2013-02-18 22:51:28.000000000","message":"Oops this was an oversight. I retained the headers from the other files that I moved around.","commit_id":"be3081f0bba9814923912c1a123be32de1b17628"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"2fe64108a429bf871c8694bb203c5b3951ea0a41","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from nova.openstack.common import cfg"},{"line_number":25,"context_line":"from nova import utils"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"CONF \u003d cfg.CONF"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class SecurityGroupBase(object):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BzkE%3D","line":27,"updated":"2013-02-18 22:01:20.000000000","message":"unused","commit_id":"be3081f0bba9814923912c1a123be32de1b17628"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"19c15de4e84656a54fcd2f2cf17f6f44a27a6592","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from nova.openstack.common import cfg"},{"line_number":25,"context_line":"from nova import utils"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"CONF \u003d cfg.CONF"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class SecurityGroupBase(object):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bzcs%3D","line":27,"in_reply_to":"AAAAM3%2F%2BzkE%3D","updated":"2013-02-18 22:51:28.000000000","message":"Done","commit_id":"be3081f0bba9814923912c1a123be32de1b17628"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"8e500a85a22d481a802f0a0642ab8539c0722855","unresolved":false,"context_lines":[{"line_number":27,"context_line":"CONF \u003d cfg.CONF"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class SecurityGroupBase(object):"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @staticmethod"},{"line_number":33,"context_line":"    def raise_invalid_property(msg):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzbI%3D","line":30,"updated":"2013-02-18 22:46:16.000000000","message":"There are a bunch of methods in the API contract for this interface which should be in the base class:\n\n  def create_security_group(self, context, name, description):\n  def get(self, context, name\u003dNone, id\u003dNone, map_exception\u003dFalse):\n  def list(self, context, names\u003dNone, ids\u003dNone, project\u003dNone,\n             search_opts\u003dNone):\n  def destroy(self, context, security_group):\n  def add_rules(self, context, id, name, vals):\n  def create_security_group_rule(self, context, security_group, new_rule):\n  def remove_rules(self, context, security_group, rule_ids):\n  def get_rule(self, context, id):\n  def get_instance_security_groups(self, req, instance_id):\n  def add_to_instance(self, context, instance, security_group_name):\n  def remove_from_instance(self, context, instance, security_group_name):\n\nAlso, rule_exists() but this doesn\u0027t seem to be implemented by the quantum driver even though EC2 uses it?","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"df5eb2d34e155a6c57ae09d1925876314a3f49fa","unresolved":false,"context_lines":[{"line_number":27,"context_line":"CONF \u003d cfg.CONF"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class SecurityGroupBase(object):"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @staticmethod"},{"line_number":33,"context_line":"    def raise_invalid_property(msg):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzRY%3D","line":30,"in_reply_to":"AAAAM3%2F%2BzbI%3D","updated":"2013-02-18 23:21:19.000000000","message":"I\u0027ll add all of these with raise NotImplementedError().  Thanks for pointing out the issue with rules_exists().","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a4be3f37bd71243d1f5c669c8f190eddda3f5e78","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    @staticmethod"},{"line_number":56,"context_line":"    def raise_not_found(msg):"},{"line_number":57,"context_line":"        raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"class EC2SecurityGroupExceptions(object):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByXo%3D","line":57,"updated":"2013-02-19 08:18:37.000000000","message":"Quite clearly belongs under nova/api/openstack","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f3af5c3ca0b1409832994c70087d9c09ab8fabae","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    @staticmethod"},{"line_number":56,"context_line":"    def raise_not_found(msg):"},{"line_number":57,"context_line":"        raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"class EC2SecurityGroupExceptions(object):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BxFY%3D","line":57,"in_reply_to":"AAAAM3%2F%2ByXo%3D","updated":"2013-02-19 17:34:26.000000000","message":"Done","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a4be3f37bd71243d1f5c669c8f190eddda3f5e78","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    @staticmethod"},{"line_number":85,"context_line":"    def raise_not_found(msg):"},{"line_number":86,"context_line":"        pass"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class SecurityGroupBase(object):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2ByXk%3D","line":86,"updated":"2013-02-19 08:18:37.000000000","message":"Quite clearly belongs under nova/api/ec2","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f3af5c3ca0b1409832994c70087d9c09ab8fabae","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    @staticmethod"},{"line_number":85,"context_line":"    def raise_not_found(msg):"},{"line_number":86,"context_line":"        pass"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class SecurityGroupBase(object):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BxFU%3D","line":86,"in_reply_to":"AAAAM3%2F%2ByXk%3D","updated":"2013-02-19 17:34:26.000000000","message":"Done","commit_id":"0f48ea33f3a06ec8163e283f81d79051ffc1200f"}],"nova/network/security_group/security_group_driver.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"2fe64108a429bf871c8694bb203c5b3951ea0a41","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                  nova_driver.SecurityGroup):"},{"line_number":41,"context_line":"        return EC2SecurityGroupNovaDriver()"},{"line_number":42,"context_line":"    else:"},{"line_number":43,"context_line":"        raise NotImplementedError()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"def get_openstack_security_group_driver():"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BzfU%3D","line":43,"updated":"2013-02-18 22:01:20.000000000","message":"What are we saying here? That quantum support for EC2 security groups isn\u0027t implemented?\n\nWhich basically means that you can\u0027t have a 3rd party implementation of this?\n\nWhy can\u0027t we do this:\n\n    cfg.StrOpt(\u0027security_group_api\u0027,\n                    default\u003d\u0027nova,)\n\nA recent openstack-dev thread (http://lists.openstack.org/pipermail/openstack-dev/2013-February/thread.html#5412) makes a very good case to avoid full python paths in config options\n\nIf we want to support 3rd party implementations of this in future, we can support it using entry points and figure out how EC2 support can be handled","commit_id":"be3081f0bba9814923912c1a123be32de1b17628"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"19c15de4e84656a54fcd2f2cf17f6f44a27a6592","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                  nova_driver.SecurityGroup):"},{"line_number":41,"context_line":"        return EC2SecurityGroupNovaDriver()"},{"line_number":42,"context_line":"    else:"},{"line_number":43,"context_line":"        raise NotImplementedError()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"def get_openstack_security_group_driver():"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2BzV4%3D","line":43,"in_reply_to":"AAAAM3%2F%2BzfU%3D","updated":"2013-02-18 22:51:28.000000000","message":"Nova did not support 3rd party implementations of this before. Quantum implements this in the patch rebased on this one (https://review.openstack.org/#/c/22062/7/nova/network/security_group/security_group_driver.py)","commit_id":"be3081f0bba9814923912c1a123be32de1b17628"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"8e500a85a22d481a802f0a0642ab8539c0722855","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class EC2SecurityGroupNovaDriver(ec2_driver.SecurityGroup,"},{"line_number":51,"context_line":"                                 nova_driver.SecurityGroup):"},{"line_number":52,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2Bzbw%3D","line":51,"updated":"2013-02-18 22:46:16.000000000","message":"This is really ugly\n\nPreviously we had compute_api.SecurityGroupAPI abstract base class with \"native\" and ec2 subclasses\n\nThat makes a tonne more sense to me than a base class with a mixin which overrides some methods\n\nHow about adding a new SecurityGroupExceptions base class, implementing nova and ec2 subclasses and passing it to the SecurityGroupAPI constructor\n\nThat way, any implementation of SecurityGroupBase will work with both Nova and Quantum without this mixin trick","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"df5eb2d34e155a6c57ae09d1925876314a3f49fa","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class EC2SecurityGroupNovaDriver(ec2_driver.SecurityGroup,"},{"line_number":51,"context_line":"                                 nova_driver.SecurityGroup):"},{"line_number":52,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2BzQA%3D","line":51,"in_reply_to":"AAAAM3%2F%2Bzbw%3D","updated":"2013-02-18 23:21:19.000000000","message":"Done","commit_id":"f4a6388ba5f0d8d735a47604ca0b6d0d57851f6d"}],"nova/tests/compute/test_compute.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"47abce465c008eee2f91e937157a8e065b0be8c4","unresolved":false,"context_lines":[{"line_number":47,"context_line":"from nova.network import api as network_api"},{"line_number":48,"context_line":"from nova.network import model as network_model"},{"line_number":49,"context_line":"from nova.network.security_group import openstack_driver"},{"line_number":50,"context_line":"from nova.openstack.common import cfg"},{"line_number":51,"context_line":"from nova.openstack.common import importutils"},{"line_number":52,"context_line":"from nova.openstack.common import jsonutils"},{"line_number":53,"context_line":"from nova.openstack.common import log as logging"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAM3%2F%2BuGk%3D","line":50,"updated":"2013-02-20 19:11:45.000000000","message":"Again shadowing oslo.config.cfg","commit_id":"671118e659773dd19874b933ec84b419b8bc0778"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"6cb97c236b500bc190e3998ee386e4d6df6ec3d6","unresolved":false,"context_lines":[{"line_number":47,"context_line":"from nova.network import api as network_api"},{"line_number":48,"context_line":"from nova.network import model as network_model"},{"line_number":49,"context_line":"from nova.network.security_group import openstack_driver"},{"line_number":50,"context_line":"from nova.openstack.common import cfg"},{"line_number":51,"context_line":"from nova.openstack.common import importutils"},{"line_number":52,"context_line":"from nova.openstack.common import jsonutils"},{"line_number":53,"context_line":"from nova.openstack.common import log as logging"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAM3%2F%2BuE4%3D","line":50,"in_reply_to":"AAAAM3%2F%2BuGk%3D","updated":"2013-02-20 19:22:18.000000000","message":"Done","commit_id":"671118e659773dd19874b933ec84b419b8bc0778"}]}
