)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"9367f6222b77e679d8a330f84ae1a71655e6e842","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Flavor and Service Profile to OVO"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch creates and introduces Flavor and Service Profile model"},{"line_number":10,"context_line":"classes to Oslo-Versioned Objects"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I2963fabfc857ca68e9e6fb4e89e3c3ca6807a959"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"fa6399be_76fe5b6c","line":9,"updated":"2016-10-19 23:24:02.000000000","message":"nit: introduces and integrate as I see some implementations","commit_id":"1e6fa0bd43f6a6eb78c0e9da1bf9a1ae1d50292a"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"d53a092125fef8b349b69586cf490866df78cc32","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Flavor and Service Profile to OVO"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch creates and introduces Flavor and Service Profile model"},{"line_number":10,"context_line":"classes to Oslo-Versioned Objects"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I2963fabfc857ca68e9e6fb4e89e3c3ca6807a959"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"da6895a0_d4c4d141","line":9,"in_reply_to":"fa6399be_76fe5b6c","updated":"2016-10-21 17:47:08.000000000","message":"Done","commit_id":"1e6fa0bd43f6a6eb78c0e9da1bf9a1ae1d50292a"}],"neutron/db/flavor/models.py":[{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"6237e71c3cc246f784936fa8a142a6ea0641e0e1","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron.api.v2 import attributes as attr"},{"line_number":20,"context_line":"from neutron.db import model_base"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class Flavor(model_base.BASEV2, model_base.HasId):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_dd8a391a","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":33},"updated":"2016-08-02 08:47:27.000000000","message":"Not using LOG anywhere.","commit_id":"52e280ac77e747c27179b1bd343e6b2d9be713bc"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"96511c3674d17e5af399cf14b80663048e036774","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"1ac06dbe_265ed845","updated":"2016-08-19 10:59:04.000000000","message":"You should name this file neutron/db/models/flavor.py","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"f6f83cecc9c0c6df13e33204ea8502c03f121245","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"1ac06dbe_ba829592","in_reply_to":"1ac06dbe_265ed845","updated":"2016-08-22 02:54:11.000000000","message":"Done","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"96511c3674d17e5af399cf14b80663048e036774","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron.api.v2 import attributes as attr"},{"line_number":20,"context_line":"from neutron.db import model_base"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class Flavor(model_base.BASEV2, model_base.HasId):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_2677f8d5","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":33},"updated":"2016-08-19 10:59:04.000000000","message":"It is not used.","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"f6f83cecc9c0c6df13e33204ea8502c03f121245","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron.api.v2 import attributes as attr"},{"line_number":20,"context_line":"from neutron.db import model_base"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class Flavor(model_base.BASEV2, model_base.HasId):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_e550f20c","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":33},"in_reply_to":"1ac06dbe_2677f8d5","updated":"2016-08-22 02:54:11.000000000","message":"Done","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"}],"neutron/db/flavors_db.py":[{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"96511c3674d17e5af399cf14b80663048e036774","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        \"\"\"Ensures no current bindings to flavors exist.\"\"\""},{"line_number":77,"context_line":"        objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":78,"context_line":"            service_profile_id\u003dsp_id)"},{"line_number":79,"context_line":"        if len(objs) \u003e 0:"},{"line_number":80,"context_line":"            raise ext_flavors.ServiceProfileInUse(sp_id\u003dsp_id)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _validate_driver(self, context, driver):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_c616e454","line":79,"range":{"start_line":79,"start_character":11,"end_line":79,"end_character":24},"updated":"2016-08-19 10:59:04.000000000","message":"\u0027if obj:\u0027 is just enough.","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"f6f83cecc9c0c6df13e33204ea8502c03f121245","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        \"\"\"Ensures no current bindings to flavors exist.\"\"\""},{"line_number":77,"context_line":"        objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":78,"context_line":"            service_profile_id\u003dsp_id)"},{"line_number":79,"context_line":"        if len(objs) \u003e 0:"},{"line_number":80,"context_line":"            raise ext_flavors.ServiceProfileInUse(sp_id\u003dsp_id)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _validate_driver(self, context, driver):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_456f46c5","line":79,"range":{"start_line":79,"start_character":11,"end_line":79,"end_character":24},"in_reply_to":"1ac06dbe_c616e454","updated":"2016-08-22 02:54:11.000000000","message":"Done","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"96511c3674d17e5af399cf14b80663048e036774","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def create_flavor(self, context, flavor):"},{"line_number":93,"context_line":"        fl \u003d flavor[\u0027flavor\u0027]"},{"line_number":94,"context_line":"        obj \u003d obj_flavor.Flavor(context, id\u003duuidutils.generate_uuid(),"},{"line_number":95,"context_line":"                                name\u003dfl[\u0027name\u0027],"},{"line_number":96,"context_line":"                                description\u003dfl[\u0027description\u0027],"},{"line_number":97,"context_line":"                                service_type\u003dfl[\u0027service_type\u0027],"},{"line_number":98,"context_line":"                                enabled\u003dfl[\u0027enabled\u0027])"},{"line_number":99,"context_line":"        obj.create()"},{"line_number":100,"context_line":"        return self._make_flavor_dict(obj)"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_69e70141","line":98,"range":{"start_line":94,"start_character":8,"end_line":98,"end_character":54},"updated":"2016-08-19 10:59:04.000000000","message":"if fl consist of only the name, description, service_type and enabled fields, you do not need to pass it explicitly in constructor. ID is generated in db ap [1]. You can do:\n\nobj \u003d obj_flavor.Flavor(context, **fl)\nobj.create()\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/objects/db/api.py#L57","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"f6f83cecc9c0c6df13e33204ea8502c03f121245","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def create_flavor(self, context, flavor):"},{"line_number":93,"context_line":"        fl \u003d flavor[\u0027flavor\u0027]"},{"line_number":94,"context_line":"        obj \u003d obj_flavor.Flavor(context, id\u003duuidutils.generate_uuid(),"},{"line_number":95,"context_line":"                                name\u003dfl[\u0027name\u0027],"},{"line_number":96,"context_line":"                                description\u003dfl[\u0027description\u0027],"},{"line_number":97,"context_line":"                                service_type\u003dfl[\u0027service_type\u0027],"},{"line_number":98,"context_line":"                                enabled\u003dfl[\u0027enabled\u0027])"},{"line_number":99,"context_line":"        obj.create()"},{"line_number":100,"context_line":"        return self._make_flavor_dict(obj)"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_656402e5","line":98,"range":{"start_line":94,"start_character":8,"end_line":98,"end_character":54},"in_reply_to":"1ac06dbe_69e70141","updated":"2016-08-22 02:54:11.000000000","message":"Done","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"96511c3674d17e5af399cf14b80663048e036774","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    def get_flavors(self, context, filters\u003dNone, fields\u003dNone,"},{"line_number":118,"context_line":"                    sorts\u003dNone, limit\u003dNone, marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":119,"context_line":"        # fixme(eliqao): need to find a way to passing filters and fields"},{"line_number":120,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse, marker)"},{"line_number":121,"context_line":"        return obj_flavor.Flavor.get_objects(context, _pager\u003dpager)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def create_flavor_service_profile(self, context,"},{"line_number":124,"context_line":"                                      service_profile, flavor_id):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_6949c1d0","line":121,"range":{"start_line":120,"start_character":8,"end_line":121,"end_character":67},"updated":"2016-08-19 10:59:04.000000000","message":"This function should return _make_flavor_dict, please take a look at: \nhttps://review.openstack.org/#/c/321001/17/neutron/db/db_base_plugin_common.py@276\nhttps://review.openstack.org/#/c/321001/17/neutron/db/db_base_plugin_v2.py@916","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"f6f83cecc9c0c6df13e33204ea8502c03f121245","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    def get_flavors(self, context, filters\u003dNone, fields\u003dNone,"},{"line_number":118,"context_line":"                    sorts\u003dNone, limit\u003dNone, marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":119,"context_line":"        # fixme(eliqao): need to find a way to passing filters and fields"},{"line_number":120,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse, marker)"},{"line_number":121,"context_line":"        return obj_flavor.Flavor.get_objects(context, _pager\u003dpager)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def create_flavor_service_profile(self, context,"},{"line_number":124,"context_line":"                                      service_profile, flavor_id):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_6547e21d","line":121,"range":{"start_line":120,"start_character":8,"end_line":121,"end_character":67},"in_reply_to":"1ac06dbe_6949c1d0","updated":"2016-08-22 02:54:11.000000000","message":"Done","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"96511c3674d17e5af399cf14b80663048e036774","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            if not sp[\u0027metainfo\u0027]:"},{"line_number":168,"context_line":"                raise ext_flavors.ServiceProfileEmpty()"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        obj \u003d obj_flavor.ServiceProfile(context,"},{"line_number":171,"context_line":"                                        id\u003duuidutils.generate_uuid(),"},{"line_number":172,"context_line":"                                        description\u003dsp[\u0027description\u0027],"},{"line_number":173,"context_line":"                                        driver\u003dsp[\u0027driver\u0027],"},{"line_number":174,"context_line":"                                        enabled\u003dsp[\u0027enabled\u0027],"},{"line_number":175,"context_line":"                                        metainfo\u003dsp[\u0027metainfo\u0027])"},{"line_number":176,"context_line":"        obj.create()"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        return self._make_service_profile_dict(obj)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_c916f554","line":175,"range":{"start_line":170,"start_character":8,"end_line":175,"end_character":64},"updated":"2016-08-19 10:59:04.000000000","message":"ditto line 94","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"f6f83cecc9c0c6df13e33204ea8502c03f121245","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            if not sp[\u0027metainfo\u0027]:"},{"line_number":168,"context_line":"                raise ext_flavors.ServiceProfileEmpty()"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        obj \u003d obj_flavor.ServiceProfile(context,"},{"line_number":171,"context_line":"                                        id\u003duuidutils.generate_uuid(),"},{"line_number":172,"context_line":"                                        description\u003dsp[\u0027description\u0027],"},{"line_number":173,"context_line":"                                        driver\u003dsp[\u0027driver\u0027],"},{"line_number":174,"context_line":"                                        enabled\u003dsp[\u0027enabled\u0027],"},{"line_number":175,"context_line":"                                        metainfo\u003dsp[\u0027metainfo\u0027])"},{"line_number":176,"context_line":"        obj.create()"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        return self._make_service_profile_dict(obj)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_25132a0f","line":175,"range":{"start_line":170,"start_character":8,"end_line":175,"end_character":64},"in_reply_to":"1ac06dbe_c916f554","updated":"2016-08-22 02:54:11.000000000","message":"Done","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"96511c3674d17e5af399cf14b80663048e036774","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    def get_service_profiles(self, context, filters\u003dNone, fields\u003dNone,"},{"line_number":204,"context_line":"                             sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":205,"context_line":"                             page_reverse\u003dFalse):"},{"line_number":206,"context_line":"        # fixme(eliqao): need to find a way to passing filters and fields"},{"line_number":207,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse, marker)"},{"line_number":208,"context_line":"        return obj_flavor.ServiceProfile.get_objects(context, _pager\u003dpager)"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def get_flavor_next_provider(self, context, flavor_id,"},{"line_number":211,"context_line":"                                 filters\u003dNone, fields\u003dNone,"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_8c036b0d","line":208,"range":{"start_line":206,"start_character":8,"end_line":208,"end_character":75},"updated":"2016-08-19 10:59:04.000000000","message":"ditto line 120","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"f6f83cecc9c0c6df13e33204ea8502c03f121245","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    def get_service_profiles(self, context, filters\u003dNone, fields\u003dNone,"},{"line_number":204,"context_line":"                             sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":205,"context_line":"                             page_reverse\u003dFalse):"},{"line_number":206,"context_line":"        # fixme(eliqao): need to find a way to passing filters and fields"},{"line_number":207,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse, marker)"},{"line_number":208,"context_line":"        return obj_flavor.ServiceProfile.get_objects(context, _pager\u003dpager)"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def get_flavor_next_provider(self, context, flavor_id,"},{"line_number":211,"context_line":"                                 filters\u003dNone, fields\u003dNone,"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_65f522ca","line":208,"range":{"start_line":206,"start_character":8,"end_line":208,"end_character":75},"in_reply_to":"1ac06dbe_8c036b0d","updated":"2016-08-22 02:54:11.000000000","message":"Done","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"87fe5148e81d4772f54eb8e06b0490f8fa8eb5ba","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                    sorts\u003dNone, limit\u003dNone, marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":114,"context_line":"        # fixme(eliqao): need to find a way to passing filters and fields"},{"line_number":115,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse, marker)"},{"line_number":116,"context_line":"        flavor_objs \u003d obj_flavor.Flavor.get_objects(context, _pager\u003dpager)"},{"line_number":117,"context_line":"        return [self._make_flavor_dict(flavor_object, fields)"},{"line_number":118,"context_line":"                for flavor_object in flavor_objs]"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1ac06dbe_91f1726d","line":116,"updated":"2016-08-22 06:39:57.000000000","message":"Missing filters","commit_id":"33b9a274a4dc3ab0a521d42dce7cdf2022413d36"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"237834f01a0fb6d68203c9ce7712532c513e2e13","unresolved":false,"context_lines":[{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class Flavor(model_base.BASEV2, model_base.HasId):"},{"line_number":31,"context_line":"    name \u003d sa.Column(sa.String(attr.NAME_MAX_LEN))"},{"line_number":32,"context_line":"    description \u003d sa.Column(sa.String(attr.LONG_DESCRIPTION_MAX_LEN))"},{"line_number":33,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue,"},{"line_number":34,"context_line":"                        server_default\u003dsa.sql.true())"},{"line_number":35,"context_line":"    # Make it True for multi-type flavors"},{"line_number":36,"context_line":"    service_type \u003d sa.Column(sa.String(36), nullable\u003dTrue)"},{"line_number":37,"context_line":"    service_profiles \u003d orm.relationship(\"FlavorServiceProfileBinding\","},{"line_number":38,"context_line":"        cascade\u003d\"all, delete-orphan\")"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class ServiceProfile(model_base.BASEV2, model_base.HasId):"},{"line_number":42,"context_line":"    description \u003d sa.Column(sa.String(attr.LONG_DESCRIPTION_MAX_LEN))"},{"line_number":43,"context_line":"    driver \u003d sa.Column(sa.String(1024), nullable\u003dFalse)"},{"line_number":44,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue,"},{"line_number":45,"context_line":"                        server_default\u003dsa.sql.true())"},{"line_number":46,"context_line":"    metainfo \u003d sa.Column(sa.String(4096))"},{"line_number":47,"context_line":"    flavors \u003d orm.relationship(\"FlavorServiceProfileBinding\")"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class FlavorServiceProfileBinding(model_base.BASEV2):"},{"line_number":51,"context_line":"    flavor_id \u003d sa.Column(sa.String(36),"},{"line_number":52,"context_line":"                          sa.ForeignKey(\"flavors.id\","},{"line_number":53,"context_line":"                                        ondelete\u003d\"CASCADE\"),"},{"line_number":54,"context_line":"                          nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":55,"context_line":"    flavor \u003d orm.relationship(Flavor)"},{"line_number":56,"context_line":"    service_profile_id \u003d sa.Column(sa.String(36),"},{"line_number":57,"context_line":"                                   sa.ForeignKey(\"serviceprofiles.id\","},{"line_number":58,"context_line":"                                                 ondelete\u003d\"CASCADE\"),"},{"line_number":59,"context_line":"                                   nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":60,"context_line":"    service_profile \u003d orm.relationship(ServiceProfile)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"class FlavorsDbMixin(common_db_mixin.CommonDbMixin):"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa7ab95a_32f99c4e","side":"PARENT","line":60,"range":{"start_line":30,"start_character":0,"end_line":60,"end_character":54},"updated":"2016-08-31 12:40:07.000000000","message":"Are you going to deprecate the location of these models, or is it not needed in this case?","commit_id":"14ebfb527dfa8631db0112f605927449584050ad"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"3e4fa42eb9a5f77a3ea0dbac064140f35784774c","unresolved":false,"context_lines":[{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class Flavor(model_base.BASEV2, model_base.HasId):"},{"line_number":31,"context_line":"    name \u003d sa.Column(sa.String(attr.NAME_MAX_LEN))"},{"line_number":32,"context_line":"    description \u003d sa.Column(sa.String(attr.LONG_DESCRIPTION_MAX_LEN))"},{"line_number":33,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue,"},{"line_number":34,"context_line":"                        server_default\u003dsa.sql.true())"},{"line_number":35,"context_line":"    # Make it True for multi-type flavors"},{"line_number":36,"context_line":"    service_type \u003d sa.Column(sa.String(36), nullable\u003dTrue)"},{"line_number":37,"context_line":"    service_profiles \u003d orm.relationship(\"FlavorServiceProfileBinding\","},{"line_number":38,"context_line":"        cascade\u003d\"all, delete-orphan\")"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class ServiceProfile(model_base.BASEV2, model_base.HasId):"},{"line_number":42,"context_line":"    description \u003d sa.Column(sa.String(attr.LONG_DESCRIPTION_MAX_LEN))"},{"line_number":43,"context_line":"    driver \u003d sa.Column(sa.String(1024), nullable\u003dFalse)"},{"line_number":44,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue,"},{"line_number":45,"context_line":"                        server_default\u003dsa.sql.true())"},{"line_number":46,"context_line":"    metainfo \u003d sa.Column(sa.String(4096))"},{"line_number":47,"context_line":"    flavors \u003d orm.relationship(\"FlavorServiceProfileBinding\")"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class FlavorServiceProfileBinding(model_base.BASEV2):"},{"line_number":51,"context_line":"    flavor_id \u003d sa.Column(sa.String(36),"},{"line_number":52,"context_line":"                          sa.ForeignKey(\"flavors.id\","},{"line_number":53,"context_line":"                                        ondelete\u003d\"CASCADE\"),"},{"line_number":54,"context_line":"                          nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":55,"context_line":"    flavor \u003d orm.relationship(Flavor)"},{"line_number":56,"context_line":"    service_profile_id \u003d sa.Column(sa.String(36),"},{"line_number":57,"context_line":"                                   sa.ForeignKey(\"serviceprofiles.id\","},{"line_number":58,"context_line":"                                                 ondelete\u003d\"CASCADE\"),"},{"line_number":59,"context_line":"                                   nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":60,"context_line":"    service_profile \u003d orm.relationship(ServiceProfile)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"class FlavorsDbMixin(common_db_mixin.CommonDbMixin):"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_59dca474","side":"PARENT","line":60,"range":{"start_line":30,"start_character":0,"end_line":60,"end_character":54},"in_reply_to":"fa7ab95a_32f99c4e","updated":"2016-09-19 14:58:11.000000000","message":"The idea is to relocate these models in other patch[1].\n\n[1] https://review.openstack.org/#/c/349071/","commit_id":"14ebfb527dfa8631db0112f605927449584050ad"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"76860e4c5f19b1826d795c1499727bec9bd5ffab","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def _get_flavor(self, context, flavor_id):"},{"line_number":41,"context_line":"        try:"},{"line_number":42,"context_line":"            return obj_flavor.Flavor.get_object(context, id\u003dflavor_id)"},{"line_number":43,"context_line":"        except sa_exc.NoResultFound:"},{"line_number":44,"context_line":"            raise ext_flavors.FlavorNotFound(flavor_id\u003dflavor_id)"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa6399be_7e3562f5","line":42,"range":{"start_line":42,"start_character":11,"end_line":42,"end_character":70},"updated":"2016-10-12 21:18:52.000000000","message":"i doubt this get_object makes try catch useless here ! when the get_object will give None no exception will be raised ! I guess you need to handle it explicitly","commit_id":"1c27930c158faade67a1ad868e5e0beb378b8a09"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"76860e4c5f19b1826d795c1499727bec9bd5ffab","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _get_service_profile(self, context, sp_id):"},{"line_number":47,"context_line":"        try:"},{"line_number":48,"context_line":"            return obj_flavor.ServiceProfile.get_object(context, id\u003dsp_id)"},{"line_number":49,"context_line":"        except sa_exc.NoResultFound:"},{"line_number":50,"context_line":"            raise ext_flavors.ServiceProfileNotFound(sp_id\u003dsp_id)"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa6399be_1e31c605","line":48,"range":{"start_line":48,"start_character":18,"end_line":48,"end_character":74},"updated":"2016-10-12 21:18:52.000000000","message":"same here","commit_id":"1c27930c158faade67a1ad868e5e0beb378b8a09"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"76860e4c5f19b1826d795c1499727bec9bd5ffab","unresolved":false,"context_lines":[{"line_number":67,"context_line":"               \u0027driver\u0027: sp_db[\u0027driver\u0027],"},{"line_number":68,"context_line":"               \u0027enabled\u0027: sp_db[\u0027enabled\u0027],"},{"line_number":69,"context_line":"               \u0027metainfo\u0027: sp_db[\u0027metainfo\u0027]}"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        if sp_db.flavors:"},{"line_number":72,"context_line":"            res[\u0027flavors\u0027] \u003d [fl[\u0027flavor_id\u0027]"},{"line_number":73,"context_line":"                              for fl in sp_db.flavors]"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa6399be_de0d8e3f","line":70,"updated":"2016-10-12 21:18:52.000000000","message":"any reason to add this line space ??","commit_id":"1c27930c158faade67a1ad868e5e0beb378b8a09"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"76860e4c5f19b1826d795c1499727bec9bd5ffab","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _ensure_service_profile_not_in_use(self, context, sp_id):"},{"line_number":88,"context_line":"        \"\"\"Ensures no current bindings to flavors exist.\"\"\""},{"line_number":89,"context_line":"        objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":90,"context_line":"            service_profile_id\u003dsp_id)"},{"line_number":91,"context_line":"        if objs:"},{"line_number":92,"context_line":"            raise ext_flavors.ServiceProfileInUse(sp_id\u003dsp_id)"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa6399be_79381ca1","line":90,"range":{"start_line":89,"start_character":54,"end_line":90,"end_character":37},"updated":"2016-10-12 21:18:52.000000000","message":"so primary key is not passed is that the reason using get object ? I feel get_objects is costing some time here ? any chance we could improve that by having flavor id as well ?","commit_id":"1c27930c158faade67a1ad868e5e0beb378b8a09"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"9367f6222b77e679d8a330f84ae1a71655e6e842","unresolved":false,"context_lines":[{"line_number":67,"context_line":"               \u0027driver\u0027: sp_db[\u0027driver\u0027],"},{"line_number":68,"context_line":"               \u0027enabled\u0027: sp_db[\u0027enabled\u0027],"},{"line_number":69,"context_line":"               \u0027metainfo\u0027: sp_db[\u0027metainfo\u0027]}"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        if sp_db.flavors:"},{"line_number":72,"context_line":"            res[\u0027flavors\u0027] \u003d [fl[\u0027flavor_id\u0027]"},{"line_number":73,"context_line":"                              for fl in sp_db.flavors]"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa6399be_7683bbcc","line":70,"updated":"2016-10-19 23:24:02.000000000","message":"was there any intention to add this ? or its because of rebase ?","commit_id":"1e6fa0bd43f6a6eb78c0e9da1bf9a1ae1d50292a"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"9367f6222b77e679d8a330f84ae1a71655e6e842","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        \"\"\"From flavor, choose service profile and find provider for driver.\"\"\""},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        obj \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":234,"context_line":"            flavor_id\u003dflavor_id)"},{"line_number":235,"context_line":"        if not obj:"},{"line_number":236,"context_line":"            raise ext_flavors.FlavorServiceProfileBindingNotFound("},{"line_number":237,"context_line":"                sp_id\u003d\u0027\u0027, fl_id\u003dflavor_id)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa6399be_b62553c3","line":234,"range":{"start_line":234,"start_character":11,"end_line":234,"end_character":32},"updated":"2016-10-19 23:24:02.000000000","message":"I doubt this query is not same, it won\u0027t be first,","commit_id":"1e6fa0bd43f6a6eb78c0e9da1bf9a1ae1d50292a"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"d53a092125fef8b349b69586cf490866df78cc32","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        \"\"\"From flavor, choose service profile and find provider for driver.\"\"\""},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        obj \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":234,"context_line":"            flavor_id\u003dflavor_id)"},{"line_number":235,"context_line":"        if not obj:"},{"line_number":236,"context_line":"            raise ext_flavors.FlavorServiceProfileBindingNotFound("},{"line_number":237,"context_line":"                sp_id\u003d\u0027\u0027, fl_id\u003dflavor_id)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da6895a0_def2309a","line":234,"range":{"start_line":234,"start_character":11,"end_line":234,"end_character":32},"in_reply_to":"fa6399be_b62553c3","updated":"2016-10-21 17:47:08.000000000","message":"I\u0027m only taking the first value in the line 239.  I tried to implement something similar but the previous implementation is not considering a sort mechanism","commit_id":"1e6fa0bd43f6a6eb78c0e9da1bf9a1ae1d50292a"},{"author":{"_account_id":22218,"name":"Sindhu Devale","email":"sindhu.devale@intel.com","username":"sindhudevale"},"change_message_id":"c964fbe0eb43d702ae1a7be7ff1a8074279454c3","unresolved":false,"context_lines":[{"line_number":235,"context_line":"        if not obj:"},{"line_number":236,"context_line":"            raise ext_flavors.FlavorServiceProfileBindingNotFound("},{"line_number":237,"context_line":"                sp_id\u003d\u0027\u0027, fl_id\u003dflavor_id)"},{"line_number":238,"context_line":"        # TODO(eliqiao) Should support get_one_object later"},{"line_number":239,"context_line":"        obj \u003d obj[0]"},{"line_number":240,"context_line":"        # Get the service profile from the first binding"},{"line_number":241,"context_line":"        # TODO(jwarendt) Should become a scheduling framework instead"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa6399be_74a101a9","line":238,"updated":"2016-10-19 16:40:11.000000000","message":"https://review.openstack.org/#/c/386875/5/neutron/objects/base.py","commit_id":"1e6fa0bd43f6a6eb78c0e9da1bf9a1ae1d50292a"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"9367f6222b77e679d8a330f84ae1a71655e6e842","unresolved":false,"context_lines":[{"line_number":235,"context_line":"        if not obj:"},{"line_number":236,"context_line":"            raise ext_flavors.FlavorServiceProfileBindingNotFound("},{"line_number":237,"context_line":"                sp_id\u003d\u0027\u0027, fl_id\u003dflavor_id)"},{"line_number":238,"context_line":"        # TODO(eliqiao) Should support get_one_object later"},{"line_number":239,"context_line":"        obj \u003d obj[0]"},{"line_number":240,"context_line":"        # Get the service profile from the first binding"},{"line_number":241,"context_line":"        # TODO(jwarendt) Should become a scheduling framework instead"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa6399be_16543f1f","line":238,"in_reply_to":"fa6399be_74a101a9","updated":"2016-10-19 23:24:02.000000000","message":"get_one is not needed in this case so above comment can be removed","commit_id":"1e6fa0bd43f6a6eb78c0e9da1bf9a1ae1d50292a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"57c9d0fec25c87628d8ecef97717f488932f01d6","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def create_flavor(self, context, flavor):"},{"line_number":108,"context_line":"        fl \u003d flavor[\u0027flavor\u0027]"},{"line_number":109,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":110,"context_line":"            obj \u003d obj_flavor.Flavor(context, **fl)"},{"line_number":111,"context_line":"            obj.create()"},{"line_number":112,"context_line":"            return self._make_flavor_dict(obj)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_ff737ab2","line":109,"updated":"2016-11-15 09:05:32.000000000","message":"why are we doing this under a transaction. the objects should do that internally","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"4ab44aa1e293b1a79700d515ba217308ed620012","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def create_flavor(self, context, flavor):"},{"line_number":108,"context_line":"        fl \u003d flavor[\u0027flavor\u0027]"},{"line_number":109,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":110,"context_line":"            obj \u003d obj_flavor.Flavor(context, **fl)"},{"line_number":111,"context_line":"            obj.create()"},{"line_number":112,"context_line":"            return self._make_flavor_dict(obj)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_4c823fc9","line":109,"in_reply_to":"7a77a97e_a36e2bc7","updated":"2016-11-18 23:14:46.000000000","message":"Well, I was not completely sure about that... The creation method uses current session[1] and in this case executes different instruction[2], anyway I\u0027m going to change it because I discovered that was failing another patch[3] for this.\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/objects/db/api.py#L59\n[2] https://github.com/openstack/oslo.db/blob/master/oslo_db/sqlalchemy/enginefacade.py#L879\n[3] https://review.openstack.org/#/c/304322/","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"7b94ffccfe2753459869157ec610f6693d409444","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def create_flavor(self, context, flavor):"},{"line_number":108,"context_line":"        fl \u003d flavor[\u0027flavor\u0027]"},{"line_number":109,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":110,"context_line":"            obj \u003d obj_flavor.Flavor(context, **fl)"},{"line_number":111,"context_line":"            obj.create()"},{"line_number":112,"context_line":"            return self._make_flavor_dict(obj)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_a36e2bc7","line":109,"in_reply_to":"7a77a97e_ff737ab2","updated":"2016-11-15 20:58:32.000000000","message":"+1 I think we do not need the transaction here","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"57c9d0fec25c87628d8ecef97717f488932f01d6","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def update_flavor(self, context, flavor_id, flavor):"},{"line_number":115,"context_line":"        fl \u003d flavor[\u0027flavor\u0027]"},{"line_number":116,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":117,"context_line":"            self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":118,"context_line":"            fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":119,"context_line":"            fl_db.update_fields(fl)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_1fa036f4","line":116,"updated":"2016-11-15 09:05:32.000000000","message":"same point here","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"7b94ffccfe2753459869157ec610f6693d409444","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def update_flavor(self, context, flavor_id, flavor):"},{"line_number":115,"context_line":"        fl \u003d flavor[\u0027flavor\u0027]"},{"line_number":116,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":117,"context_line":"            self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":118,"context_line":"            fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":119,"context_line":"            fl_db.update_fields(fl)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_4360f7ce","line":116,"in_reply_to":"7a77a97e_1fa036f4","updated":"2016-11-15 20:58:32.000000000","message":"+1","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"4ab44aa1e293b1a79700d515ba217308ed620012","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def update_flavor(self, context, flavor_id, flavor):"},{"line_number":115,"context_line":"        fl \u003d flavor[\u0027flavor\u0027]"},{"line_number":116,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":117,"context_line":"            self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":118,"context_line":"            fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":119,"context_line":"            fl_db.update_fields(fl)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_6c853bcd","line":116,"in_reply_to":"7a77a97e_4360f7ce","updated":"2016-11-18 23:14:46.000000000","message":"Done","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":22218,"name":"Sindhu Devale","email":"sindhu.devale@intel.com","username":"sindhudevale"},"change_message_id":"714197686d8205a955790675be69532b1d71674a","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        try:"},{"line_number":133,"context_line":"            with db_api.context_manager.writer.using(context):"},{"line_number":134,"context_line":"                self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":135,"context_line":"                self._get_flavor(context, flavor_id).delete()"},{"line_number":136,"context_line":"        except db_exc.DBReferenceError:"},{"line_number":137,"context_line":"            raise ext_flavors.FlavorInUse(flavor_id\u003dflavor_id)"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_94ab4089","line":135,"range":{"start_line":135,"start_character":53,"end_line":135,"end_character":61},"updated":"2016-11-15 12:45:13.000000000","message":"this one?","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"57c9d0fec25c87628d8ecef97717f488932f01d6","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        try:"},{"line_number":133,"context_line":"            with db_api.context_manager.writer.using(context):"},{"line_number":134,"context_line":"                self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":135,"context_line":"                self._get_flavor(context, flavor_id).delete()"},{"line_number":136,"context_line":"        except db_exc.DBReferenceError:"},{"line_number":137,"context_line":"            raise ext_flavors.FlavorInUse(flavor_id\u003dflavor_id)"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_5f81ce49","line":135,"updated":"2016-11-15 09:05:32.000000000","message":"where is the delete taking place?","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"7b94ffccfe2753459869157ec610f6693d409444","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        try:"},{"line_number":133,"context_line":"            with db_api.context_manager.writer.using(context):"},{"line_number":134,"context_line":"                self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":135,"context_line":"                self._get_flavor(context, flavor_id).delete()"},{"line_number":136,"context_line":"        except db_exc.DBReferenceError:"},{"line_number":137,"context_line":"            raise ext_flavors.FlavorInUse(flavor_id\u003dflavor_id)"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_a3f38b09","line":135,"range":{"start_line":135,"start_character":53,"end_line":135,"end_character":61},"in_reply_to":"7a77a97e_94ab4089","updated":"2016-11-15 20:58:32.000000000","message":"Don\u0027t we have to check that a flavor exists before deleting the flavor?","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"4ab44aa1e293b1a79700d515ba217308ed620012","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        try:"},{"line_number":133,"context_line":"            with db_api.context_manager.writer.using(context):"},{"line_number":134,"context_line":"                self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":135,"context_line":"                self._get_flavor(context, flavor_id).delete()"},{"line_number":136,"context_line":"        except db_exc.DBReferenceError:"},{"line_number":137,"context_line":"            raise ext_flavors.FlavorInUse(flavor_id\u003dflavor_id)"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_ec486bb5","line":135,"range":{"start_line":135,"start_character":53,"end_line":135,"end_character":61},"in_reply_to":"7a77a97e_a3f38b09","updated":"2016-11-18 23:14:46.000000000","message":"For this case, this is using the method which was defined in the line 41, where is made the proper validation.","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"7b94ffccfe2753459869157ec610f6693d409444","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    def create_flavor_service_profile(self, context,"},{"line_number":149,"context_line":"                                      service_profile, flavor_id):"},{"line_number":150,"context_line":"        sp \u003d service_profile[\u0027service_profile\u0027]"},{"line_number":151,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":152,"context_line":"            binding \u003d obj_flavor.FlavorServiceProfileBinding.get_object("},{"line_number":153,"context_line":"                context, service_profile_id\u003dsp[\u0027id\u0027], flavor_id\u003dflavor_id)"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_a3b0ebde","line":151,"updated":"2016-11-15 20:58:32.000000000","message":"I don\u0027t think we need the transaction here as get_object already has the transaction?","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"7b94ffccfe2753459869157ec610f6693d409444","unresolved":false,"context_lines":[{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def delete_flavor_service_profile(self, context,"},{"line_number":165,"context_line":"                                      service_profile_id, flavor_id):"},{"line_number":166,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":167,"context_line":"            obj \u003d obj_flavor.FlavorServiceProfileBinding.get_object("},{"line_number":168,"context_line":"                context, service_profile_id\u003dservice_profile_id,"},{"line_number":169,"context_line":"                flavor_id\u003dflavor_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_63ddf313","line":166,"updated":"2016-11-15 20:58:32.000000000","message":"ditto","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"4ab44aa1e293b1a79700d515ba217308ed620012","unresolved":false,"context_lines":[{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def delete_flavor_service_profile(self, context,"},{"line_number":165,"context_line":"                                      service_profile_id, flavor_id):"},{"line_number":166,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":167,"context_line":"            obj \u003d obj_flavor.FlavorServiceProfileBinding.get_object("},{"line_number":168,"context_line":"                context, service_profile_id\u003dservice_profile_id,"},{"line_number":169,"context_line":"                flavor_id\u003dflavor_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_c71c686c","line":166,"in_reply_to":"7a77a97e_63ddf313","updated":"2016-11-18 23:14:46.000000000","message":"Done","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"7b94ffccfe2753459869157ec610f6693d409444","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    @staticmethod"},{"line_number":176,"context_line":"    def get_flavor_service_profile(context,"},{"line_number":177,"context_line":"                                   service_profile_id, flavor_id, fields\u003dNone):"},{"line_number":178,"context_line":"        with db_api.context_manager.reader.using(context):"},{"line_number":179,"context_line":"            obj \u003d obj_flavor.FlavorServiceProfileBinding.get_object("},{"line_number":180,"context_line":"                context, service_profile_id\u003dservice_profile_id,"},{"line_number":181,"context_line":"                flavor_id\u003dflavor_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_7e310ca2","line":178,"updated":"2016-11-15 20:58:32.000000000","message":"ditto","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"4ab44aa1e293b1a79700d515ba217308ed620012","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    @staticmethod"},{"line_number":176,"context_line":"    def get_flavor_service_profile(context,"},{"line_number":177,"context_line":"                                   service_profile_id, flavor_id, fields\u003dNone):"},{"line_number":178,"context_line":"        with db_api.context_manager.reader.using(context):"},{"line_number":179,"context_line":"            obj \u003d obj_flavor.FlavorServiceProfileBinding.get_object("},{"line_number":180,"context_line":"                context, service_profile_id\u003dservice_profile_id,"},{"line_number":181,"context_line":"                flavor_id\u003dflavor_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_e717a442","line":178,"in_reply_to":"7a77a97e_7e310ca2","updated":"2016-11-18 23:14:46.000000000","message":"Done","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"7b94ffccfe2753459869157ec610f6693d409444","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            if not sp[\u0027metainfo\u0027]:"},{"line_number":196,"context_line":"                raise ext_flavors.ServiceProfileEmpty()"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":199,"context_line":"            obj \u003d obj_flavor.ServiceProfile(context, **sp)"},{"line_number":200,"context_line":"            obj.create()"},{"line_number":201,"context_line":"            return self._make_service_profile_dict(obj)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_5ed37038","line":198,"updated":"2016-11-15 20:58:32.000000000","message":"ditto","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"4ab44aa1e293b1a79700d515ba217308ed620012","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            if not sp[\u0027metainfo\u0027]:"},{"line_number":196,"context_line":"                raise ext_flavors.ServiceProfileEmpty()"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":199,"context_line":"            obj \u003d obj_flavor.ServiceProfile(context, **sp)"},{"line_number":200,"context_line":"            obj.create()"},{"line_number":201,"context_line":"            return self._make_service_profile_dict(obj)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_272c3c98","line":198,"in_reply_to":"7a77a97e_5ed37038","updated":"2016-11-18 23:14:46.000000000","message":"Done","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"7b94ffccfe2753459869157ec610f6693d409444","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        if sp.get(\u0027driver\u0027):"},{"line_number":208,"context_line":"            self._validate_driver(context, sp[\u0027driver\u0027])"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":211,"context_line":"            self._ensure_service_profile_not_in_use(context,"},{"line_number":212,"context_line":"                                                    service_profile_id)"},{"line_number":213,"context_line":"            sp_db \u003d self._get_service_profile(context, service_profile_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_1ef2d8d2","line":210,"updated":"2016-11-15 20:58:32.000000000","message":"ditto","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"4ab44aa1e293b1a79700d515ba217308ed620012","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        if sp.get(\u0027driver\u0027):"},{"line_number":208,"context_line":"            self._validate_driver(context, sp[\u0027driver\u0027])"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":211,"context_line":"            self._ensure_service_profile_not_in_use(context,"},{"line_number":212,"context_line":"                                                    service_profile_id)"},{"line_number":213,"context_line":"            sp_db \u003d self._get_service_profile(context, service_profile_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_471f785a","line":210,"in_reply_to":"7a77a97e_1ef2d8d2","updated":"2016-11-18 23:14:46.000000000","message":"Done","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"4ab44aa1e293b1a79700d515ba217308ed620012","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        return self._make_service_profile_dict(sp_db, fields)"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def delete_service_profile(self, context, sp_id):"},{"line_number":223,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":224,"context_line":"            self._ensure_service_profile_not_in_use(context, sp_id)"},{"line_number":225,"context_line":"            sp_obj \u003d self._get_service_profile(context, sp_id)"},{"line_number":226,"context_line":"            sp_obj.delete()"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_873d10c6","line":223,"range":{"start_line":223,"start_character":8,"end_line":223,"end_character":58},"updated":"2016-11-18 23:14:46.000000000","message":"ditto","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"7b94ffccfe2753459869157ec610f6693d409444","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                                 marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":242,"context_line":"        \"\"\"From flavor, choose service profile and find provider for driver.\"\"\""},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        with db_api.context_manager.reader.using(context):"},{"line_number":245,"context_line":"            obj \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":246,"context_line":"                flavor_id\u003dflavor_id)"},{"line_number":247,"context_line":"            if not obj:"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_5eba90e2","line":244,"updated":"2016-11-15 20:58:32.000000000","message":"ditto","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"4ab44aa1e293b1a79700d515ba217308ed620012","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                                 marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":242,"context_line":"        \"\"\"From flavor, choose service profile and find provider for driver.\"\"\""},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        with db_api.context_manager.reader.using(context):"},{"line_number":245,"context_line":"            obj \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":246,"context_line":"                flavor_id\u003dflavor_id)"},{"line_number":247,"context_line":"            if not obj:"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_67a7140b","line":244,"in_reply_to":"7a77a97e_5eba90e2","updated":"2016-11-18 23:14:46.000000000","message":"Done","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        return service_profile"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @staticmethod"},{"line_number":54,"context_line":"    def _make_flavor_dict(flavor_db, fields\u003dNone):"},{"line_number":55,"context_line":"        res \u003d {\u0027id\u0027: flavor_db[\u0027id\u0027],"},{"line_number":56,"context_line":"               \u0027name\u0027: flavor_db[\u0027name\u0027],"},{"line_number":57,"context_line":"               \u0027description\u0027: flavor_db[\u0027description\u0027],"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_79b88d2a","line":54,"updated":"2016-11-29 13:43:18.000000000","message":"we could use this opportunity to rename flavor_db into flavor/flavor_obj here.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        return service_profile"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @staticmethod"},{"line_number":54,"context_line":"    def _make_flavor_dict(flavor_db, fields\u003dNone):"},{"line_number":55,"context_line":"        res \u003d {\u0027id\u0027: flavor_db[\u0027id\u0027],"},{"line_number":56,"context_line":"               \u0027name\u0027: flavor_db[\u0027name\u0027],"},{"line_number":57,"context_line":"               \u0027description\u0027: flavor_db[\u0027description\u0027],"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_a4774c07","line":54,"in_reply_to":"5a74a57a_79b88d2a","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    @staticmethod"},{"line_number":67,"context_line":"    def _make_service_profile_dict(sp_db, fields\u003dNone):"},{"line_number":68,"context_line":"        res \u003d {\u0027id\u0027: sp_db[\u0027id\u0027],"},{"line_number":69,"context_line":"               \u0027description\u0027: sp_db[\u0027description\u0027],"},{"line_number":70,"context_line":"               \u0027driver\u0027: sp_db[\u0027driver\u0027],"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_99b3a94c","line":67,"updated":"2016-11-29 13:43:18.000000000","message":"same for sp_db -\u003e sp_obj","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    @staticmethod"},{"line_number":67,"context_line":"    def _make_service_profile_dict(sp_db, fields\u003dNone):"},{"line_number":68,"context_line":"        res \u003d {\u0027id\u0027: sp_db[\u0027id\u0027],"},{"line_number":69,"context_line":"               \u0027description\u0027: sp_db[\u0027description\u0027],"},{"line_number":70,"context_line":"               \u0027driver\u0027: sp_db[\u0027driver\u0027],"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_84733015","line":67,"in_reply_to":"5a74a57a_99b3a94c","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def _ensure_service_profile_not_in_use(self, context, sp_id):"},{"line_number":90,"context_line":"        \"\"\"Ensures no current bindings to flavors exist.\"\"\""},{"line_number":91,"context_line":"        objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":92,"context_line":"            service_profile_id\u003dsp_id)"},{"line_number":93,"context_line":"        if objs:"},{"line_number":94,"context_line":"            raise ext_flavors.ServiceProfileInUse(sp_id\u003dsp_id)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_d9044116","line":91,"updated":"2016-11-29 13:43:18.000000000","message":"now that https://review.openstack.org/#/c/395748/ is merged, please use objects_exist API instead.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def _ensure_service_profile_not_in_use(self, context, sp_id):"},{"line_number":90,"context_line":"        \"\"\"Ensures no current bindings to flavors exist.\"\"\""},{"line_number":91,"context_line":"        objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":92,"context_line":"            service_profile_id\u003dsp_id)"},{"line_number":93,"context_line":"        if objs:"},{"line_number":94,"context_line":"            raise ext_flavors.ServiceProfileInUse(sp_id\u003dsp_id)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_4450385f","line":91,"in_reply_to":"5a74a57a_d9044116","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            raise ext_flavors.ServiceProfileDriverNotFound(driver\u003ddriver)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def create_flavor(self, context, flavor):"},{"line_number":107,"context_line":"        obj \u003d obj_flavor.Flavor(context, **flavor[\u0027flavor\u0027])"},{"line_number":108,"context_line":"        obj.create()"},{"line_number":109,"context_line":"        return self._make_flavor_dict(obj)"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_b976a5a1","line":107,"updated":"2016-11-29 13:43:18.000000000","message":"that\u0027s not an exact replacement. For example, if flavor argument contains more keys, then the code will raise a TypeError. Please revert to explicitly passing needed keys.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            raise ext_flavors.ServiceProfileDriverNotFound(driver\u003ddriver)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def create_flavor(self, context, flavor):"},{"line_number":107,"context_line":"        obj \u003d obj_flavor.Flavor(context, **flavor[\u0027flavor\u0027])"},{"line_number":108,"context_line":"        obj.create()"},{"line_number":109,"context_line":"        return self._make_flavor_dict(obj)"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_e4422468","line":107,"in_reply_to":"5a74a57a_b976a5a1","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"44b30bea5ed60a34db7c3d4439b9ebedd2facab8","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def update_flavor(self, context, flavor_id, flavor):"},{"line_number":112,"context_line":"        self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":113,"context_line":"        fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":114,"context_line":"        fl_db.update_fields(flavor[\u0027flavor\u0027])"},{"line_number":115,"context_line":"        fl_db.update()"},{"line_number":116,"context_line":"        return self._make_flavor_dict(fl_db)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_eb9d9e0a","line":113,"range":{"start_line":113,"start_character":8,"end_line":113,"end_character":13},"updated":"2016-11-30 13:48:43.000000000","message":"flavor_obj","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def update_flavor(self, context, flavor_id, flavor):"},{"line_number":112,"context_line":"        self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":113,"context_line":"        fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":114,"context_line":"        fl_db.update_fields(flavor[\u0027flavor\u0027])"},{"line_number":115,"context_line":"        fl_db.update()"},{"line_number":116,"context_line":"        return self._make_flavor_dict(fl_db)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_19ccf9b9","line":113,"updated":"2016-11-29 13:43:18.000000000","message":"we must keep writer.using transaction here because otherwise we may get NotFound error if the flavor object is removed in between lines 113 and 115.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def update_flavor(self, context, flavor_id, flavor):"},{"line_number":112,"context_line":"        self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":113,"context_line":"        fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":114,"context_line":"        fl_db.update_fields(flavor[\u0027flavor\u0027])"},{"line_number":115,"context_line":"        fl_db.update()"},{"line_number":116,"context_line":"        return self._make_flavor_dict(fl_db)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_affd650a","line":113,"in_reply_to":"5a74a57a_19ccf9b9","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        # flavors so for now we just capture the foreign key violation"},{"line_number":126,"context_line":"        # to detect if it\u0027s in use."},{"line_number":127,"context_line":"        try:"},{"line_number":128,"context_line":"            self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":129,"context_line":"            self._get_flavor(context, flavor_id).delete()"},{"line_number":130,"context_line":"        except db_exc.DBReferenceError:"},{"line_number":131,"context_line":"            raise ext_flavors.FlavorInUse(flavor_id\u003dflavor_id)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_99eba9db","line":128,"updated":"2016-11-29 13:43:18.000000000","message":"Though _ensure_flavor_not_in_use is no-op at this point, it\u0027s better to keep the writer.using context manager here to guarantee a single transaction for once the method is filled with meat.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        # flavors so for now we just capture the foreign key violation"},{"line_number":126,"context_line":"        # to detect if it\u0027s in use."},{"line_number":127,"context_line":"        try:"},{"line_number":128,"context_line":"            self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":129,"context_line":"            self._get_flavor(context, flavor_id).delete()"},{"line_number":130,"context_line":"        except db_exc.DBReferenceError:"},{"line_number":131,"context_line":"            raise ext_flavors.FlavorInUse(flavor_id\u003dflavor_id)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_de9ed4b7","line":128,"in_reply_to":"5a74a57a_99eba9db","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    def create_flavor_service_profile(self, context,"},{"line_number":143,"context_line":"                                      service_profile, flavor_id):"},{"line_number":144,"context_line":"        sp \u003d service_profile[\u0027service_profile\u0027]"},{"line_number":145,"context_line":"        binding \u003d obj_flavor.FlavorServiceProfileBinding.get_object("},{"line_number":146,"context_line":"            context, service_profile_id\u003dsp[\u0027id\u0027], flavor_id\u003dflavor_id)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if binding:"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_f9e57ddb","line":145,"updated":"2016-11-29 13:43:18.000000000","message":"again, unless we have writer.using in place, you risk to catch duplicate error in line 151.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    def create_flavor_service_profile(self, context,"},{"line_number":143,"context_line":"                                      service_profile, flavor_id):"},{"line_number":144,"context_line":"        sp \u003d service_profile[\u0027service_profile\u0027]"},{"line_number":145,"context_line":"        binding \u003d obj_flavor.FlavorServiceProfileBinding.get_object("},{"line_number":146,"context_line":"            context, service_profile_id\u003dsp[\u0027id\u0027], flavor_id\u003dflavor_id)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if binding:"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_de85f459","line":145,"in_reply_to":"5a74a57a_f9e57ddb","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        binding \u003d obj_flavor.FlavorServiceProfileBinding.get_object("},{"line_number":146,"context_line":"            context, service_profile_id\u003dsp[\u0027id\u0027], flavor_id\u003dflavor_id)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if binding:"},{"line_number":149,"context_line":"            raise ext_flavors.FlavorServiceProfileBindingExists("},{"line_number":150,"context_line":"                sp_id\u003dsp[\u0027id\u0027], fl_id\u003dflavor_id)"},{"line_number":151,"context_line":"        obj_flavor.FlavorServiceProfileBinding("}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_994809b5","line":148,"updated":"2016-11-29 13:43:18.000000000","message":"we don\u0027t really need the \u0027binding\u0027 object, so please use objects_exist method instead.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        binding \u003d obj_flavor.FlavorServiceProfileBinding.get_object("},{"line_number":146,"context_line":"            context, service_profile_id\u003dsp[\u0027id\u0027], flavor_id\u003dflavor_id)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if binding:"},{"line_number":149,"context_line":"            raise ext_flavors.FlavorServiceProfileBindingExists("},{"line_number":150,"context_line":"                sp_id\u003dsp[\u0027id\u0027], fl_id\u003dflavor_id)"},{"line_number":151,"context_line":"        obj_flavor.FlavorServiceProfileBinding("}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_fe7ab076","line":148,"in_reply_to":"5a74a57a_994809b5","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":154,"context_line":"        return self._make_flavor_dict(fl_db)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def delete_flavor_service_profile(self, context,"},{"line_number":157,"context_line":"                                      service_profile_id, flavor_id):"},{"line_number":158,"context_line":"        obj \u003d obj_flavor.FlavorServiceProfileBinding.get_object("},{"line_number":159,"context_line":"            context, service_profile_id\u003dservice_profile_id,"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_f933bd5f","line":156,"updated":"2016-11-29 13:43:18.000000000","message":"same comment, you risk to catch not-found error in line 164.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":154,"context_line":"        return self._make_flavor_dict(fl_db)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def delete_flavor_service_profile(self, context,"},{"line_number":157,"context_line":"                                      service_profile_id, flavor_id):"},{"line_number":158,"context_line":"        obj \u003d obj_flavor.FlavorServiceProfileBinding.get_object("},{"line_number":159,"context_line":"            context, service_profile_id\u003dservice_profile_id,"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_9e51bcdb","line":156,"in_reply_to":"5a74a57a_f933bd5f","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    @staticmethod"},{"line_number":167,"context_line":"    def get_flavor_service_profile(context,"},{"line_number":168,"context_line":"                                   service_profile_id, flavor_id, fields\u003dNone):"},{"line_number":169,"context_line":"        obj \u003d obj_flavor.FlavorServiceProfileBinding.get_object("},{"line_number":170,"context_line":"            context, service_profile_id\u003dservice_profile_id,"},{"line_number":171,"context_line":"            flavor_id\u003dflavor_id)"},{"line_number":172,"context_line":"        if not obj:"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_3970d50a","line":169,"range":{"start_line":169,"start_character":8,"end_line":169,"end_character":14},"updated":"2016-11-29 13:43:18.000000000","message":"seems like we don\u0027t really need that object, only that it exists. so please use the new objects_exist method here.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    @staticmethod"},{"line_number":167,"context_line":"    def get_flavor_service_profile(context,"},{"line_number":168,"context_line":"                                   service_profile_id, flavor_id, fields\u003dNone):"},{"line_number":169,"context_line":"        obj \u003d obj_flavor.FlavorServiceProfileBinding.get_object("},{"line_number":170,"context_line":"            context, service_profile_id\u003dservice_profile_id,"},{"line_number":171,"context_line":"            flavor_id\u003dflavor_id)"},{"line_number":172,"context_line":"        if not obj:"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_3e1fc80a","line":169,"range":{"start_line":169,"start_character":8,"end_line":169,"end_character":14},"in_reply_to":"5a74a57a_3970d50a","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            if not sp[\u0027metainfo\u0027]:"},{"line_number":186,"context_line":"                raise ext_flavors.ServiceProfileEmpty()"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        obj \u003d obj_flavor.ServiceProfile(context, **sp)"},{"line_number":189,"context_line":"        obj.create()"},{"line_number":190,"context_line":"        return self._make_service_profile_dict(obj)"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_79e40dab","line":188,"updated":"2016-11-29 13:43:18.000000000","message":"you risk a TypeError here. Please pass explicit keywords here. Also, you haven\u0027t generated id\u003d","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            if not sp[\u0027metainfo\u0027]:"},{"line_number":186,"context_line":"                raise ext_flavors.ServiceProfileEmpty()"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        obj \u003d obj_flavor.ServiceProfile(context, **sp)"},{"line_number":189,"context_line":"        obj.create()"},{"line_number":190,"context_line":"        return self._make_service_profile_dict(obj)"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_7ec78064","line":188,"in_reply_to":"5a74a57a_79e40dab","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"44b30bea5ed60a34db7c3d4439b9ebedd2facab8","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            if not sp[\u0027metainfo\u0027]:"},{"line_number":186,"context_line":"                raise ext_flavors.ServiceProfileEmpty()"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        obj \u003d obj_flavor.ServiceProfile(context, **sp)"},{"line_number":189,"context_line":"        obj.create()"},{"line_number":190,"context_line":"        return self._make_service_profile_dict(obj)"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_c1a0c3f6","line":188,"in_reply_to":"5a74a57a_79e40dab","updated":"2016-11-30 13:48:43.000000000","message":"Well, the id would be generated here:\nhttps://github.com/openstack/neutron/blob/master/neutron/objects/db/api.py#L59\n\nBut that is different story.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        if sp.get(\u0027driver\u0027):"},{"line_number":197,"context_line":"            self._validate_driver(context, sp[\u0027driver\u0027])"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        self._ensure_service_profile_not_in_use(context,"},{"line_number":200,"context_line":"                                                service_profile_id)"},{"line_number":201,"context_line":"        sp_db \u003d self._get_service_profile(context, service_profile_id)"},{"line_number":202,"context_line":"        sp_db.update_fields(sp)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_19b87974","line":199,"updated":"2016-11-29 13:43:18.000000000","message":"we need writer.using to maintain transactional safety between lines 201 and 203.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        if sp.get(\u0027driver\u0027):"},{"line_number":197,"context_line":"            self._validate_driver(context, sp[\u0027driver\u0027])"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        self._ensure_service_profile_not_in_use(context,"},{"line_number":200,"context_line":"                                                service_profile_id)"},{"line_number":201,"context_line":"        sp_db \u003d self._get_service_profile(context, service_profile_id)"},{"line_number":202,"context_line":"        sp_db.update_fields(sp)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_9e9b7c72","line":199,"in_reply_to":"5a74a57a_19b87974","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        return self._make_service_profile_dict(sp_db, fields)"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def delete_service_profile(self, context, sp_id):"},{"line_number":211,"context_line":"        self._ensure_service_profile_not_in_use(context, sp_id)"},{"line_number":212,"context_line":"        self._get_service_profile(context, sp_id).delete()"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def get_service_profiles(self, context, filters\u003dNone, fields\u003dNone,"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_79a96d23","line":211,"updated":"2016-11-29 13:43:18.000000000","message":"same: please restore writer.using.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        return self._make_service_profile_dict(sp_db, fields)"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def delete_service_profile(self, context, sp_id):"},{"line_number":211,"context_line":"        self._ensure_service_profile_not_in_use(context, sp_id)"},{"line_number":212,"context_line":"        self._get_service_profile(context, sp_id).delete()"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def get_service_profiles(self, context, filters\u003dNone, fields\u003dNone,"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_fe80f0f9","line":211,"in_reply_to":"5a74a57a_79a96d23","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                                 marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":228,"context_line":"        \"\"\"From flavor, choose service profile and find provider for driver.\"\"\""},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"        objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":231,"context_line":"            flavor_id\u003dflavor_id)"},{"line_number":232,"context_line":"        if not objs:"},{"line_number":233,"context_line":"            raise ext_flavors.FlavorServiceProfileBindingNotFound("}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_390ff537","line":230,"updated":"2016-11-29 13:43:18.000000000","message":"you need reader.using here because otherwise you can get not-found in line 237 if the binding and the service profile is gone in between lines 230 and 237.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                                 marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":228,"context_line":"        \"\"\"From flavor, choose service profile and find provider for driver.\"\"\""},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"        objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":231,"context_line":"            flavor_id\u003dflavor_id)"},{"line_number":232,"context_line":"        if not objs:"},{"line_number":233,"context_line":"            raise ext_flavors.FlavorServiceProfileBindingNotFound("}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_be2918f5","line":230,"in_reply_to":"5a74a57a_390ff537","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":234,"context_line":"                sp_id\u003d\u0027\u0027, fl_id\u003dflavor_id)"},{"line_number":235,"context_line":"        # Get the service profile from the first binding"},{"line_number":236,"context_line":"        # TODO(jwarendt) Should become a scheduling framework instead"},{"line_number":237,"context_line":"        sp_db \u003d self._get_service_profile(context, objs[0].service_profile_id)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        if not sp_db.enabled:"},{"line_number":240,"context_line":"            raise ext_flavors.ServiceProfileDisabled()"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_9952c933","line":237,"range":{"start_line":237,"start_character":8,"end_line":237,"end_character":13},"updated":"2016-11-29 13:43:18.000000000","message":"maybe rename into sp_obj","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":234,"context_line":"                sp_id\u003d\u0027\u0027, fl_id\u003dflavor_id)"},{"line_number":235,"context_line":"        # Get the service profile from the first binding"},{"line_number":236,"context_line":"        # TODO(jwarendt) Should become a scheduling framework instead"},{"line_number":237,"context_line":"        sp_db \u003d self._get_service_profile(context, objs[0].service_profile_id)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        if not sp_db.enabled:"},{"line_number":240,"context_line":"            raise ext_flavors.ServiceProfileDisabled()"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_de2ed4f9","line":237,"range":{"start_line":237,"start_character":8,"end_line":237,"end_character":13},"in_reply_to":"5a74a57a_9952c933","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"bdcb950de5277a6f31f05e19ac6a148c68eed578","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    @staticmethod"},{"line_number":170,"context_line":"    def get_flavor_service_profile(context,"},{"line_number":171,"context_line":"                                   service_profile_id, flavor_id, fields\u003dNone):"},{"line_number":172,"context_line":"        if obj_flavor.FlavorServiceProfileBinding.objects_exist("},{"line_number":173,"context_line":"                context, service_profile_id\u003dservice_profile_id,"},{"line_number":174,"context_line":"                flavor_id\u003dflavor_id):"},{"line_number":175,"context_line":"            raise ext_flavors.FlavorServiceProfileBindingNotFound("}],"source_content_type":"text/x-python","patch_set":23,"id":"3a71b18c_c1f75589","line":172,"range":{"start_line":172,"start_character":8,"end_line":172,"end_character":11},"updated":"2016-12-05 08:38:02.000000000","message":"\"if not\" ?","commit_id":"e9d647e2c8252897b1a3c69cfd603f4da4a6eabd"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"09215d0b07ee286a1230e6b7cd836d6d59932abe","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    @staticmethod"},{"line_number":170,"context_line":"    def get_flavor_service_profile(context,"},{"line_number":171,"context_line":"                                   service_profile_id, flavor_id, fields\u003dNone):"},{"line_number":172,"context_line":"        if obj_flavor.FlavorServiceProfileBinding.objects_exist("},{"line_number":173,"context_line":"                context, service_profile_id\u003dservice_profile_id,"},{"line_number":174,"context_line":"                flavor_id\u003dflavor_id):"},{"line_number":175,"context_line":"            raise ext_flavors.FlavorServiceProfileBindingNotFound("}],"source_content_type":"text/x-python","patch_set":23,"id":"3a71b18c_ce320ba7","line":172,"range":{"start_line":172,"start_character":8,"end_line":172,"end_character":11},"in_reply_to":"3a71b18c_c1f75589","updated":"2016-12-05 20:20:32.000000000","message":"Ouch, you\u0027re right thanks that solves the issue.","commit_id":"e9d647e2c8252897b1a3c69cfd603f4da4a6eabd"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"d8c7b1f8a076db0ef4d0c1241ed032ab8e8a1d58","unresolved":false,"context_lines":[{"line_number":58,"context_line":"               \u0027description\u0027: flavor_obj[\u0027description\u0027],"},{"line_number":59,"context_line":"               \u0027service_type\u0027: flavor_obj[\u0027service_type\u0027],"},{"line_number":60,"context_line":"               \u0027enabled\u0027: flavor_obj[\u0027enabled\u0027],"},{"line_number":61,"context_line":"               \u0027service_profiles\u0027: [sp for sp in"},{"line_number":62,"context_line":"                                    flavor_obj[\u0027service_profile_ids\u0027]]}"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_26ae2998","line":62,"range":{"start_line":61,"start_character":35,"end_line":62,"end_character":70},"updated":"2016-12-06 07:59:21.000000000","message":"list(flavor_obj[...]) would be better.","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"dcbd34f11912afe3fd59eaa01d3df9a646da6acc","unresolved":false,"context_lines":[{"line_number":58,"context_line":"               \u0027description\u0027: flavor_obj[\u0027description\u0027],"},{"line_number":59,"context_line":"               \u0027service_type\u0027: flavor_obj[\u0027service_type\u0027],"},{"line_number":60,"context_line":"               \u0027enabled\u0027: flavor_obj[\u0027enabled\u0027],"},{"line_number":61,"context_line":"               \u0027service_profiles\u0027: [sp for sp in"},{"line_number":62,"context_line":"                                    flavor_obj[\u0027service_profile_ids\u0027]]}"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_f8d11e24","line":62,"range":{"start_line":61,"start_character":35,"end_line":62,"end_character":70},"in_reply_to":"3a71b18c_26ae2998","updated":"2016-12-06 14:34:34.000000000","message":"+1","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"414581d3558d7d7986da14cdbcb41705946eba13","unresolved":false,"context_lines":[{"line_number":58,"context_line":"               \u0027description\u0027: flavor_obj[\u0027description\u0027],"},{"line_number":59,"context_line":"               \u0027service_type\u0027: flavor_obj[\u0027service_type\u0027],"},{"line_number":60,"context_line":"               \u0027enabled\u0027: flavor_obj[\u0027enabled\u0027],"},{"line_number":61,"context_line":"               \u0027service_profiles\u0027: [sp for sp in"},{"line_number":62,"context_line":"                                    flavor_obj[\u0027service_profile_ids\u0027]]}"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_3fd0c7c8","line":62,"range":{"start_line":61,"start_character":35,"end_line":62,"end_character":70},"in_reply_to":"3a71b18c_26ae2998","updated":"2016-12-06 23:36:50.000000000","message":"Done","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"d8c7b1f8a076db0ef4d0c1241ed032ab8e8a1d58","unresolved":false,"context_lines":[{"line_number":70,"context_line":"               \u0027driver\u0027: sp_obj[\u0027driver\u0027],"},{"line_number":71,"context_line":"               \u0027enabled\u0027: sp_obj[\u0027enabled\u0027],"},{"line_number":72,"context_line":"               \u0027metainfo\u0027: sp_obj[\u0027metainfo\u0027],"},{"line_number":73,"context_line":"               \u0027flavors\u0027: [fl for fl in sp_obj[\u0027flavor_ids\u0027]]}"},{"line_number":74,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def _ensure_flavor_not_in_use(self, context, flavor_id):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_6694a142","line":73,"range":{"start_line":73,"start_character":26,"end_line":73,"end_character":61},"updated":"2016-12-06 07:59:21.000000000","message":"ditto","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"dcbd34f11912afe3fd59eaa01d3df9a646da6acc","unresolved":false,"context_lines":[{"line_number":70,"context_line":"               \u0027driver\u0027: sp_obj[\u0027driver\u0027],"},{"line_number":71,"context_line":"               \u0027enabled\u0027: sp_obj[\u0027enabled\u0027],"},{"line_number":72,"context_line":"               \u0027metainfo\u0027: sp_obj[\u0027metainfo\u0027],"},{"line_number":73,"context_line":"               \u0027flavors\u0027: [fl for fl in sp_obj[\u0027flavor_ids\u0027]]}"},{"line_number":74,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def _ensure_flavor_not_in_use(self, context, flavor_id):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_78a42eb9","line":73,"range":{"start_line":73,"start_character":26,"end_line":73,"end_character":61},"in_reply_to":"3a71b18c_6694a142","updated":"2016-12-06 14:34:34.000000000","message":"+1","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"414581d3558d7d7986da14cdbcb41705946eba13","unresolved":false,"context_lines":[{"line_number":70,"context_line":"               \u0027driver\u0027: sp_obj[\u0027driver\u0027],"},{"line_number":71,"context_line":"               \u0027enabled\u0027: sp_obj[\u0027enabled\u0027],"},{"line_number":72,"context_line":"               \u0027metainfo\u0027: sp_obj[\u0027metainfo\u0027],"},{"line_number":73,"context_line":"               \u0027flavors\u0027: [fl for fl in sp_obj[\u0027flavor_ids\u0027]]}"},{"line_number":74,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def _ensure_flavor_not_in_use(self, context, flavor_id):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_1ff4eb58","line":73,"range":{"start_line":73,"start_character":26,"end_line":73,"end_character":61},"in_reply_to":"3a71b18c_6694a142","updated":"2016-12-06 23:36:50.000000000","message":"Done","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"d8c7b1f8a076db0ef4d0c1241ed032ab8e8a1d58","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    def update_flavor(self, context, flavor_id, flavor):"},{"line_number":112,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":113,"context_line":"            self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":114,"context_line":"            fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":115,"context_line":"            fl_db.update_fields(flavor[\u0027flavor\u0027])"},{"line_number":116,"context_line":"            fl_db.update()"},{"line_number":117,"context_line":"            return self._make_flavor_dict(fl_db)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_b0498fb9","line":114,"range":{"start_line":114,"start_character":12,"end_line":114,"end_character":17},"updated":"2016-12-06 07:59:21.000000000","message":"Should be fl_obj?","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"dcbd34f11912afe3fd59eaa01d3df9a646da6acc","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    def update_flavor(self, context, flavor_id, flavor):"},{"line_number":112,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":113,"context_line":"            self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":114,"context_line":"            fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":115,"context_line":"            fl_db.update_fields(flavor[\u0027flavor\u0027])"},{"line_number":116,"context_line":"            fl_db.update()"},{"line_number":117,"context_line":"            return self._make_flavor_dict(fl_db)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_d884620c","line":114,"range":{"start_line":114,"start_character":12,"end_line":114,"end_character":17},"in_reply_to":"3a71b18c_b0498fb9","updated":"2016-12-06 14:34:34.000000000","message":"+1","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"414581d3558d7d7986da14cdbcb41705946eba13","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    def update_flavor(self, context, flavor_id, flavor):"},{"line_number":112,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":113,"context_line":"            self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":114,"context_line":"            fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":115,"context_line":"            fl_db.update_fields(flavor[\u0027flavor\u0027])"},{"line_number":116,"context_line":"            fl_db.update()"},{"line_number":117,"context_line":"            return self._make_flavor_dict(fl_db)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_3f9e0707","line":114,"range":{"start_line":114,"start_character":12,"end_line":114,"end_character":17},"in_reply_to":"3a71b18c_b0498fb9","updated":"2016-12-06 23:36:50.000000000","message":"Done","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"dcbd34f11912afe3fd59eaa01d3df9a646da6acc","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    def get_flavors(self, context, filters\u003dNone, fields\u003dNone,"},{"line_number":136,"context_line":"                    sorts\u003dNone, limit\u003dNone, marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":137,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse, marker)"},{"line_number":138,"context_line":"        filters \u003d filters or {}"},{"line_number":139,"context_line":"        flavor_objs \u003d obj_flavor.Flavor.get_objects(context, _pager\u003dpager,"},{"line_number":140,"context_line":"                                                    **filters)"},{"line_number":141,"context_line":"        return [self._make_flavor_dict(flavor_object, fields)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_c1870eb3","line":138,"range":{"start_line":138,"start_character":8,"end_line":138,"end_character":31},"updated":"2016-12-06 14:34:34.000000000","message":"maybe you can UT for calling get_flavors without filters, in https://review.openstack.org/#/c/306685/24/neutron/tests/unit/extensions/test_flavors.py","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"414581d3558d7d7986da14cdbcb41705946eba13","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    def get_flavors(self, context, filters\u003dNone, fields\u003dNone,"},{"line_number":136,"context_line":"                    sorts\u003dNone, limit\u003dNone, marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":137,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse, marker)"},{"line_number":138,"context_line":"        filters \u003d filters or {}"},{"line_number":139,"context_line":"        flavor_objs \u003d obj_flavor.Flavor.get_objects(context, _pager\u003dpager,"},{"line_number":140,"context_line":"                                                    **filters)"},{"line_number":141,"context_line":"        return [self._make_flavor_dict(flavor_object, fields)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_4a5783c9","line":138,"range":{"start_line":138,"start_character":8,"end_line":138,"end_character":31},"in_reply_to":"3a71b18c_c1870eb3","updated":"2016-12-06 23:36:50.000000000","message":"Actually, the test_get_flavors UT is calling this without passing any filter.  Not sure if we have to test this with filters","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"d8c7b1f8a076db0ef4d0c1241ed032ab8e8a1d58","unresolved":false,"context_lines":[{"line_number":152,"context_line":"            obj_flavor.FlavorServiceProfileBinding("},{"line_number":153,"context_line":"                context, service_profile_id\u003dsp[\u0027id\u0027],"},{"line_number":154,"context_line":"                flavor_id\u003dflavor_id).create()"},{"line_number":155,"context_line":"        fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":156,"context_line":"        return self._make_flavor_dict(fl_db)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def delete_flavor_service_profile(self, context,"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_eb66bc4f","line":155,"range":{"start_line":155,"start_character":8,"end_line":155,"end_character":13},"updated":"2016-12-06 07:59:21.000000000","message":"fl_obj?","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"414581d3558d7d7986da14cdbcb41705946eba13","unresolved":false,"context_lines":[{"line_number":152,"context_line":"            obj_flavor.FlavorServiceProfileBinding("},{"line_number":153,"context_line":"                context, service_profile_id\u003dsp[\u0027id\u0027],"},{"line_number":154,"context_line":"                flavor_id\u003dflavor_id).create()"},{"line_number":155,"context_line":"        fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":156,"context_line":"        return self._make_flavor_dict(fl_db)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def delete_flavor_service_profile(self, context,"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_2550b831","line":155,"range":{"start_line":155,"start_character":8,"end_line":155,"end_character":13},"in_reply_to":"3a71b18c_78e0aecd","updated":"2016-12-06 23:36:50.000000000","message":"Done","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"dcbd34f11912afe3fd59eaa01d3df9a646da6acc","unresolved":false,"context_lines":[{"line_number":152,"context_line":"            obj_flavor.FlavorServiceProfileBinding("},{"line_number":153,"context_line":"                context, service_profile_id\u003dsp[\u0027id\u0027],"},{"line_number":154,"context_line":"                flavor_id\u003dflavor_id).create()"},{"line_number":155,"context_line":"        fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":156,"context_line":"        return self._make_flavor_dict(fl_db)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def delete_flavor_service_profile(self, context,"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_78e0aecd","line":155,"range":{"start_line":155,"start_character":8,"end_line":155,"end_character":13},"in_reply_to":"3a71b18c_eb66bc4f","updated":"2016-12-06 14:34:34.000000000","message":"+1","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"dcbd34f11912afe3fd59eaa01d3df9a646da6acc","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def delete_flavor_service_profile(self, context,"},{"line_number":159,"context_line":"                                      service_profile_id, flavor_id):"},{"line_number":160,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":161,"context_line":"            obj \u003d obj_flavor.FlavorServiceProfileBinding.get_object("},{"line_number":162,"context_line":"                context, service_profile_id\u003dservice_profile_id,"},{"line_number":163,"context_line":"                flavor_id\u003dflavor_id)"},{"line_number":164,"context_line":"            if not obj:"},{"line_number":165,"context_line":"                raise ext_flavors.FlavorServiceProfileBindingNotFound("},{"line_number":166,"context_line":"                    sp_id\u003dservice_profile_id, fl_id\u003dflavor_id)"},{"line_number":167,"context_line":"            obj.delete()"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    @staticmethod"},{"line_number":170,"context_line":"    def get_flavor_service_profile(context,"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_d80e228b","line":167,"range":{"start_line":160,"start_character":8,"end_line":167,"end_character":24},"updated":"2016-12-06 14:34:34.000000000","message":"When delete_objects will be ready, it can be rewritten to:\nif not obj_flavor.FlavorServiceProfileBinding.delete_objects(\n    context, service_profile_id\u003dservice_profile_id,\n    flavor_id\u003dflavor_id):\n    raise ext_flavors.FlavorServiceProfileBindingNotFound(\n                    sp_id\u003dservice_profile_id, fl_id\u003dflavor_id)","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"414581d3558d7d7986da14cdbcb41705946eba13","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def delete_flavor_service_profile(self, context,"},{"line_number":159,"context_line":"                                      service_profile_id, flavor_id):"},{"line_number":160,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":161,"context_line":"            obj \u003d obj_flavor.FlavorServiceProfileBinding.get_object("},{"line_number":162,"context_line":"                context, service_profile_id\u003dservice_profile_id,"},{"line_number":163,"context_line":"                flavor_id\u003dflavor_id)"},{"line_number":164,"context_line":"            if not obj:"},{"line_number":165,"context_line":"                raise ext_flavors.FlavorServiceProfileBindingNotFound("},{"line_number":166,"context_line":"                    sp_id\u003dservice_profile_id, fl_id\u003dflavor_id)"},{"line_number":167,"context_line":"            obj.delete()"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    @staticmethod"},{"line_number":170,"context_line":"    def get_flavor_service_profile(context,"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_2537d8ff","line":167,"range":{"start_line":160,"start_character":8,"end_line":167,"end_character":24},"in_reply_to":"3a71b18c_d80e228b","updated":"2016-12-06 23:36:50.000000000","message":"yeah, let\u0027s wait until what happens first","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"d8c7b1f8a076db0ef4d0c1241ed032ab8e8a1d58","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":204,"context_line":"            self._ensure_service_profile_not_in_use(context,"},{"line_number":205,"context_line":"                                                    service_profile_id)"},{"line_number":206,"context_line":"            sp_db \u003d self._get_service_profile(context, service_profile_id)"},{"line_number":207,"context_line":"            sp_db.update_fields(sp)"},{"line_number":208,"context_line":"            sp_db.update()"},{"line_number":209,"context_line":"            return self._make_service_profile_dict(sp_db)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_abf76457","line":206,"range":{"start_line":206,"start_character":12,"end_line":206,"end_character":18},"updated":"2016-12-06 07:59:21.000000000","message":"sp_obj?","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"dcbd34f11912afe3fd59eaa01d3df9a646da6acc","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":204,"context_line":"            self._ensure_service_profile_not_in_use(context,"},{"line_number":205,"context_line":"                                                    service_profile_id)"},{"line_number":206,"context_line":"            sp_db \u003d self._get_service_profile(context, service_profile_id)"},{"line_number":207,"context_line":"            sp_db.update_fields(sp)"},{"line_number":208,"context_line":"            sp_db.update()"},{"line_number":209,"context_line":"            return self._make_service_profile_dict(sp_db)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_98666a4f","line":206,"range":{"start_line":206,"start_character":12,"end_line":206,"end_character":18},"in_reply_to":"3a71b18c_abf76457","updated":"2016-12-06 14:34:34.000000000","message":"+1","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"414581d3558d7d7986da14cdbcb41705946eba13","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":204,"context_line":"            self._ensure_service_profile_not_in_use(context,"},{"line_number":205,"context_line":"                                                    service_profile_id)"},{"line_number":206,"context_line":"            sp_db \u003d self._get_service_profile(context, service_profile_id)"},{"line_number":207,"context_line":"            sp_db.update_fields(sp)"},{"line_number":208,"context_line":"            sp_db.update()"},{"line_number":209,"context_line":"            return self._make_service_profile_dict(sp_db)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_37a70b0c","line":206,"range":{"start_line":206,"start_character":12,"end_line":206,"end_character":18},"in_reply_to":"3a71b18c_abf76457","updated":"2016-12-06 23:36:50.000000000","message":"Done","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"dcbd34f11912afe3fd59eaa01d3df9a646da6acc","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                             sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":222,"context_line":"                             page_reverse\u003dFalse):"},{"line_number":223,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse, marker)"},{"line_number":224,"context_line":"        filters \u003d filters or {}"},{"line_number":225,"context_line":"        sp_objs \u003d obj_flavor.ServiceProfile.get_objects(context, _pager\u003dpager,"},{"line_number":226,"context_line":"                                                        **filters)"},{"line_number":227,"context_line":"        return [self._make_service_profile_dict(sp_obj, fields)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_41c21eea","line":224,"range":{"start_line":224,"start_character":7,"end_line":224,"end_character":31},"updated":"2016-12-06 14:34:34.000000000","message":"ditto line 138","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"414581d3558d7d7986da14cdbcb41705946eba13","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                             sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":222,"context_line":"                             page_reverse\u003dFalse):"},{"line_number":223,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse, marker)"},{"line_number":224,"context_line":"        filters \u003d filters or {}"},{"line_number":225,"context_line":"        sp_objs \u003d obj_flavor.ServiceProfile.get_objects(context, _pager\u003dpager,"},{"line_number":226,"context_line":"                                                        **filters)"},{"line_number":227,"context_line":"        return [self._make_service_profile_dict(sp_obj, fields)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_77db437c","line":224,"range":{"start_line":224,"start_character":7,"end_line":224,"end_character":31},"in_reply_to":"3a71b18c_41c21eea","updated":"2016-12-06 23:36:50.000000000","message":"Same thing , the test_get_service_profiles UT method is calling this method without any filter.","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"d8c7b1f8a076db0ef4d0c1241ed032ab8e8a1d58","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                                 marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":234,"context_line":"        \"\"\"From flavor, choose service profile and find provider for driver.\"\"\""},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":237,"context_line":"            objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":238,"context_line":"                flavor_id\u003dflavor_id)"},{"line_number":239,"context_line":"            if not objs:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_66e66116","line":236,"updated":"2016-12-06 07:59:21.000000000","message":"This with statement seems unnecessary.","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"b485003aa1de9de8793161859cf438ab333049f8","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                                 marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":234,"context_line":"        \"\"\"From flavor, choose service profile and find provider for driver.\"\"\""},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":237,"context_line":"            objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":238,"context_line":"                flavor_id\u003dflavor_id)"},{"line_number":239,"context_line":"            if not objs:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_762f6ff6","line":236,"in_reply_to":"3a71b18c_0d6c859b","updated":"2016-12-08 14:46:50.000000000","message":"Hm, but it seems like we follow the current pattern in the code? It seems to me it\u0027s not the place to fix the potential issue.","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"dcbd34f11912afe3fd59eaa01d3df9a646da6acc","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                                 marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":234,"context_line":"        \"\"\"From flavor, choose service profile and find provider for driver.\"\"\""},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":237,"context_line":"            objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":238,"context_line":"                flavor_id\u003dflavor_id)"},{"line_number":239,"context_line":"            if not objs:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_38fc763d","line":236,"in_reply_to":"3a71b18c_66e66116","updated":"2016-12-06 14:34:34.000000000","message":"+1","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"414581d3558d7d7986da14cdbcb41705946eba13","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                                 marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":234,"context_line":"        \"\"\"From flavor, choose service profile and find provider for driver.\"\"\""},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":237,"context_line":"            objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":238,"context_line":"                flavor_id\u003dflavor_id)"},{"line_number":239,"context_line":"            if not objs:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_d76097a7","line":236,"in_reply_to":"3a71b18c_66e66116","updated":"2016-12-06 23:36:50.000000000","message":"It should be a reader instead of writer[1], but I changed this according to Ihar\u0027s comment[2]\n\n[1] http://specs.openstack.org/openstack/oslo-specs/specs/kilo/make-enginefacade-a-facade.html#proposed-change\n[2] https://review.openstack.org/#/c/306685/21/neutron/db/flavors_db.py@230","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"312edc35e26642ab8a12f1b859bd19ad9cbd9606","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                                 marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":234,"context_line":"        \"\"\"From flavor, choose service profile and find provider for driver.\"\"\""},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":237,"context_line":"            objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":238,"context_line":"                flavor_id\u003dflavor_id)"},{"line_number":239,"context_line":"            if not objs:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_5895283e","line":236,"in_reply_to":"3a71b18c_762f6ff6","updated":"2016-12-09 02:05:52.000000000","message":"get_objects has its own autonested_transaction() inside.\nIIUC, this with statement is redundant.","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"20bd144fc5379afd84ae365a196307f47f02cbbf","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                                 marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":234,"context_line":"        \"\"\"From flavor, choose service profile and find provider for driver.\"\"\""},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":237,"context_line":"            objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":238,"context_line":"                flavor_id\u003dflavor_id)"},{"line_number":239,"context_line":"            if not objs:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_0d6c859b","line":236,"in_reply_to":"3a71b18c_d76097a7","updated":"2016-12-08 04:31:55.000000000","message":"According to Ihar\u0027s comment[2], L.244 should be under this with block.","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"09fa19b3e7ee94abc65b8d877b31f47418c0250c","unresolved":false,"context_lines":[{"line_number":234,"context_line":"                                 marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":235,"context_line":"        \"\"\"From flavor, choose service profile and find provider for driver.\"\"\""},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        with db_api.context_manager.reader.using(context):"},{"line_number":238,"context_line":"            objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":239,"context_line":"                flavor_id\u003dflavor_id)"},{"line_number":240,"context_line":"            if not objs:"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a6eadb0_a51d8068","line":237,"updated":"2016-12-12 20:58:14.000000000","message":"ok let\u0027s remove this context manager, it\u0027s indeed redundant, as IWAMOTO suggests.","commit_id":"6fae241517cbbceab0520b7d2826b72b32123d18"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"bdaa2f5e0ebe6701cd0caa60c4c73dea98b3c5fa","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":238,"context_line":"            flavor_id\u003dflavor_id)"},{"line_number":239,"context_line":"        if not objs:"},{"line_number":240,"context_line":"            raise ext_flavors.FlavorServiceProfileBindingNotFound(sp_id\u003d\u0027\u0027, fl_id\u003dflavor_id)"},{"line_number":241,"context_line":"        # Get the service profile from the first binding"},{"line_number":242,"context_line":"        # TODO(jwarendt) Should become a scheduling framework instead"},{"line_number":243,"context_line":"        sp_obj \u003d self._get_service_profile(context, objs[0].service_profile_id)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_2c3db92b","line":240,"updated":"2016-12-13 12:56:34.000000000","message":"pep8 failure, line too long.","commit_id":"4155624f1d9dbbf649bfc145fe091880ac5f7c26"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"cfe208ac87067c91e655482c501555a24340bd84","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":238,"context_line":"            flavor_id\u003dflavor_id)"},{"line_number":239,"context_line":"        if not objs:"},{"line_number":240,"context_line":"            raise ext_flavors.FlavorServiceProfileBindingNotFound"},{"line_number":241,"context_line":"                sp_id\u003d\u0027\u0027, fl_id\u003dflavor_id)"},{"line_number":242,"context_line":"        # Get the service profile from the first binding"},{"line_number":243,"context_line":"        # TODO(jwarendt) Should become a scheduling framework instead"},{"line_number":244,"context_line":"        sp_obj \u003d self._get_service_profile(context, objs[0].service_profile_id)"}],"source_content_type":"text/x-python","patch_set":27,"id":"1a6eadb0_9260a437","line":241,"range":{"start_line":240,"start_character":12,"end_line":241,"end_character":42},"updated":"2016-12-13 13:39:05.000000000","message":"missing \u0027(\u0027.","commit_id":"d8ee9a7f3b9d083de5d82410314bd2a2fe2e8982"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"c576c7ca9128e0694090ef3a88d53a3adbbe88c9","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        return service_profile"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @staticmethod"},{"line_number":55,"context_line":"    def _make_flavor_dict(flavor_obj, fields\u003dNone):"},{"line_number":56,"context_line":"        res \u003d {\u0027id\u0027: flavor_obj[\u0027id\u0027],"},{"line_number":57,"context_line":"               \u0027name\u0027: flavor_obj[\u0027name\u0027],"},{"line_number":58,"context_line":"               \u0027description\u0027: flavor_obj[\u0027description\u0027],"}],"source_content_type":"text/x-python","patch_set":29,"id":"1a6eadb0_157d4ce7","line":55,"updated":"2016-12-13 19:38:25.000000000","message":"do we still need this helper methods? if Flavor is an ovo now, it\u0027s accessible as a dict, no need to convert it","commit_id":"93066d30e193486279455b2f33741027ce526c5d"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"e9321267ab2a4d854d4f7e853134289958ec1592","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        return service_profile"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @staticmethod"},{"line_number":55,"context_line":"    def _make_flavor_dict(flavor_obj, fields\u003dNone):"},{"line_number":56,"context_line":"        res \u003d {\u0027id\u0027: flavor_obj[\u0027id\u0027],"},{"line_number":57,"context_line":"               \u0027name\u0027: flavor_obj[\u0027name\u0027],"},{"line_number":58,"context_line":"               \u0027description\u0027: flavor_obj[\u0027description\u0027],"}],"source_content_type":"text/x-python","patch_set":29,"id":"1a6eadb0_73175ced","line":55,"in_reply_to":"1a6eadb0_157d4ce7","updated":"2016-12-14 10:34:11.000000000","message":"With adoption of OVO, we have decided to leave the compatibility of make_\u003csmth\u003e_dict and return dict to extensions etc. The main point was that, the make-smth-dict functions are sometimes adding more stuff than the OVO itself contains (see Port, Network, Subnet). I guess it is OK to have the DB access be made by OVO and then consume it in dict form, with runtime addition of all the stuff that make-smth-dict methods are doing right now.","commit_id":"93066d30e193486279455b2f33741027ce526c5d"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"ce50bf702374df09a320b16ccba7d19af12debda","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def delete_flavor_service_profile(self, context,"},{"line_number":158,"context_line":"                                      service_profile_id, flavor_id):"},{"line_number":159,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":160,"context_line":"            if (obj_flavor.FlavorServiceProfileBinding.delete_objects("},{"line_number":161,"context_line":"                    context, service_profile_id\u003dservice_profile_id,"},{"line_number":162,"context_line":"                    flavor_id\u003dflavor_id) \u003d\u003d 0):"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a6eadb0_b4ae3096","line":159,"range":{"start_line":159,"start_character":8,"end_line":159,"end_character":58},"updated":"2016-12-20 19:03:07.000000000","message":"is it still needed ?","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"140958cf13010ab71e506b44fe438b1fd099e2a3","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def delete_flavor_service_profile(self, context,"},{"line_number":158,"context_line":"                                      service_profile_id, flavor_id):"},{"line_number":159,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":160,"context_line":"            if (obj_flavor.FlavorServiceProfileBinding.delete_objects("},{"line_number":161,"context_line":"                    context, service_profile_id\u003dservice_profile_id,"},{"line_number":162,"context_line":"                    flavor_id\u003dflavor_id) \u003d\u003d 0):"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a6eadb0_8ffbbb7a","line":159,"range":{"start_line":159,"start_character":8,"end_line":159,"end_character":58},"in_reply_to":"1a6eadb0_6f3d7f8e","updated":"2016-12-21 13:07:18.000000000","message":"Done","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"62f5fdf33b74ed8f25d9f3c1d0cdc13cee96fa61","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def delete_flavor_service_profile(self, context,"},{"line_number":158,"context_line":"                                      service_profile_id, flavor_id):"},{"line_number":159,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":160,"context_line":"            if (obj_flavor.FlavorServiceProfileBinding.delete_objects("},{"line_number":161,"context_line":"                    context, service_profile_id\u003dservice_profile_id,"},{"line_number":162,"context_line":"                    flavor_id\u003dflavor_id) \u003d\u003d 0):"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a6eadb0_6f3d7f8e","line":159,"range":{"start_line":159,"start_character":8,"end_line":159,"end_character":58},"in_reply_to":"1a6eadb0_b4ae3096","updated":"2016-12-21 12:44:15.000000000","message":"Probably not anymore.","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"ce50bf702374df09a320b16ccba7d19af12debda","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        filters \u003d filters or {}"},{"line_number":222,"context_line":"        sp_objs \u003d obj_flavor.ServiceProfile.get_objects(context, _pager\u003dpager,"},{"line_number":223,"context_line":"                                                        **filters)"},{"line_number":224,"context_line":"        return [self._make_service_profile_dict(sp_obj, fields)"},{"line_number":225,"context_line":"                for sp_obj in sp_objs]"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def get_flavor_next_provider(self, context, flavor_id,"},{"line_number":228,"context_line":"                                 filters\u003dNone, fields\u003dNone,"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a6eadb0_94121461","line":225,"range":{"start_line":224,"start_character":15,"end_line":225,"end_character":38},"updated":"2016-12-20 19:03:07.000000000","message":"for some reason converting back to dict is extra work we are doing, can we extend get_objects to pass the dict builder function ? as it will call get_collection so  instead of having no-op call in https://github.com/openstack/neutron/blob/master/neutron/objects/db/api.py#L52","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"9c870c4751e3ee5fd2b53c402342ea22fae1c266","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        filters \u003d filters or {}"},{"line_number":222,"context_line":"        sp_objs \u003d obj_flavor.ServiceProfile.get_objects(context, _pager\u003dpager,"},{"line_number":223,"context_line":"                                                        **filters)"},{"line_number":224,"context_line":"        return [self._make_service_profile_dict(sp_obj, fields)"},{"line_number":225,"context_line":"                for sp_obj in sp_objs]"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def get_flavor_next_provider(self, context, flavor_id,"},{"line_number":228,"context_line":"                                 filters\u003dNone, fields\u003dNone,"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa48f94a_f8d569b9","line":225,"range":{"start_line":224,"start_character":15,"end_line":225,"end_character":38},"in_reply_to":"1a6eadb0_8f557bc3","updated":"2016-12-21 18:17:44.000000000","message":"that i got it, I meant if we can modify our get_objects to take make_dicts methods as arguments and then forward them to _get_collection instead of having no-op to fill that gap in https://github.com/openstack/neutron/blob/master/neutron/objects/db/api.py#L52","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"62f5fdf33b74ed8f25d9f3c1d0cdc13cee96fa61","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        filters \u003d filters or {}"},{"line_number":222,"context_line":"        sp_objs \u003d obj_flavor.ServiceProfile.get_objects(context, _pager\u003dpager,"},{"line_number":223,"context_line":"                                                        **filters)"},{"line_number":224,"context_line":"        return [self._make_service_profile_dict(sp_obj, fields)"},{"line_number":225,"context_line":"                for sp_obj in sp_objs]"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def get_flavor_next_provider(self, context, flavor_id,"},{"line_number":228,"context_line":"                                 filters\u003dNone, fields\u003dNone,"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a6eadb0_8f557bc3","line":225,"range":{"start_line":224,"start_character":15,"end_line":225,"end_character":38},"in_reply_to":"1a6eadb0_94121461","updated":"2016-12-21 12:44:15.000000000","message":"This is because API layer expects a dict.","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"ce50bf702374df09a320b16ccba7d19af12debda","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                                 marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":231,"context_line":"        \"\"\"From flavor, choose service profile and find provider for driver.\"\"\""},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":234,"context_line":"            flavor_id\u003dflavor_id)"},{"line_number":235,"context_line":"        if not objs:"},{"line_number":236,"context_line":"            raise ext_flavors.FlavorServiceProfileBindingNotFound("},{"line_number":237,"context_line":"                sp_id\u003d\u0027\u0027, fl_id\u003dflavor_id)"},{"line_number":238,"context_line":"        # Get the service profile from the first binding"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a6eadb0_f44fc8bb","line":235,"range":{"start_line":233,"start_character":8,"end_line":235,"end_character":20},"updated":"2016-12-20 19:03:07.000000000","message":"object_exist can serve the purpose here as it will call get_object which will call first() which is what query was doing.","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"62f5fdf33b74ed8f25d9f3c1d0cdc13cee96fa61","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                                 marker\u003dNone, page_reverse\u003dFalse):"},{"line_number":231,"context_line":"        \"\"\"From flavor, choose service profile and find provider for driver.\"\"\""},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        objs \u003d obj_flavor.FlavorServiceProfileBinding.get_objects(context,"},{"line_number":234,"context_line":"            flavor_id\u003dflavor_id)"},{"line_number":235,"context_line":"        if not objs:"},{"line_number":236,"context_line":"            raise ext_flavors.FlavorServiceProfileBindingNotFound("},{"line_number":237,"context_line":"                sp_id\u003d\u0027\u0027, fl_id\u003dflavor_id)"},{"line_number":238,"context_line":"        # Get the service profile from the first binding"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a6eadb0_2ffe27ae","line":235,"range":{"start_line":233,"start_character":8,"end_line":235,"end_character":20},"in_reply_to":"1a6eadb0_f44fc8bb","updated":"2016-12-21 12:44:15.000000000","message":"Note that we use objs[0] later in line 240.","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"}],"neutron/db/models/flavor.py":[{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"534b51cebd79975454511382b4ee60e522719582","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from neutron_lib.db import model_base"},{"line_number":14,"context_line":"from oslo_log import log as logging"},{"line_number":15,"context_line":"import sqlalchemy as sa"},{"line_number":16,"context_line":"from sqlalchemy import orm"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"7a77a97e_e2f63af8","side":"PARENT","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":35},"updated":"2016-11-22 21:05:35.000000000","message":"this change is also being done in [1]\n[1] https://review.openstack.org/#/c/399834/4/neutron/db/models/flavor.py","commit_id":"fa276fc4171913d8015d9c07d2f4703021ee4bd9"}],"neutron/objects/flavor.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"92b4200e815d1b14db14159e0d929331403a53c4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2016 OpenStack Foundation."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_b02f5c3d","line":1,"updated":"2016-04-18 13:53:04.000000000","message":"If you don\u0027t work for the foundation, please remove the line. (lines 1-3 actually).","commit_id":"8327f8cca2d28eaf17f8c0c34b93b494be65ec99"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"92b4200e815d1b14db14159e0d929331403a53c4","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    fields \u003d {"},{"line_number":31,"context_line":"        \u0027flavor_id\u0027: obj_fields.UUIDField(),"},{"line_number":32,"context_line":"        \u0027service_profile_id\u0027: obj_fields.UUIDField(),"},{"line_number":33,"context_line":"        \u0027flavor\u0027: obj_fields.ObjectField(\u0027Flavor\u0027,"},{"line_number":34,"context_line":"                                         nullable\u003dTrue),"},{"line_number":35,"context_line":"        \u0027service_profile\u0027: obj_fields.ObjectField(\u0027ServiceProfile\u0027,"},{"line_number":36,"context_line":"                                                  nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_109a9063","line":33,"updated":"2016-04-18 13:53:04.000000000","message":"Do we plan to update flavour thru the binding? If not, I prefer we keep them detached.","commit_id":"8327f8cca2d28eaf17f8c0c34b93b494be65ec99"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"92b4200e815d1b14db14159e0d929331403a53c4","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        \u0027service_profile_id\u0027: obj_fields.UUIDField(),"},{"line_number":33,"context_line":"        \u0027flavor\u0027: obj_fields.ObjectField(\u0027Flavor\u0027,"},{"line_number":34,"context_line":"                                         nullable\u003dTrue),"},{"line_number":35,"context_line":"        \u0027service_profile\u0027: obj_fields.ObjectField(\u0027ServiceProfile\u0027,"},{"line_number":36,"context_line":"                                                  nullable\u003dTrue),"},{"line_number":37,"context_line":"    }"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_f09c345f","line":35,"updated":"2016-04-18 13:53:04.000000000","message":"Same for service profile","commit_id":"8327f8cca2d28eaf17f8c0c34b93b494be65ec99"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"92b4200e815d1b14db14159e0d929331403a53c4","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        \u0027metainfo\u0027: obj_fields.StringField(),"},{"line_number":57,"context_line":"    }"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    foreign_keys \u003d {\u0027id\u0027: \u0027service_profile_id\u0027}"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"@obj_base.VersionedObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_9094e0e2","line":59,"updated":"2016-04-18 13:53:04.000000000","message":"I don\u0027t follow. What is it for? Foreign keys are supposed to fetch object typed fields, but I don\u0027t see any in this object.","commit_id":"8327f8cca2d28eaf17f8c0c34b93b494be65ec99"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"92b4200e815d1b14db14159e0d929331403a53c4","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        \u0027service_type\u0027: obj_fields.StringField(nullable\u003dTrue),"},{"line_number":75,"context_line":"    }"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    foreign_keys \u003d {\u0027id\u0027: \u0027flavor_id\u0027}"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_30086c2d","line":77,"updated":"2016-04-18 13:53:04.000000000","message":"ditto","commit_id":"8327f8cca2d28eaf17f8c0c34b93b494be65ec99"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"63b3240bb4a293e1fa13c7099f67b87eadcef330","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    fields \u003d {"},{"line_number":46,"context_line":"        \u0027id\u0027: obj_fields.UUIDField(),"},{"line_number":47,"context_line":"        \u0027description\u0027: obj_fields.StringField(),"},{"line_number":48,"context_line":"        \u0027driver\u0027: obj_fields.StringField(),"},{"line_number":49,"context_line":"        \u0027enabled\u0027: obj_fields.BooleanField(default\u003dTrue),"},{"line_number":50,"context_line":"        \u0027metainfo\u0027: obj_fields.StringField(),"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_958ab419","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":48},"updated":"2016-05-20 08:54:34.000000000","message":"Description can be nullable.","commit_id":"22559f3a84df966fdd557d35a1fc655d1356bb3e"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"63b3240bb4a293e1fa13c7099f67b87eadcef330","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        \u0027description\u0027: obj_fields.StringField(),"},{"line_number":48,"context_line":"        \u0027driver\u0027: obj_fields.StringField(),"},{"line_number":49,"context_line":"        \u0027enabled\u0027: obj_fields.BooleanField(default\u003dTrue),"},{"line_number":50,"context_line":"        \u0027metainfo\u0027: obj_fields.StringField(),"},{"line_number":51,"context_line":"    }"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_b5853808","line":50,"range":{"start_line":50,"start_character":8,"end_line":50,"end_character":45},"updated":"2016-05-20 08:54:34.000000000","message":"metainfo can be nullable.","commit_id":"22559f3a84df966fdd557d35a1fc655d1356bb3e"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"63b3240bb4a293e1fa13c7099f67b87eadcef330","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    fields \u003d {"},{"line_number":62,"context_line":"        \u0027id\u0027: obj_fields.UUIDField(),"},{"line_number":63,"context_line":"        \u0027name\u0027: obj_fields.StringField(),"},{"line_number":64,"context_line":"        \u0027description\u0027: obj_fields.StringField(),"},{"line_number":65,"context_line":"        \u0027enabled\u0027: obj_fields.BooleanField(default\u003dTrue),"},{"line_number":66,"context_line":"        \u0027service_type\u0027: obj_fields.StringField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_15fb647a","line":63,"range":{"start_line":63,"start_character":8,"end_line":63,"end_character":40},"updated":"2016-05-20 08:54:34.000000000","message":"name can be nullable.","commit_id":"22559f3a84df966fdd557d35a1fc655d1356bb3e"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"63b3240bb4a293e1fa13c7099f67b87eadcef330","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    fields \u003d {"},{"line_number":62,"context_line":"        \u0027id\u0027: obj_fields.UUIDField(),"},{"line_number":63,"context_line":"        \u0027name\u0027: obj_fields.StringField(),"},{"line_number":64,"context_line":"        \u0027description\u0027: obj_fields.StringField(),"},{"line_number":65,"context_line":"        \u0027enabled\u0027: obj_fields.BooleanField(default\u003dTrue),"},{"line_number":66,"context_line":"        \u0027service_type\u0027: obj_fields.StringField(nullable\u003dTrue),"},{"line_number":67,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_35c0282a","line":64,"range":{"start_line":64,"start_character":8,"end_line":64,"end_character":48},"updated":"2016-05-20 08:54:34.000000000","message":"Description can be nullable.","commit_id":"22559f3a84df966fdd557d35a1fc655d1356bb3e"},{"author":{"_account_id":22218,"name":"Sindhu Devale","email":"sindhu.devale@intel.com","username":"sindhudevale"},"change_message_id":"714197686d8205a955790675be69532b1d71674a","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    primary_keys \u003d [\u0027id\u0027]"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    synthetic_fields \u003d [\u0027flavors\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    fields \u003d {"},{"line_number":55,"context_line":"        \u0027id\u0027: obj_fields.UUIDField(),"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_aff8e5e6","line":52,"updated":"2016-11-15 12:45:13.000000000","message":"Is synthetic_fields needed here?","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"4ab44aa1e293b1a79700d515ba217308ed620012","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    primary_keys \u003d [\u0027id\u0027]"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    synthetic_fields \u003d [\u0027flavors\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    fields \u003d {"},{"line_number":55,"context_line":"        \u0027id\u0027: obj_fields.UUIDField(),"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_47aa1886","line":52,"in_reply_to":"7a77a97e_aff8e5e6","updated":"2016-11-18 23:14:46.000000000","message":"You\u0027re right, the integration shows it\u0027s not required.","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":22218,"name":"Sindhu Devale","email":"sindhu.devale@intel.com","username":"sindhudevale"},"change_message_id":"714197686d8205a955790675be69532b1d71674a","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    primary_keys \u003d [\u0027id\u0027]"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    synthetic_fields \u003d [\u0027service_profiles\u0027]"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    fields \u003d {"},{"line_number":77,"context_line":"        \u0027id\u0027: obj_fields.UUIDField(),"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_6feecd23","line":74,"updated":"2016-11-15 12:45:13.000000000","message":"ditto","commit_id":"a6a9fe544725721a4e21f85a9848970329297a11"},{"author":{"_account_id":22774,"name":"Shashank Kumar Shankar","email":"shashank.kumar.shankar@intel.com","username":"skshankar"},"change_message_id":"ed1fa4d156e71dc17e552d42cc04650a584616d4","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \u0027driver\u0027: obj_fields.StringField(),"},{"line_number":58,"context_line":"        \u0027enabled\u0027: obj_fields.BooleanField(default\u003dTrue),"},{"line_number":59,"context_line":"        \u0027metainfo\u0027: obj_fields.StringField(nullable\u003dTrue),"},{"line_number":60,"context_line":"        \u0027flavors\u0027: obj_fields.ListOfObjectsField("},{"line_number":61,"context_line":"            \u0027FlavorServiceProfileBinding\u0027, nullable\u003dTrue)"},{"line_number":62,"context_line":"    }"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"7a77a97e_bd2b8a32","line":60,"updated":"2016-11-22 19:52:42.000000000","message":"Shouldn\u0027t \u0027flavors\u0027 be a synthetic field if they are used in integration?","commit_id":"f3d4d204ac4a4c5fc0a4b6882ca5aa6d2b332f57"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"534b51cebd79975454511382b4ee60e522719582","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \u0027driver\u0027: obj_fields.StringField(),"},{"line_number":58,"context_line":"        \u0027enabled\u0027: obj_fields.BooleanField(default\u003dTrue),"},{"line_number":59,"context_line":"        \u0027metainfo\u0027: obj_fields.StringField(nullable\u003dTrue),"},{"line_number":60,"context_line":"        \u0027flavors\u0027: obj_fields.ListOfObjectsField("},{"line_number":61,"context_line":"            \u0027FlavorServiceProfileBinding\u0027, nullable\u003dTrue)"},{"line_number":62,"context_line":"    }"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"7a77a97e_e212ba08","line":60,"in_reply_to":"7a77a97e_bd2b8a32","updated":"2016-11-22 21:05:35.000000000","message":"+1","commit_id":"f3d4d204ac4a4c5fc0a4b6882ca5aa6d2b332f57"},{"author":{"_account_id":22774,"name":"Shashank Kumar Shankar","email":"shashank.kumar.shankar@intel.com","username":"skshankar"},"change_message_id":"ed1fa4d156e71dc17e552d42cc04650a584616d4","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        \u0027enabled\u0027: obj_fields.BooleanField(default\u003dTrue),"},{"line_number":81,"context_line":"        \u0027service_type\u0027: obj_fields.StringField(nullable\u003dTrue),"},{"line_number":82,"context_line":"        \u0027service_profiles\u0027: obj_fields.ListOfObjectsField("},{"line_number":83,"context_line":"            \u0027FlavorServiceProfileBinding\u0027, nullable\u003dTrue)"},{"line_number":84,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a77a97e_1de0fef9","line":83,"updated":"2016-11-22 19:52:42.000000000","message":"Shouldn\u0027t \u0027service_profiles\u0027 be a synthetic field if used during integration?","commit_id":"f3d4d204ac4a4c5fc0a4b6882ca5aa6d2b332f57"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"534b51cebd79975454511382b4ee60e522719582","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        \u0027enabled\u0027: obj_fields.BooleanField(default\u003dTrue),"},{"line_number":81,"context_line":"        \u0027service_type\u0027: obj_fields.StringField(nullable\u003dTrue),"},{"line_number":82,"context_line":"        \u0027service_profiles\u0027: obj_fields.ListOfObjectsField("},{"line_number":83,"context_line":"            \u0027FlavorServiceProfileBinding\u0027, nullable\u003dTrue)"},{"line_number":84,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a77a97e_02fa56bd","line":83,"in_reply_to":"7a77a97e_1de0fef9","updated":"2016-11-22 21:05:35.000000000","message":"+1","commit_id":"f3d4d204ac4a4c5fc0a4b6882ca5aa6d2b332f57"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \u0027driver\u0027: obj_fields.StringField(),"},{"line_number":58,"context_line":"        \u0027enabled\u0027: obj_fields.BooleanField(default\u003dTrue),"},{"line_number":59,"context_line":"        \u0027metainfo\u0027: obj_fields.StringField(nullable\u003dTrue),"},{"line_number":60,"context_line":"        \u0027flavors\u0027: obj_fields.ListOfObjectsField("},{"line_number":61,"context_line":"            \u0027FlavorServiceProfileBinding\u0027, nullable\u003dTrue)"},{"line_number":62,"context_line":"    }"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_b4d22c5a","line":60,"updated":"2016-11-29 13:43:18.000000000","message":"how about just exposing IDs? carrying a whole object seems redundant because all of them will have the same ID of the service profile.\n\nAlso, since it\u0027s a lazy loaded field, I suggest we don\u0027t carry it on the object at all. Otherwise performance sucks.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \u0027driver\u0027: obj_fields.StringField(),"},{"line_number":58,"context_line":"        \u0027enabled\u0027: obj_fields.BooleanField(default\u003dTrue),"},{"line_number":59,"context_line":"        \u0027metainfo\u0027: obj_fields.StringField(nullable\u003dTrue),"},{"line_number":60,"context_line":"        \u0027flavors\u0027: obj_fields.ListOfObjectsField("},{"line_number":61,"context_line":"            \u0027FlavorServiceProfileBinding\u0027, nullable\u003dTrue)"},{"line_number":62,"context_line":"    }"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_3e2428c5","line":60,"in_reply_to":"5a74a57a_b4d22c5a","updated":"2016-11-29 18:47:24.000000000","message":"Makes sense, I\u0027m gonna use SetOfUUIDsField for this, in essence there is no way to have a duplicate flavor_id in a collection of FlavoreServiceProfileBinding filtered by a service_profile_id","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        \u0027description\u0027: obj_fields.StringField(nullable\u003dTrue),"},{"line_number":80,"context_line":"        \u0027enabled\u0027: obj_fields.BooleanField(default\u003dTrue),"},{"line_number":81,"context_line":"        \u0027service_type\u0027: obj_fields.StringField(nullable\u003dTrue),"},{"line_number":82,"context_line":"        \u0027service_profiles\u0027: obj_fields.ListOfObjectsField("},{"line_number":83,"context_line":"            \u0027FlavorServiceProfileBinding\u0027, nullable\u003dTrue)"},{"line_number":84,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_54c2b885","line":82,"updated":"2016-11-29 13:43:18.000000000","message":"same question: can\u0027t we keep it as just a list of profile IDs and just as a method on the object? That should help with fetch performance scalability, and honestly, will also look better from API standpoint, because then we won\u0027t need to mess with binding objects that are internal details of data modeling.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"dcbd34f11912afe3fd59eaa01d3df9a646da6acc","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    db_model \u003d models.ServiceProfile"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    primary_keys \u003d [\u0027id\u0027]"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    synthetic_fields \u003d [\u0027flavor_ids\u0027]"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_817ef667","line":46,"range":{"start_line":46,"start_character":4,"end_line":46,"end_character":25},"updated":"2016-12-06 14:34:34.000000000","message":"it is not needed, since \u0027id\u0027 is the default PK.","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"414581d3558d7d7986da14cdbcb41705946eba13","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    db_model \u003d models.ServiceProfile"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    primary_keys \u003d [\u0027id\u0027]"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    synthetic_fields \u003d [\u0027flavor_ids\u0027]"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_57756761","line":46,"range":{"start_line":46,"start_character":4,"end_line":46,"end_character":25},"in_reply_to":"3a71b18c_817ef667","updated":"2016-12-06 23:36:50.000000000","message":"Done","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"dcbd34f11912afe3fd59eaa01d3df9a646da6acc","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    db_model \u003d models.Flavor"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    primary_keys \u003d [\u0027id\u0027]"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    synthetic_fields \u003d [\u0027service_profile_ids\u0027]"},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_81cc36bc","line":78,"range":{"start_line":78,"start_character":4,"end_line":78,"end_character":25},"updated":"2016-12-06 14:34:34.000000000","message":"ditto.","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"414581d3558d7d7986da14cdbcb41705946eba13","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    db_model \u003d models.Flavor"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    primary_keys \u003d [\u0027id\u0027]"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    synthetic_fields \u003d [\u0027service_profile_ids\u0027]"},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_7770a372","line":78,"range":{"start_line":78,"start_character":4,"end_line":78,"end_character":25},"in_reply_to":"3a71b18c_81cc36bc","updated":"2016-12-06 23:36:50.000000000","message":"Done","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"}],"neutron/tests/unit/extensions/test_flavors.py":[{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"96511c3674d17e5af399cf14b80663048e036774","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from neutron.db import api as dbapi"},{"line_number":27,"context_line":"from neutron.db import servicetype_db"},{"line_number":28,"context_line":"from neutron.extensions import flavors"},{"line_number":29,"context_line":"from neutron.objects import flavor as flavor_objcls"},{"line_number":30,"context_line":"from neutron.plugins.common import constants"},{"line_number":31,"context_line":"from neutron.services.flavors import flavors_plugin"},{"line_number":32,"context_line":"from neutron.services import provider_configuration as provconf"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_2c72377d","line":29,"range":{"start_line":29,"start_character":38,"end_line":29,"end_character":51},"updated":"2016-08-19 10:59:04.000000000","message":"nit: flavor_obj would be just enough.","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"f6f83cecc9c0c6df13e33204ea8502c03f121245","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from neutron.db import api as dbapi"},{"line_number":27,"context_line":"from neutron.db import servicetype_db"},{"line_number":28,"context_line":"from neutron.extensions import flavors"},{"line_number":29,"context_line":"from neutron.objects import flavor as flavor_objcls"},{"line_number":30,"context_line":"from neutron.plugins.common import constants"},{"line_number":31,"context_line":"from neutron.services.flavors import flavors_plugin"},{"line_number":32,"context_line":"from neutron.services import provider_configuration as provconf"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_e5bd92d8","line":29,"range":{"start_line":29,"start_character":38,"end_line":29,"end_character":51},"in_reply_to":"1ac06dbe_2c72377d","updated":"2016-08-22 02:54:11.000000000","message":"Done","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"9367f6222b77e679d8a330f84ae1a71655e6e842","unresolved":false,"context_lines":[{"line_number":517,"context_line":""},{"line_number":518,"context_line":"    def test_create_service_profile(self):"},{"line_number":519,"context_line":"        sp, data \u003d self._create_service_profile()"},{"line_number":520,"context_line":"        res \u003d flavor_obj.ServiceProfile.get_objects(self.ctx, id\u003dsp[\u0027id\u0027])"},{"line_number":521,"context_line":"        self.assertEqual(data[\u0027service_profile\u0027][\u0027driver\u0027], res[0][\u0027driver\u0027])"},{"line_number":522,"context_line":"        self.assertEqual(data[\u0027service_profile\u0027][\u0027metainfo\u0027],"},{"line_number":523,"context_line":"                         res[0][\u0027metainfo\u0027])"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa6399be_697cbc72","line":520,"range":{"start_line":520,"start_character":9,"end_line":520,"end_character":74},"updated":"2016-10-19 23:24:02.000000000","message":"this also does not serve the purpose if no rows or multiple results are returned it should raise an exception, since id is primary, get_object will work here.","commit_id":"1e6fa0bd43f6a6eb78c0e9da1bf9a1ae1d50292a"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"d53a092125fef8b349b69586cf490866df78cc32","unresolved":false,"context_lines":[{"line_number":517,"context_line":""},{"line_number":518,"context_line":"    def test_create_service_profile(self):"},{"line_number":519,"context_line":"        sp, data \u003d self._create_service_profile()"},{"line_number":520,"context_line":"        res \u003d flavor_obj.ServiceProfile.get_objects(self.ctx, id\u003dsp[\u0027id\u0027])"},{"line_number":521,"context_line":"        self.assertEqual(data[\u0027service_profile\u0027][\u0027driver\u0027], res[0][\u0027driver\u0027])"},{"line_number":522,"context_line":"        self.assertEqual(data[\u0027service_profile\u0027][\u0027metainfo\u0027],"},{"line_number":523,"context_line":"                         res[0][\u0027metainfo\u0027])"}],"source_content_type":"text/x-python","patch_set":14,"id":"da6895a0_94ca594e","line":520,"range":{"start_line":520,"start_character":9,"end_line":520,"end_character":74},"in_reply_to":"fa6399be_697cbc72","updated":"2016-10-21 17:47:08.000000000","message":"Done","commit_id":"1e6fa0bd43f6a6eb78c0e9da1bf9a1ae1d50292a"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"9367f6222b77e679d8a330f84ae1a71655e6e842","unresolved":false,"context_lines":[{"line_number":567,"context_line":"    def test_delete_service_profile(self):"},{"line_number":568,"context_line":"        sp, data \u003d self._create_service_profile()"},{"line_number":569,"context_line":"        self.plugin.delete_service_profile(self.ctx, sp[\u0027id\u0027])"},{"line_number":570,"context_line":"        res \u003d flavor_obj.ServiceProfile.get_objects(self.ctx)"},{"line_number":571,"context_line":"        self.assertFalse(res)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"    def test_show_service_profile(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa6399be_098c207e","line":570,"range":{"start_line":570,"start_character":8,"end_line":570,"end_character":61},"updated":"2016-10-19 23:24:02.000000000","message":"I wonder why this need get_objects? it deletes one service profile created not all, even though it was query all before but this can be discussed and corrected here,","commit_id":"1e6fa0bd43f6a6eb78c0e9da1bf9a1ae1d50292a"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"9367f6222b77e679d8a330f84ae1a71655e6e842","unresolved":false,"context_lines":[{"line_number":587,"context_line":"            self.ctx,"},{"line_number":588,"context_line":"            {\u0027service_profile\u0027: {\u0027id\u0027: sp[\u0027id\u0027]}},"},{"line_number":589,"context_line":"            fl[\u0027id\u0027])"},{"line_number":590,"context_line":"        binding \u003d flavor_obj.FlavorServiceProfileBinding.get_objects("},{"line_number":591,"context_line":"            self.ctx)[0]"},{"line_number":592,"context_line":"        self.assertEqual(fl[\u0027id\u0027], binding[\u0027flavor_id\u0027])"},{"line_number":593,"context_line":"        self.assertEqual(sp[\u0027id\u0027], binding[\u0027service_profile_id\u0027])"},{"line_number":594,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"fa6399be_89f670f7","line":591,"range":{"start_line":590,"start_character":8,"end_line":591,"end_character":24},"updated":"2016-10-19 23:24:02.000000000","message":"the solution to this would be create a helper method in object/base.py that would call get_object from object/db/api without checking primary key constraint","commit_id":"1e6fa0bd43f6a6eb78c0e9da1bf9a1ae1d50292a"},{"author":{"_account_id":22774,"name":"Shashank Kumar Shankar","email":"shashank.kumar.shankar@intel.com","username":"skshankar"},"change_message_id":"ed1fa4d156e71dc17e552d42cc04650a584616d4","unresolved":false,"context_lines":[{"line_number":487,"context_line":"        fl, _ \u003d self._create_flavor()"},{"line_number":488,"context_line":"        self.plugin.delete_flavor(self.ctx, fl[\u0027id\u0027])"},{"line_number":489,"context_line":"        res \u003d flavor_obj.Flavor.get_objects(self.ctx)"},{"line_number":490,"context_line":"        self.assertEqual(0, len(res))"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def test_show_flavor(self):"},{"line_number":493,"context_line":"        fl, _ \u003d self._create_flavor()"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a77a97e_bdb54ad1","line":490,"updated":"2016-11-22 19:52:42.000000000","message":"Will self.assertIsNone(res) work here?","commit_id":"f3d4d204ac4a4c5fc0a4b6882ca5aa6d2b332f57"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":605,"context_line":"            {\u0027service_profile\u0027: {\u0027id\u0027: sp[\u0027id\u0027]}},"},{"line_number":606,"context_line":"            fl[\u0027id\u0027])"},{"line_number":607,"context_line":"        self.plugin.delete_flavor(self.ctx, fl[\u0027id\u0027])"},{"line_number":608,"context_line":"        binding \u003d flavor_obj.FlavorServiceProfileBinding.get_objects("},{"line_number":609,"context_line":"            self.ctx)"},{"line_number":610,"context_line":"        self.assertEqual(0, len(binding))"},{"line_number":611,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_14ea0074","line":608,"updated":"2016-11-29 13:43:18.000000000","message":"maybe even count()","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":605,"context_line":"            {\u0027service_profile\u0027: {\u0027id\u0027: sp[\u0027id\u0027]}},"},{"line_number":606,"context_line":"            fl[\u0027id\u0027])"},{"line_number":607,"context_line":"        self.plugin.delete_flavor(self.ctx, fl[\u0027id\u0027])"},{"line_number":608,"context_line":"        binding \u003d flavor_obj.FlavorServiceProfileBinding.get_objects("},{"line_number":609,"context_line":"            self.ctx)"},{"line_number":610,"context_line":"        self.assertEqual(0, len(binding))"},{"line_number":611,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_413905d8","line":608,"in_reply_to":"5a74a57a_14ea0074","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":632,"context_line":"        self.plugin.delete_flavor_service_profile("},{"line_number":633,"context_line":"            self.ctx, sp[\u0027id\u0027], fl[\u0027id\u0027])"},{"line_number":634,"context_line":""},{"line_number":635,"context_line":"        binding \u003d flavor_obj.FlavorServiceProfileBinding.get_objects("},{"line_number":636,"context_line":"            self.ctx)"},{"line_number":637,"context_line":"        self.assertEqual(0, len(binding))"},{"line_number":638,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_74fb3447","line":635,"updated":"2016-11-29 13:43:18.000000000","message":"count?","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":632,"context_line":"        self.plugin.delete_flavor_service_profile("},{"line_number":633,"context_line":"            self.ctx, sp[\u0027id\u0027], fl[\u0027id\u0027])"},{"line_number":634,"context_line":""},{"line_number":635,"context_line":"        binding \u003d flavor_obj.FlavorServiceProfileBinding.get_objects("},{"line_number":636,"context_line":"            self.ctx)"},{"line_number":637,"context_line":"        self.assertEqual(0, len(binding))"},{"line_number":638,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_c17275b0","line":635,"in_reply_to":"5a74a57a_74fb3447","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":22776,"name":"Nakul Dahiwade","email":"nakul.dahiwade@intel.com","username":"nakul.dahiwade"},"change_message_id":"58b2ac00673d73e5d41104969c8e7bba86ff6e2f","unresolved":false,"context_lines":[{"line_number":486,"context_line":"    def test_delete_flavor(self):"},{"line_number":487,"context_line":"        fl, _ \u003d self._create_flavor()"},{"line_number":488,"context_line":"        self.plugin.delete_flavor(self.ctx, fl[\u0027id\u0027])"},{"line_number":489,"context_line":"        count \u003d flavor_obj.Flavor.count(self.ctx)"},{"line_number":490,"context_line":"        self.assertEqual(0, count)"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def test_show_flavor(self):"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a6eadb0_32f315a0","line":489,"updated":"2016-12-20 17:44:10.000000000","message":"Can this be replaced with objects_exist followed by a assertFalse?\nobjects_exist being less expensive than count.","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"},{"author":{"_account_id":22776,"name":"Nakul Dahiwade","email":"nakul.dahiwade@intel.com","username":"nakul.dahiwade"},"change_message_id":"d77f579898e9b1e5be8befdddfe6f14b6404f4bc","unresolved":false,"context_lines":[{"line_number":486,"context_line":"    def test_delete_flavor(self):"},{"line_number":487,"context_line":"        fl, _ \u003d self._create_flavor()"},{"line_number":488,"context_line":"        self.plugin.delete_flavor(self.ctx, fl[\u0027id\u0027])"},{"line_number":489,"context_line":"        count \u003d flavor_obj.Flavor.count(self.ctx)"},{"line_number":490,"context_line":"        self.assertEqual(0, count)"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def test_show_flavor(self):"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a6eadb0_d702ce3d","line":489,"in_reply_to":"1a6eadb0_174c466f","updated":"2016-12-20 19:22:55.000000000","message":"objects_exist will avoid fetching more than one object,unlike count().\nMay be in this case it won\u0027t benefit as we are getting none.","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"ce50bf702374df09a320b16ccba7d19af12debda","unresolved":false,"context_lines":[{"line_number":486,"context_line":"    def test_delete_flavor(self):"},{"line_number":487,"context_line":"        fl, _ \u003d self._create_flavor()"},{"line_number":488,"context_line":"        self.plugin.delete_flavor(self.ctx, fl[\u0027id\u0027])"},{"line_number":489,"context_line":"        count \u003d flavor_obj.Flavor.count(self.ctx)"},{"line_number":490,"context_line":"        self.assertEqual(0, count)"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def test_show_flavor(self):"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a6eadb0_174c466f","line":489,"in_reply_to":"1a6eadb0_32f315a0","updated":"2016-12-20 19:03:07.000000000","message":"how objects_exist is less expensive ? they both call _get_filter_query under the hood to return first() or count()\ni don\u0027t see any benefit of using one over other.","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"140958cf13010ab71e506b44fe438b1fd099e2a3","unresolved":false,"context_lines":[{"line_number":486,"context_line":"    def test_delete_flavor(self):"},{"line_number":487,"context_line":"        fl, _ \u003d self._create_flavor()"},{"line_number":488,"context_line":"        self.plugin.delete_flavor(self.ctx, fl[\u0027id\u0027])"},{"line_number":489,"context_line":"        count \u003d flavor_obj.Flavor.count(self.ctx)"},{"line_number":490,"context_line":"        self.assertEqual(0, count)"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def test_show_flavor(self):"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a6eadb0_2f71c744","line":489,"in_reply_to":"1a6eadb0_cfcf737d","updated":"2016-12-21 13:07:18.000000000","message":"Done","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"62f5fdf33b74ed8f25d9f3c1d0cdc13cee96fa61","unresolved":false,"context_lines":[{"line_number":486,"context_line":"    def test_delete_flavor(self):"},{"line_number":487,"context_line":"        fl, _ \u003d self._create_flavor()"},{"line_number":488,"context_line":"        self.plugin.delete_flavor(self.ctx, fl[\u0027id\u0027])"},{"line_number":489,"context_line":"        count \u003d flavor_obj.Flavor.count(self.ctx)"},{"line_number":490,"context_line":"        self.assertEqual(0, count)"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def test_show_flavor(self):"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a6eadb0_cfcf737d","line":489,"in_reply_to":"1a6eadb0_d702ce3d","updated":"2016-12-21 12:44:15.000000000","message":"I think we don\u0027t need to care about speed here, it\u0027s a unit test. But yes, exists() would be semantically closer to the intent.","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"},{"author":{"_account_id":22776,"name":"Nakul Dahiwade","email":"nakul.dahiwade@intel.com","username":"nakul.dahiwade"},"change_message_id":"58b2ac00673d73e5d41104969c8e7bba86ff6e2f","unresolved":false,"context_lines":[{"line_number":605,"context_line":"            {\u0027service_profile\u0027: {\u0027id\u0027: sp[\u0027id\u0027]}},"},{"line_number":606,"context_line":"            fl[\u0027id\u0027])"},{"line_number":607,"context_line":"        self.plugin.delete_flavor(self.ctx, fl[\u0027id\u0027])"},{"line_number":608,"context_line":"        count \u003d flavor_obj.FlavorServiceProfileBinding.count(self.ctx)"},{"line_number":609,"context_line":"        self.assertEqual(0, count)"},{"line_number":610,"context_line":""},{"line_number":611,"context_line":"    def test_associate_service_profile_with_flavor_exists(self):"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a6eadb0_d20f4186","line":608,"updated":"2016-12-20 17:44:10.000000000","message":"ditto","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"140958cf13010ab71e506b44fe438b1fd099e2a3","unresolved":false,"context_lines":[{"line_number":605,"context_line":"            {\u0027service_profile\u0027: {\u0027id\u0027: sp[\u0027id\u0027]}},"},{"line_number":606,"context_line":"            fl[\u0027id\u0027])"},{"line_number":607,"context_line":"        self.plugin.delete_flavor(self.ctx, fl[\u0027id\u0027])"},{"line_number":608,"context_line":"        count \u003d flavor_obj.FlavorServiceProfileBinding.count(self.ctx)"},{"line_number":609,"context_line":"        self.assertEqual(0, count)"},{"line_number":610,"context_line":""},{"line_number":611,"context_line":"    def test_associate_service_profile_with_flavor_exists(self):"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a6eadb0_0fab2b76","line":608,"in_reply_to":"1a6eadb0_d20f4186","updated":"2016-12-21 13:07:18.000000000","message":"Done","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"},{"author":{"_account_id":22776,"name":"Nakul Dahiwade","email":"nakul.dahiwade@intel.com","username":"nakul.dahiwade"},"change_message_id":"58b2ac00673d73e5d41104969c8e7bba86ff6e2f","unresolved":false,"context_lines":[{"line_number":631,"context_line":"        self.plugin.delete_flavor_service_profile("},{"line_number":632,"context_line":"            self.ctx, sp[\u0027id\u0027], fl[\u0027id\u0027])"},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"        count \u003d flavor_obj.FlavorServiceProfileBinding.count(self.ctx)"},{"line_number":635,"context_line":"        self.assertEqual(0, count)"},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":31,"id":"1a6eadb0_322155fc","line":634,"updated":"2016-12-20 17:44:10.000000000","message":"ditto","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"140958cf13010ab71e506b44fe438b1fd099e2a3","unresolved":false,"context_lines":[{"line_number":631,"context_line":"        self.plugin.delete_flavor_service_profile("},{"line_number":632,"context_line":"            self.ctx, sp[\u0027id\u0027], fl[\u0027id\u0027])"},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"        count \u003d flavor_obj.FlavorServiceProfileBinding.count(self.ctx)"},{"line_number":635,"context_line":"        self.assertEqual(0, count)"},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":31,"id":"1a6eadb0_efc8af57","line":634,"in_reply_to":"1a6eadb0_322155fc","updated":"2016-12-21 13:07:18.000000000","message":"Done","commit_id":"35475c89348089e3825b2dd72ea4eebccae3d561"}],"neutron/tests/unit/objects/test_base.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"92b4200e815d1b14db14159e0d929331403a53c4","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        for db_obj in db_objs:"},{"line_number":352,"context_line":"            for field in self._test_class.synthetic_fields:"},{"line_number":353,"context_line":"                if self._test_class.is_object_field(field):"},{"line_number":354,"context_line":"                    obj_class \u003d obj_base.VersionedObjectRegistry.obj_classes("},{"line_number":355,"context_line":"                    ).get(self._test_class.fields[field].objname)[0]"},{"line_number":356,"context_line":"                    foreign_key \u003d obj_class.foreign_keys["},{"line_number":357,"context_line":"                        obj_class.primary_keys[0]]"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_330fd62f","line":354,"updated":"2016-04-18 13:53:04.000000000","message":"I think this is covered in https://review.openstack.org/#/c/306951/ Please rebase.","commit_id":"8327f8cca2d28eaf17f8c0c34b93b494be65ec99"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"92b4200e815d1b14db14159e0d929331403a53c4","unresolved":false,"context_lines":[{"line_number":648,"context_line":"                                               \u0027device_id\u0027: \u0027fake_device\u0027,"},{"line_number":649,"context_line":"                                               \u0027device_owner\u0027: \u0027fake_owner\u0027})"},{"line_number":650,"context_line":""},{"line_number":651,"context_line":"    def _create_test_flavor(self):"},{"line_number":652,"context_line":"        # TODO(electrocucaracha): replace with flavor.create() once we get an"},{"line_number":653,"context_line":"        # object implementation for flavors"},{"line_number":654,"context_line":"        data \u003d {\u0027name\u0027: \u0027GOLD\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_d32662b9","line":651,"updated":"2016-04-18 13:53:04.000000000","message":"This does not belong into the base class. Let\u0027s keep flavour specific methods in flavour specific test class.","commit_id":"8327f8cca2d28eaf17f8c0c34b93b494be65ec99"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"92b4200e815d1b14db14159e0d929331403a53c4","unresolved":false,"context_lines":[{"line_number":650,"context_line":""},{"line_number":651,"context_line":"    def _create_test_flavor(self):"},{"line_number":652,"context_line":"        # TODO(electrocucaracha): replace with flavor.create() once we get an"},{"line_number":653,"context_line":"        # object implementation for flavors"},{"line_number":654,"context_line":"        data \u003d {\u0027name\u0027: \u0027GOLD\u0027,"},{"line_number":655,"context_line":"                \u0027service_type\u0027: \u0027test\u0027,"},{"line_number":656,"context_line":"                \u0027description\u0027: \u0027test-description\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_934cea71","line":653,"updated":"2016-04-18 13:53:04.000000000","message":"?? This TODO is not correct: we have the object now, with the patch that you propose!","commit_id":"8327f8cca2d28eaf17f8c0c34b93b494be65ec99"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"92b4200e815d1b14db14159e0d929331403a53c4","unresolved":false,"context_lines":[{"line_number":656,"context_line":"                \u0027description\u0027: \u0027test-description\u0027,"},{"line_number":657,"context_line":"                \u0027enabled\u0027: True}"},{"line_number":658,"context_line":""},{"line_number":659,"context_line":"        self._flavor \u003d obj_db_api.create_object(self.context,"},{"line_number":660,"context_line":"                                                flavors_db.Flavor,"},{"line_number":661,"context_line":"                                                data)"},{"line_number":662,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_136f3ac6","line":659,"updated":"2016-04-18 13:53:04.000000000","message":"flavour object should be used instead.","commit_id":"8327f8cca2d28eaf17f8c0c34b93b494be65ec99"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"92b4200e815d1b14db14159e0d929331403a53c4","unresolved":false,"context_lines":[{"line_number":660,"context_line":"                                                flavors_db.Flavor,"},{"line_number":661,"context_line":"                                                data)"},{"line_number":662,"context_line":""},{"line_number":663,"context_line":"    def _create_test_service_profile(self):"},{"line_number":664,"context_line":"        # TODO(electrocucaracha): replace with service_profile.create() once we"},{"line_number":665,"context_line":"        # get an object implementation for service profiles"},{"line_number":666,"context_line":"        data \u003d {\u0027description\u0027: \u0027test-description1\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_f371dea9","line":663,"updated":"2016-04-18 13:53:04.000000000","message":"ditto","commit_id":"8327f8cca2d28eaf17f8c0c34b93b494be65ec99"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":1211,"context_line":"        self._port \u003d self._create_port(network_id\u003dnetwork[\u0027id\u0027])"},{"line_number":1212,"context_line":""},{"line_number":1213,"context_line":"    def _create_test_flavor(self):"},{"line_number":1214,"context_line":"        test_flavor \u003d {"},{"line_number":1215,"context_line":"            \u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":1216,"context_line":"            \u0027name\u0027: \u0027GOLD\u0027,"},{"line_number":1217,"context_line":"            \u0027service_type\u0027: \u0027test\u0027,"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_348c5cd9","line":1214,"updated":"2016-11-29 13:43:18.000000000","message":"we could use get_random_fields to generate values","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":1211,"context_line":"        self._port \u003d self._create_port(network_id\u003dnetwork[\u0027id\u0027])"},{"line_number":1212,"context_line":""},{"line_number":1213,"context_line":"    def _create_test_flavor(self):"},{"line_number":1214,"context_line":"        test_flavor \u003d {"},{"line_number":1215,"context_line":"            \u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":1216,"context_line":"            \u0027name\u0027: \u0027GOLD\u0027,"},{"line_number":1217,"context_line":"            \u0027service_type\u0027: \u0027test\u0027,"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_217249ae","line":1214,"in_reply_to":"5a74a57a_348c5cd9","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":1222,"context_line":"        self._flavor.create()"},{"line_number":1223,"context_line":""},{"line_number":1224,"context_line":"    def _create_test_service_profile(self):"},{"line_number":1225,"context_line":"        test_service_profile \u003d {"},{"line_number":1226,"context_line":"            \u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":1227,"context_line":"            \u0027description\u0027: \u0027test-description1\u0027,"},{"line_number":1228,"context_line":"            \u0027driver\u0027: \u0027test-driver1\u0027,"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_34b37c99","line":1225,"updated":"2016-11-29 13:43:18.000000000","message":"ditto","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":1222,"context_line":"        self._flavor.create()"},{"line_number":1223,"context_line":""},{"line_number":1224,"context_line":"    def _create_test_service_profile(self):"},{"line_number":1225,"context_line":"        test_service_profile \u003d {"},{"line_number":1226,"context_line":"            \u0027id\u0027: uuidutils.generate_uuid(),"},{"line_number":1227,"context_line":"            \u0027description\u0027: \u0027test-description1\u0027,"},{"line_number":1228,"context_line":"            \u0027driver\u0027: \u0027test-driver1\u0027,"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_616441e5","line":1225,"in_reply_to":"5a74a57a_34b37c99","updated":"2016-11-29 18:47:24.000000000","message":"Done","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"}],"neutron/tests/unit/objects/test_flavor.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"92b4200e815d1b14db14159e0d929331403a53c4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 OpenStack Foundation."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_93634adc","line":1,"updated":"2016-04-18 13:53:04.000000000","message":"please remove","commit_id":"8327f8cca2d28eaf17f8c0c34b93b494be65ec99"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"92b4200e815d1b14db14159e0d929331403a53c4","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        super(FlavorServiceProfileBindingDbObjectTestCase, self).setUp()"},{"line_number":37,"context_line":"        self._create_test_flavor()"},{"line_number":38,"context_line":"        self._create_test_service_profile()"},{"line_number":39,"context_line":"        self.db_obj[\u0027flavor_id\u0027] \u003d self._flavor[\u0027id\u0027]"},{"line_number":40,"context_line":"        self.db_obj[\u0027service_profile_id\u0027] \u003d self._service_profile[\u0027id\u0027]"},{"line_number":41,"context_line":"        for obj in itertools.chain(self.db_objs, self.obj_fields):"},{"line_number":42,"context_line":"            obj[\u0027flavor_id\u0027] \u003d self._flavor[\u0027id\u0027]"},{"line_number":43,"context_line":"            obj[\u0027service_profile_id\u0027] \u003d self._service_profile[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_738cae7f","line":40,"range":{"start_line":39,"start_character":8,"end_line":40,"end_character":71},"updated":"2016-04-18 13:53:04.000000000","message":"Instead of those lines, add [self.db_obj] into line 41 chain.","commit_id":"8327f8cca2d28eaf17f8c0c34b93b494be65ec99"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"96511c3674d17e5af399cf14b80663048e036774","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            obj[\u0027flavors\u0027][0][\u0027flavor_id\u0027] \u003d _create_test_flavor("},{"line_number":83,"context_line":"                self.context).id"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    # NOTE(korzen) _list method is used in neutron.tests.db.unit.db."},{"line_number":86,"context_line":"    # test_db_base_plugin_v2.DbOperationBoundMixin in _list_and_count_queries()"},{"line_number":87,"context_line":"    # This is used in test_subnet for asserting that number of queries is"},{"line_number":88,"context_line":"    # constant. It can be used also for port and network objects when ready."},{"line_number":89,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":90,"context_line":"        pass"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_0ce49b0b","line":88,"range":{"start_line":85,"start_character":4,"end_line":88,"end_character":76},"updated":"2016-08-19 10:59:04.000000000","message":"It is not relevant note here.","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"96511c3674d17e5af399cf14b80663048e036774","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    # test_db_base_plugin_v2.DbOperationBoundMixin in _list_and_count_queries()"},{"line_number":87,"context_line":"    # This is used in test_subnet for asserting that number of queries is"},{"line_number":88,"context_line":"    # constant. It can be used also for port and network objects when ready."},{"line_number":89,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":90,"context_line":"        pass"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"class FlavorIfaceObjectTestCase(obj_test_base.BaseObjectIfaceTestCase):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_6cdb8f1c","line":90,"range":{"start_line":89,"start_character":4,"end_line":90,"end_character":12},"updated":"2016-08-19 10:59:04.000000000","message":"you should write here down, why are you disabling this UT. Like for synthetic field there is no lazy loading relationship in model db.","commit_id":"3c15dd3cf44548717cc47672db98b1385ea7fd78"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        super(FlavorServiceProfileBindingDbObjectTestCase, self).setUp()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        for obj in itertools.chain(self.db_objs, self.obj_fields, self.objs):"},{"line_number":38,"context_line":"            self._create_test_flavor()"},{"line_number":39,"context_line":"            self._create_test_service_profile()"},{"line_number":40,"context_line":"            obj[\u0027flavor_id\u0027] \u003d self._flavor.id"},{"line_number":41,"context_line":"            obj[\u0027service_profile_id\u0027] \u003d self._service_profile.id"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_947b70bd","line":38,"updated":"2016-11-29 13:43:18.000000000","message":"hm, so since you use chain and not zip, your db_objs will not match obj_fields or objs. How does it work?","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        super(FlavorServiceProfileBindingDbObjectTestCase, self).setUp()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        for obj in itertools.chain(self.db_objs, self.obj_fields, self.objs):"},{"line_number":38,"context_line":"            self._create_test_flavor()"},{"line_number":39,"context_line":"            self._create_test_service_profile()"},{"line_number":40,"context_line":"            obj[\u0027flavor_id\u0027] \u003d self._flavor.id"},{"line_number":41,"context_line":"            obj[\u0027service_profile_id\u0027] \u003d self._service_profile.id"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_81023db3","line":38,"in_reply_to":"5a74a57a_947b70bd","updated":"2016-11-29 18:47:24.000000000","message":"Maybe, that was the reason for test_filtering_by_fields failing.  I\u0027m going to change this to use zip","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    def setUp(self):"},{"line_number":55,"context_line":"        super(ServiceProfileDbObjectTestCase, self).setUp()"},{"line_number":56,"context_line":"        self._create_test_flavor()"},{"line_number":57,"context_line":"        for obj in self.db_objs:"},{"line_number":58,"context_line":"            obj[\u0027flavors\u0027][0][\u0027service_profile_id\u0027] \u003d obj[\u0027id\u0027]"},{"line_number":59,"context_line":"            obj[\u0027flavors\u0027][0][\u0027flavor_id\u0027] \u003d self._flavor.id"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_7457b425","line":57,"updated":"2016-11-29 13:43:18.000000000","message":"but you don\u0027t update other related lists, like self.objs or self.obj_fields. We should keep them synced.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"620d956813d707ff41e400edad5ab100b808907d","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    def setUp(self):"},{"line_number":55,"context_line":"        super(ServiceProfileDbObjectTestCase, self).setUp()"},{"line_number":56,"context_line":"        self._create_test_flavor()"},{"line_number":57,"context_line":"        for obj in self.db_objs:"},{"line_number":58,"context_line":"            obj[\u0027flavors\u0027][0][\u0027service_profile_id\u0027] \u003d obj[\u0027id\u0027]"},{"line_number":59,"context_line":"            obj[\u0027flavors\u0027][0][\u0027flavor_id\u0027] \u003d self._flavor.id"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_619fe150","line":57,"in_reply_to":"5a74a57a_7457b425","updated":"2016-11-29 18:47:24.000000000","message":"True, and this will be affected by changing the definition of the object.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            obj[\u0027flavors\u0027][0][\u0027service_profile_id\u0027] \u003d obj[\u0027id\u0027]"},{"line_number":59,"context_line":"            obj[\u0027flavors\u0027][0][\u0027flavor_id\u0027] \u003d self._flavor.id"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":62,"context_line":"        # NOTE(eliqiao): There are no lazy loading relationship in model db"},{"line_number":63,"context_line":"        # disable this UT to avoid failing"},{"line_number":64,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_542398bc","line":61,"updated":"2016-11-29 13:43:18.000000000","message":"I don\u0027t believe we should make it the default behaviour of the object to provide bad fetch performance. Consider dropping the field that results in the additional fetch.","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"44b30bea5ed60a34db7c3d4439b9ebedd2facab8","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            obj[\u0027flavors\u0027][0][\u0027service_profile_id\u0027] \u003d obj[\u0027id\u0027]"},{"line_number":59,"context_line":"            obj[\u0027flavors\u0027][0][\u0027flavor_id\u0027] \u003d self._flavor.id"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":62,"context_line":"        # NOTE(eliqiao): There are no lazy loading relationship in model db"},{"line_number":63,"context_line":"        # disable this UT to avoid failing"},{"line_number":64,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_4d558fc4","line":61,"in_reply_to":"5a74a57a_542398bc","updated":"2016-11-30 13:48:43.000000000","message":"I guess that \u0027flavors\u0027 or \u0027flavor_ids\u0027 is not lazy loaded, so this is dropping the performance. Should we add lazy loading?","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    def setUp(self):"},{"line_number":78,"context_line":"        super(FlavorDbObjectTestCase, self).setUp()"},{"line_number":79,"context_line":"        self._create_test_service_profile()"},{"line_number":80,"context_line":"        for obj in self.db_objs:"},{"line_number":81,"context_line":"            obj[\u0027service_profiles\u0027][0][\u0027service_profile_id\u0027] \u003d \\"},{"line_number":82,"context_line":"                self._service_profile.id"},{"line_number":83,"context_line":"            obj[\u0027service_profiles\u0027][0][\u0027flavor_id\u0027] \u003d obj[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_742ed4a5","line":80,"updated":"2016-11-29 13:43:18.000000000","message":"ditto","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"084588afd8ffd39ddfc1bff9ad9da7bbb2b06033","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                self._service_profile.id"},{"line_number":83,"context_line":"            obj[\u0027service_profiles\u0027][0][\u0027flavor_id\u0027] \u003d obj[\u0027id\u0027]"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":86,"context_line":"        # NOTE(eliqiao): There are no lazy loading relationship in model db"},{"line_number":87,"context_line":"        # disable this UT to avoid failing"},{"line_number":88,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_b41a2c7b","line":85,"updated":"2016-11-29 13:43:18.000000000","message":"ditto","commit_id":"925b6d60f50fd62baeae857df0fd77a1f62dd162"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"dcbd34f11912afe3fd59eaa01d3df9a646da6acc","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    def setUp(self):"},{"line_number":33,"context_line":"        super(FlavorServiceProfileBindingDbObjectTestCase, self).setUp()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"        for db_obj, fields, obj in zip("},{"line_number":36,"context_line":"                self.db_objs, self.obj_fields, self.objs):"},{"line_number":37,"context_line":"            self._create_test_flavor()"},{"line_number":38,"context_line":"            db_obj[\u0027flavor_id\u0027] \u003d self._flavor.id"},{"line_number":39,"context_line":"            fields[\u0027flavor_id\u0027] \u003d self._flavor.id"},{"line_number":40,"context_line":"            obj.flavor_id \u003d self._flavor.id"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"            self._create_test_service_profile()"},{"line_number":43,"context_line":"            db_obj[\u0027service_profile_id\u0027] \u003d self._service_profile.id"},{"line_number":44,"context_line":"            fields[\u0027service_profile_id\u0027] \u003d self._service_profile.id"},{"line_number":45,"context_line":"            obj.service_profile_id \u003d self._service_profile.id"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class ServiceProfileIfaceObjectTestCase(obj_test_base.BaseObjectIfaceTestCase):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_6159da8d","line":45,"range":{"start_line":35,"start_character":8,"end_line":45,"end_character":61},"updated":"2016-12-06 14:34:34.000000000","message":"Maybe you can use new function update_obj_fields()","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"414581d3558d7d7986da14cdbcb41705946eba13","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    def setUp(self):"},{"line_number":33,"context_line":"        super(FlavorServiceProfileBindingDbObjectTestCase, self).setUp()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"        for db_obj, fields, obj in zip("},{"line_number":36,"context_line":"                self.db_objs, self.obj_fields, self.objs):"},{"line_number":37,"context_line":"            self._create_test_flavor()"},{"line_number":38,"context_line":"            db_obj[\u0027flavor_id\u0027] \u003d self._flavor.id"},{"line_number":39,"context_line":"            fields[\u0027flavor_id\u0027] \u003d self._flavor.id"},{"line_number":40,"context_line":"            obj.flavor_id \u003d self._flavor.id"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"            self._create_test_service_profile()"},{"line_number":43,"context_line":"            db_obj[\u0027service_profile_id\u0027] \u003d self._service_profile.id"},{"line_number":44,"context_line":"            fields[\u0027service_profile_id\u0027] \u003d self._service_profile.id"},{"line_number":45,"context_line":"            obj.service_profile_id \u003d self._service_profile.id"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class ServiceProfileIfaceObjectTestCase(obj_test_base.BaseObjectIfaceTestCase):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_b7707b41","line":45,"range":{"start_line":35,"start_character":8,"end_line":45,"end_character":61},"in_reply_to":"3a71b18c_6159da8d","updated":"2016-12-06 23:36:50.000000000","message":"Done","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"dcbd34f11912afe3fd59eaa01d3df9a646da6acc","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    _test_class \u003d flavor.ServiceProfile"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":59,"context_line":"        # NOTE(eliqiao): There are no lazy loading relationship in model db"},{"line_number":60,"context_line":"        # disable this UT to avoid failing"},{"line_number":61,"context_line":"        pass"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_01c3c657","line":60,"range":{"start_line":59,"start_character":8,"end_line":60,"end_character":42},"updated":"2016-12-06 14:34:34.000000000","message":"please add which relationship is not lazy loaded.","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"414581d3558d7d7986da14cdbcb41705946eba13","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    _test_class \u003d flavor.ServiceProfile"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":59,"context_line":"        # NOTE(eliqiao): There are no lazy loading relationship in model db"},{"line_number":60,"context_line":"        # disable this UT to avoid failing"},{"line_number":61,"context_line":"        pass"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_b7295b9d","line":60,"range":{"start_line":59,"start_character":8,"end_line":60,"end_character":42},"in_reply_to":"3a71b18c_01c3c657","updated":"2016-12-06 23:36:50.000000000","message":"Done","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"414581d3558d7d7986da14cdbcb41705946eba13","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    _test_class \u003d flavor.Flavor"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":75,"context_line":"        # NOTE(eliqiao): There are no lazy loading relationship in model db"},{"line_number":76,"context_line":"        # disable this UT to avoid failing"},{"line_number":77,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_f71d9373","line":76,"range":{"start_line":75,"start_character":8,"end_line":76,"end_character":42},"updated":"2016-12-06 23:36:50.000000000","message":"ditto: line 60","commit_id":"0c8cbb3905e95fc76bdef9dc2ec2175bf7971497"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c293554dd73601c85fef114512f405fed18940e5","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.update_obj_fields("},{"line_number":35,"context_line":"            {\u0027flavor_id\u0027: lambda: self._create_test_flavor().id})"},{"line_number":36,"context_line":"        self.update_obj_fields("},{"line_number":37,"context_line":"            {\u0027service_profile_id\u0027: lambda: self._create_test_service_profile("},{"line_number":38,"context_line":"            ).id})"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"3a71b18c_95c7cc63","line":37,"updated":"2016-12-07 18:28:26.000000000","message":"the indent is not ideal here but whateva.","commit_id":"6fae241517cbbceab0520b7d2826b72b32123d18"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c293554dd73601c85fef114512f405fed18940e5","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    _test_class \u003d flavor.ServiceProfile"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":52,"context_line":"        # NOTE(electrocucaracha): There are no lazy loading for flavors"},{"line_number":53,"context_line":"        # relationship in ServiceProfile model db disable this UT to avoid"},{"line_number":54,"context_line":"        # failing"},{"line_number":55,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a71b18c_95da6c16","line":52,"updated":"2016-12-07 18:28:26.000000000","message":"It\u0027s not ideal, but looking at current usage patterns for the model, it seems like we almost always extract the ID lists, so I guess it\u0027s not that big of a deal, for now.","commit_id":"6fae241517cbbceab0520b7d2826b72b32123d18"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"c576c7ca9128e0694090ef3a88d53a3adbbe88c9","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    _test_class \u003d flavor.ServiceProfile"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":52,"context_line":"        # NOTE(electrocucaracha): There are no lazy loading for flavors"},{"line_number":53,"context_line":"        # relationship in ServiceProfile model db disable this UT to avoid"},{"line_number":54,"context_line":"        # failing"},{"line_number":55,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":29,"id":"1a6eadb0_15cb8c1f","line":52,"updated":"2016-12-13 19:38:25.000000000","message":"maybe we should fix the UT not to fail?","commit_id":"93066d30e193486279455b2f33741027ce526c5d"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"e9321267ab2a4d854d4f7e853134289958ec1592","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    _test_class \u003d flavor.ServiceProfile"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":52,"context_line":"        # NOTE(electrocucaracha): There are no lazy loading for flavors"},{"line_number":53,"context_line":"        # relationship in ServiceProfile model db disable this UT to avoid"},{"line_number":54,"context_line":"        # failing"},{"line_number":55,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":29,"id":"1a6eadb0_33cb2474","line":52,"in_reply_to":"1a6eadb0_15cb8c1f","updated":"2016-12-14 10:34:11.000000000","message":"Fixing it requires to add lazy loading of relationships defined in code. Not sure we want to add it in OVO adoption patch.","commit_id":"93066d30e193486279455b2f33741027ce526c5d"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"974c3ab29a7c8f0c329b60282d73be5cb3310556","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    _test_class \u003d flavor.ServiceProfile"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":52,"context_line":"        # NOTE(electrocucaracha): There are no lazy loading for flavors"},{"line_number":53,"context_line":"        # relationship in ServiceProfile model db disable this UT to avoid"},{"line_number":54,"context_line":"        # failing"},{"line_number":55,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":29,"id":"1a6eadb0_f8d5891b","line":52,"in_reply_to":"1a6eadb0_33cb2474","updated":"2016-12-16 14:38:21.000000000","message":"not in this patch but let\u0027s file a bug and add a FIXME :)","commit_id":"93066d30e193486279455b2f33741027ce526c5d"}],"neutron/tests/unit/objects/test_objects.py":[{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"534b51cebd79975454511382b4ee60e522719582","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    \u0027SegmentHostMapping\u0027: \u00271.0-521597cf82ead26217c3bd10738f00f0\u0027,"},{"line_number":62,"context_line":"    \u0027Subnet\u0027: \u00271.0-b71e720f45fff2a39759940e010be7d1\u0027,"},{"line_number":63,"context_line":"    \u0027SubnetPool\u0027: \u00271.0-e8300bfbc4762cc88a7f6205b52da2f8\u0027,"},{"line_number":64,"context_line":"    \u0027ServiceProfile\u0027: \u00271.0-ea9bbf82be971af90e26052aae81b0ac\u0027,"},{"line_number":65,"context_line":"    \u0027SubnetPoolPrefix\u0027: \u00271.0-13c15144135eb869faa4a76dc3ee3b6c\u0027,"},{"line_number":66,"context_line":"    \u0027SubPort\u0027: \u00271.0-72c8471068db1f0491b5480fe49b52bb\u0027,"},{"line_number":67,"context_line":"    \u0027Trunk\u0027: \u00271.0-80ebebb57f2b0dbb510f84d91421ed10\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a77a97e_a23a8296","line":64,"range":{"start_line":64,"start_character":0,"end_line":64,"end_character":61},"updated":"2016-11-22 21:05:35.000000000","message":"afaik this is in alphabetical order,\n\"ServiceProfile\" should come SegmentHostMapping","commit_id":"f3d4d204ac4a4c5fc0a4b6882ca5aa6d2b332f57"}]}
