)]}'
{"ironic/objects/volume_target.py":[{"author":{"_account_id":9066,"name":"Satoru Moriya","email":"satoru.moriya.br@hitachi.com","username":"satoru-moriya-br"},"change_message_id":"cc396099bf3073eabfb3383d62fe4081559936a4","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        \u0027node_id\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":37,"context_line":"        \u0027driver_volume_type\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":38,"context_line":"        \u0027target_properties\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":39,"context_line":"        \u0027boot_index\u0027: object_fields.IntegerField(),"},{"line_number":40,"context_line":"        \u0027extra\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":41,"context_line":"    }"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da0c15f0_1de8d8b3","line":39,"range":{"start_line":39,"start_character":48,"end_line":39,"end_character":51},"updated":"2016-03-31 04:31:43.000000000","message":"missing nullable\u003dTrue.","commit_id":"cdd62d8138f10b5fc2cc4b4d4b53567b6fb872b6"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"51dfc8555019a7a4a53ddb4f270d044d76605e38","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        \u0027node_id\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":37,"context_line":"        \u0027driver_volume_type\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":38,"context_line":"        \u0027target_properties\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":39,"context_line":"        \u0027boot_index\u0027: object_fields.IntegerField(),"},{"line_number":40,"context_line":"        \u0027extra\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":41,"context_line":"    }"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_e96af57f","line":39,"range":{"start_line":39,"start_character":48,"end_line":39,"end_character":51},"in_reply_to":"da0c15f0_1de8d8b3","updated":"2016-06-14 17:21:29.000000000","message":"Done","commit_id":"cdd62d8138f10b5fc2cc4b4d4b53567b6fb872b6"},{"author":{"_account_id":7080,"name":"Mathieu Mitchell","email":"mat128@gmail.com","username":"mat128"},"change_message_id":"c5e3aa2acdf1a65afc0df8ec5c6a20283dbfa057","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    # NOTE(xek): We don\u0027t want to enable RPC on this call just yet. Remotable"},{"line_number":50,"context_line":"    # methods can be used in the future to replace current explicit RPC calls."},{"line_number":51,"context_line":"    # Implications of calling new remote procedures should be thought through."},{"line_number":52,"context_line":"    # @object_base.remotable_classmethod"},{"line_number":53,"context_line":"    @classmethod"},{"line_number":54,"context_line":"    def get(cls, context, target_id):"},{"line_number":55,"context_line":"        \"\"\"Find a volume target based on its id or uuid."}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_501a0d7e","line":52,"updated":"2016-04-06 12:00:15.000000000","message":"Are we suggesting this call is the first one that won\u0027t be an explicit RPC call? Will this be done within this feature?","commit_id":"f1e55764c03b253f1e9ded0a41e837459ac44696"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"e88aa1ee285504649ab79662abf1c47972d7fd87","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \u0027id\u0027: object_fields.IntegerField(),"},{"line_number":35,"context_line":"        \u0027uuid\u0027: object_fields.UUIDField(nullable\u003dTrue),"},{"line_number":36,"context_line":"        \u0027node_id\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":37,"context_line":"        \u0027driver_volume_type\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":38,"context_line":"        \u0027target_properties\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":39,"context_line":"        \u0027boot_index\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":40,"context_line":"        \u0027extra\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_e9186320","line":37,"range":{"start_line":37,"start_character":9,"end_line":37,"end_character":27},"updated":"2016-07-20 21:09:41.000000000","message":"s/driver_//","commit_id":"2d6364b2241becd5711e88f9cd5d149b6666527e"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"f1d6c65faae7cfc1f67cdf93b5054756d7e455bb","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \u0027id\u0027: object_fields.IntegerField(),"},{"line_number":35,"context_line":"        \u0027uuid\u0027: object_fields.UUIDField(nullable\u003dTrue),"},{"line_number":36,"context_line":"        \u0027node_id\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":37,"context_line":"        \u0027driver_volume_type\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":38,"context_line":"        \u0027target_properties\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":39,"context_line":"        \u0027boot_index\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":40,"context_line":"        \u0027extra\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_e90183b0","line":37,"range":{"start_line":37,"start_character":9,"end_line":37,"end_character":27},"updated":"2016-07-20 21:07:42.000000000","message":"should be \"volume_type\" according to spec","commit_id":"2d6364b2241becd5711e88f9cd5d149b6666527e"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"0fa301824072e58811b46e27ccff9865526d6c17","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \u0027id\u0027: object_fields.IntegerField(),"},{"line_number":35,"context_line":"        \u0027uuid\u0027: object_fields.UUIDField(nullable\u003dTrue),"},{"line_number":36,"context_line":"        \u0027node_id\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":37,"context_line":"        \u0027driver_volume_type\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":38,"context_line":"        \u0027target_properties\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":39,"context_line":"        \u0027boot_index\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":40,"context_line":"        \u0027extra\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_eec3d236","line":37,"range":{"start_line":37,"start_character":9,"end_line":37,"end_character":27},"in_reply_to":"dada55a8_e9186320","updated":"2016-07-22 19:14:23.000000000","message":"Done","commit_id":"2d6364b2241becd5711e88f9cd5d149b6666527e"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"e88aa1ee285504649ab79662abf1c47972d7fd87","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        \u0027uuid\u0027: object_fields.UUIDField(nullable\u003dTrue),"},{"line_number":36,"context_line":"        \u0027node_id\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":37,"context_line":"        \u0027driver_volume_type\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":38,"context_line":"        \u0027target_properties\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":39,"context_line":"        \u0027boot_index\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":40,"context_line":"        \u0027extra\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":41,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_e99d0367","line":38,"updated":"2016-07-20 21:09:41.000000000","message":"s/target_//","commit_id":"2d6364b2241becd5711e88f9cd5d149b6666527e"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"f1d6c65faae7cfc1f67cdf93b5054756d7e455bb","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        \u0027uuid\u0027: object_fields.UUIDField(nullable\u003dTrue),"},{"line_number":36,"context_line":"        \u0027node_id\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":37,"context_line":"        \u0027driver_volume_type\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":38,"context_line":"        \u0027target_properties\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":39,"context_line":"        \u0027boot_index\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":40,"context_line":"        \u0027extra\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":41,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_292efb42","line":38,"range":{"start_line":38,"start_character":9,"end_line":38,"end_character":26},"updated":"2016-07-20 21:07:42.000000000","message":"should be \"properties\" according to spec","commit_id":"2d6364b2241becd5711e88f9cd5d149b6666527e"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"0fa301824072e58811b46e27ccff9865526d6c17","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        \u0027uuid\u0027: object_fields.UUIDField(nullable\u003dTrue),"},{"line_number":36,"context_line":"        \u0027node_id\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":37,"context_line":"        \u0027driver_volume_type\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":38,"context_line":"        \u0027target_properties\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":39,"context_line":"        \u0027boot_index\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":40,"context_line":"        \u0027extra\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":41,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_2edcca17","line":38,"in_reply_to":"dada55a8_e99d0367","updated":"2016-07-22 19:14:23.000000000","message":"Done","commit_id":"2d6364b2241becd5711e88f9cd5d149b6666527e"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"e88aa1ee285504649ab79662abf1c47972d7fd87","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        \u0027driver_volume_type\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":38,"context_line":"        \u0027target_properties\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":39,"context_line":"        \u0027boot_index\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":40,"context_line":"        \u0027extra\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":41,"context_line":"    }"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_49aecf98","line":40,"updated":"2016-07-20 21:09:41.000000000","message":"volume_id is missing","commit_id":"2d6364b2241becd5711e88f9cd5d149b6666527e"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"0fa301824072e58811b46e27ccff9865526d6c17","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        \u0027driver_volume_type\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":38,"context_line":"        \u0027target_properties\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":39,"context_line":"        \u0027boot_index\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":40,"context_line":"        \u0027extra\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":41,"context_line":"    }"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_0ee106d1","line":40,"in_reply_to":"dada55a8_49aecf98","updated":"2016-07-22 19:14:23.000000000","message":"Done","commit_id":"2d6364b2241becd5711e88f9cd5d149b6666527e"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"f1d6c65faae7cfc1f67cdf93b5054756d7e455bb","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        \u0027target_properties\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":39,"context_line":"        \u0027boot_index\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":40,"context_line":"        \u0027extra\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":41,"context_line":"    }"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    @staticmethod"},{"line_number":44,"context_line":"    def _from_db_object_list(db_objects, cls, context):"}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_891f2707","line":41,"range":{"start_line":41,"start_character":4,"end_line":41,"end_character":5},"updated":"2016-07-20 21:07:42.000000000","message":"missing \u0027volume_id\u0027 field from spec","commit_id":"2d6364b2241becd5711e88f9cd5d149b6666527e"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"0fa301824072e58811b46e27ccff9865526d6c17","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        \u0027target_properties\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":39,"context_line":"        \u0027boot_index\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":40,"context_line":"        \u0027extra\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":41,"context_line":"    }"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    @staticmethod"},{"line_number":44,"context_line":"    def _from_db_object_list(db_objects, cls, context):"}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_6ee6c2e9","line":41,"range":{"start_line":41,"start_character":4,"end_line":41,"end_character":5},"in_reply_to":"dada55a8_891f2707","updated":"2016-07-22 19:14:23.000000000","message":"Done","commit_id":"2d6364b2241becd5711e88f9cd5d149b6666527e"},{"author":{"_account_id":20522,"name":"Aline Bousquet","email":"albousque@gmail.com","username":"alineb"},"change_message_id":"eb6298713f0e126b5e3e97368f7d447a95d7c365","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        :param context: Security context"},{"line_number":59,"context_line":"        :param target_id: the id *or* uuid of a volume target."},{"line_number":60,"context_line":"        :returns: a :class:`VolumeTarget` object."},{"line_number":61,"context_line":"        \"\"\""},{"line_number":62,"context_line":"        if strutils.is_int_like(target_id):"},{"line_number":63,"context_line":"            return cls.get_by_id(context, target_id)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a89bdaa_66bcff6c","line":60,"updated":"2016-09-12 11:00:41.000000000","message":"Maybe add \":raises: InvalidIdentity\" to the docstring?","commit_id":"6282b7c313aabf69bb402290888fe938c99cae4d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"f9745443acc1f1dd6948e0f922cb8f707b4d4578","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    }"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @staticmethod"},{"line_number":45,"context_line":"    def _from_db_object_list(db_objects, cls, context):"},{"line_number":46,"context_line":"        \"\"\"Converts a list of database entities to a list of formal objects.\"\"\""},{"line_number":47,"context_line":"        return [VolumeTarget._from_db_object(cls(context), obj)"},{"line_number":48,"context_line":"                for obj in db_objects]"}],"source_content_type":"text/x-python","patch_set":39,"id":"5a74a57a_e6810c4f","line":45,"range":{"start_line":45,"start_character":8,"end_line":45,"end_character":28},"updated":"2016-11-30 18:33:33.000000000","message":"A method almost identical to this is used in many other object modules. It might be good to put the code for all these in the base class. That can be done later though, since this patch didn\u0027t introduce the issue.","commit_id":"5f7f657fc2d6b3c59997e52c4dca2bf570a5a44b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f487f96f9f09a9c970c048c818c999ed35affb53","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    }"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @staticmethod"},{"line_number":45,"context_line":"    def _from_db_object_list(db_objects, cls, context):"},{"line_number":46,"context_line":"        \"\"\"Converts a list of database entities to a list of formal objects.\"\"\""},{"line_number":47,"context_line":"        return [VolumeTarget._from_db_object(cls(context), obj)"},{"line_number":48,"context_line":"                for obj in db_objects]"}],"source_content_type":"text/x-python","patch_set":39,"id":"5a74a57a_ec03ab74","line":45,"range":{"start_line":45,"start_character":8,"end_line":45,"end_character":28},"in_reply_to":"5a74a57a_e6810c4f","updated":"2016-11-30 18:52:49.000000000","message":"Yup, we suffer from copy/paste.","commit_id":"5f7f657fc2d6b3c59997e52c4dca2bf570a5a44b"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"f9745443acc1f1dd6948e0f922cb8f707b4d4578","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        :raises: VolumeTargetNotFound if the volume target cannot be found"},{"line_number":192,"context_line":"        \"\"\""},{"line_number":193,"context_line":"        self.dbapi.destroy_volume_target(self.uuid)"},{"line_number":194,"context_line":"        self.obj_reset_changes()"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    # NOTE(xek): We don\u0027t want to enable RPC on this call just yet. Remotable"},{"line_number":197,"context_line":"    # methods can be used in the future to replace current explicit RPC calls."}],"source_content_type":"text/x-python","patch_set":39,"id":"5a74a57a_66209c4a","line":194,"updated":"2016-11-30 18:33:33.000000000","message":"Why is this necessary? We aren\u0027t returning the object at all here.","commit_id":"5f7f657fc2d6b3c59997e52c4dca2bf570a5a44b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f487f96f9f09a9c970c048c818c999ed35affb53","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        :raises: VolumeTargetNotFound if the volume target cannot be found"},{"line_number":192,"context_line":"        \"\"\""},{"line_number":193,"context_line":"        self.dbapi.destroy_volume_target(self.uuid)"},{"line_number":194,"context_line":"        self.obj_reset_changes()"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    # NOTE(xek): We don\u0027t want to enable RPC on this call just yet. Remotable"},{"line_number":197,"context_line":"    # methods can be used in the future to replace current explicit RPC calls."}],"source_content_type":"text/x-python","patch_set":39,"id":"5a74a57a_0c1b8781","line":194,"in_reply_to":"5a74a57a_66209c4a","updated":"2016-11-30 18:52:49.000000000","message":"Even if you don\u0027t return the object, the object still exists. Besides the \u0027cuz all the other destroy methods do this\u0027 answer), I suspect it is a clean up thing. What if someone had this object, changed it but didn\u0027t save it, and destroyed it instead. They\u0027d still have the object after the destroy and I don\u0027t really know what that object means any more, but at least, after doing this, it won\u0027t seem like it was in a changed-but-not-saved state.","commit_id":"5f7f657fc2d6b3c59997e52c4dca2bf570a5a44b"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"f9745443acc1f1dd6948e0f922cb8f707b4d4578","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        :raises: VolumeTargetAlreadyExists if a volume target already exists"},{"line_number":214,"context_line":"                 with the same node ID and boot index values"},{"line_number":215,"context_line":"        :raises: VolumeTargetNotFound if the volume target cannot be found"},{"line_number":216,"context_line":"        \"\"\""},{"line_number":217,"context_line":"        updates \u003d self.obj_get_changes()"},{"line_number":218,"context_line":"        updated_target \u003d self.dbapi.update_volume_target(self.uuid, updates)"},{"line_number":219,"context_line":"        self._from_db_object(self, updated_target)"}],"source_content_type":"text/x-python","patch_set":39,"id":"5a74a57a_06a448b7","line":216,"updated":"2016-11-30 18:33:33.000000000","message":"Can this also raise some other exception? For example, VolumeTargetBootIndexAlreadyExists is raised when you try to duplicate the boot index for 2 volume targets on the same node.","commit_id":"5f7f657fc2d6b3c59997e52c4dca2bf570a5a44b"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4826203c4b5d36267282ec42b8c4f3fac9305a90","unresolved":false,"context_lines":[{"line_number":210,"context_line":"                        A context should be set when instantiating the"},{"line_number":211,"context_line":"                        object, e.g.: VolumeTarget(context)."},{"line_number":212,"context_line":"        :raises: InvalidParameterValue if the UUID is being changed"},{"line_number":213,"context_line":"        :raises: VolumeTargetBootIndexAlreadyExists if a volume target already"},{"line_number":214,"context_line":"                 exists with the same node ID and boot index values"},{"line_number":215,"context_line":"        :raises: VolumeTargetNotFound if the volume target cannot be found"},{"line_number":216,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":41,"id":"5a74a57a_6c96bb95","line":213,"updated":"2016-11-30 18:36:38.000000000","message":"Please disregard patch set 39 comment here, I didn\u0027t see this.","commit_id":"fd9fa86d94963631d899f38b4262ffe39c91b6ba"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"390ecaaa4cedeecc59465411f8109330458effea","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    }"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @staticmethod"},{"line_number":45,"context_line":"    def _from_db_object_list(db_objects, cls, context):"},{"line_number":46,"context_line":"        \"\"\"Converts a list of database entities to a list of formal objects.\"\"\""},{"line_number":47,"context_line":"        return [VolumeTarget._from_db_object(cls(context), obj)"},{"line_number":48,"context_line":"                for obj in db_objects]"}],"source_content_type":"text/x-python","patch_set":42,"id":"3a71b18c_35e263d6","line":45,"updated":"2016-12-01 20:33:14.000000000","message":"This appears to be copied in from https://github.com/openstack/ironic/blob/master/ironic/objects/portgroup.py#L48\n\nI would have the same comment there if I reviewed it now. A couple things here.\n\n1. Convention is that cls is the first argument in staticmethods.\n\n2. I also don\u0027t see any reason not to make this a classmethod instead.\n\n3. Last, can we just factor this into BaseObject? VolumeTarget can be replaced with cls, which makes it usable for any subclass of BaseObject.","commit_id":"d3cdb864eff81ed8e68a3d40478164b72bb43611"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e6814ef92be5dbc1d1e5122dfee10f4f106af055","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    }"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @staticmethod"},{"line_number":45,"context_line":"    def _from_db_object_list(db_objects, cls, context):"},{"line_number":46,"context_line":"        \"\"\"Converts a list of database entities to a list of formal objects.\"\"\""},{"line_number":47,"context_line":"        return [VolumeTarget._from_db_object(cls(context), obj)"},{"line_number":48,"context_line":"                for obj in db_objects]"}],"source_content_type":"text/x-python","patch_set":42,"id":"3a71b18c_ae3aa4cb","line":45,"in_reply_to":"3a71b18c_35e263d6","updated":"2016-12-01 22:28:16.000000000","message":"++. Someone (maybe it was Mario) commented on this. Will do a separate patch to clean up the other ones. I suspect it was in port.py first :-(","commit_id":"d3cdb864eff81ed8e68a3d40478164b72bb43611"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"390ecaaa4cedeecc59465411f8109330458effea","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        :raises: InvalidParameterValue if sort_key does not exist"},{"line_number":147,"context_line":"        \"\"\""},{"line_number":148,"context_line":"        db_targets \u003d \\"},{"line_number":149,"context_line":"            cls.dbapi.get_volume_targets_by_node_id(node_id,"},{"line_number":150,"context_line":"                                                    limit\u003dlimit,"},{"line_number":151,"context_line":"                                                    marker\u003dmarker,"},{"line_number":152,"context_line":"                                                    sort_key\u003dsort_key,"}],"source_content_type":"text/x-python","patch_set":42,"id":"3a71b18c_75a4db56","line":149,"updated":"2016-12-01 20:33:14.000000000","message":"Style nit:\n\n    db_targets \u003d cls.dbapi.get_volume_targets_by_node_id(\n        node_id, ...)","commit_id":"d3cdb864eff81ed8e68a3d40478164b72bb43611"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e6814ef92be5dbc1d1e5122dfee10f4f106af055","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        :raises: InvalidParameterValue if sort_key does not exist"},{"line_number":147,"context_line":"        \"\"\""},{"line_number":148,"context_line":"        db_targets \u003d \\"},{"line_number":149,"context_line":"            cls.dbapi.get_volume_targets_by_node_id(node_id,"},{"line_number":150,"context_line":"                                                    limit\u003dlimit,"},{"line_number":151,"context_line":"                                                    marker\u003dmarker,"},{"line_number":152,"context_line":"                                                    sort_key\u003dsort_key,"}],"source_content_type":"text/x-python","patch_set":42,"id":"3a71b18c_643b4bec","line":149,"in_reply_to":"3a71b18c_75a4db56","updated":"2016-12-01 22:28:16.000000000","message":"Done","commit_id":"d3cdb864eff81ed8e68a3d40478164b72bb43611"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"390ecaaa4cedeecc59465411f8109330458effea","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                        object, e.g.: VolumeTarget(context)."},{"line_number":238,"context_line":"        :raises: VolumeTargetNotFound if the volume target cannot be found"},{"line_number":239,"context_line":"        \"\"\""},{"line_number":240,"context_line":"        current \u003d self.__class__.get_by_uuid(self._context, uuid\u003dself.uuid)"},{"line_number":241,"context_line":"        self.obj_refresh(current)"}],"source_content_type":"text/x-python","patch_set":42,"id":"3a71b18c_3536e303","line":240,"updated":"2016-12-01 20:33:14.000000000","message":"This can just be self.get_by_uuid(...)","commit_id":"d3cdb864eff81ed8e68a3d40478164b72bb43611"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e6814ef92be5dbc1d1e5122dfee10f4f106af055","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                        object, e.g.: VolumeTarget(context)."},{"line_number":238,"context_line":"        :raises: VolumeTargetNotFound if the volume target cannot be found"},{"line_number":239,"context_line":"        \"\"\""},{"line_number":240,"context_line":"        current \u003d self.__class__.get_by_uuid(self._context, uuid\u003dself.uuid)"},{"line_number":241,"context_line":"        self.obj_refresh(current)"}],"source_content_type":"text/x-python","patch_set":42,"id":"3a71b18c_ae6d4434","line":240,"in_reply_to":"3a71b18c_3536e303","updated":"2016-12-01 22:28:16.000000000","message":"Yes, it can be. But our code uses this .__class__.get_by_uuid() style. I suspect it might have to do with wanting it to be explicit that it is a class method, not an instance method, but I don\u0027t know. fwiw, I took a quick look in nova, and see a similar pattern there too.\n\nI think if we want to change it, we should do it throughout, but I\u0027m not convinced we should change it.","commit_id":"d3cdb864eff81ed8e68a3d40478164b72bb43611"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e9b96b7c350971d2acb3c5f9e5e011faa5914949","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        :raises: VolumeTargetNotFound if no volume target with this ID exists"},{"line_number":79,"context_line":"        \"\"\""},{"line_number":80,"context_line":"        db_target \u003d cls.dbapi.get_volume_target_by_id(db_id)"},{"line_number":81,"context_line":"        target \u003d VolumeTarget._from_db_object(cls(context), db_target)"},{"line_number":82,"context_line":"        return target"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    # NOTE(xek): We don\u0027t want to enable RPC on this call just yet. Remotable"}],"source_content_type":"text/x-python","patch_set":43,"id":"3a71b18c_08afe594","line":81,"range":{"start_line":81,"start_character":17,"end_line":81,"end_character":29},"updated":"2016-12-02 14:21:49.000000000","message":"why not use cls here (and in other places)?","commit_id":"f766bbab451cd8a0b37b1085ee4d95bcda95a8b8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"75d734e1d33053dbde492d1c8a1381de51e83bba","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        :raises: VolumeTargetNotFound if no volume target with this ID exists"},{"line_number":79,"context_line":"        \"\"\""},{"line_number":80,"context_line":"        db_target \u003d cls.dbapi.get_volume_target_by_id(db_id)"},{"line_number":81,"context_line":"        target \u003d VolumeTarget._from_db_object(cls(context), db_target)"},{"line_number":82,"context_line":"        return target"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    # NOTE(xek): We don\u0027t want to enable RPC on this call just yet. Remotable"}],"source_content_type":"text/x-python","patch_set":43,"id":"3a71b18c_ad24c30c","line":81,"range":{"start_line":81,"start_character":17,"end_line":81,"end_character":29},"in_reply_to":"3a71b18c_08afe594","updated":"2016-12-06 15:48:53.000000000","message":"cls would work. It is like this because most/all of the other objects use the same pattern.","commit_id":"f766bbab451cd8a0b37b1085ee4d95bcda95a8b8"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e9b96b7c350971d2acb3c5f9e5e011faa5914949","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                        object, e.g.: VolumeTarget(context)."},{"line_number":232,"context_line":"        :raises: VolumeTargetNotFound if the volume target cannot be found"},{"line_number":233,"context_line":"        \"\"\""},{"line_number":234,"context_line":"        current \u003d self.__class__.get_by_uuid(self._context, uuid\u003dself.uuid)"},{"line_number":235,"context_line":"        self.obj_refresh(current)"}],"source_content_type":"text/x-python","patch_set":43,"id":"3a71b18c_68c93978","line":234,"range":{"start_line":234,"start_character":23,"end_line":234,"end_character":33},"updated":"2016-12-02 14:21:49.000000000","message":"class not needed","commit_id":"f766bbab451cd8a0b37b1085ee4d95bcda95a8b8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"75d734e1d33053dbde492d1c8a1381de51e83bba","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                        object, e.g.: VolumeTarget(context)."},{"line_number":232,"context_line":"        :raises: VolumeTargetNotFound if the volume target cannot be found"},{"line_number":233,"context_line":"        \"\"\""},{"line_number":234,"context_line":"        current \u003d self.__class__.get_by_uuid(self._context, uuid\u003dself.uuid)"},{"line_number":235,"context_line":"        self.obj_refresh(current)"}],"source_content_type":"text/x-python","patch_set":43,"id":"3a71b18c_4d824fc9","line":234,"range":{"start_line":234,"start_character":23,"end_line":234,"end_character":33},"in_reply_to":"3a71b18c_68c93978","updated":"2016-12-06 15:48:53.000000000","message":"Yeah, Jim said the same thing. It is like this cuz it follows the same pattern as most/all of the other objects.","commit_id":"f766bbab451cd8a0b37b1085ee4d95bcda95a8b8"}],"ironic/tests/unit/objects/test_volume_target.py":[{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"f1d6c65faae7cfc1f67cdf93b5054756d7e455bb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"dada55a8_e9c6a366","line":110,"updated":"2016-07-20 21:07:42.000000000","message":"test create, destroy and list_by_node_id?","commit_id":"2d6364b2241becd5711e88f9cd5d149b6666527e"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"0fa301824072e58811b46e27ccff9865526d6c17","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"dada55a8_0e08e690","line":110,"in_reply_to":"dada55a8_e9c6a366","updated":"2016-07-22 19:14:23.000000000","message":"list_by_node_id test done; create and destroy are not tested on other objects currently.","commit_id":"2d6364b2241becd5711e88f9cd5d149b6666527e"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"541ee294edb95e0339d25b9cbb029466119340d5","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                mock_update_target.return_value \u003d ("},{"line_number":69,"context_line":"                    utils.get_test_volume_target(boot_index\u003dboot_index,"},{"line_number":70,"context_line":"                                                 updated_at\u003dtest_time))"},{"line_number":71,"context_line":"                p \u003d objects.VolumeTarget.get_by_uuid(self.context, uuid)"},{"line_number":72,"context_line":"                p.boot_index \u003d boot_index"},{"line_number":73,"context_line":"                p.save()"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"bacf61ea_5e5dee13","line":71,"range":{"start_line":71,"start_character":16,"end_line":71,"end_character":17},"updated":"2016-07-31 13:24:19.000000000","message":"nit: It would be better to rename \u0027p\u0027 to \u0027t\u0027 or \u0027vt\u0027. \u0027p\u0027 seems to be used for port or portgroup.","commit_id":"a0b03cc9eb8a66c2bc004d2d1cbb33d1d4eef76b"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"541ee294edb95e0339d25b9cbb029466119340d5","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        with mock.patch.object(self.dbapi, \u0027get_volume_target_by_uuid\u0027,"},{"line_number":90,"context_line":"                               side_effect\u003dreturns,"},{"line_number":91,"context_line":"                               autospec\u003dTrue) as mock_get_volume_target:"},{"line_number":92,"context_line":"            p \u003d objects.VolumeTarget.get_by_uuid(self.context, uuid)"},{"line_number":93,"context_line":"            self.assertEqual(old_boot_index, p.boot_index)"},{"line_number":94,"context_line":"            p.refresh()"},{"line_number":95,"context_line":"            self.assertEqual(100, p.boot_index)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bacf61ea_be386aa1","line":92,"range":{"start_line":92,"start_character":12,"end_line":92,"end_character":13},"updated":"2016-07-31 13:24:19.000000000","message":"ditto","commit_id":"a0b03cc9eb8a66c2bc004d2d1cbb33d1d4eef76b"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"f9745443acc1f1dd6948e0f922cb8f707b4d4578","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Hitachi, Ltd."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":39,"id":"5a74a57a_0c02a709","line":1,"updated":"2016-11-30 18:33:33.000000000","message":"Can you also test more exceptional cases, such as when you try to update a volume target with a boot index that already exists?","commit_id":"5f7f657fc2d6b3c59997e52c4dca2bf570a5a44b"}]}
