)]}'
{"nova/objects/security_group.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e37ecdc69ba471271803767ad52f82d151e91056","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    # Version 1.0: Initial Version"},{"line_number":81,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":82,"context_line":"    fields \u003d {"},{"line_number":83,"context_line":"        \u0027id\u0027: fields.UUIDField()"},{"line_number":84,"context_line":"    }"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_ae1f6a59","line":83,"updated":"2016-11-10 23:42:43.000000000","message":"This won\u0027t work if we\u0027re storing \u0027default\u0027 in here.","commit_id":"f16f756427973771c8c6ec84a3ba5104c68cbb91"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c9bccabb0ff6d6f2ac800f523d7f9b6268ef4c14","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    # Version 1.0: Initial Version"},{"line_number":81,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":82,"context_line":"    fields \u003d {"},{"line_number":83,"context_line":"        \u0027id\u0027: fields.UUIDField()"},{"line_number":84,"context_line":"    }"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_2ead1a88","line":83,"in_reply_to":"9a629dbe_ae1f6a59","updated":"2016-11-11 00:06:51.000000000","message":"Alternatively we could just not have a special NeutronSecurityGroup object and store the uuid in the \u0027name\u0027 field and then have to check is_uuid later to know if it\u0027s neutron or not.","commit_id":"f16f756427973771c8c6ec84a3ba5104c68cbb91"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"58d8dcd81cd36b8f7d4ab6b5fbf817958274969b","unresolved":false,"context_lines":[{"line_number":75,"context_line":"# We don\u0027t want to register this object because it will not be passed"},{"line_number":76,"context_line":"# around on RPC, it just makes our lives a lot easier in the API when we"},{"line_number":77,"context_line":"# store this in the RequestSpec."},{"line_number":78,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":79,"context_line":"class NeutronSecurityGroup(SecurityGroup):"},{"line_number":80,"context_line":"    # Version 1.0: Initial Version"},{"line_number":81,"context_line":"    VERSION \u003d \u00271.0\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_31b5647d","line":78,"updated":"2016-11-11 14:56:46.000000000","message":"You can\u0027t send this over RPC if it\u0027s not registered, but it will need to be as part of the RequestSpec and the eventual call to compute.","commit_id":"cc2921db4704acd62ca5ed08a1cb299622f9d68e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"ccd8123ec3d36147b8b69fbf2bd7e51dbc1041cf","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    # Version 1.0: Initial Version"},{"line_number":81,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":82,"context_line":"    fields \u003d {"},{"line_number":83,"context_line":"        # NOTE(mriedem): This is a string field because of the special \u0027uuid\u0027"},{"line_number":84,"context_line":"        # security group case, otherwise these should all be UUIDs."},{"line_number":85,"context_line":"        \u0027id\u0027: fields.StringField()"},{"line_number":86,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_8c662e28","line":83,"range":{"start_line":83,"start_character":71,"end_line":83,"end_character":77},"updated":"2016-11-11 02:29:40.000000000","message":"You mean \u0027default\u0027 here, right?\n\nI dug up an old patch [1] because I remembered something about not sending the \u0027default\u0027 group to Neutron anymore. From that patch, we have code that removes the \u0027default\u0027 group before calling Neutron [2]. I\u0027m wondering if this means we don\u0027t need to be able to represent the \u0027default\u0027 group here? The only reason I could think of for needing to be able to store \u0027default\u0027 is if we\u0027re doing something to guess whether or not the default group is applied in Neutron. And we won\u0027t know that unless we at least check \"port_security_enabled\" I think.\n\n[1] https://review.openstack.org/#/c/284095\n[2] https://github.com/openstack/nova/blob/53ab606/nova/network/neutronv2/api.py#L582-L591","commit_id":"cc2921db4704acd62ca5ed08a1cb299622f9d68e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0e06327ea3db280434c849b6e1dff7cb297422c6","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    # Version 1.0: Initial Version"},{"line_number":81,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":82,"context_line":"    fields \u003d {"},{"line_number":83,"context_line":"        # NOTE(mriedem): This is a string field because of the special \u0027uuid\u0027"},{"line_number":84,"context_line":"        # security group case, otherwise these should all be UUIDs."},{"line_number":85,"context_line":"        \u0027id\u0027: fields.StringField()"},{"line_number":86,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_e737c54a","line":83,"range":{"start_line":83,"start_character":71,"end_line":83,"end_character":77},"in_reply_to":"9a629dbe_0799197c","updated":"2016-11-11 02:54:51.000000000","message":"Ah, sorry, I didn\u0027t catch that it was only removing it if it was the only group in the list -- I wrongly thought it was removing it from any list of security groups. I agree we should just leave it as-is. Even if we did something to make sure it matches what we send to Neutron (in the removal case), we still need to be able to represent the \u0027default\u0027 group in this field.","commit_id":"cc2921db4704acd62ca5ed08a1cb299622f9d68e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ecc90d9545cdfe91af1be0a6f7f356228d192648","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    # Version 1.0: Initial Version"},{"line_number":81,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":82,"context_line":"    fields \u003d {"},{"line_number":83,"context_line":"        # NOTE(mriedem): This is a string field because of the special \u0027uuid\u0027"},{"line_number":84,"context_line":"        # security group case, otherwise these should all be UUIDs."},{"line_number":85,"context_line":"        \u0027id\u0027: fields.StringField()"},{"line_number":86,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_0799197c","line":83,"range":{"start_line":83,"start_character":71,"end_line":83,"end_character":77},"in_reply_to":"9a629dbe_8c662e28","updated":"2016-11-11 02:45:12.000000000","message":"Yeah I meant \u0027default\u0027.\n\nAnd yeah, I\u0027m intimately familiar with that other change, I think it shaved a couple of months off my life.\n\nSo my thought process was maybe we could use that same logic in the compute API and not store a [\u0027default\u0027] group by default, but then remembered that _clean_security_groups is only making it an empty list iff the user didn\u0027t request the default group and the compute API added it here:\n\nhttps://github.com/openstack/nova/blob/53ab6068a318079757fa76db37fc9838db2b4f24/nova/compute/api.py#L1108\n\nBut in the case that you request something like:\n\n [\u0027default\u0027, \u0027my-extra-secret-group\u0027, \u0027yeah-me-too\u0027]\n\nThen the neutronv2 API code doesn\u0027t modify that list and it gets passed onto neutron. So for that reason alone I decided to just leave this as-is and try to not get cute with the compute API list of requested security groups. I might be over or under thinking that, but at this point in the night I wanted to just get this up for review and comments.","commit_id":"cc2921db4704acd62ca5ed08a1cb299622f9d68e"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"8868d20933c80f691e543e5842df30622e679277","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    @staticmethod"},{"line_number":36,"context_line":"    def _from_db_object(context, secgroup, db_secgroup):"},{"line_number":37,"context_line":"        # NOTE(danms): These are identical right now"},{"line_number":38,"context_line":"        for field in secgroup.fields:"},{"line_number":39,"context_line":"            setattr(secgroup, field, db_secgroup[field])"},{"line_number":40,"context_line":"        secgroup._context \u003d context"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a629dbe_ea04ce15","side":"PARENT","line":37,"updated":"2016-11-11 17:43:48.000000000","message":"If \"these\" refers to secgroup and db_secgroup then this comment is no longer true and go away?","commit_id":"4058471132f06ae8b137f6a4a917e1b2b7382158"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"789c7b645e414955c334174902e121b61c8e8122","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    @staticmethod"},{"line_number":36,"context_line":"    def _from_db_object(context, secgroup, db_secgroup):"},{"line_number":37,"context_line":"        # NOTE(danms): These are identical right now"},{"line_number":38,"context_line":"        for field in secgroup.fields:"},{"line_number":39,"context_line":"            setattr(secgroup, field, db_secgroup[field])"},{"line_number":40,"context_line":"        secgroup._context \u003d context"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a629dbe_883fdab2","side":"PARENT","line":37,"in_reply_to":"9a629dbe_082caa97","updated":"2016-11-11 18:42:20.000000000","message":"What chris said.","commit_id":"4058471132f06ae8b137f6a4a917e1b2b7382158"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1f2ed495b414aa115aa1192da36770a264523e0e","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    @staticmethod"},{"line_number":36,"context_line":"    def _from_db_object(context, secgroup, db_secgroup):"},{"line_number":37,"context_line":"        # NOTE(danms): These are identical right now"},{"line_number":38,"context_line":"        for field in secgroup.fields:"},{"line_number":39,"context_line":"            setattr(secgroup, field, db_secgroup[field])"},{"line_number":40,"context_line":"        secgroup._context \u003d context"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a629dbe_082caa97","side":"PARENT","line":37,"in_reply_to":"9a629dbe_ea04ce15","updated":"2016-11-11 18:41:29.000000000","message":"I saw that myself and wondered the same, I\u0027d need to ask Dan.","commit_id":"4058471132f06ae8b137f6a4a917e1b2b7382158"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"951009a5f532979da68d4f7de00961389f88e233","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    def save(self):"},{"line_number":73,"context_line":"        updates \u003d self.obj_get_changes()"},{"line_number":74,"context_line":"        # We don\u0027t store uuid in the Nova database so remove it if someone"},{"line_number":75,"context_line":"        # mistakently tried to save a neutron security group object."},{"line_number":76,"context_line":"        updates.pop(\u0027uuid\u0027, None)"},{"line_number":77,"context_line":"        if updates:"},{"line_number":78,"context_line":"            db_secgroup \u003d db.security_group_update(self._context, self.id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_b0178853","line":75,"range":{"start_line":75,"start_character":10,"end_line":75,"end_character":21},"updated":"2016-11-14 21:12:00.000000000","message":"Mistake here.","commit_id":"feedd4c3bfccf03527403e3e9e8259c68a5fc5fa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"472c34ab8ed658a000a9849bc4773dc605ff845e","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    def save(self):"},{"line_number":73,"context_line":"        updates \u003d self.obj_get_changes()"},{"line_number":74,"context_line":"        # We don\u0027t store uuid in the Nova database so remove it if someone"},{"line_number":75,"context_line":"        # mistakently tried to save a neutron security group object."},{"line_number":76,"context_line":"        updates.pop(\u0027uuid\u0027, None)"},{"line_number":77,"context_line":"        if updates:"},{"line_number":78,"context_line":"            db_secgroup \u003d db.security_group_update(self._context, self.id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_eb567105","line":75,"range":{"start_line":75,"start_character":10,"end_line":75,"end_character":21},"in_reply_to":"7a77a97e_b0178853","updated":"2016-11-14 21:15:36.000000000","message":"Done","commit_id":"feedd4c3bfccf03527403e3e9e8259c68a5fc5fa"}]}
