)]}'
{"neutron/api/v2/attributes.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1b78bd9c4b4bedd0ff8178b0918874204ade50aa","unresolved":false,"context_lines":[{"line_number":457,"context_line":"        return msg"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"def _validate_service_type(data):"},{"line_number":461,"context_line":"    if data not in plugin_constants.ALLOWED_SERVICES:"},{"line_number":462,"context_line":"        msg \u003d _(\"\u0027%s\u0027 service type unknown\")"},{"line_number":463,"context_line":"        LOG.debug(msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BPf0%3D","line":460,"updated":"2014-03-28 06:25:08.000000000","message":"seems _validate_values() should suit for service types","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"690965d80b7b4bb3b2f4c9bb9f3617f8ba9addd4","unresolved":false,"context_lines":[{"line_number":457,"context_line":"        return msg"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"def _validate_service_type(data):"},{"line_number":461,"context_line":"    if data not in plugin_constants.ALLOWED_SERVICES:"},{"line_number":462,"context_line":"        msg \u003d _(\"\u0027%s\u0027 service type unknown\")"},{"line_number":463,"context_line":"        LOG.debug(msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2F9c8%3D","line":460,"in_reply_to":"AAAAWH%2F%2BPf0%3D","updated":"2014-04-09 08:32:05.000000000","message":"ok","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"}],"neutron/db/flavors_db.py":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"7ab4e235fa59f439b81354847a72b8c12ba503ca","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 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":2,"id":"AAAAWH%2F%2BbiU%3D","line":1,"updated":"2014-03-26 20:25:49.000000000","message":"This line isn\u0027t needed, and furthermore its incorrect as you do not an employee of the  foundation (based  on your mirantis email)\nhttps://wiki.openstack.org/wiki/LegalIssuesFAQ#OpenStack_Foundation_Copyright_Headers","commit_id":"d3c5fb7781fd511a3fcf51eac1593c8c7ead797a"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"96b83841e11f5b526d875389bd2a6c453664a078","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 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":2,"id":"AAAAWH%2F%2BUBc%3D","line":1,"in_reply_to":"AAAAWH%2F%2BZDY%3D","updated":"2014-03-27 17:22:42.000000000","message":"See the ML thread cited in the wiki above. If you aren\u0027t a Foundation Employee then the copyright line above is a lie.","commit_id":"d3c5fb7781fd511a3fcf51eac1593c8c7ead797a"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"eb1167def8e4b42601a027040431badabef40e4e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 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":2,"id":"AAAAWH%2F%2BZDY%3D","line":1,"in_reply_to":"AAAAWH%2F%2BbiU%3D","updated":"2014-03-27 05:43:43.000000000","message":"That is somehow contradicts with how all of the files in neutron are written, for instance, each and every file contains that copyright with the difference of year.\n\nIf you think it contradicts with some guidelines - please discuss that with the neutron community, file a blueprint and propose a cleanup patch.","commit_id":"d3c5fb7781fd511a3fcf51eac1593c8c7ead797a"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"7ab4e235fa59f439b81354847a72b8c12ba503ca","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"#"},{"line_number":16,"context_line":"#    @author: Eugene Nikanorov, Mirantis"},{"line_number":17,"context_line":"#"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import sqlalchemy as sa"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2Bbj4%3D","line":16,"updated":"2014-03-26 20:25:49.000000000","message":"It is almost impossible to keep author tags up to date in a large project, we have git-blame for this.","commit_id":"d3c5fb7781fd511a3fcf51eac1593c8c7ead797a"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"eb1167def8e4b42601a027040431badabef40e4e","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"#"},{"line_number":16,"context_line":"#    @author: Eugene Nikanorov, Mirantis"},{"line_number":17,"context_line":"#"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import sqlalchemy as sa"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BZDA%3D","line":16,"in_reply_to":"AAAAWH%2F%2Bbj4%3D","updated":"2014-03-27 05:43:43.000000000","message":"That\u0027s optional anyway. I like my name in the code.","commit_id":"d3c5fb7781fd511a3fcf51eac1593c8c7ead797a"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"f0203526c7fcedf2787e4658710f460ffb9da673","unresolved":false,"context_lines":[{"line_number":31,"context_line":"class Flavor(model_base.BASEV2, models_v2.HasId):"},{"line_number":32,"context_line":"    service_type \u003d sa.Column(sa.String(36), primary_key\u003dTrue)"},{"line_number":33,"context_line":"    name \u003d sa.Column(sa.String(255), primary_key\u003dTrue)"},{"line_number":34,"context_line":"    tags \u003d sa.Column(sa.String(1024), default\u003d\u0027\u0027)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class FlavorsMixin(db_base_plugin_v2.CommonDbMixin):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BA3Y%3D","line":34,"updated":"2014-03-31 14:59:30.000000000","message":"Wondering if having tags in a string of length 1024 (or any other length) will be a reasonable choice in the long run. Having tags in a separate table similar to say how extra dhcp options are organized will be a more general solution. Of course if tags are limited to certain known key/values this won\u0027t be needed but I do not think that is the case here. If the suggested approach is used then some of the methods below need to be changed as well.","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"690965d80b7b4bb3b2f4c9bb9f3617f8ba9addd4","unresolved":false,"context_lines":[{"line_number":31,"context_line":"class Flavor(model_base.BASEV2, models_v2.HasId):"},{"line_number":32,"context_line":"    service_type \u003d sa.Column(sa.String(36), primary_key\u003dTrue)"},{"line_number":33,"context_line":"    name \u003d sa.Column(sa.String(255), primary_key\u003dTrue)"},{"line_number":34,"context_line":"    tags \u003d sa.Column(sa.String(1024), default\u003d\u0027\u0027)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class FlavorsMixin(db_base_plugin_v2.CommonDbMixin):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2F9vw%3D","line":34,"in_reply_to":"AAAAWH%2F%2BA3Y%3D","updated":"2014-04-09 08:32:05.000000000","message":"I\u0027m not sure we want to get that deep, i mean creating separate table for tags and an entry per tag. IMO that\u0027s both DB burden and implementation/API burden for the little benefit.","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c7335f9db2b179a5eb0d47e4735e9f0ad06eb1c2","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    tags \u003d sa.Column(sa.String(1024), default\u003d\u0027\u0027)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class FlavorsMixin(db_base_plugin_v2.CommonDbMixin):"},{"line_number":38,"context_line":"    \"\"\"Mixin class to support extra route configuration on router.\"\"\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def _make_flavor_dict(self, flavor_db):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BKig%3D","line":37,"updated":"2014-03-28 18:05:24.000000000","message":"Same as below, correct the comments","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1b78bd9c4b4bedd0ff8178b0918874204ade50aa","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class FlavorsMixin(db_base_plugin_v2.CommonDbMixin):"},{"line_number":38,"context_line":"    \"\"\"Mixin class to support extra route configuration on router.\"\"\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def _make_flavor_dict(self, flavor_db):"},{"line_number":41,"context_line":"        res \u003d {\u0027id\u0027: flavor_db[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BPfk%3D","line":38,"updated":"2014-03-28 06:25:08.000000000","message":"please correct","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"690965d80b7b4bb3b2f4c9bb9f3617f8ba9addd4","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class FlavorsMixin(db_base_plugin_v2.CommonDbMixin):"},{"line_number":38,"context_line":"    \"\"\"Mixin class to support extra route configuration on router.\"\"\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def _make_flavor_dict(self, flavor_db):"},{"line_number":41,"context_line":"        res \u003d {\u0027id\u0027: flavor_db[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2F9w8%3D","line":38,"in_reply_to":"AAAAWH%2F%2BPfk%3D","updated":"2014-04-09 08:32:05.000000000","message":"that\u0027s poc anyway :)","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"f0203526c7fcedf2787e4658710f460ffb9da673","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def create_flavor(self, context, flavor):"},{"line_number":48,"context_line":"        flavor \u003d flavor[\u0027flavor\u0027]"},{"line_number":49,"context_line":"        fl \u003d Flavor("},{"line_number":50,"context_line":"            id\u003duuidutils.generate_uuid(),"},{"line_number":51,"context_line":"            service_type\u003dflavor[\u0027service_type\u0027],"},{"line_number":52,"context_line":"            name\u003dflavor[\u0027name\u0027],"},{"line_number":53,"context_line":"            tags\u003dflavor[\u0027tags\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BA0A%3D","line":50,"updated":"2014-03-31 14:59:30.000000000","message":"Just to remain consistent with the rest of Neutron, why not allow the id to be specified as well: \nid\u003dflavor.get(\u0027id\u0027) or uuidutils.generate_uuid(),","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"a52e07b4b68e6a4b1b259be9b17ab55bf8059c7d","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def create_flavor(self, context, flavor):"},{"line_number":48,"context_line":"        flavor \u003d flavor[\u0027flavor\u0027]"},{"line_number":49,"context_line":"        fl \u003d Flavor("},{"line_number":50,"context_line":"            id\u003duuidutils.generate_uuid(),"},{"line_number":51,"context_line":"            service_type\u003dflavor[\u0027service_type\u0027],"},{"line_number":52,"context_line":"            name\u003dflavor[\u0027name\u0027],"},{"line_number":53,"context_line":"            tags\u003dflavor[\u0027tags\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2F75I%3D","line":50,"in_reply_to":"AAAAWH%2F%2BA0A%3D","updated":"2014-04-09 14:24:36.000000000","message":"Done","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"20970e5309425b8c5d7ce816b026049f3b76324a","unresolved":false,"context_lines":[{"line_number":31,"context_line":"class Flavor(model_base.BASEV2, models_v2.HasId):"},{"line_number":32,"context_line":"    service_type \u003d sa.Column(sa.String(36), primary_key\u003dTrue)"},{"line_number":33,"context_line":"    name \u003d sa.Column(sa.String(255), primary_key\u003dTrue)"},{"line_number":34,"context_line":"    tags \u003d sa.Column(sa.String(1024), default\u003d\u0027\u0027)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"# not inheriting FlavorsPlugin for now to avoid circular imports"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAXX%2F%2FtPk%3D","line":34,"updated":"2014-04-28 14:59:56.000000000","message":"capabilities go here? or we will avoid using db for capabilities in the beginning?","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"},{"author":{"_account_id":162,"name":"Bob Melander","email":"bob.melander@gmail.com","username":"bob-melander"},"change_message_id":"6e08c8ae7c192d82998a632223084bc5f3072cf7","unresolved":false,"context_lines":[{"line_number":31,"context_line":"class Flavor(model_base.BASEV2, models_v2.HasId):"},{"line_number":32,"context_line":"    service_type \u003d sa.Column(sa.String(36), primary_key\u003dTrue)"},{"line_number":33,"context_line":"    name \u003d sa.Column(sa.String(255), primary_key\u003dTrue)"},{"line_number":34,"context_line":"    tags \u003d sa.Column(sa.String(1024), default\u003d\u0027\u0027)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"# not inheriting FlavorsPlugin for now to avoid circular imports"}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_470956dc","line":34,"in_reply_to":"9ad9bd40_36e81bb4","updated":"2014-05-12 01:37:37.000000000","message":"Will 1024 be enough then?","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"129540df0ed3144ff9c1f5052c54d3bf29ae71ee","unresolved":false,"context_lines":[{"line_number":31,"context_line":"class Flavor(model_base.BASEV2, models_v2.HasId):"},{"line_number":32,"context_line":"    service_type \u003d sa.Column(sa.String(36), primary_key\u003dTrue)"},{"line_number":33,"context_line":"    name \u003d sa.Column(sa.String(255), primary_key\u003dTrue)"},{"line_number":34,"context_line":"    tags \u003d sa.Column(sa.String(1024), default\u003d\u0027\u0027)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"# not inheriting FlavorsPlugin for now to avoid circular imports"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_36e81bb4","line":34,"in_reply_to":"AAAAXX%2F%2FtPk%3D","updated":"2014-05-01 20:47:09.000000000","message":"yes, currently I\u0027m thinking of a simple string form, without additional table","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"761aeb03c88102b3b0bd4059fa363d3b09515e35","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def create_flavor(self, context, flavor):"},{"line_number":55,"context_line":"        flavor \u003d flavor[\u0027flavor\u0027]"},{"line_number":56,"context_line":"        fl \u003d Flavor("},{"line_number":57,"context_line":"            id\u003dflavor.get(\u0027id\u0027) or uuidutils.generate_uuid(),"},{"line_number":58,"context_line":"            service_type\u003dflavor[\u0027service_type\u0027],"},{"line_number":59,"context_line":"            name\u003dflavor[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAXH%2F%2FStg%3D","line":56,"updated":"2014-04-22 17:54:12.000000000","message":"nit: I prefer flavor_db","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"}],"neutron/extensions/flavors.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1b78bd9c4b4bedd0ff8178b0918874204ade50aa","unresolved":false,"context_lines":[{"line_number":28,"context_line":"COLLECTION_NAME \u003d \"%ss\" % RESOURCE_NAME"},{"line_number":29,"context_line":"EXT_ALIAS \u003d \u0027svc-flavor\u0027"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"# Attribute Map for Service Provider Resource"},{"line_number":32,"context_line":"# Allow read-only access"},{"line_number":33,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":34,"context_line":"    COLLECTION_NAME: {"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BPes%3D","line":31,"updated":"2014-03-28 06:25:08.000000000","message":"for flavors?","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c7335f9db2b179a5eb0d47e4735e9f0ad06eb1c2","unresolved":false,"context_lines":[{"line_number":29,"context_line":"EXT_ALIAS \u003d \u0027svc-flavor\u0027"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"# Attribute Map for Service Provider Resource"},{"line_number":32,"context_line":"# Allow read-only access"},{"line_number":33,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":34,"context_line":"    COLLECTION_NAME: {"},{"line_number":35,"context_line":"        \u0027service_type\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BKhY%3D","line":32,"updated":"2014-03-28 18:05:24.000000000","message":"The comment here says \"Allow read-only access\", but I see the \"allow_post\" as True for all the variables.","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"690965d80b7b4bb3b2f4c9bb9f3617f8ba9addd4","unresolved":false,"context_lines":[{"line_number":29,"context_line":"EXT_ALIAS \u003d \u0027svc-flavor\u0027"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"# Attribute Map for Service Provider Resource"},{"line_number":32,"context_line":"# Allow read-only access"},{"line_number":33,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":34,"context_line":"    COLLECTION_NAME: {"},{"line_number":35,"context_line":"        \u0027service_type\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2F9u4%3D","line":32,"in_reply_to":"AAAAWH%2F%2BKhY%3D","updated":"2014-04-09 08:32:05.000000000","message":"sorry, copy-pasted from providers framework, will clean up","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1b78bd9c4b4bedd0ff8178b0918874204ade50aa","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                         \u0027validate\u0027: attributes._validate_service_type},"},{"line_number":38,"context_line":"        \u0027name\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":39,"context_line":"                 \u0027is_visible\u0027: True},"},{"line_number":40,"context_line":"        \u0027tags\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":41,"context_line":"                 \u0027is_visible\u0027: True},"},{"line_number":42,"context_line":"    }"},{"line_number":43,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BPfE%3D","line":40,"updated":"2014-03-28 06:25:08.000000000","message":"attributes module has some utils for converting key-value pairs, may be worth to use it here","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"a52e07b4b68e6a4b1b259be9b17ab55bf8059c7d","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                         \u0027validate\u0027: attributes._validate_service_type},"},{"line_number":38,"context_line":"        \u0027name\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":39,"context_line":"                 \u0027is_visible\u0027: True},"},{"line_number":40,"context_line":"        \u0027tags\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":41,"context_line":"                 \u0027is_visible\u0027: True},"},{"line_number":42,"context_line":"    }"},{"line_number":43,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2F74g%3D","line":40,"in_reply_to":"AAAAWH%2F%2BPfE%3D","updated":"2014-04-09 14:24:36.000000000","message":"don\u0027t see why. that should go directly to db, although may require additional validation.\nI\u0027ll leave it as is for now.","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"c078677ad362301be1aa0b040de3eac139e5bcd8","unresolved":false,"context_lines":[{"line_number":43,"context_line":"}"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class Servicetype(extensions.ExtensionDescriptor):"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @classmethod"},{"line_number":49,"context_line":"    def get_name(cls):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2F904%3D","line":46,"updated":"2014-04-09 07:45:02.000000000","message":"this should be Flavors?","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"690965d80b7b4bb3b2f4c9bb9f3617f8ba9addd4","unresolved":false,"context_lines":[{"line_number":43,"context_line":"}"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class Servicetype(extensions.ExtensionDescriptor):"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @classmethod"},{"line_number":49,"context_line":"    def get_name(cls):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2F9uw%3D","line":46,"in_reply_to":"AAAAW3%2F%2F904%3D","updated":"2014-04-09 08:32:05.000000000","message":"Sure","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1b78bd9c4b4bedd0ff8178b0918874204ade50aa","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @classmethod"},{"line_number":70,"context_line":"    def get_resources(cls):"},{"line_number":71,"context_line":"        \"\"\"Returns Extended Resource for service type management.\"\"\""},{"line_number":72,"context_line":"        my_plurals \u003d [(key, key[:-1]) for key in RESOURCE_ATTRIBUTE_MAP.keys()]"},{"line_number":73,"context_line":"        attributes.PLURALS.update(dict(my_plurals))"},{"line_number":74,"context_line":"        attr_map \u003d RESOURCE_ATTRIBUTE_MAP[COLLECTION_NAME]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BPeQ%3D","line":71,"updated":"2014-03-28 06:25:08.000000000","message":"service type \u003c-\u003e flavors?","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"690965d80b7b4bb3b2f4c9bb9f3617f8ba9addd4","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @classmethod"},{"line_number":70,"context_line":"    def get_resources(cls):"},{"line_number":71,"context_line":"        \"\"\"Returns Extended Resource for service type management.\"\"\""},{"line_number":72,"context_line":"        my_plurals \u003d [(key, key[:-1]) for key in RESOURCE_ATTRIBUTE_MAP.keys()]"},{"line_number":73,"context_line":"        attributes.PLURALS.update(dict(my_plurals))"},{"line_number":74,"context_line":"        attr_map \u003d RESOURCE_ATTRIBUTE_MAP[COLLECTION_NAME]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2F9us%3D","line":71,"in_reply_to":"AAAAWH%2F%2BPeQ%3D","updated":"2014-04-09 08:32:05.000000000","message":"right","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"c078677ad362301be1aa0b040de3eac139e5bcd8","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        if version \u003d\u003d \"2.0\":"},{"line_number":87,"context_line":"            return RESOURCE_ATTRIBUTE_MAP"},{"line_number":88,"context_line":"        else:"},{"line_number":89,"context_line":"            return {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2F9yM%3D","line":89,"updated":"2014-04-09 07:45:02.000000000","message":"Shouldn\u0027t there be a base plugin definition here? DB mixin will inherit from this? Else its not clear what operations are supported for this resource.","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"690965d80b7b4bb3b2f4c9bb9f3617f8ba9addd4","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        if version \u003d\u003d \"2.0\":"},{"line_number":87,"context_line":"            return RESOURCE_ATTRIBUTE_MAP"},{"line_number":88,"context_line":"        else:"},{"line_number":89,"context_line":"            return {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2F9uo%3D","line":89,"in_reply_to":"AAAAW3%2F%2F9yM%3D","updated":"2014-04-09 08:32:05.000000000","message":"ok","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":162,"name":"Bob Melander","email":"bob.melander@gmail.com","username":"bob-melander"},"change_message_id":"6e08c8ae7c192d82998a632223084bc5f3072cf7","unresolved":false,"context_lines":[{"line_number":32,"context_line":"EXT_ALIAS \u003d \u0027svc-flavor\u0027"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":35,"context_line":"    COLLECTION_NAME: {"},{"line_number":36,"context_line":"        \u0027service_type\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":37,"context_line":"                         \u0027is_visible\u0027: True,"},{"line_number":38,"context_line":"                         \u0027validate\u0027: {\u0027type:values\u0027:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_275feae6","line":35,"updated":"2014-05-12 01:37:37.000000000","message":"No id attribute?\nNo tenant_id attribute?","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"}],"neutron/tests/unit/test_flavors.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"42c948e4c07f8564fed72cbfebeb4d6309fe72f6","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            if any(tag not in caps for tag in tags):"},{"line_number":54,"context_line":"                continue"},{"line_number":55,"context_line":"            names_to_choose.append(name)"},{"line_number":56,"context_line":"        return names_to_choose[0]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class TestPlugin(db_base_plugin_v2.NeutronDbPluginV2,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BaJ8%3D","line":56,"updated":"2014-03-27 00:43:37.000000000","message":"So, I see where you are going with this, but I guess I\u0027m having trouble understanding why the drivers need to be scheduled at all. The driver isn\u0027t a resource, it\u0027s a provider of resources.\n\nTo compare with Nova... in Nova, when one boots a VM, it gets scheduled on to a compute node. The scheduler doesn\u0027t select the hypervisor (the driver). It selects the compute node that has capacity to provide the amount of memory and CPU specified by the flavor being launched and meets the requirements that were supplied in the launch instance request (for instance, characteristics like GPU, PCI support, etc).\n\nThe thing that is missing in this Neutron Service Type Flavors PoC is the load balancing-as-a-service equivalent of the compute node (or host aggregate) in Nova. In the Neutron LBaaS world, that equivalency, I believe, is the pool object.\n\nSo, what I\u0027d like to see in this PoC is not a scheduler that is matching an LBaaS request to a driver, but instead matching a LBaaS request to a *pool* that is *managed by* one of the drivers.\n\nCloud administrators should be able to create LBaaS pools that have both a capacity (number of supported tenants, number of supported balancers, amount of underlying VMs running HAProxy, etc) and that have certain capabilities (active/active capability, active/hot standby, L7 rule support, etc). Load Balancer Flavors are an easy way to collect a set of capabilities together. So, when cloud admins create an LBaaS pool, they should specify a Load Balancer Flavor as well as capacity information for the pool.\n\nWhen a pool is created, Neutron LBaaS should look at the required capacity and capabilities and choose a driver that can manage such a pool. If more than one driver can manage the pool, then we can create a simple mechanism (configuration option, perhaps) that assigns a weight or preference to the list of drivers.\n\nWhen a user asks for a balancer to be created, they should be able to select a Load Balancer Flavor. The Scheduler should simply look for a LBaaS pool that was created with that flavor that has capacity to fill the request (for example, pick the pool that has the least amount of tenant balancers being serviced in it).","commit_id":"d3c5fb7781fd511a3fcf51eac1593c8c7ead797a"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"eb1167def8e4b42601a027040431badabef40e4e","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            if any(tag not in caps for tag in tags):"},{"line_number":54,"context_line":"                continue"},{"line_number":55,"context_line":"            names_to_choose.append(name)"},{"line_number":56,"context_line":"        return names_to_choose[0]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class TestPlugin(db_base_plugin_v2.NeutronDbPluginV2,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BZHU%3D","line":56,"in_reply_to":"AAAAWH%2F%2BZJc%3D","updated":"2014-03-27 05:43:43.000000000","message":"\u003e When a user asks for a balancer to be created, they should be able to select a Load Balancer Flavor. \n\nyes, that\u0027s how it will work. It\u0027s possible because of \u0027service_type\u0027 attribute of the flavor.\n\n\u003e The Scheduler should simply look for a LBaaS pool that was created with that flavor that has capacity to fill the request \n\nIt\u0027s close to that with the difference that there is no \u0027lbaas pool\u0027 but just a set of hardware where every unit may or may not satisfy flavor requirements. Particular methods like \u0027schedule resource to the least loaded backend\u0027 is up to the provider driver chosen.","commit_id":"d3c5fb7781fd511a3fcf51eac1593c8c7ead797a"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"484c98888ec183775efc6508f361964a14756abc","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            if any(tag not in caps for tag in tags):"},{"line_number":54,"context_line":"                continue"},{"line_number":55,"context_line":"            names_to_choose.append(name)"},{"line_number":56,"context_line":"        return names_to_choose[0]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class TestPlugin(db_base_plugin_v2.NeutronDbPluginV2,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BZJc%3D","line":56,"in_reply_to":"AAAAWH%2F%2BZMo%3D","updated":"2014-03-27 05:20:41.000000000","message":"\u003e Cloud administrators should be able to create LBaaS pools that have both a capacity\nProbably that\u0027s not a best way of using the word \u0027pool\u0027 because it creates confusion with one of the objects of lbaas object-model.\nLBaaS pool is something created with \u0027neutron lb-pool-create\u0027 and I guess it\u0027s not what you mean here. \u0027Pool of loadbalancers\u0027 sound more clear\n\n\u003e So, when cloud admins create an LBaaS pool, they should specify a Load Balancer Flavor as well as capacity information for the pool.\n\nI thought it in a bit other way: cloud admin doesn\u0027t need to create pools of LB manually, instead:\n - appliances are registered or register themselves to a DB\n - corresponding driver knows capabilities of its appliances\n - cloud provider sets up flavors, based on the capabilities that drivers support.\nIn fact it\u0027s little bit more generic, because appliance can provide multiple services.\nAnyway, we don\u0027t have such API for appliances yet (but do have for agents!), so these \u0027pools of LBs\u0027 are managed by external system.","commit_id":"d3c5fb7781fd511a3fcf51eac1593c8c7ead797a"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"708af1dedcb24dbbf67d8aa4b67d076577d57b5c","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            if any(tag not in caps for tag in tags):"},{"line_number":54,"context_line":"                continue"},{"line_number":55,"context_line":"            names_to_choose.append(name)"},{"line_number":56,"context_line":"        return names_to_choose[0]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class TestPlugin(db_base_plugin_v2.NeutronDbPluginV2,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BZMo%3D","line":56,"in_reply_to":"AAAAWH%2F%2BZO8%3D","updated":"2014-03-27 04:57:31.000000000","message":"\u003e It selects the compute node that has capacity to provide the amount of memory and CPU specified by the flavor being launched and meets the requirements\n\nSo to address this I probably will extend those 3 drivers with different examples of appliance management plus add internal scheduling.\n\n\u003e So, what I\u0027d like to see in this PoC is not a scheduler that is matching an LBaaS request to a driver, but instead matching a LBaaS request to a *pool* that is *managed by* one of the drivers.\n\nI\u0027m afraid that not exactly what should happen in the code.\nIf speaking in lbaas terms, we\u0027re creating a pool (operation is not fully complete at this point), we\u0027re at \"db-level\": we don\u0027t know which provider will handle the pool we\u0027re creating. And, in turn, provider that we will choose, doesn\u0027t know what backend it will use to deploy pool to. So, first of all, we choose provider, then provider will choose the backend.","commit_id":"d3c5fb7781fd511a3fcf51eac1593c8c7ead797a"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"0defc80069be05dc0b32920127b559bbc8c15443","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            if any(tag not in caps for tag in tags):"},{"line_number":54,"context_line":"                continue"},{"line_number":55,"context_line":"            names_to_choose.append(name)"},{"line_number":56,"context_line":"        return names_to_choose[0]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class TestPlugin(db_base_plugin_v2.NeutronDbPluginV2,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BZO8%3D","line":56,"in_reply_to":"AAAAWH%2F%2BaJ8%3D","updated":"2014-03-27 04:51:20.000000000","message":"\u003e The driver isn\u0027t a resource, it\u0027s a provider of resources.\nWell... it depends. For instance, some providers (radware) don\u0027t expose particular backend units, others don\u0027t have backends that could support capabilities (such as reference haproxy implementation where backend is an agent).\nSo basically scheduling to a provider means that we just choose the provider that satisfies to the requirements. It may then do it\u0027s own scheduling to actually bind resource to a backend.\n\nProbably it may make sense to try to do \u0027internal scheduling\u0027 in place, e.g. to call driver-\u003eschedule() within this schedule method.","commit_id":"d3c5fb7781fd511a3fcf51eac1593c8c7ead797a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c7335f9db2b179a5eb0d47e4735e9f0ad06eb1c2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 VMware, Inc. All Rights Reserved."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BKYA%3D","line":1,"updated":"2014-03-28 18:05:24.000000000","message":"Copyright notice states \"2013\".","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c7335f9db2b179a5eb0d47e4735e9f0ad06eb1c2","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"TEST_SERVICE_TYPE \u003d \u0027TEST\u0027"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class SchedulingProvidersPlugin(object):"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def _parse_tags(self, flavor):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BKMY%3D","line":27,"updated":"2014-03-28 18:05:24.000000000","message":"Can you move the \"Plugin\" to a different file. Or should it be in the same file as the \"test file\".","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"690965d80b7b4bb3b2f4c9bb9f3617f8ba9addd4","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"TEST_SERVICE_TYPE \u003d \u0027TEST\u0027"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class SchedulingProvidersPlugin(object):"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def _parse_tags(self, flavor):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2F9hE%3D","line":27,"in_reply_to":"AAAAWH%2F%2BKMY%3D","updated":"2014-04-09 08:32:05.000000000","message":"that\u0027s an example plugin, so I just wanted to put example code close together","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1b78bd9c4b4bedd0ff8178b0918874204ade50aa","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    def create_resource(self, context, resource):"},{"line_number":167,"context_line":"        res \u003d resource[\u0027resource\u0027]"},{"line_number":168,"context_line":"        flavor_id \u003d res[\u0027flavor_id\u0027]"},{"line_number":169,"context_line":"        flavor \u003d self.get_flavor(context, flavor_id)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        provider \u003d self.schedule(context, TEST_SERVICE_TYPE, flavor, resource)"},{"line_number":172,"context_line":"        res \u003d {\u0027id\u0027: \u0027123\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BPbw%3D","line":169,"updated":"2014-03-28 06:25:08.000000000","message":"nit: can fetch flavor from db inside self.schedule() and do not pass that parameter","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"690965d80b7b4bb3b2f4c9bb9f3617f8ba9addd4","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    def create_resource(self, context, resource):"},{"line_number":167,"context_line":"        res \u003d resource[\u0027resource\u0027]"},{"line_number":168,"context_line":"        flavor_id \u003d res[\u0027flavor_id\u0027]"},{"line_number":169,"context_line":"        flavor \u003d self.get_flavor(context, flavor_id)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        provider \u003d self.schedule(context, TEST_SERVICE_TYPE, flavor, resource)"},{"line_number":172,"context_line":"        res \u003d {\u0027id\u0027: \u0027123\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2F9gM%3D","line":169,"in_reply_to":"AAAAWH%2F%2BPbw%3D","updated":"2014-04-09 08:32:05.000000000","message":"no, i think that will make schedule method depend on resource structure.","commit_id":"71d4ce691d0c6174284b23d9edd998c1174e4f27"},{"author":{"_account_id":162,"name":"Bob Melander","email":"bob.melander@gmail.com","username":"bob-melander"},"change_message_id":"6e08c8ae7c192d82998a632223084bc5f3072cf7","unresolved":false,"context_lines":[{"line_number":25,"context_line":"TEST_SERVICE_TYPE \u003d \u0027TEST\u0027"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class SchedulingProvidersPlugin(object):"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def _parse_tags(self, flavor):"},{"line_number":31,"context_line":"        kv_pairs \u003d flavor[\u0027tags\u0027].split(\u0027,\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_e7ad028a","line":28,"updated":"2014-05-12 01:37:37.000000000","message":"Is class only to exemplify workflow or is intent that it will form some basis for service plugins to be based on?","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"761aeb03c88102b3b0bd4059fa363d3b09515e35","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class SchedulingProvidersPlugin(object):"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def _parse_tags(self, flavor):"},{"line_number":31,"context_line":"        kv_pairs \u003d flavor[\u0027tags\u0027].split(\u0027,\u0027)"},{"line_number":32,"context_line":"        res \u003d []"},{"line_number":33,"context_line":"        for kv in kv_pairs:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAXH%2F%2FSsM%3D","line":30,"updated":"2014-04-22 17:54:12.000000000","message":"I prefer this method should be in utils (or oslo?)","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"57616e2f77a5e257286cfd901abbed1b90cfffbb","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            res.append((k, v))"},{"line_number":36,"context_line":"        return res"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def schedule(self, context, service_type, flavor, resource):"},{"line_number":39,"context_line":"        if flavor[\u0027service_type\u0027] !\u003d service_type:"},{"line_number":40,"context_line":"            raise Exception(\u0027Wrong flavor service type is used with service\u0027)"},{"line_number":41,"context_line":"        "}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_4d9a7764","line":38,"updated":"2014-05-01 15:02:05.000000000","message":"Could use some docstrings on the methods to describe what they are doing. I\u0027m a bit confused as to why each Vendor driver has a schedule method.","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"761aeb03c88102b3b0bd4059fa363d3b09515e35","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    def schedule(self, context, service_type, flavor, resource):"},{"line_number":39,"context_line":"        if flavor[\u0027service_type\u0027] !\u003d service_type:"},{"line_number":40,"context_line":"            raise Exception(\u0027Wrong flavor service type is used with service\u0027)"},{"line_number":41,"context_line":"        "},{"line_number":42,"context_line":"        # Scheduler not only chooses provider, but chooses"},{"line_number":43,"context_line":"        # backend also:"},{"line_number":44,"context_line":"        tags \u003d self._parse_tags(flavor)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAXH%2F%2FSsg%3D","line":41,"updated":"2014-04-22 17:54:12.000000000","message":"nit: blanks","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"57616e2f77a5e257286cfd901abbed1b90cfffbb","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        for name in self.drivers:"},{"line_number":46,"context_line":"            caps \u003d self.drivers[name].get_capabilities()"},{"line_number":47,"context_line":"            # all tags of flavor must be included in tags declared by driver"},{"line_number":48,"context_line":"            if any(tag not in caps for tag in tags):"},{"line_number":49,"context_line":"                continue"},{"line_number":50,"context_line":"            # try internal scheduling with provider that matches requirements"},{"line_number":51,"context_line":"            # provider will tell if there are backends satisfying the flavor"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_09eea488","line":48,"updated":"2014-05-01 15:02:05.000000000","message":"So selects driver that matches all desired capabilities. If want to select by vendor, user would specify the vendor as a capability?","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"129540df0ed3144ff9c1f5052c54d3bf29ae71ee","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        for name in self.drivers:"},{"line_number":46,"context_line":"            caps \u003d self.drivers[name].get_capabilities()"},{"line_number":47,"context_line":"            # all tags of flavor must be included in tags declared by driver"},{"line_number":48,"context_line":"            if any(tag not in caps for tag in tags):"},{"line_number":49,"context_line":"                continue"},{"line_number":50,"context_line":"            # try internal scheduling with provider that matches requirements"},{"line_number":51,"context_line":"            # provider will tell if there are backends satisfying the flavor"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_f604f37f","line":48,"in_reply_to":"9ad9bd40_09eea488","updated":"2014-05-01 20:47:09.000000000","message":"not exactly. clout operator specifies flavor with provider name as capability, user passes that flavor_id","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"},{"author":{"_account_id":162,"name":"Bob Melander","email":"bob.melander@gmail.com","username":"bob-melander"},"change_message_id":"6e08c8ae7c192d82998a632223084bc5f3072cf7","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            # backends are managed by external system"},{"line_number":144,"context_line":"            # real binding happens when resource is created"},{"line_number":145,"context_line":"            # through that management system"},{"line_number":146,"context_line":"            return True"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    supported_extension_aliases \u003d ["},{"line_number":149,"context_line":"        \"flavors\","}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_27de0a12","line":146,"updated":"2014-05-12 01:37:37.000000000","message":"So a driver of this type, if it is the first matching driver for a certain flavor, effectively handles *all* service instances of that flavor. I.e., no other drivers for that flavor will ever be used to create that flavor\u0027s service instances.","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"761aeb03c88102b3b0bd4059fa363d3b09515e35","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    def __init__(self):"},{"line_number":153,"context_line":"        self.drivers \u003d {}"},{"line_number":154,"context_line":"        # here drivers are loadad from conf"},{"line_number":155,"context_line":"        d \u003d TestPlugin.VendorXDriver()"},{"line_number":156,"context_line":"        self.drivers[d.get_name()] \u003d d"},{"line_number":157,"context_line":"        d \u003d TestPlugin.VendorYDriver()"},{"line_number":158,"context_line":"        self.drivers[d.get_name()] \u003d d"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAXH%2F%2FSsA%3D","line":155,"updated":"2014-04-22 17:54:12.000000000","message":"nit: driver","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"761aeb03c88102b3b0bd4059fa363d3b09515e35","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        # here drivers are loadad from conf"},{"line_number":155,"context_line":"        d \u003d TestPlugin.VendorXDriver()"},{"line_number":156,"context_line":"        self.drivers[d.get_name()] \u003d d"},{"line_number":157,"context_line":"        d \u003d TestPlugin.VendorYDriver()"},{"line_number":158,"context_line":"        self.drivers[d.get_name()] \u003d d"},{"line_number":159,"context_line":"        d \u003d TestPlugin.VendorZDriver()"},{"line_number":160,"context_line":"        self.drivers[d.get_name()] \u003d d"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAXH%2F%2FSro%3D","line":157,"updated":"2014-04-22 17:54:12.000000000","message":"nit: driver1","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"761aeb03c88102b3b0bd4059fa363d3b09515e35","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        self.drivers[d.get_name()] \u003d d"},{"line_number":157,"context_line":"        d \u003d TestPlugin.VendorYDriver()"},{"line_number":158,"context_line":"        self.drivers[d.get_name()] \u003d d"},{"line_number":159,"context_line":"        d \u003d TestPlugin.VendorZDriver()"},{"line_number":160,"context_line":"        self.drivers[d.get_name()] \u003d d"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def create_resource(self, context, resource):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAXH%2F%2FSrg%3D","line":159,"updated":"2014-04-22 17:54:12.000000000","message":"nit: driver2","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"57616e2f77a5e257286cfd901abbed1b90cfffbb","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        flavorX \u003d self._create_flavor({\u0027name\u0027: \u0027name\u0027,"},{"line_number":208,"context_line":"                                       \u0027service_type\u0027: TEST_SERVICE_TYPE,"},{"line_number":209,"context_line":"                                       \u0027tags\u0027: \u0027Vendor:VendorX\u0027})"},{"line_number":210,"context_line":"        flavorY \u003d self._create_flavor({\u0027name\u0027: \u0027name\u0027,"},{"line_number":211,"context_line":"                                       \u0027service_type\u0027: TEST_SERVICE_TYPE,"},{"line_number":212,"context_line":"                                       \u0027tags\u0027: \u0027Vendor:VendorY\u0027})"},{"line_number":213,"context_line":"        ctx \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_4de8b7b4","line":210,"updated":"2014-05-01 15:02:05.000000000","message":"So to select a vendor we use a tag for that vendor?\nIt have it select from multiple vendors, we\u0027d have tags for capabilities and no vendor tag?","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"129540df0ed3144ff9c1f5052c54d3bf29ae71ee","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        flavorX \u003d self._create_flavor({\u0027name\u0027: \u0027name\u0027,"},{"line_number":208,"context_line":"                                       \u0027service_type\u0027: TEST_SERVICE_TYPE,"},{"line_number":209,"context_line":"                                       \u0027tags\u0027: \u0027Vendor:VendorX\u0027})"},{"line_number":210,"context_line":"        flavorY \u003d self._create_flavor({\u0027name\u0027: \u0027name\u0027,"},{"line_number":211,"context_line":"                                       \u0027service_type\u0027: TEST_SERVICE_TYPE,"},{"line_number":212,"context_line":"                                       \u0027tags\u0027: \u0027Vendor:VendorY\u0027})"},{"line_number":213,"context_line":"        ctx \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_763f0326","line":210,"in_reply_to":"9ad9bd40_4de8b7b4","updated":"2014-05-01 20:47:09.000000000","message":"Not sure i understand the question.\nThe example above creates flavors which are a direct match for providers, and hence allow the same workflow.","commit_id":"ebffad114e1b86553a8ce10f626af2993e6b7bc8"}]}
