)]}'
{"nova/objects/fixed_ip.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2c567445caf781d100fad30254bf53cd5f717813","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        \u0027leased\u0027: fields.BooleanField(),"},{"line_number":38,"context_line":"        \u0027reserved\u0027: fields.BooleanField(),"},{"line_number":39,"context_line":"        \u0027host\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":40,"context_line":"        \u0027instance\u0027: fields.ObjectField(\u0027Instance\u0027, nullable\u003dTrue),"},{"line_number":41,"context_line":"        \u0027network\u0027: fields.ObjectField(\u0027Network\u0027, nullable\u003dTrue),"},{"line_number":42,"context_line":"        }"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FKtg%3D","line":40,"updated":"2014-01-16 19:44:26.000000000","message":"why do we need the instance if we have the instance_uuid? or vice versa?","commit_id":"b44fecf9c3ecb4d3a49ec0454a1efce0883ce7b9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5fbdebefcc5c835c832489e95115ceb934bd0a74","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        \u0027leased\u0027: fields.BooleanField(),"},{"line_number":38,"context_line":"        \u0027reserved\u0027: fields.BooleanField(),"},{"line_number":39,"context_line":"        \u0027host\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":40,"context_line":"        \u0027instance\u0027: fields.ObjectField(\u0027Instance\u0027, nullable\u003dTrue),"},{"line_number":41,"context_line":"        \u0027network\u0027: fields.ObjectField(\u0027Network\u0027, nullable\u003dTrue),"},{"line_number":42,"context_line":"        }"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FKsc%3D","line":40,"in_reply_to":"AAAAUH%2F%2FKtg%3D","updated":"2014-01-16 19:47:50.000000000","message":"The way the network code works, instance_uuid may point to a deleted instance, so that the .instance property will be None (see the relationship in the model). The code can usually use the .instance property, but occasionally does a read_deleted\u003dyes lookup for .instance_uuid. See the comment I added on that call site in a later patch.","commit_id":"b44fecf9c3ecb4d3a49ec0454a1efce0883ce7b9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1b0df3ea5315c4a31e0d956f8307ed54a772f39d","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    @obj_base.remotable"},{"line_number":142,"context_line":"    def disassociate(self, context):"},{"line_number":143,"context_line":"        db.fixed_ip_disassociate(context, str(self.address))"},{"line_number":144,"context_line":"        self.instance_uuid \u003d None"},{"line_number":145,"context_line":"        self.obj_reset_changes([\u0027instance\u0027])"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FAto%3D","line":144,"updated":"2014-01-19 07:43:58.000000000","message":"should the instance also be set as None?","commit_id":"a288e2d480f0384e9e7669707143f3eb39ed3f9b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fa36636b7a1772acaa74c2a4ac7ee895ccab060e","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    @obj_base.remotable"},{"line_number":142,"context_line":"    def disassociate(self, context):"},{"line_number":143,"context_line":"        db.fixed_ip_disassociate(context, str(self.address))"},{"line_number":144,"context_line":"        self.instance_uuid \u003d None"},{"line_number":145,"context_line":"        self.obj_reset_changes([\u0027instance\u0027])"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2B8UU%3D","line":144,"in_reply_to":"AAAAUH%2F%2B%2Fzw%3D","updated":"2014-01-20 15:12:45.000000000","message":"Yep, fixed, thanks.","commit_id":"a288e2d480f0384e9e7669707143f3eb39ed3f9b"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"1f450e7e7f879daf42b4338bc6c98f0d622e6b02","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    @obj_base.remotable"},{"line_number":142,"context_line":"    def disassociate(self, context):"},{"line_number":143,"context_line":"        db.fixed_ip_disassociate(context, str(self.address))"},{"line_number":144,"context_line":"        self.instance_uuid \u003d None"},{"line_number":145,"context_line":"        self.obj_reset_changes([\u0027instance\u0027])"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2B%2Fzw%3D","line":144,"in_reply_to":"AAAAUH%2F%2FAto%3D","updated":"2014-01-19 19:04:08.000000000","message":"ya, i think so too.","commit_id":"a288e2d480f0384e9e7669707143f3eb39ed3f9b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"96b6760410208ea8553fe9bbae7c3958e3c472a9","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from nova.openstack.common import timeutils"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"OPTIONAL_ATTRS \u003d [\u0027instance\u0027, \u0027network\u0027]"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class FixedIP(obj_base.NovaPersistentObject, obj_base.NovaObject):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9%2BAQ%3D","line":24,"updated":"2014-01-31 15:39:04.000000000","message":"Why not use the same naming convention here that we\u0027ve been using for instance and others like:\n\n FIXED_IP_OPTIONAL_ATTRS\n\njust to be consistent, since they do serve the same purpose.","commit_id":"21c3d5b5e8e395c3b8df8e2a0394181e002e346a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fb1fbf4eb673cd86468933b9a1b7f442e4938b45","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from nova.openstack.common import timeutils"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"OPTIONAL_ATTRS \u003d [\u0027instance\u0027, \u0027network\u0027]"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class FixedIP(obj_base.NovaPersistentObject, obj_base.NovaObject):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F99iQ%3D","line":24,"in_reply_to":"AAAAUH%2F9%2BAQ%3D","updated":"2014-01-31 16:31:48.000000000","message":"Sure...","commit_id":"21c3d5b5e8e395c3b8df8e2a0394181e002e346a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"96b6760410208ea8553fe9bbae7c3958e3c472a9","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        \u0027instance_uuid\u0027: fields.UUIDField(nullable\u003dTrue),"},{"line_number":37,"context_line":"        \u0027allocated\u0027: fields.BooleanField(),"},{"line_number":38,"context_line":"        \u0027leased\u0027: fields.BooleanField(),"},{"line_number":39,"context_line":"        \u0027reserved\u0027: fields.BooleanField(),"},{"line_number":40,"context_line":"        \u0027host\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":41,"context_line":"        \u0027instance\u0027: fields.ObjectField(\u0027Instance\u0027, nullable\u003dTrue),"},{"line_number":42,"context_line":"        \u0027network\u0027: fields.ObjectField(\u0027Network\u0027, nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9%2BBM%3D","line":39,"updated":"2014-01-31 15:39:04.000000000","message":"Why not copy the defaults from the db models here? Just for clarity...","commit_id":"21c3d5b5e8e395c3b8df8e2a0394181e002e346a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fb1fbf4eb673cd86468933b9a1b7f442e4938b45","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        \u0027instance_uuid\u0027: fields.UUIDField(nullable\u003dTrue),"},{"line_number":37,"context_line":"        \u0027allocated\u0027: fields.BooleanField(),"},{"line_number":38,"context_line":"        \u0027leased\u0027: fields.BooleanField(),"},{"line_number":39,"context_line":"        \u0027reserved\u0027: fields.BooleanField(),"},{"line_number":40,"context_line":"        \u0027host\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":41,"context_line":"        \u0027instance\u0027: fields.ObjectField(\u0027Instance\u0027, nullable\u003dTrue),"},{"line_number":42,"context_line":"        \u0027network\u0027: fields.ObjectField(\u0027Network\u0027, nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F99pM%3D","line":39,"in_reply_to":"AAAAUH%2F9%2BBM%3D","updated":"2014-01-31 16:31:48.000000000","message":"I can, but in general, I don\u0027t think we should necessarily try to make this mirror the DB model when it doesn\u0027t make sense. We\u0027ve got a lot of (planned, calculated) differences already, and as soon as we have another DB driver underneath us, it\u0027s going to be be quite different.","commit_id":"21c3d5b5e8e395c3b8df8e2a0394181e002e346a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"96b6760410208ea8553fe9bbae7c3958e3c472a9","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                fixedip[field] \u003d db_fixedip[field]"},{"line_number":52,"context_line":"        # NOTE(danms): Instance could be deleted, and thus None"},{"line_number":53,"context_line":"        if \u0027instance\u0027 in expected_attrs:"},{"line_number":54,"context_line":"            fixedip._instance \u003d instance_obj.Instance._from_db_object("},{"line_number":55,"context_line":"                context,"},{"line_number":56,"context_line":"                instance_obj.Instance(),"},{"line_number":57,"context_line":"                db_fixedip[\u0027instance\u0027]) if db_fixedip[\u0027instance\u0027] else None"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F99%2F8%3D","line":54,"updated":"2014-01-31 15:39:04.000000000","message":"What\u0027s with the underscore here? I don\u0027t think it\u0027s good to use the mangled name... just access it through the setter set by the metaclass. This is just confusing.","commit_id":"21c3d5b5e8e395c3b8df8e2a0394181e002e346a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fb1fbf4eb673cd86468933b9a1b7f442e4938b45","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                fixedip[field] \u003d db_fixedip[field]"},{"line_number":52,"context_line":"        # NOTE(danms): Instance could be deleted, and thus None"},{"line_number":53,"context_line":"        if \u0027instance\u0027 in expected_attrs:"},{"line_number":54,"context_line":"            fixedip._instance \u003d instance_obj.Instance._from_db_object("},{"line_number":55,"context_line":"                context,"},{"line_number":56,"context_line":"                instance_obj.Instance(),"},{"line_number":57,"context_line":"                db_fixedip[\u0027instance\u0027]) if db_fixedip[\u0027instance\u0027] else None"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F99iM%3D","line":54,"in_reply_to":"AAAAUH%2F99%2F8%3D","updated":"2014-01-31 16:31:48.000000000","message":"I have no idea. I\u0027ll look into it, but I can\u0027t think of why I would have done this at the moment.","commit_id":"21c3d5b5e8e395c3b8df8e2a0394181e002e346a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"96b6760410208ea8553fe9bbae7c3958e3c472a9","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                instance_obj.Instance(),"},{"line_number":57,"context_line":"                db_fixedip[\u0027instance\u0027]) if db_fixedip[\u0027instance\u0027] else None"},{"line_number":58,"context_line":"        if \u0027network\u0027 in expected_attrs:"},{"line_number":59,"context_line":"            fixedip._network \u003d network_obj.Network._from_db_object("},{"line_number":60,"context_line":"                context, network_obj.Network(), db_fixedip[\u0027network\u0027])"},{"line_number":61,"context_line":"        fixedip._context \u003d context"},{"line_number":62,"context_line":"        fixedip.obj_reset_changes()"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F99%2FE%3D","line":59,"updated":"2014-01-31 15:39:04.000000000","message":"Same here.","commit_id":"21c3d5b5e8e395c3b8df8e2a0394181e002e346a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"96b6760410208ea8553fe9bbae7c3958e3c472a9","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        return cls._from_db_object(context, cls(), db_fixedip)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @obj_base.remotable_classmethod"},{"line_number":92,"context_line":"    def associate(cls, context, address, instance_uuid, network_id\u003dNone,"},{"line_number":93,"context_line":"                  reserved\u003dFalse):"},{"line_number":94,"context_line":"        db_fixedip \u003d db.fixed_ip_associate(context, address, instance_uuid,"},{"line_number":95,"context_line":"                                           network_id\u003dnetwork_id,"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F998Q%3D","line":92,"updated":"2014-01-31 15:39:04.000000000","message":"IMHO this should be instance (normal) method, not classmethods. We can just use self.address, no?","commit_id":"21c3d5b5e8e395c3b8df8e2a0394181e002e346a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fb1fbf4eb673cd86468933b9a1b7f442e4938b45","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        return cls._from_db_object(context, cls(), db_fixedip)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @obj_base.remotable_classmethod"},{"line_number":92,"context_line":"    def associate(cls, context, address, instance_uuid, network_id\u003dNone,"},{"line_number":93,"context_line":"                  reserved\u003dFalse):"},{"line_number":94,"context_line":"        db_fixedip \u003d db.fixed_ip_associate(context, address, instance_uuid,"},{"line_number":95,"context_line":"                                           network_id\u003dnetwork_id,"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F99hw%3D","line":92,"in_reply_to":"AAAAUH%2F998Q%3D","updated":"2014-01-31 16:31:48.000000000","message":"We decided before we started the network stuff that we were going to avoid trying to optimize the paths and just get them moved to objects in the easiest way possible. Once they\u0027re there and versioned, we can easily refactor and make changes. This and the others are the way they are because of the way the underlying db operations were used before.","commit_id":"21c3d5b5e8e395c3b8df8e2a0394181e002e346a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"2c50e4030fdf195fecc9ffceb9c517944630e82a","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        return cls._from_db_object(context, cls(), db_fixedip)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @obj_base.remotable_classmethod"},{"line_number":92,"context_line":"    def associate(cls, context, address, instance_uuid, network_id\u003dNone,"},{"line_number":93,"context_line":"                  reserved\u003dFalse):"},{"line_number":94,"context_line":"        db_fixedip \u003d db.fixed_ip_associate(context, address, instance_uuid,"},{"line_number":95,"context_line":"                                           network_id\u003dnetwork_id,"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F99aI%3D","line":92,"in_reply_to":"AAAAUH%2F99hw%3D","updated":"2014-01-31 16:56:31.000000000","message":"OK fine.","commit_id":"21c3d5b5e8e395c3b8df8e2a0394181e002e346a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"96b6760410208ea8553fe9bbae7c3958e3c472a9","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        return cls._from_db_object(context, cls(), db_fixedip)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @obj_base.remotable_classmethod"},{"line_number":100,"context_line":"    def associate_pool(cls, context, network_id, instance_uuid\u003dNone,"},{"line_number":101,"context_line":"                       host\u003dNone):"},{"line_number":102,"context_line":"        db_fixedip \u003d db.fixed_ip_associate_pool(context, network_id,"},{"line_number":103,"context_line":"                                                instance_uuid\u003dinstance_uuid,"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F997w%3D","line":100,"updated":"2014-01-31 15:39:04.000000000","message":"This one is ok to be a classmethod I think...","commit_id":"21c3d5b5e8e395c3b8df8e2a0394181e002e346a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"96b6760410208ea8553fe9bbae7c3958e3c472a9","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        return cls._from_db_object(context, cls(), db_fixedip)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    @obj_base.remotable_classmethod"},{"line_number":108,"context_line":"    def disassociate_by_address(cls, context, address):"},{"line_number":109,"context_line":"        db.fixed_ip_disassociate(context, address)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    @obj_base.remotable_classmethod"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F992g%3D","line":108,"updated":"2014-01-31 15:39:04.000000000","message":"I don\u0027t see why we need this one at all - we have the instance method that get\u0027s us the same thing","commit_id":"21c3d5b5e8e395c3b8df8e2a0394181e002e346a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"96b6760410208ea8553fe9bbae7c3958e3c472a9","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        db.fixed_ip_disassociate(context, address)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    @obj_base.remotable_classmethod"},{"line_number":112,"context_line":"    def _disassociate_all_by_timeout(cls, context, host, time_str):"},{"line_number":113,"context_line":"        time \u003d timeutils.parse_isotime(time_str)"},{"line_number":114,"context_line":"        return db.fixed_ip_disassociate_all_by_timeout(context, host, time)"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F993c%3D","line":112,"updated":"2014-01-31 15:39:04.000000000","message":"Um OK I guess, not sure what\u0027s the deal with this tho... will see how it\u0027s used.","commit_id":"21c3d5b5e8e395c3b8df8e2a0394181e002e346a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fb1fbf4eb673cd86468933b9a1b7f442e4938b45","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        db.fixed_ip_disassociate(context, address)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    @obj_base.remotable_classmethod"},{"line_number":112,"context_line":"    def _disassociate_all_by_timeout(cls, context, host, time_str):"},{"line_number":113,"context_line":"        time \u003d timeutils.parse_isotime(time_str)"},{"line_number":114,"context_line":"        return db.fixed_ip_disassociate_all_by_timeout(context, host, time)"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F99hY%3D","line":112,"in_reply_to":"AAAAUH%2F993c%3D","updated":"2014-01-31 16:31:48.000000000","message":"We can\u0027t pass a datetime as a method argument to a remotable method, so this bit of indirection sends it as a tz-aware UTC isotime string instead. There is prior art for doing this in other parts of the code.","commit_id":"21c3d5b5e8e395c3b8df8e2a0394181e002e346a"}]}
