)]}'
{"neutron/api/v2/base.py":[{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"7ade47a3cae8a3467f4e73f8c9799f95fc328c47","unresolved":false,"context_lines":[{"line_number":553,"context_line":"                msg \u003d _(\"Running without keystone AuthN requires \""},{"line_number":554,"context_line":"                        \" that tenant_id is specified\")"},{"line_number":555,"context_line":"                raise webob.exc.HTTPBadRequest(msg)"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"    @staticmethod"},{"line_number":558,"context_line":"    def prepare_request_body(context, body, is_create, resource, attr_info,"},{"line_number":559,"context_line":"                             allow_bulk\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_800ef38d","side":"PARENT","line":556,"updated":"2014-08-06 23:21:32.000000000","message":"Do we not need the general else: here anymore?","commit_id":"f32c0ebe68f0ad27ac7a9717ef3f6e3406f953a1"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"9b1c2297ea6e4dba256ff736f42e2330aae36ec5","unresolved":false,"context_lines":[{"line_number":553,"context_line":"                msg \u003d _(\"Running without keystone AuthN requires \""},{"line_number":554,"context_line":"                        \" that tenant_id is specified\")"},{"line_number":555,"context_line":"                raise webob.exc.HTTPBadRequest(msg)"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"    @staticmethod"},{"line_number":558,"context_line":"    def prepare_request_body(context, body, is_create, resource, attr_info,"},{"line_number":559,"context_line":"                             allow_bulk\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_ef65931d","side":"PARENT","line":556,"in_reply_to":"baada198_77a08a36","updated":"2014-08-08 19:19:19.000000000","message":"Right, ok, so tenant_id must always be in context or attr_info?  Or if not, you want populate to NOT populate, which is a behavior change?","commit_id":"f32c0ebe68f0ad27ac7a9717ef3f6e3406f953a1"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"9469694d6fa76f8925f274336b014cb552e8a507","unresolved":false,"context_lines":[{"line_number":553,"context_line":"                msg \u003d _(\"Running without keystone AuthN requires \""},{"line_number":554,"context_line":"                        \" that tenant_id is specified\")"},{"line_number":555,"context_line":"                raise webob.exc.HTTPBadRequest(msg)"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"    @staticmethod"},{"line_number":558,"context_line":"    def prepare_request_body(context, body, is_create, resource, attr_info,"},{"line_number":559,"context_line":"                             allow_bulk\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_77a08a36","side":"PARENT","line":556,"in_reply_to":"baada198_800ef38d","updated":"2014-08-08 12:53:13.000000000","message":"No, that\u0027s the point of the change","commit_id":"f32c0ebe68f0ad27ac7a9717ef3f6e3406f953a1"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"eb099c1f2a2b3bed97cc13906e7b1147a478d824","unresolved":false,"context_lines":[{"line_number":553,"context_line":"                msg \u003d _(\"Running without keystone AuthN requires \""},{"line_number":554,"context_line":"                        \" that tenant_id is specified\")"},{"line_number":555,"context_line":"                raise webob.exc.HTTPBadRequest(msg)"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"    @staticmethod"},{"line_number":558,"context_line":"    def prepare_request_body(context, body, is_create, resource, attr_info,"},{"line_number":559,"context_line":"                             allow_bulk\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_9047bd1d","side":"PARENT","line":556,"in_reply_to":"baada198_ef65931d","updated":"2014-08-10 18:19:42.000000000","message":"I don\u0027t want to populate tenant_id if it\u0027s not in the resource description, e.g. attr_info (that\u0027s the case of admin-only resources such as flavors)","commit_id":"f32c0ebe68f0ad27ac7a9717ef3f6e3406f953a1"}],"neutron/db/flavors_db.py":[{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"94eb09b3d2faa7f17480f8ce23dfcfebdb5d7426","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":54,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":55,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue)"},{"line_number":56,"context_line":"    #service_type \u003d sa.Column(sa.String(36), nullable\u003dFalse)"},{"line_number":57,"context_line":"    #service_profiles"},{"line_number":58,"context_line":"    service_profiles \u003d orm.relationship(\"FlavorServiceProfileBinding\","},{"line_number":59,"context_line":"        cascade\u003d\"all, delete-orphan\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_4687a5d7","line":56,"updated":"2014-07-16 21:17:23.000000000","message":"I still think flavors should be service_type specific--  I know we\u0027re discussing this on the mailing list and would like to see us come to some conclusions there, eh.","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"b8aad954387d3b869f5276c7edb8a2883995290b","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":54,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":55,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue)"},{"line_number":56,"context_line":"    #service_type \u003d sa.Column(sa.String(36), nullable\u003dFalse)"},{"line_number":57,"context_line":"    #service_profiles"},{"line_number":58,"context_line":"    service_profiles \u003d orm.relationship(\"FlavorServiceProfileBinding\","},{"line_number":59,"context_line":"        cascade\u003d\"all, delete-orphan\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_b914064e","line":56,"in_reply_to":"baada198_4687a5d7","updated":"2014-07-17 12:14:39.000000000","message":"moving back to service-specific, while leaving this attribute nullable in database.","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"94eb09b3d2faa7f17480f8ce23dfcfebdb5d7426","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":64,"context_line":"    driver \u003d sa.Column(sa.String(1024), nullable\u003dFalse)"},{"line_number":65,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue)"},{"line_number":66,"context_line":"    metainfo \u003d sa.Column(sa.String(4096))"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class FlavorServiceProfileBinding(model_base.BASEV2):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_c1d63ff1","line":66,"updated":"2014-07-16 21:17:23.000000000","message":"4096 bytes might not be enough for some appliances\u0027 metadata.","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"b8aad954387d3b869f5276c7edb8a2883995290b","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":64,"context_line":"    driver \u003d sa.Column(sa.String(1024), nullable\u003dFalse)"},{"line_number":65,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue)"},{"line_number":66,"context_line":"    metainfo \u003d sa.Column(sa.String(4096))"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class FlavorServiceProfileBinding(model_base.BASEV2):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_1905f213","line":66,"in_reply_to":"baada198_c1d63ff1","updated":"2014-07-17 12:14:39.000000000","message":"Ok, to be defined.\nI\u0027m concerned about how this will be populated via cli","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"94eb09b3d2faa7f17480f8ce23dfcfebdb5d7426","unresolved":false,"context_lines":[{"line_number":141,"context_line":"               \u0027description\u0027: sp_db[\u0027description\u0027],"},{"line_number":142,"context_line":"               \u0027driver\u0027: sp_db[\u0027driver\u0027],"},{"line_number":143,"context_line":"               \u0027enabled\u0027: sp_db[\u0027enabled\u0027],"},{"line_number":144,"context_line":"               \u0027metainfo\u0027: sp_db[\u0027metainfo\u0027]}"},{"line_number":145,"context_line":"        return self._fields(res, fields)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _ensure_flavor_not_in_use(self, context, flavor_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_61d9f3f3","line":144,"updated":"2014-07-16 21:17:23.000000000","message":"Since flavors and service profiles are n:m in this code, does it make sense to to list all the flavors in which this service profile is referenced, like you\u0027re doing in _make_flavor_dict (but reversed)? I could see this making things a little easier for GUI developers, for example.","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"b8aad954387d3b869f5276c7edb8a2883995290b","unresolved":false,"context_lines":[{"line_number":141,"context_line":"               \u0027description\u0027: sp_db[\u0027description\u0027],"},{"line_number":142,"context_line":"               \u0027driver\u0027: sp_db[\u0027driver\u0027],"},{"line_number":143,"context_line":"               \u0027enabled\u0027: sp_db[\u0027enabled\u0027],"},{"line_number":144,"context_line":"               \u0027metainfo\u0027: sp_db[\u0027metainfo\u0027]}"},{"line_number":145,"context_line":"        return self._fields(res, fields)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _ensure_flavor_not_in_use(self, context, flavor_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_dc38c8d6","line":144,"in_reply_to":"baada198_61d9f3f3","updated":"2014-07-17 12:14:39.000000000","message":"Ok, will add this","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"94eb09b3d2faa7f17480f8ce23dfcfebdb5d7426","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                                    page_reverse\u003dpage_reverse)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def _load_driver(self, profile):"},{"line_number":193,"context_line":"        driver_klass \u003d importutils.import_class(profile.driver)"},{"line_number":194,"context_line":"        return driver_klass"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def create_service_profile(self, context, service_profile):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_0199171f","line":193,"updated":"2014-07-16 21:17:23.000000000","message":"driver_klass? Is that spelling to avoid a collision somewhere with driver_class?","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"b8aad954387d3b869f5276c7edb8a2883995290b","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                                    page_reverse\u003dpage_reverse)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def _load_driver(self, profile):"},{"line_number":193,"context_line":"        driver_klass \u003d importutils.import_class(profile.driver)"},{"line_number":194,"context_line":"        return driver_klass"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def create_service_profile(self, context, service_profile):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_3c2e248d","line":193,"in_reply_to":"baada198_0199171f","updated":"2014-07-17 12:14:39.000000000","message":"i\u0027m just following this tiny cargo cult :D","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"94eb09b3d2faa7f17480f8ce23dfcfebdb5d7426","unresolved":false,"context_lines":[{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def update_service_profile(self, context, sp_id, service_profile):"},{"line_number":218,"context_line":"        sp \u003d service_profile[\u0027service_profile\u0027]"},{"line_number":219,"context_line":"        self._ensure_service_profile_not_in_use(context, sp_id)"},{"line_number":220,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":221,"context_line":"            sp_db \u003d self._get_service_profile(context, sp_id)"},{"line_number":222,"context_line":"            sp_db.update(sp)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_c101df07","line":219,"updated":"2014-07-16 21:17:23.000000000","message":"Service profiles are not changeable when in use? ie. we\u0027re treating them as immutable when in use? (That seems fine to me, but I don\u0027t think it was discussed, and others may have other opinions on this.)","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"4354ce9b8a875d150124ab58d2ad92ffaf2b9b62","unresolved":false,"context_lines":[{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def update_service_profile(self, context, sp_id, service_profile):"},{"line_number":218,"context_line":"        sp \u003d service_profile[\u0027service_profile\u0027]"},{"line_number":219,"context_line":"        self._ensure_service_profile_not_in_use(context, sp_id)"},{"line_number":220,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":221,"context_line":"            sp_db \u003d self._get_service_profile(context, sp_id)"},{"line_number":222,"context_line":"            sp_db.update(sp)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_435da978","line":219,"in_reply_to":"baada198_1c6160d3","updated":"2014-07-17 17:36:07.000000000","message":"Agreed!","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"b8aad954387d3b869f5276c7edb8a2883995290b","unresolved":false,"context_lines":[{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def update_service_profile(self, context, sp_id, service_profile):"},{"line_number":218,"context_line":"        sp \u003d service_profile[\u0027service_profile\u0027]"},{"line_number":219,"context_line":"        self._ensure_service_profile_not_in_use(context, sp_id)"},{"line_number":220,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":221,"context_line":"            sp_db \u003d self._get_service_profile(context, sp_id)"},{"line_number":222,"context_line":"            sp_db.update(sp)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_1c6160d3","line":219,"in_reply_to":"baada198_c101df07","updated":"2014-07-17 12:14:39.000000000","message":"If service profile is bound to a service instance, it\u0027s better to preserve it. Or at least it deserves separate discussion about the policy of modifying such profiles. I think it would be fair to forbid it in the first step.","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"94eb09b3d2faa7f17480f8ce23dfcfebdb5d7426","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        self._ensure_service_profile_not_in_use(context, sp_id)"},{"line_number":220,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":221,"context_line":"            sp_db \u003d self._get_service_profile(context, sp_id)"},{"line_number":222,"context_line":"            sp_db.update(sp)"},{"line_number":223,"context_line":"        return self._make_service_profile_dict(sp_db)"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    def get_service_profile(self, context, sp_id, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_7c3518da","line":222,"updated":"2014-07-16 21:17:23.000000000","message":"Do we want to make sure that certain attributes of the service profile can\u0027t be changed after creation? I\u0027m thinking we probably don\u0027t want to let the operator change the driver, though all the other fields seem fair game for changing, to me.","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"b8aad954387d3b869f5276c7edb8a2883995290b","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        self._ensure_service_profile_not_in_use(context, sp_id)"},{"line_number":220,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":221,"context_line":"            sp_db \u003d self._get_service_profile(context, sp_id)"},{"line_number":222,"context_line":"            sp_db.update(sp)"},{"line_number":223,"context_line":"        return self._make_service_profile_dict(sp_db)"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    def get_service_profile(self, context, sp_id, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_dcad28ec","line":222,"in_reply_to":"baada198_7c3518da","updated":"2014-07-17 12:14:39.000000000","message":"Yep, driver and metainfo is what I\u0027d prefer to see immutable","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"4354ce9b8a875d150124ab58d2ad92ffaf2b9b62","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        self._ensure_service_profile_not_in_use(context, sp_id)"},{"line_number":220,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":221,"context_line":"            sp_db \u003d self._get_service_profile(context, sp_id)"},{"line_number":222,"context_line":"            sp_db.update(sp)"},{"line_number":223,"context_line":"        return self._make_service_profile_dict(sp_db)"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    def get_service_profile(self, context, sp_id, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_43d4c9bc","line":222,"in_reply_to":"baada198_dcad28ec","updated":"2014-07-17 17:36:07.000000000","message":"I could see an argument for allowing the metainfo to be changed. But as a first step, I don\u0027t mind if we make it immutable. (Operator can always work around by creating a new service profile and then migrating instances to the new service profile.)","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"a1025956eb0baff49d71b41fb76d14eb85c523e1","unresolved":false,"context_lines":[{"line_number":62,"context_line":"class Flavor(model_base.BASEV2, models_v2.HasId):"},{"line_number":63,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":64,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":65,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue)"},{"line_number":66,"context_line":"    # Make it True for multi-type flavors"},{"line_number":67,"context_line":"    service_type \u003d sa.Column(sa.String(36), nullable\u003dTrue)"},{"line_number":68,"context_line":"    service_profiles \u003d orm.relationship(\"FlavorServiceProfileBinding\","}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_3c00e401","line":65,"updated":"2014-07-17 12:32:42.000000000","message":"Besides default\u003dTrue please add server_default\u003dsa.sql.true()","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"d1e08cb47de79834250f7c80d9ce106ec883a2d7","unresolved":false,"context_lines":[{"line_number":62,"context_line":"class Flavor(model_base.BASEV2, models_v2.HasId):"},{"line_number":63,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":64,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":65,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue)"},{"line_number":66,"context_line":"    # Make it True for multi-type flavors"},{"line_number":67,"context_line":"    service_type \u003d sa.Column(sa.String(36), nullable\u003dTrue)"},{"line_number":68,"context_line":"    service_profiles \u003d orm.relationship(\"FlavorServiceProfileBinding\","}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_6f91c045","line":65,"in_reply_to":"baada198_3c00e401","updated":"2014-07-17 12:41:17.000000000","message":"Done","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"a1025956eb0baff49d71b41fb76d14eb85c523e1","unresolved":false,"context_lines":[{"line_number":72,"context_line":"class ServiceProfile(model_base.BASEV2, models_v2.HasId):"},{"line_number":73,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":74,"context_line":"    driver \u003d sa.Column(sa.String(1024), nullable\u003dFalse)"},{"line_number":75,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue)"},{"line_number":76,"context_line":"    metainfo \u003d sa.Column(sa.String(4096))"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_8f08d429","line":75,"updated":"2014-07-17 12:32:42.000000000","message":"Besides default\u003dTrue please add server_default\u003dsa.sql.true()","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"d1e08cb47de79834250f7c80d9ce106ec883a2d7","unresolved":false,"context_lines":[{"line_number":72,"context_line":"class ServiceProfile(model_base.BASEV2, models_v2.HasId):"},{"line_number":73,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":74,"context_line":"    driver \u003d sa.Column(sa.String(1024), nullable\u003dFalse)"},{"line_number":75,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue)"},{"line_number":76,"context_line":"    metainfo \u003d sa.Column(sa.String(4096))"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_af9bd864","line":75,"in_reply_to":"baada198_8f08d429","updated":"2014-07-17 12:41:17.000000000","message":"Done","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"fadc64bb75a1f31ea3d1b05094b87e9bbb98a7c3","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":74,"context_line":"    driver \u003d sa.Column(sa.String(1024), nullable\u003dFalse)"},{"line_number":75,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue)"},{"line_number":76,"context_line":"    metainfo \u003d sa.Column(sa.String(4096))"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"class FlavorServiceProfileBinding(model_base.BASEV2):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_c3e1b92b","line":76,"updated":"2014-07-17 17:32:55.000000000","message":"Revision 8 Eugene said about metainfo \u003e 4096 bytes: I\u0027m concerned about how this will be populated via cli\n\nMy thought there is to optionally pass a filename containing the metainfo on the cli, which then gets imported into this blob in the database. I could see vendors actually distributing these files as a simple way for operators to enable a specific feature set. (Also, it should be a LargeBinary type, since we\u0027re not placing any constraints on what data the vendor wants to include here.)","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"9048515127256e1eb704b0ea4724391583a7cfab","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":74,"context_line":"    driver \u003d sa.Column(sa.String(1024), nullable\u003dFalse)"},{"line_number":75,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue)"},{"line_number":76,"context_line":"    metainfo \u003d sa.Column(sa.String(4096))"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"class FlavorServiceProfileBinding(model_base.BASEV2):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_f8b5787e","line":76,"in_reply_to":"baada198_2835ec45","updated":"2014-07-18 03:31:55.000000000","message":"I disagree, because that implies that the driver at least needs to have access to the file in question, which requires the operator to then populate it on disk wherever the driver might run. Is there any reason this shouldn\u0027t be stored in the database and avoid that hassle?","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f53129b0a54656454ced9258beb2a7c0901cc843","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":74,"context_line":"    driver \u003d sa.Column(sa.String(1024), nullable\u003dFalse)"},{"line_number":75,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue)"},{"line_number":76,"context_line":"    metainfo \u003d sa.Column(sa.String(4096))"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"class FlavorServiceProfileBinding(model_base.BASEV2):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_2835ec45","line":76,"in_reply_to":"baada198_c3e1b92b","updated":"2014-07-17 20:16:29.000000000","message":"I think passing files might not be necessary, because file loading can be then delegated to the driver itself, and we only pass configuration file name in the metainfo. That might make both API and CLI simple for this attribute.","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"fadc64bb75a1f31ea3d1b05094b87e9bbb98a7c3","unresolved":false,"context_lines":[{"line_number":155,"context_line":"               \u0027description\u0027: sp_db[\u0027description\u0027],"},{"line_number":156,"context_line":"               \u0027driver\u0027: sp_db[\u0027driver\u0027],"},{"line_number":157,"context_line":"               \u0027enabled\u0027: sp_db[\u0027enabled\u0027],"},{"line_number":158,"context_line":"               \u0027metainfo\u0027: sp_db[\u0027metainfo\u0027]}"},{"line_number":159,"context_line":"        return self._fields(res, fields)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def _ensure_flavor_not_in_use(self, context, flavor_id):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_831a6116","line":158,"updated":"2014-07-17 17:32:55.000000000","message":"Just re-commenting so that I don\u0027t lose track of what Eugene said he would add:  Since flavors and service profiles are n:m in this code, does it make sense to to list all the flavors in which this service profile is referenced, like you\u0027re doing in _make_flavor_dict (but reversed)? I could see this making things a little easier for GUI developers, for example.","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f53129b0a54656454ced9258beb2a7c0901cc843","unresolved":false,"context_lines":[{"line_number":155,"context_line":"               \u0027description\u0027: sp_db[\u0027description\u0027],"},{"line_number":156,"context_line":"               \u0027driver\u0027: sp_db[\u0027driver\u0027],"},{"line_number":157,"context_line":"               \u0027enabled\u0027: sp_db[\u0027enabled\u0027],"},{"line_number":158,"context_line":"               \u0027metainfo\u0027: sp_db[\u0027metainfo\u0027]}"},{"line_number":159,"context_line":"        return self._fields(res, fields)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def _ensure_flavor_not_in_use(self, context, flavor_id):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_4838603d","line":158,"in_reply_to":"baada198_831a6116","updated":"2014-07-17 20:16:29.000000000","message":"yep, I\u0027ll add it","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"fadc64bb75a1f31ea3d1b05094b87e9bbb98a7c3","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        return self._fields(res, fields)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def _load_driver(self, profile):"},{"line_number":253,"context_line":"        driver_klass \u003d importutils.import_class(profile.driver)"},{"line_number":254,"context_line":"        return driver_klass"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def create_service_profile(self, context, service_profile):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_c34379ad","line":253,"updated":"2014-07-17 17:32:55.000000000","message":"Don\u0027t you mean kargo kult? ;)","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f53129b0a54656454ced9258beb2a7c0901cc843","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        return self._fields(res, fields)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def _load_driver(self, profile):"},{"line_number":253,"context_line":"        driver_klass \u003d importutils.import_class(profile.driver)"},{"line_number":254,"context_line":"        return driver_klass"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def create_service_profile(self, context, service_profile):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_88399841","line":253,"in_reply_to":"baada198_c34379ad","updated":"2014-07-17 20:16:29.000000000","message":"exactly :)","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":7576,"name":"Gary Duan","email":"garyduan@gmail.com","username":"garyduan"},"change_message_id":"62d85dee58a1de927fa25f8e0ca99ea13a8a8a89","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        return self._make_service_profile_dict(sp_db)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def update_service_profile(self, context,"},{"line_number":278,"context_line":"                               service_profile_id, service_profile):"},{"line_number":279,"context_line":"        sp \u003d service_profile[\u0027service_profile\u0027]"},{"line_number":280,"context_line":"        self._ensure_service_profile_not_in_use(context, service_profile_id)"},{"line_number":281,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_4bb2d349","line":278,"updated":"2014-07-20 23:43:03.000000000","message":"Metainfo is a contract between service profile and backend driver, and it supports put. Should we notify the driver when metainfo is changed.","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"b683edf1c09038f496be4dc69cabc66d217ba6f5","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        return self._make_service_profile_dict(sp_db)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def update_service_profile(self, context,"},{"line_number":278,"context_line":"                               service_profile_id, service_profile):"},{"line_number":279,"context_line":"        sp \u003d service_profile[\u0027service_profile\u0027]"},{"line_number":280,"context_line":"        self._ensure_service_profile_not_in_use(context, service_profile_id)"},{"line_number":281,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_bf646622","line":278,"in_reply_to":"baada198_4bb2d349","updated":"2014-07-22 14:57:47.000000000","message":"I don\u0027t think we have to do that. At least it seems such for now.\n\nService profile will be available to the driver when it will handle actual service instance creation","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":7576,"name":"Gary Duan","email":"garyduan@gmail.com","username":"garyduan"},"change_message_id":"1f9ec60a18ae1df16274c0c20a21941c8a920cd0","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        return self._make_service_profile_dict(sp_db)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def update_service_profile(self, context,"},{"line_number":278,"context_line":"                               service_profile_id, service_profile):"},{"line_number":279,"context_line":"        sp \u003d service_profile[\u0027service_profile\u0027]"},{"line_number":280,"context_line":"        self._ensure_service_profile_not_in_use(context, service_profile_id)"},{"line_number":281,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_09c875a7","line":278,"in_reply_to":"baada198_bf646622","updated":"2014-07-22 18:26:29.000000000","message":"Agree. I don\u0027t think we should support that either. As you already checked the profile is not in use, I think it\u0027s fine.","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6f568e4e16d44de240b1570af4aa930befbe2901","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class ServiceProfileInUse(qexception.InUse):"},{"line_number":49,"context_line":"    message \u003d _(\"Service Profile %(sp_id)s is used by some service instance\")"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"class FlavorServiceProfileBindingExists(qexception.Conflict):"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_066046cf","line":49,"updated":"2014-07-30 12:52:13.000000000","message":"some -\u003e another","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"91cb5821860e3bfa8019b63b1f5c991b75e46256","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class ServiceProfileInUse(qexception.InUse):"},{"line_number":49,"context_line":"    message \u003d _(\"Service Profile %(sp_id)s is used by some service instance\")"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"class FlavorServiceProfileBindingExists(qexception.Conflict):"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_a96bedb7","line":49,"in_reply_to":"baada198_066046cf","updated":"2014-07-31 08:31:04.000000000","message":"why?","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6f568e4e16d44de240b1570af4aa930befbe2901","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"class FlavorServiceProfileBindingExists(qexception.Conflict):"},{"line_number":53,"context_line":"    message \u003d _(\"Service Profile %(sp_id)s is already associated\""},{"line_number":54,"context_line":"                \" with flavor %(fl_id)s\")"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class FlavorServiceProfileBindingNotFound(qexception.NotFound):"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_465a3e1f","line":54,"updated":"2014-07-30 12:52:13.000000000","message":"nit: consistency/readability move leading space to previous line.","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"91cb5821860e3bfa8019b63b1f5c991b75e46256","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"class FlavorServiceProfileBindingExists(qexception.Conflict):"},{"line_number":53,"context_line":"    message \u003d _(\"Service Profile %(sp_id)s is already associated\""},{"line_number":54,"context_line":"                \" with flavor %(fl_id)s\")"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class FlavorServiceProfileBindingNotFound(qexception.NotFound):"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_096059cf","line":54,"in_reply_to":"baada198_465a3e1f","updated":"2014-07-31 08:31:04.000000000","message":"sure","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6f568e4e16d44de240b1570af4aa930befbe2901","unresolved":false,"context_lines":[{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def update_flavor(self, context, flavor_id, flavor):"},{"line_number":193,"context_line":"        fl \u003d flavor[\u0027flavor\u0027]"},{"line_number":194,"context_line":"        self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":195,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":196,"context_line":"            fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":197,"context_line":"            fl_db.update(fl)"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_a6da3a49","line":194,"updated":"2014-07-30 12:52:13.000000000","message":"Will this need to be inside the transaction?","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"91cb5821860e3bfa8019b63b1f5c991b75e46256","unresolved":false,"context_lines":[{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def update_flavor(self, context, flavor_id, flavor):"},{"line_number":193,"context_line":"        fl \u003d flavor[\u0027flavor\u0027]"},{"line_number":194,"context_line":"        self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":195,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":196,"context_line":"            fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":197,"context_line":"            fl_db.update(fl)"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_899b89c7","line":194,"in_reply_to":"baada198_a6da3a49","updated":"2014-07-31 08:31:04.000000000","message":"that\u0027s hardly necessary in this case, but ok","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6f568e4e16d44de240b1570af4aa930befbe2901","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        return self._make_flavor_dict(fl, fields)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def delete_flavor(self, context, flavor_id):"},{"line_number":205,"context_line":"        self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":206,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":207,"context_line":"            fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":208,"context_line":"            context.session.delete(fl_db)"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_46e95ee2","line":205,"updated":"2014-07-30 12:52:13.000000000","message":"ditto?","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"91cb5821860e3bfa8019b63b1f5c991b75e46256","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        return self._make_flavor_dict(fl, fields)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def delete_flavor(self, context, flavor_id):"},{"line_number":205,"context_line":"        self._ensure_flavor_not_in_use(context, flavor_id)"},{"line_number":206,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":207,"context_line":"            fl_db \u003d self._get_flavor(context, flavor_id)"},{"line_number":208,"context_line":"            context.session.delete(fl_db)"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_e9ab25d5","line":205,"in_reply_to":"baada198_46e95ee2","updated":"2014-07-31 08:31:04.000000000","message":"Done","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6f568e4e16d44de240b1570af4aa930befbe2901","unresolved":false,"context_lines":[{"line_number":276,"context_line":"            svc_type \u003d driver_klass.get_service_type()"},{"line_number":277,"context_line":"            plugin \u003d self.manager.get_service_plugins()[svc_type]"},{"line_number":278,"context_line":"            plugin.driver_loaded(driver_klass(plugin), sp_db)"},{"line_number":279,"context_line":"        except Exception:"},{"line_number":280,"context_line":"            # TODO(enikanorov): raise proper exception"},{"line_number":281,"context_line":"            self.delete_service_profile(context, sp_db[\u0027id\u0027])"},{"line_number":282,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_66b3c2ec","line":279,"updated":"2014-07-30 12:52:13.000000000","message":"Catch specific exception(s)?","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"91cb5821860e3bfa8019b63b1f5c991b75e46256","unresolved":false,"context_lines":[{"line_number":276,"context_line":"            svc_type \u003d driver_klass.get_service_type()"},{"line_number":277,"context_line":"            plugin \u003d self.manager.get_service_plugins()[svc_type]"},{"line_number":278,"context_line":"            plugin.driver_loaded(driver_klass(plugin), sp_db)"},{"line_number":279,"context_line":"        except Exception:"},{"line_number":280,"context_line":"            # TODO(enikanorov): raise proper exception"},{"line_number":281,"context_line":"            self.delete_service_profile(context, sp_db[\u0027id\u0027])"},{"line_number":282,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_89e9c91b","line":279,"in_reply_to":"baada198_66b3c2ec","updated":"2014-07-31 08:31:04.000000000","message":"No, i have specifically used generic exception here because there are no contract about what exceptions could be thrown in the code block above.\nIt could be anything - from invalid class path/entrypoint name to some exceptions that arise during driver initialization.","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6f568e4e16d44de240b1570af4aa930befbe2901","unresolved":false,"context_lines":[{"line_number":285,"context_line":"    def update_service_profile(self, context,"},{"line_number":286,"context_line":"                               service_profile_id, service_profile):"},{"line_number":287,"context_line":"        sp \u003d service_profile[\u0027service_profile\u0027]"},{"line_number":288,"context_line":"        self._ensure_service_profile_not_in_use(context, service_profile_id)"},{"line_number":289,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":290,"context_line":"            sp_db \u003d self._get_service_profile(context, service_profile_id)"},{"line_number":291,"context_line":"            sp_db.update(sp)"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_26c1ca2f","line":288,"updated":"2014-07-30 12:52:13.000000000","message":"Inside of transaction?","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"91cb5821860e3bfa8019b63b1f5c991b75e46256","unresolved":false,"context_lines":[{"line_number":285,"context_line":"    def update_service_profile(self, context,"},{"line_number":286,"context_line":"                               service_profile_id, service_profile):"},{"line_number":287,"context_line":"        sp \u003d service_profile[\u0027service_profile\u0027]"},{"line_number":288,"context_line":"        self._ensure_service_profile_not_in_use(context, service_profile_id)"},{"line_number":289,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":290,"context_line":"            sp_db \u003d self._get_service_profile(context, service_profile_id)"},{"line_number":291,"context_line":"            sp_db.update(sp)"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_c9f3c107","line":288,"in_reply_to":"baada198_26c1ca2f","updated":"2014-07-31 08:31:04.000000000","message":"Done","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6f568e4e16d44de240b1570af4aa930befbe2901","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        return self._make_service_profile_dict(sp_db, fields)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def delete_service_profile(self, context, sp_id):"},{"line_number":299,"context_line":"        self._ensure_service_profile_not_in_use(context, sp_id)"},{"line_number":300,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":301,"context_line":"            sp_db \u003d self._get_service_profile(context, sp_id)"},{"line_number":302,"context_line":"            context.session.delete(sp_db)"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_86dd3616","line":299,"updated":"2014-07-30 12:52:13.000000000","message":"ditto?","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"91cb5821860e3bfa8019b63b1f5c991b75e46256","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        return self._make_service_profile_dict(sp_db, fields)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def delete_service_profile(self, context, sp_id):"},{"line_number":299,"context_line":"        self._ensure_service_profile_not_in_use(context, sp_id)"},{"line_number":300,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":301,"context_line":"            sp_db \u003d self._get_service_profile(context, sp_id)"},{"line_number":302,"context_line":"            context.session.delete(sp_db)"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_e9d96585","line":299,"in_reply_to":"baada198_86dd3616","updated":"2014-07-31 08:31:04.000000000","message":"Done","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"7ade47a3cae8a3467f4e73f8c9799f95fc328c47","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"class Flavor(model_base.BASEV2, models_v2.HasId):"},{"line_number":63,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":64,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":65,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue,"},{"line_number":66,"context_line":"                        server_default\u003dsa.sql.true())"},{"line_number":67,"context_line":"    # Make it True for multi-type flavors"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_a07857f8","line":64,"updated":"2014-08-06 23:21:32.000000000","message":"1024 seems short for marketing copy.","commit_id":"e8f3c209cf09f8b7dec4ce9cbf6ba6ae28606fbe"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"9469694d6fa76f8925f274336b014cb552e8a507","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"class Flavor(model_base.BASEV2, models_v2.HasId):"},{"line_number":63,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":64,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":65,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue,"},{"line_number":66,"context_line":"                        server_default\u003dsa.sql.true())"},{"line_number":67,"context_line":"    # Make it True for multi-type flavors"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_f76bbaed","line":64,"in_reply_to":"baada198_a07857f8","updated":"2014-08-08 12:53:13.000000000","message":"That\u0027s usual length for \u0027description\u0027 filed in the API","commit_id":"e8f3c209cf09f8b7dec4ce9cbf6ba6ae28606fbe"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"7ade47a3cae8a3467f4e73f8c9799f95fc328c47","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":64,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":65,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue,"},{"line_number":66,"context_line":"                        server_default\u003dsa.sql.true())"},{"line_number":67,"context_line":"    # Make it True for multi-type flavors"},{"line_number":68,"context_line":"    service_type \u003d sa.Column(sa.String(36), nullable\u003dTrue)"},{"line_number":69,"context_line":"    service_profiles \u003d orm.relationship(\"FlavorServiceProfileBinding\","}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_60171f9e","line":66,"updated":"2014-08-06 23:21:32.000000000","message":"Isn\u0027t this called \u0027admin_state_up\u0027 in most other places?","commit_id":"e8f3c209cf09f8b7dec4ce9cbf6ba6ae28606fbe"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"9469694d6fa76f8925f274336b014cb552e8a507","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":64,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":65,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue,"},{"line_number":66,"context_line":"                        server_default\u003dsa.sql.true())"},{"line_number":67,"context_line":"    # Make it True for multi-type flavors"},{"line_number":68,"context_line":"    service_type \u003d sa.Column(sa.String(36), nullable\u003dTrue)"},{"line_number":69,"context_line":"    service_profiles \u003d orm.relationship(\"FlavorServiceProfileBinding\","}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_f739faf1","line":66,"in_reply_to":"baada198_60171f9e","updated":"2014-08-08 12:53:13.000000000","message":"Not exactly. Semantics here is different.\nWhile admin_state_up turns some object from operational to non-operational state and vice versa, to flavor such action is not applicable because flavor is scheduling hint. Disabling flavor doesn\u0027t disable resources that are associated with it.","commit_id":"e8f3c209cf09f8b7dec4ce9cbf6ba6ae28606fbe"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"9b1c2297ea6e4dba256ff736f42e2330aae36ec5","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":64,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":65,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue,"},{"line_number":66,"context_line":"                        server_default\u003dsa.sql.true())"},{"line_number":67,"context_line":"    # Make it True for multi-type flavors"},{"line_number":68,"context_line":"    service_type \u003d sa.Column(sa.String(36), nullable\u003dTrue)"},{"line_number":69,"context_line":"    service_profiles \u003d orm.relationship(\"FlavorServiceProfileBinding\","}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_cf47ef78","line":66,"in_reply_to":"baada198_f739faf1","updated":"2014-08-08 19:19:19.000000000","message":"That was my guess, thanks.","commit_id":"e8f3c209cf09f8b7dec4ce9cbf6ba6ae28606fbe"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"7ade47a3cae8a3467f4e73f8c9799f95fc328c47","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":75,"context_line":"    driver \u003d sa.Column(sa.String(1024), nullable\u003dFalse)"},{"line_number":76,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue,"},{"line_number":77,"context_line":"                        server_default\u003dsa.sql.true())"},{"line_number":78,"context_line":"    metainfo \u003d sa.Column(sa.String(4096))"},{"line_number":79,"context_line":"    flavors \u003d orm.relationship(\"FlavorServiceProfileBinding\")"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_2064474c","line":77,"updated":"2014-08-06 23:21:32.000000000","message":"same comment as above, re: boolean naming","commit_id":"e8f3c209cf09f8b7dec4ce9cbf6ba6ae28606fbe"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"9469694d6fa76f8925f274336b014cb552e8a507","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    description \u003d sa.Column(sa.String(1024))"},{"line_number":75,"context_line":"    driver \u003d sa.Column(sa.String(1024), nullable\u003dFalse)"},{"line_number":76,"context_line":"    enabled \u003d sa.Column(sa.Boolean, nullable\u003dFalse, default\u003dTrue,"},{"line_number":77,"context_line":"                        server_default\u003dsa.sql.true())"},{"line_number":78,"context_line":"    metainfo \u003d sa.Column(sa.String(4096))"},{"line_number":79,"context_line":"    flavors \u003d orm.relationship(\"FlavorServiceProfileBinding\")"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_1d868fba","line":77,"in_reply_to":"baada198_2064474c","updated":"2014-08-08 12:53:13.000000000","message":"same reasoning as in previous comment","commit_id":"e8f3c209cf09f8b7dec4ce9cbf6ba6ae28606fbe"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"7ade47a3cae8a3467f4e73f8c9799f95fc328c47","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                   nullable\u003dFalse, primary_key \u003d True)"},{"line_number":111,"context_line":"    instance_id \u003d sa.Column(sa.String(36),"},{"line_number":112,"context_line":"                            nullable\u003dFalse, primary_key \u003d True)"},{"line_number":113,"context_line":"\"\"\""},{"line_number":114,"context_line":""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"class FlavorManager(common_db_mixin.CommonDbMixin):"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_c0562b5e","line":113,"updated":"2014-08-06 23:21:32.000000000","message":"Are we using these at some point?  Why are they commented out?","commit_id":"e8f3c209cf09f8b7dec4ce9cbf6ba6ae28606fbe"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"9469694d6fa76f8925f274336b014cb552e8a507","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                   nullable\u003dFalse, primary_key \u003d True)"},{"line_number":111,"context_line":"    instance_id \u003d sa.Column(sa.String(36),"},{"line_number":112,"context_line":"                            nullable\u003dFalse, primary_key \u003d True)"},{"line_number":113,"context_line":"\"\"\""},{"line_number":114,"context_line":""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"class FlavorManager(common_db_mixin.CommonDbMixin):"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_9d5d3f7f","line":113,"in_reply_to":"baada198_c0562b5e","updated":"2014-08-08 12:53:13.000000000","message":"That should be used in follow up patches. I think i\u0027ll remove it in a couple of iterations","commit_id":"e8f3c209cf09f8b7dec4ce9cbf6ba6ae28606fbe"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"7ade47a3cae8a3467f4e73f8c9799f95fc328c47","unresolved":false,"context_lines":[{"line_number":278,"context_line":"            plugin \u003d self.manager.get_service_plugins()[svc_type]"},{"line_number":279,"context_line":"            plugin.driver_loaded(driver_klass(plugin), sp_db)"},{"line_number":280,"context_line":"        except Exception:"},{"line_number":281,"context_line":"            # TODO(enikanorov): raise proper exception"},{"line_number":282,"context_line":"            self.delete_service_profile(context, sp_db[\u0027id\u0027])"},{"line_number":283,"context_line":"            raise"},{"line_number":284,"context_line":"        return self._make_service_profile_dict(sp_db)"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_a0edb78f","line":281,"updated":"2014-08-06 23:21:32.000000000","message":"or just re-raise","commit_id":"e8f3c209cf09f8b7dec4ce9cbf6ba6ae28606fbe"}],"neutron/db/migration/alembic_migrations/versions/31337ec0ffee_flavors.py":[{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"fadc64bb75a1f31ea3d1b05094b87e9bbb98a7c3","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\"Flavor framework"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Revision ID: 313373c0ffee"},{"line_number":19,"context_line":"Revises: 3927f7f7c456"},{"line_number":20,"context_line":"Create Date: 2014-07-17 03:00:00.00"},{"line_number":21,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_c3f6195d","line":18,"updated":"2014-07-17 17:32:55.000000000","message":"Elite Coffee? I guess this ID isn\u0027t randomly generated? ;)","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f53129b0a54656454ced9258beb2a7c0901cc843","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\"Flavor framework"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Revision ID: 313373c0ffee"},{"line_number":19,"context_line":"Revises: 3927f7f7c456"},{"line_number":20,"context_line":"Create Date: 2014-07-17 03:00:00.00"},{"line_number":21,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_4886a0dc","line":18,"in_reply_to":"baada198_c3f6195d","updated":"2014-07-17 20:16:29.000000000","message":"i was just lucky ;)","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"fadc64bb75a1f31ea3d1b05094b87e9bbb98a7c3","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        sa.Column(\u0027driver\u0027, sa.String(1024), nullable\u003dFalse),"},{"line_number":58,"context_line":"        sa.Column(\u0027enabled\u0027, sa.Boolean, nullable\u003dFalse,"},{"line_number":59,"context_line":"                  server_default\u003dsa.sql.true()),"},{"line_number":60,"context_line":"        sa.Column(\u0027metainfo\u0027, sa.String(4096)),"},{"line_number":61,"context_line":"        sa.PrimaryKeyConstraint(\u0027id\u0027)"},{"line_number":62,"context_line":"    )"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_e3bb1d73","line":60,"updated":"2014-07-17 17:32:55.000000000","message":"Again, see earlier comments about this being a LargeBinary field.","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f53129b0a54656454ced9258beb2a7c0901cc843","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        sa.Column(\u0027driver\u0027, sa.String(1024), nullable\u003dFalse),"},{"line_number":58,"context_line":"        sa.Column(\u0027enabled\u0027, sa.Boolean, nullable\u003dFalse,"},{"line_number":59,"context_line":"                  server_default\u003dsa.sql.true()),"},{"line_number":60,"context_line":"        sa.Column(\u0027metainfo\u0027, sa.String(4096)),"},{"line_number":61,"context_line":"        sa.PrimaryKeyConstraint(\u0027id\u0027)"},{"line_number":62,"context_line":"    )"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_087ca8ea","line":60,"in_reply_to":"baada198_e3bb1d73","updated":"2014-07-17 20:16:29.000000000","message":"lets discuss this separately. Once we get to some decision, I\u0027ll fix it in all places.","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"d4d0dbc0d182cb074f59a818bccd5fe4d4623a4a","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"migration_for_plugins \u003d ["},{"line_number":28,"context_line":"    \u0027*\u0027"},{"line_number":29,"context_line":"]"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"from alembic import op"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_8de979b9","line":29,"updated":"2014-08-28 13:20:22.000000000","message":"All lines about conditions should be removed from migration.","commit_id":"2d6df8df550dcde59e3369aea956427dbbc85a4d"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"d4d0dbc0d182cb074f59a818bccd5fe4d4623a4a","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def upgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":39,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":40,"context_line":"        return"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    op.create_table("},{"line_number":43,"context_line":"        \u0027flavors\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_cdce115a","line":40,"updated":"2014-08-28 13:20:22.000000000","message":"Remove this check","commit_id":"2d6df8df550dcde59e3369aea956427dbbc85a4d"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"d4d0dbc0d182cb074f59a818bccd5fe4d4623a4a","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":73,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":74,"context_line":"        return"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    op.drop_table(\u0027flavorserviceprofilebindings\u0027)"},{"line_number":77,"context_line":"    op.drop_table(\u0027serviceprofiles\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_edd74dec","line":74,"updated":"2014-08-28 13:20:22.000000000","message":"The same","commit_id":"2d6df8df550dcde59e3369aea956427dbbc85a4d"}],"neutron/extensions/flavors.py":[{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"94eb09b3d2faa7f17480f8ce23dfcfebdb5d7426","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                        \u0027is_visible\u0027: True},"},{"line_number":54,"context_line":"        # service_profile belong to one service type for now"},{"line_number":55,"context_line":"        #\u0027service_types\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":56,"context_line":"        #                  \u0027is_visible\u0027: True},"},{"line_number":57,"context_line":"        \u0027driver\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":58,"context_line":"                   \u0027validate\u0027: {\u0027type:string\u0027: None},"},{"line_number":59,"context_line":"                   \u0027is_visible\u0027: True,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_9c010cb2","line":56,"updated":"2014-07-16 21:17:23.000000000","message":"So, I assume that if service_type ends up being an attribute of the flavor (which I\u0027m arguing it should be), then there won\u0027t be a service_types attribute on the service_profile? Or do we need it here to perform a validation that flavor.service_type matches service_profile.service_type, right?\n\nAlso, in this structure, you\u0027re listing a plural \"service_types\". Do you see a case where a service_profile would have more than one service_type?","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"b8aad954387d3b869f5276c7edb8a2883995290b","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                        \u0027is_visible\u0027: True},"},{"line_number":54,"context_line":"        # service_profile belong to one service type for now"},{"line_number":55,"context_line":"        #\u0027service_types\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":56,"context_line":"        #                  \u0027is_visible\u0027: True},"},{"line_number":57,"context_line":"        \u0027driver\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":58,"context_line":"                   \u0027validate\u0027: {\u0027type:string\u0027: None},"},{"line_number":59,"context_line":"                   \u0027is_visible\u0027: True,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_1ce6c044","line":56,"in_reply_to":"baada198_9c010cb2","updated":"2014-07-17 12:14:39.000000000","message":"Probably this attribute is not needed.\n\nIn case some hypothetical driver supports several service types, that could be a case","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"94eb09b3d2faa7f17480f8ce23dfcfebdb5d7426","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                   \u0027is_visible\u0027: True,"},{"line_number":60,"context_line":"                   \u0027default\u0027: attr.ATTR_NOT_SPECIFIED},"},{"line_number":61,"context_line":"        \u0027metainfo\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":62,"context_line":"                     \u0027validate\u0027: {\u0027type:json_string\u0027: None},"},{"line_number":63,"context_line":"                     \u0027is_visible\u0027: True},"},{"line_number":64,"context_line":"        \u0027enabled\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":65,"context_line":"                    \u0027validate\u0027: {\u0027type:boolean\u0027: None},"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_fcbda8d8","line":62,"updated":"2014-07-16 21:17:23.000000000","message":"You\u0027re forcing metainfo to be a json_string here. That may not be a valid assumption for some drivers, so I don\u0027t think we should enforce it here.","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"94eb09b3d2faa7f17480f8ce23dfcfebdb5d7426","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    @classmethod"},{"line_number":97,"context_line":"    def get_namespace(cls):"},{"line_number":98,"context_line":"        return \"http://docs.openstack.org/ext/neutron/flavors/api/v1.0\""},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @classmethod"},{"line_number":101,"context_line":"    def get_updated(cls):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_3c864014","line":98,"updated":"2014-07-16 21:17:23.000000000","message":"Oh hey! We\u0027re going to get versioning in on flavors from the first revision? Great!","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"fadc64bb75a1f31ea3d1b05094b87e9bbb98a7c3","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                   \u0027is_visible\u0027: True,"},{"line_number":62,"context_line":"                   \u0027default\u0027: attr.ATTR_NOT_SPECIFIED},"},{"line_number":63,"context_line":"        \u0027metainfo\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":64,"context_line":"                     \u0027validate\u0027: {\u0027type:json_string\u0027: None},"},{"line_number":65,"context_line":"                     \u0027is_visible\u0027: True},"},{"line_number":66,"context_line":"        \u0027enabled\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":67,"context_line":"                    \u0027validate\u0027: {\u0027type:boolean\u0027: None},"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_03665129","line":64,"updated":"2014-07-17 17:32:55.000000000","message":"Again, still don\u0027t agree that we want to force a JSON string validation on the metainfo since some vendors probably won\u0027t use JSON for their metainfo.","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f53129b0a54656454ced9258beb2a7c0901cc843","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                   \u0027is_visible\u0027: True,"},{"line_number":62,"context_line":"                   \u0027default\u0027: attr.ATTR_NOT_SPECIFIED},"},{"line_number":63,"context_line":"        \u0027metainfo\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":64,"context_line":"                     \u0027validate\u0027: {\u0027type:json_string\u0027: None},"},{"line_number":65,"context_line":"                     \u0027is_visible\u0027: True},"},{"line_number":66,"context_line":"        \u0027enabled\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":67,"context_line":"                    \u0027validate\u0027: {\u0027type:boolean\u0027: None},"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_08e028cb","line":64,"in_reply_to":"baada198_03665129","updated":"2014-07-17 20:16:29.000000000","message":"I think it might be good for now, not to sure how to test arbitrary blobs here (especially how to pass them).\n\nEven json metainfo can be challenging to pass from CLI, not to say blob.\n\nI don\u0027t mind changing this to more generic attribute once we decide how this will be handled from user perspective. Also I don\u0027t see this particular thing as a blocker here","commit_id":"85c8262f121699dc93efb4d3c639ed87c9f62474"},{"author":{"_account_id":7576,"name":"Gary Duan","email":"garyduan@gmail.com","username":"garyduan"},"change_message_id":"1630ffaee6b6f6149273069adbeb6b7eb0882fde","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                   \u0027validate\u0027: {\u0027type:string\u0027: None},"},{"line_number":61,"context_line":"                   \u0027is_visible\u0027: True,"},{"line_number":62,"context_line":"                   \u0027default\u0027: attr.ATTR_NOT_SPECIFIED},"},{"line_number":63,"context_line":"        \u0027metainfo\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":64,"context_line":"                     \u0027validate\u0027: {\u0027type:json_string\u0027: None},"},{"line_number":65,"context_line":"                     \u0027is_visible\u0027: True},"},{"line_number":66,"context_line":"        \u0027enabled\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_25bf8eac","line":63,"updated":"2014-07-25 19:15:26.000000000","message":"Continue on my comment in the previous patch, should we disallow PUT, because the driver won\u0027t be notified if metainfo changes.","commit_id":"4487e79257b1cd28f4b855e6af2b8fb00a638f1b"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"6d02033a95e73f74e30fc6c2bb2e1c4f6551d159","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                   \u0027validate\u0027: {\u0027type:string\u0027: None},"},{"line_number":61,"context_line":"                   \u0027is_visible\u0027: True,"},{"line_number":62,"context_line":"                   \u0027default\u0027: attr.ATTR_NOT_SPECIFIED},"},{"line_number":63,"context_line":"        \u0027metainfo\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":64,"context_line":"                     \u0027validate\u0027: {\u0027type:json_string\u0027: None},"},{"line_number":65,"context_line":"                     \u0027is_visible\u0027: True},"},{"line_number":66,"context_line":"        \u0027enabled\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_50b6e989","line":63,"in_reply_to":"baada198_25bf8eac","updated":"2014-07-27 08:52:31.000000000","message":"I think that needs to be enforced at DB level, not at API level.\nif service profile is not yet associated with any service instance - i think it\u0027s fine to update configuration.\nAlso, I\u0027m for single instance of each driver, which means that configuration is actually taken from DB, and not embedded into driver instance. \nIt\u0027s actually very important point: drivers should be stateless wherever possible. Initializing a driver with a configuration is breaking this principle. (Statelessness is needed for multi-server deployment)","commit_id":"4487e79257b1cd28f4b855e6af2b8fb00a638f1b"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"7ade47a3cae8a3467f4e73f8c9799f95fc328c47","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        jsonutils.loads(data)"},{"line_number":87,"context_line":"    except Exception:"},{"line_number":88,"context_line":"        msg \u003d _(\"Invalid json string \u0027%s\u0027\") % data"},{"line_number":89,"context_line":"        return msg"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"attr.validators[\u0027type:json_string\u0027] \u003d _validate_json_string"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_608abfbd","line":89,"updated":"2014-08-06 23:21:32.000000000","message":"Exception seems a little broad.  ValueError is the actual exception if it\u0027s invalid JSON.","commit_id":"e8f3c209cf09f8b7dec4ce9cbf6ba6ae28606fbe"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"9469694d6fa76f8925f274336b014cb552e8a507","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        jsonutils.loads(data)"},{"line_number":87,"context_line":"    except Exception:"},{"line_number":88,"context_line":"        msg \u003d _(\"Invalid json string \u0027%s\u0027\") % data"},{"line_number":89,"context_line":"        return msg"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"attr.validators[\u0027type:json_string\u0027] \u003d _validate_json_string"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_0f59f68c","line":89,"in_reply_to":"baada198_608abfbd","updated":"2014-08-08 12:53:13.000000000","message":"Done","commit_id":"e8f3c209cf09f8b7dec4ce9cbf6ba6ae28606fbe"}],"neutron/tests/unit/test_flavors.py":[{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"94eb09b3d2faa7f17480f8ce23dfcfebdb5d7426","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        self._create_service_profile(description\u003d\u0027another sp\u0027)"},{"line_number":356,"context_line":"        self.assertEqual(2, len(self.plugin.get_service_profiles(self.ctx)))"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def test_associate_profile_with_flavor(self):"},{"line_number":359,"context_line":"        pass"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def test_disassociate_profile_with_flavor(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_5c5cd44c","line":358,"updated":"2014-07-16 21:17:23.000000000","message":"Definitely a few more TODOs here, eh. :)","commit_id":"9a1cfd39e6cdb16d3887540d70e31b52f6800186"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6f568e4e16d44de240b1570af4aa930befbe2901","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                           \u0027description\u0027: \u0027the best flavor\u0027,"},{"line_number":51,"context_line":"                           \u0027enabled\u0027: True}}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        return_value \u003d copy.deepcopy(data)"},{"line_number":54,"context_line":"        return_value[\u0027flavor\u0027][\u0027service_profiles\u0027] \u003d []"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        instance \u003d self.plugin.return_value"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_6676620e","line":53,"updated":"2014-07-30 12:52:13.000000000","message":"suggestion: return_value -\u003e expected. Here and other test methods.","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"91cb5821860e3bfa8019b63b1f5c991b75e46256","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                           \u0027description\u0027: \u0027the best flavor\u0027,"},{"line_number":51,"context_line":"                           \u0027enabled\u0027: True}}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        return_value \u003d copy.deepcopy(data)"},{"line_number":54,"context_line":"        return_value[\u0027flavor\u0027][\u0027service_profiles\u0027] \u003d []"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        instance \u003d self.plugin.return_value"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_96238005","line":53,"in_reply_to":"baada198_6676620e","updated":"2014-07-31 08:31:04.000000000","message":"Done","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6f568e4e16d44de240b1570af4aa930befbe2901","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_show_flavor(self):"},{"line_number":99,"context_line":"        flavor_id \u003d \u0027fake_id\u0027"},{"line_number":100,"context_line":"        data \u003d {\u0027flavor\u0027: {\u0027id\u0027: flavor_id,"},{"line_number":101,"context_line":"                           \u0027name\u0027: \u0027GOLD\u0027,"},{"line_number":102,"context_line":"                           \u0027description\u0027: \u0027the best flavor\u0027,"},{"line_number":103,"context_line":"                           \u0027enabled\u0027: True,"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_264b8ab2","line":100,"updated":"2014-07-30 12:52:13.000000000","message":"suggestion: data -\u003e expected. Here and others.","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"91cb5821860e3bfa8019b63b1f5c991b75e46256","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_show_flavor(self):"},{"line_number":99,"context_line":"        flavor_id \u003d \u0027fake_id\u0027"},{"line_number":100,"context_line":"        data \u003d {\u0027flavor\u0027: {\u0027id\u0027: flavor_id,"},{"line_number":101,"context_line":"                           \u0027name\u0027: \u0027GOLD\u0027,"},{"line_number":102,"context_line":"                           \u0027description\u0027: \u0027the best flavor\u0027,"},{"line_number":103,"context_line":"                           \u0027enabled\u0027: True,"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_760d0c8f","line":100,"in_reply_to":"baada198_264b8ab2","updated":"2014-07-31 08:31:04.000000000","message":"Done","commit_id":"ff75bfd4605e5999d6369dcbc074cd11e57bc71d"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"7ade47a3cae8a3467f4e73f8c9799f95fc328c47","unresolved":false,"context_lines":[{"line_number":35,"context_line":"_uuid \u003d uuidutils.generate_uuid"},{"line_number":36,"context_line":"_get_path \u003d test_api_v2._get_path"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class FlavorExtensionTestCase(test_api_v2_extension.ExtensionTestCase):"},{"line_number":40,"context_line":"    def setUp(self):"},{"line_number":41,"context_line":"        super(FlavorExtensionTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_407dbbb1","line":38,"updated":"2014-08-06 23:21:32.000000000","message":"Flavors \u003c-\u003e Profiles is a many-to-many relationship, but I only see 1:1 tested here.","commit_id":"e8f3c209cf09f8b7dec4ce9cbf6ba6ae28606fbe"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"9469694d6fa76f8925f274336b014cb552e8a507","unresolved":false,"context_lines":[{"line_number":35,"context_line":"_uuid \u003d uuidutils.generate_uuid"},{"line_number":36,"context_line":"_get_path \u003d test_api_v2._get_path"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class FlavorExtensionTestCase(test_api_v2_extension.ExtensionTestCase):"},{"line_number":40,"context_line":"    def setUp(self):"},{"line_number":41,"context_line":"        super(FlavorExtensionTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_cfc9be26","line":38,"in_reply_to":"baada198_407dbbb1","updated":"2014-08-08 12:53:13.000000000","message":"Done","commit_id":"e8f3c209cf09f8b7dec4ce9cbf6ba6ae28606fbe"}]}
