)]}'
{"cinder/db/api.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"fe59c57687661b8a0c79eea5ce8771fdfe9ef83a","unresolved":false,"context_lines":[{"line_number":920,"context_line":"def volume_micro_state_update(context, volume_id, values):"},{"line_number":921,"context_line":"    \"\"\"Set the given properties on an volume and update it."},{"line_number":922,"context_line":""},{"line_number":923,"context_line":"    Mostly \u0027state\u0027 associated with a particular resource."},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"    \"\"\""},{"line_number":926,"context_line":"    return IMPL.volume_micro_state_update(context, volume_id, values)"}],"source_content_type":"text/x-python","patch_set":27,"id":"da86d52c_b2d0e1f8","line":923,"updated":"2015-01-31 01:12:21.000000000","message":"Nit; not sure what why a blank line follows this last line.","commit_id":"56ec246e7569b1ca433e7023a46ac35d63143743"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"161f05b9c217cb005c7b82ad169d6e036d7fef78","unresolved":false,"context_lines":[{"line_number":918,"context_line":""},{"line_number":919,"context_line":""},{"line_number":920,"context_line":"def micro_states_update(context, resource_id, values):"},{"line_number":921,"context_line":"    \"\"\"Set the given properties on an volume and update it."},{"line_number":922,"context_line":""},{"line_number":923,"context_line":"    Mostly \u0027state\u0027 associated with a particular resource."},{"line_number":924,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_8b20d2f8","line":921,"updated":"2015-02-02 17:12:23.000000000","message":"This line doesn\u0027t seem to make any sense; is this code setting the properties on a volume? I didn\u0027t think so...","commit_id":"421fb4e2846f9422c48f0b02d4ae8c0cbe0be963"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"161f05b9c217cb005c7b82ad169d6e036d7fef78","unresolved":false,"context_lines":[{"line_number":920,"context_line":"def micro_states_update(context, resource_id, values):"},{"line_number":921,"context_line":"    \"\"\"Set the given properties on an volume and update it."},{"line_number":922,"context_line":""},{"line_number":923,"context_line":"    Mostly \u0027state\u0027 associated with a particular resource."},{"line_number":924,"context_line":"    \"\"\""},{"line_number":925,"context_line":"    return IMPL.micro_states_update(context, resource_id, values)"},{"line_number":926,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_8b9372f9","line":923,"updated":"2015-02-02 17:12:23.000000000","message":"So it mostly sets state? Seems like this doesn\u0027t make sense :-P","commit_id":"421fb4e2846f9422c48f0b02d4ae8c0cbe0be963"}],"cinder/db/sqlalchemy/api.py":[{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"a014b4ff52ca8b59d577bcf48bac7a6b8879d480","unresolved":false,"context_lines":[{"line_number":3159,"context_line":"        session.add(micro_states)"},{"line_number":3160,"context_line":"        volume_ref.update(volume_ref)"},{"line_number":3161,"context_line":""},{"line_number":3162,"context_line":"    return micro_states "},{"line_number":3163,"context_line":""},{"line_number":3164,"context_line":""},{"line_number":3165,"context_line":"@require_context"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_b13925d9","line":3162,"updated":"2014-09-26 01:19:00.000000000","message":"extra white space","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"a014b4ff52ca8b59d577bcf48bac7a6b8879d480","unresolved":false,"context_lines":[{"line_number":3169,"context_line":"        micro_states \u003d model_query(context, models.MicroStates,"},{"line_number":3170,"context_line":"                             session\u003dsession).\\"},{"line_number":3171,"context_line":"            filter_by(id\u003dresource_id).first()"},{"line_number":3172,"context_line":"     "},{"line_number":3173,"context_line":"        micro_states.update(values)"},{"line_number":3174,"context_line":""},{"line_number":3175,"context_line":"    return micro_states "}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_f12f2d86","line":3172,"updated":"2014-09-26 01:19:00.000000000","message":"same","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"a014b4ff52ca8b59d577bcf48bac7a6b8879d480","unresolved":false,"context_lines":[{"line_number":3172,"context_line":"     "},{"line_number":3173,"context_line":"        micro_states.update(values)"},{"line_number":3174,"context_line":""},{"line_number":3175,"context_line":"    return micro_states "},{"line_number":3176,"context_line":""},{"line_number":3177,"context_line":""},{"line_number":3178,"context_line":"@require_admin_context"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_51563907","line":3175,"updated":"2014-09-26 01:19:00.000000000","message":"same","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"a014b4ff52ca8b59d577bcf48bac7a6b8879d480","unresolved":false,"context_lines":[{"line_number":3187,"context_line":"        volume_ref \u003d _volume_get(context,"},{"line_number":3188,"context_line":"                                 micro_states_ref[\u0027resource_id\u0027],"},{"line_number":3189,"context_line":"                                 session\u003dsession)"},{"line_number":3190,"context_line":"        if volume_ref[\u0027status\u0027] \u003d\u003d \u0027creating\u0027"},{"line_number":3191,"context_line":"            msg \u003d _(\u0027Volume is in %s state\u0027) % volume_ref[\u0027status\u0027]"},{"line_number":3192,"context_line":"            LOG.error(msg)"},{"line_number":3193,"context_line":"        # else set the volume status to initialize phase"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_11b911cc","line":3190,"updated":"2014-09-26 01:19:00.000000000","message":": is needed.","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"09afbe63014405f80c0402cc87fac2799bc78673","unresolved":false,"context_lines":[{"line_number":3202,"context_line":"        volume_ref \u003d _volume_get(context,"},{"line_number":3203,"context_line":"                                 micro_states_ref[\u0027resource_id\u0027],"},{"line_number":3204,"context_line":"                                 session\u003dsession)"},{"line_number":3205,"context_line":"        if volume_ref[\u0027status\u0027] \u003d\u003d \u0027creating\u0027"},{"line_number":3206,"context_line":"            msg \u003d _(\u0027Volume is in %s state\u0027) % volume_ref[\u0027status\u0027]"},{"line_number":3207,"context_line":"            LOG.error(msg)"},{"line_number":3208,"context_line":"        # else set the volume status to initialize phase"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_ec57cf00","line":3205,"updated":"2014-09-30 05:04:36.000000000","message":"Missing \":\" at the end.","commit_id":"63c514dff8a5d6277f7a48da12cc4d1df44883bf"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"a7fafdeaac78d0ae481555b4d7f3f13867abcd76","unresolved":false,"context_lines":[{"line_number":3141,"context_line":""},{"line_number":3142,"context_line":""},{"line_number":3143,"context_line":"@require_context"},{"line_number":3144,"context_line":"def _micro_states_get(context, resource_id, session\u003dNone):"},{"line_number":3145,"context_line":"    result \u003d model_query(context, models.MicroStates, session\u003dsession).\\"},{"line_number":3146,"context_line":"        filter_by(resource_id\u003dresource_id).\\"},{"line_number":3147,"context_line":"        first()"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a890539_c4e9dbb8","line":3144,"updated":"2014-11-30 20:30:33.000000000","message":"What stops this from returning deleted ones?","commit_id":"ac9778cd67e23ba4535332a0af293d0eb47aaa78"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"d630b7f9becb1fae4a8fc6a264c04affa1bae778","unresolved":false,"context_lines":[{"line_number":3170,"context_line":""},{"line_number":3171,"context_line":"@require_context"},{"line_number":3172,"context_line":"@_retry_on_deadlock"},{"line_number":3173,"context_line":"def micro_states_update(context, resource_id, values):"},{"line_number":3174,"context_line":"    session \u003d get_session()"},{"line_number":3175,"context_line":"    with session.begin():"},{"line_number":3176,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a890539_249e1f64","line":3173,"updated":"2014-11-30 20:20:09.000000000","message":"What statements does this create.\n\nIs this a select for update or select then update? \n\nI\u0027m still wondering why we can\u0027t just do a UPDATE microstates.state \u003d \u0027BLAH\u0027 WHERE microstates.volume_id \u003d \u0027ID\u0027? Then if nothing is updated then you can assume failure...","commit_id":"ac9778cd67e23ba4535332a0af293d0eb47aaa78"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"d630b7f9becb1fae4a8fc6a264c04affa1bae778","unresolved":false,"context_lines":[{"line_number":3176,"context_line":"        try:"},{"line_number":3177,"context_line":"            micro_states_ref \u003d _micro_states_get(context, resource_id, session)"},{"line_number":3178,"context_line":"        except exception.MicroStatesNotFound:"},{"line_number":3179,"context_line":"            raise exception.MicroStatesNotFound"},{"line_number":3180,"context_line":"        micro_states_ref.update(values)"},{"line_number":3181,"context_line":"        session.add(micro_states_ref)"},{"line_number":3182,"context_line":"    return micro_states_ref"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a890539_44996b78","line":3179,"updated":"2014-11-30 20:20:09.000000000","message":"This doesn\u0027t make sense to catch something then raise the same thing...","commit_id":"ac9778cd67e23ba4535332a0af293d0eb47aaa78"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"d630b7f9becb1fae4a8fc6a264c04affa1bae778","unresolved":false,"context_lines":[{"line_number":3191,"context_line":"        try:"},{"line_number":3192,"context_line":"            micro_states_ref \u003d _micro_states_get(context, resource_id, session)"},{"line_number":3193,"context_line":"        except exception.MicroStatesNotFound:"},{"line_number":3194,"context_line":"            raise exception.MicroStatesNotFound"},{"line_number":3195,"context_line":"        micro_states_ref.update({\u0027state\u0027: \u0027deleted\u0027,"},{"line_number":3196,"context_line":"                                 \u0027deleted\u0027: True,"},{"line_number":3197,"context_line":"                                 \u0027deleted_at\u0027: timeutils.utcnow(),"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a890539_64874713","line":3194,"updated":"2014-11-30 20:20:09.000000000","message":"Ditto.","commit_id":"ac9778cd67e23ba4535332a0af293d0eb47aaa78"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":3292,"context_line":"@require_context"},{"line_number":3293,"context_line":"def micro_states_create(context, values):"},{"line_number":3294,"context_line":"    if not values.get(\u0027id\u0027):"},{"line_number":3295,"context_line":"        values[\u0027id\u0027] \u003d str(uuid.uuid4())"},{"line_number":3296,"context_line":"    resource_id \u003d values.get(\u0027resource_id\u0027)"},{"line_number":3297,"context_line":"    session \u003d get_session()"},{"line_number":3298,"context_line":"    with session.begin():"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_160fcf2f","line":3295,"updated":"2015-02-08 04:14:19.000000000","message":"Please use six.text_type() instead of str().","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":3297,"context_line":"    session \u003d get_session()"},{"line_number":3298,"context_line":"    with session.begin():"},{"line_number":3299,"context_line":"        try:"},{"line_number":3300,"context_line":"            if(_micro_states_get(context, resource_id, session)):"},{"line_number":3301,"context_line":"                raise exception.MicroStatesRecordExists"},{"line_number":3302,"context_line":"        except exception.MicroStatesNotFound:"},{"line_number":3303,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_565ea713","line":3300,"updated":"2015-02-08 04:14:19.000000000","message":"The outer () is not needed.","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":3298,"context_line":"    with session.begin():"},{"line_number":3299,"context_line":"        try:"},{"line_number":3300,"context_line":"            if(_micro_states_get(context, resource_id, session)):"},{"line_number":3301,"context_line":"                raise exception.MicroStatesRecordExists"},{"line_number":3302,"context_line":"        except exception.MicroStatesNotFound:"},{"line_number":3303,"context_line":"            pass"},{"line_number":3304,"context_line":"        micro_states \u003d models.MicroStates()"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_d6a9b7e0","line":3301,"updated":"2015-02-08 04:14:19.000000000","message":"I suggested adding resource_id to this exception.","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"}],"cinder/db/sqlalchemy/migrate_repo/versions/027_add_micro_state_table.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"03210a90f88010252b2de91a8a5a268b9391c4fd","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    Table(\u0027volumes\u0027, meta, autoload\u003dTrue)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    # New table"},{"line_number":28,"context_line":"    micro_states \u003d Table("},{"line_number":29,"context_line":"        \u0027micro_states\u0027, meta,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_987e0618","line":26,"updated":"2014-09-25 22:56:26.000000000","message":"Could a more descriptive comment be given ;)","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"03210a90f88010252b2de91a8a5a268b9391c4fd","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        \u0027micro_states\u0027, meta,"},{"line_number":30,"context_line":"        Column(\u0027resource_id\u0027, String(length\u003d36), ForeignKey(\u0027volumes.id\u0027),"},{"line_number":31,"context_line":"               primary_key\u003dTrue, nullable\u003dFalse),"},{"line_number":32,"context_line":"        Column(\u0027micro_state\u0027, String(length\u003d255), nullable\u003dFalse),"},{"line_number":33,"context_line":"        mysql_engine\u003d\u0027InnoDB\u0027,"},{"line_number":34,"context_line":"        mysql_charset\u003d\u0027utf8\u0027"},{"line_number":35,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_b87bca26","line":32,"updated":"2014-09-25 22:56:26.000000000","message":"Should this just be called \u0027state\u0027?","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c9d6dfffe005497cb1428e2204347d3f126ce263","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    meta \u003d MetaData()"},{"line_number":23,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    Table(\u0027volumes\u0027, meta, autoload\u003dTrue)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    # Micro states table to keep track of the micro state"},{"line_number":28,"context_line":"    # the resource is currently in. Volume table maintains"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9df570_824dad40","line":25,"updated":"2014-09-26 05:06:39.000000000","message":"This line is not needed and can be removed.","commit_id":"8e1ea5d19920be0396373ae2d636af9e012f2ab3"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"acdbbe0e3d3ff6bb8f4dee25168fb01f95035b4c","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    meta \u003d MetaData()"},{"line_number":23,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    Table(\u0027volumes\u0027, meta, autoload\u003dTrue)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    # Micro states table to keep track of the micro state"},{"line_number":28,"context_line":"    # the resource is currently in. Volume table maintains"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_fd24dec7","line":25,"in_reply_to":"da9df570_824dad40","updated":"2014-09-29 22:11:55.000000000","message":"Done","commit_id":"8e1ea5d19920be0396373ae2d636af9e012f2ab3"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c9d6dfffe005497cb1428e2204347d3f126ce263","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    # Micro states table to keep track of the micro state"},{"line_number":28,"context_line":"    # the resource is currently in. Volume table maintains"},{"line_number":29,"context_line":"    # volume status which is an aggregation of many changes"},{"line_number":30,"context_line":"    # happening under the hood. Micro states helps to keep"},{"line_number":31,"context_line":"    # track of these micro state changes."},{"line_number":32,"context_line":"    micro_states \u003d Table("},{"line_number":33,"context_line":"        \u0027micro_states\u0027, meta,"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9df570_625b692e","line":30,"updated":"2014-09-26 05:06:39.000000000","message":"helps -\u003e help","commit_id":"8e1ea5d19920be0396373ae2d636af9e012f2ab3"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"acdbbe0e3d3ff6bb8f4dee25168fb01f95035b4c","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    # Micro states table to keep track of the micro state"},{"line_number":28,"context_line":"    # the resource is currently in. Volume table maintains"},{"line_number":29,"context_line":"    # volume status which is an aggregation of many changes"},{"line_number":30,"context_line":"    # happening under the hood. Micro states helps to keep"},{"line_number":31,"context_line":"    # track of these micro state changes."},{"line_number":32,"context_line":"    micro_states \u003d Table("},{"line_number":33,"context_line":"        \u0027micro_states\u0027, meta,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_1d2282b9","line":30,"in_reply_to":"da9df570_625b692e","updated":"2014-09-29 22:11:55.000000000","message":"Done","commit_id":"8e1ea5d19920be0396373ae2d636af9e012f2ab3"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"6d85f745cdfdc263d598b7bc8cd9e18cd7d7bc31","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    micro_states \u003d Table("},{"line_number":32,"context_line":"        \u0027micro_states\u0027, meta,"},{"line_number":33,"context_line":"        Column(\u0027id\u0027, String(length\u003d36), primary_key\u003dTrue, nullable\u003dFalse),"},{"line_number":34,"context_line":"        Column(\u0027resource_id\u0027, String(length\u003d36), ForeignKey(\u0027volumes.id\u0027),"},{"line_number":35,"context_line":"               nullable\u003dFalse),"},{"line_number":36,"context_line":"        Column(\u0027state\u0027, String(length\u003d255), nullable\u003dFalse),"},{"line_number":37,"context_line":"        mysql_engine\u003d\u0027InnoDB\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_ad4e8fbf","line":34,"updated":"2014-09-30 18:44:30.000000000","message":"Still seems like this won\u0027t work out for anything but volumes. Perhaps we shouldn\u0027t have a foreign key reference here (which afaik is only here so that this gets cleaned in a cascading fashion). If we treat this pure resource \u003c-\u003e state table that will probably end better (and don\u0027t tie it to a single volume resource).","commit_id":"63c514dff8a5d6277f7a48da12cc4d1df44883bf"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"d0add5f2b25fbc7289911230d5696b35a4910e65","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from sqlalchemy import Boolean, Column, DateTime"},{"line_number":14,"context_line":"from sqlalchemy import Integer, MetaData, String, Table, ForeignKey"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from cinder.openstack.common import log as logging"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_ae9ad46b","line":13,"updated":"2014-10-14 08:21:52.000000000","message":"Boolean and DateTime are not used.","commit_id":"0879394e8cdf04caa64b11a45268ec1d0ac4cd3c"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"d0add5f2b25fbc7289911230d5696b35a4910e65","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from sqlalchemy import Boolean, Column, DateTime"},{"line_number":14,"context_line":"from sqlalchemy import Integer, MetaData, String, Table, ForeignKey"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_0e83e004","line":14,"updated":"2014-10-14 08:21:52.000000000","message":"Integer is not used.","commit_id":"0879394e8cdf04caa64b11a45268ec1d0ac4cd3c"}],"cinder/db/sqlalchemy/migrate_repo/versions/032_add_micro_state_table.py":[{"author":{"_account_id":8475,"name":"AmitKumarDas","email":"amit.das@cloudbyte.com","username":"AmitKumarDas"},"change_message_id":"3eae319249a99c65f89fe34842724f506469a375","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    try:"},{"line_number":46,"context_line":"        micro_states.create()"},{"line_number":47,"context_line":"    except Exception:"},{"line_number":48,"context_line":"        LOG.error((\"Table |%s| not created!\"), repr(micro_states))"},{"line_number":49,"context_line":"        raise"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3a961159_bf8218c6","line":48,"updated":"2014-12-31 07:15:09.000000000","message":"Should we not have i18n rules here ?\n\nref - http://docs.openstack.org/developer/oslo.i18n/guidelines.html","commit_id":"ac9778cd67e23ba4535332a0af293d0eb47aaa78"},{"author":{"_account_id":8475,"name":"AmitKumarDas","email":"amit.das@cloudbyte.com","username":"AmitKumarDas"},"change_message_id":"3eae319249a99c65f89fe34842724f506469a375","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    try:"},{"line_number":59,"context_line":"        micro_states.drop()"},{"line_number":60,"context_line":"    except Exception:"},{"line_number":61,"context_line":"        LOG.error((\"micro_states table not dropped\"))"},{"line_number":62,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a961159_ff6bc01c","line":61,"updated":"2014-12-31 07:15:09.000000000","message":"i18n rules.","commit_id":"ac9778cd67e23ba4535332a0af293d0eb47aaa78"}],"cinder/db/sqlalchemy/migrate_repo/versions/037_add_micro_state_table.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    try:"},{"line_number":46,"context_line":"        micro_states.create()"},{"line_number":47,"context_line":"    except Exception:"},{"line_number":48,"context_line":"        LOG.error((\"Table |%s| not created!\"), repr(micro_states))"},{"line_number":49,"context_line":"        raise"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_563067e8","line":48,"updated":"2015-02-08 04:14:19.000000000","message":"Should use _LE marker for error msg.","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    try:"},{"line_number":59,"context_line":"        micro_states.drop()"},{"line_number":60,"context_line":"    except Exception:"},{"line_number":61,"context_line":"        LOG.error((\"micro_states table not dropped\"))"},{"line_number":62,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_9651ff10","line":61,"updated":"2015-02-08 04:14:19.000000000","message":"_LE","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"}],"cinder/db/sqlalchemy/models.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"03210a90f88010252b2de91a8a5a268b9391c4fd","unresolved":false,"context_lines":[{"line_number":530,"context_line":"    volume \u003d relationship(Volume, backref\u003d\"MicroStates\","},{"line_number":531,"context_line":"                          foreign_keys\u003dresource_id,"},{"line_number":532,"context_line":"                          primaryjoin\u003d\u0027and_(\u0027"},{"line_number":533,"context_line":"                          \u0027MicorStates.resource_id \u003d\u003d Volume.id)\u0027)"},{"line_number":534,"context_line":""},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"def register_models():"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_3890ba49","line":533,"updated":"2014-09-25 22:56:26.000000000","message":"sp MicorStates ?","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c9d6dfffe005497cb1428e2204347d3f126ce263","unresolved":false,"context_lines":[{"line_number":525,"context_line":"    __tablename__ \u003d \u0027micro_states\u0027"},{"line_number":526,"context_line":"    resource_id \u003d Column(String(36),"},{"line_number":527,"context_line":"                         ForeignKey(\u0027volumes.id\u0027),"},{"line_number":528,"context_line":"                         primary_key\u003dTrue)"},{"line_number":529,"context_line":"    micro_state \u003d Column(String(255))"},{"line_number":530,"context_line":"    volume \u003d relationship(Volume, backref\u003d\"MicroStates\","},{"line_number":531,"context_line":"                          foreign_keys\u003dresource_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9df570_a212b154","line":528,"updated":"2014-09-26 05:06:39.000000000","message":"This table should have its own id (uuid) as the primary_key, not using volumes.id.  If you delete the micro_state for a volume and try to create a micro_state for the same volume again, you\u0027ll get DBDuplicateEntry error because of the primary key (volumes.id).  The encryption table has a bug opened against it because of this. https://bugs.launchpad.net/cinder/+bug/1316540","commit_id":"8e1ea5d19920be0396373ae2d636af9e012f2ab3"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"acdbbe0e3d3ff6bb8f4dee25168fb01f95035b4c","unresolved":false,"context_lines":[{"line_number":525,"context_line":"    __tablename__ \u003d \u0027micro_states\u0027"},{"line_number":526,"context_line":"    resource_id \u003d Column(String(36),"},{"line_number":527,"context_line":"                         ForeignKey(\u0027volumes.id\u0027),"},{"line_number":528,"context_line":"                         primary_key\u003dTrue)"},{"line_number":529,"context_line":"    micro_state \u003d Column(String(255))"},{"line_number":530,"context_line":"    volume \u003d relationship(Volume, backref\u003d\"MicroStates\","},{"line_number":531,"context_line":"                          foreign_keys\u003dresource_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_c283b9ca","line":528,"in_reply_to":"da9df570_a212b154","updated":"2014-09-29 22:11:55.000000000","message":"Done","commit_id":"8e1ea5d19920be0396373ae2d636af9e012f2ab3"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"efd34da7ddf1e4c0c30f34a7b5be65a6cec32acd","unresolved":false,"context_lines":[{"line_number":530,"context_line":"    volume \u003d relationship(Volume, backref\u003d\"MicroStates\","},{"line_number":531,"context_line":"                          foreign_keys\u003dresource_id,"},{"line_number":532,"context_line":"                          primaryjoin\u003d\u0027and_(\u0027"},{"line_number":533,"context_line":"                          \u0027MicroStates.resource_id \u003d\u003d Volume.id)\u0027)"},{"line_number":534,"context_line":""},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"def register_models():"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9df570_4282e5c8","line":533,"updated":"2014-09-26 05:33:19.000000000","message":"What about micro_states of snapshots, backups, consistency groups, and cgsnapshots?  If this table only has volumes.id as the foreign key, how can it be extended to support the other cases?","commit_id":"8e1ea5d19920be0396373ae2d636af9e012f2ab3"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b343a830fd598a6e0f1079f7be027be142505922","unresolved":false,"context_lines":[{"line_number":530,"context_line":"    volume \u003d relationship(Volume, backref\u003d\"MicroStates\","},{"line_number":531,"context_line":"                          foreign_keys\u003dresource_id,"},{"line_number":532,"context_line":"                          primaryjoin\u003d\u0027and_(\u0027"},{"line_number":533,"context_line":"                          \u0027MicroStates.resource_id \u003d\u003d Volume.id)\u0027)"},{"line_number":534,"context_line":""},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"def register_models():"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_f209642d","line":533,"in_reply_to":"baa201ad_dd81da4b","updated":"2014-09-30 05:04:13.000000000","message":"This is a challenging problem and I don\u0027t have a good solution either. With #1, you can probably add another column to describe the type of resource. Sure, starting with volumes tables sounds good.","commit_id":"8e1ea5d19920be0396373ae2d636af9e012f2ab3"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"acdbbe0e3d3ff6bb8f4dee25168fb01f95035b4c","unresolved":false,"context_lines":[{"line_number":530,"context_line":"    volume \u003d relationship(Volume, backref\u003d\"MicroStates\","},{"line_number":531,"context_line":"                          foreign_keys\u003dresource_id,"},{"line_number":532,"context_line":"                          primaryjoin\u003d\u0027and_(\u0027"},{"line_number":533,"context_line":"                          \u0027MicroStates.resource_id \u003d\u003d Volume.id)\u0027)"},{"line_number":534,"context_line":""},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"def register_models():"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_dd81da4b","line":533,"in_reply_to":"da9df570_4282e5c8","updated":"2014-09-29 22:11:55.000000000","message":"This is a valid point and right now just to start the things of I will keep the primary join for the Volumes tables. We can have 2 options for this\n1) Have multiple foreign keys one for each resource in the MicroStates table for example volume_id a foreign key for Volume.id (PK) in Volumes table; snapshot_id a FK in MicroStates for Snapshot.id (PK) and so on. The only challenge here is figuring out the type of resource either volume, snapshot, backup, etc. \n\n2) Microstates table will not have any PK and can write some script to clean up the stale data.\n\nI am open to options.","commit_id":"8e1ea5d19920be0396373ae2d636af9e012f2ab3"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"43744f4dde6c86b3a7545a5441ba43946a47f7ef","unresolved":false,"context_lines":[{"line_number":524,"context_line":"                          \u0027Transfer.deleted \u003d\u003d False)\u0027)"},{"line_number":525,"context_line":""},{"line_number":526,"context_line":""},{"line_number":527,"context_line":"class MicroStates(BASE, CinderBase):"},{"line_number":528,"context_line":"    \"\"\"Represents a volume transfer request.\"\"\""},{"line_number":529,"context_line":"    __tablename__ \u003d \u0027micro_states\u0027"},{"line_number":530,"context_line":"    id \u003d Column(String(36), primary_key\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_b90e23e3","line":527,"updated":"2014-10-28 03:51:16.000000000","message":"Should this be named VolumeMicroStates?\n\nIt is after all strongly tied to volumes and not the states of arbitrary resources. Thoughts?","commit_id":"7c265508f8affab003e039a0909ca72ae5e0127f"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"2c108025407bdda26a357706cff33f7ef68320e9","unresolved":false,"context_lines":[{"line_number":524,"context_line":""},{"line_number":525,"context_line":""},{"line_number":526,"context_line":"class MicroStates(BASE, CinderBase):"},{"line_number":527,"context_line":"    \"\"\"Represents a volume transfer request.\"\"\""},{"line_number":528,"context_line":"    __tablename__ \u003d \u0027micro_states\u0027"},{"line_number":529,"context_line":"    id \u003d Column(String(36), primary_key\u003dTrue)"},{"line_number":530,"context_line":"    resource_id \u003d Column(String(36), ForeignKey(\u0027volumes.id\u0027))"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a890539_b111735f","line":527,"updated":"2014-11-30 18:02:49.000000000","message":"\u0027Represents a volume transfer request\u0027?\n\nHuh?","commit_id":"ac9778cd67e23ba4535332a0af293d0eb47aaa78"}],"cinder/exception.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":963,"context_line":""},{"line_number":964,"context_line":"# Microstates"},{"line_number":965,"context_line":"class MicroStatesNotFound(NotFound):"},{"line_number":966,"context_line":"    message \u003d _(\"Microstate for resource could not be found.\")"},{"line_number":967,"context_line":""},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"class MicroStatesRecordExists(Duplicate):"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_d67297ac","line":966,"updated":"2015-02-08 04:14:19.000000000","message":"This should be implemented the same way as VolumeNotFound. %(resource_id)s is missing.\n\nclass VolumeNotFound(NotFound):\n    message \u003d _(\"Volume %(volume_id)s could not be found.\")","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":967,"context_line":""},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"class MicroStatesRecordExists(Duplicate):"},{"line_number":970,"context_line":"    message \u003d _(\"Microstate for resource already exists.\")"},{"line_number":971,"context_line":""},{"line_number":972,"context_line":""},{"line_number":973,"context_line":"class InvalidMicroStateTransition(Invalid):"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_f666bbed","line":970,"updated":"2015-02-08 04:14:19.000000000","message":"Please add resource_id to the message.","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"}],"cinder/tests/test_create_volume_microstates.py":[{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"62badb08cf77f51ab04546e965ed14985be0a9c2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 Canonical Ltd."},{"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":10,"id":"baa201ad_14b1e68e","line":1,"updated":"2014-10-16 10:20:11.000000000","message":"2014?","commit_id":"5c516b160a4072a5d7f2e387c1cbf7505bd08606"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"62badb08cf77f51ab04546e965ed14985be0a9c2","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"\"\"\" Tests for create_volume TaskFlow \"\"\""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"#import cinder.volume"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from cinder import context"},{"line_number":20,"context_line":"from cinder import test"}],"source_content_type":"text/x-python","patch_set":10,"id":"baa201ad_d4b3de97","line":17,"updated":"2014-10-16 10:20:11.000000000","message":"did you forget to delete?","commit_id":"5c516b160a4072a5d7f2e387c1cbf7505bd08606"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"2c108025407bdda26a357706cff33f7ef68320e9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 Canonical Ltd."},{"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":21,"id":"5a890539_911ab77a","line":1,"updated":"2014-11-30 18:02:49.000000000","message":"I think this is now yahoo copyright; not canonical...","commit_id":"ac9778cd67e23ba4535332a0af293d0eb47aaa78"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"2c108025407bdda26a357706cff33f7ef68320e9","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":"\"\"\" Tests for create_volume TaskFlow \"\"\""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"#import cinder.volume"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from cinder import context"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a890539_71170b55","line":16,"updated":"2014-11-30 18:02:49.000000000","message":"Remove this.","commit_id":"ac9778cd67e23ba4535332a0af293d0eb47aaa78"}],"cinder/tests/utils.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"fe59c57687661b8a0c79eea5ce8771fdfe9ef83a","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        \u0027state\u0027: \u0027entry_create\u0027,"},{"line_number":65,"context_line":"    }"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    db.volume_micro_state_create(ctxt, micro_states_properties)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    return volume"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"da86d52c_155fd70f","line":67,"updated":"2015-01-31 01:12:21.000000000","message":"If this fails; the volume has been created (but will not be returned). Is that expected/handled? Did u want to do both of these creates in the same session to avoid that?","commit_id":"56ec246e7569b1ca433e7023a46ac35d63143743"}],"cinder/volume/flows/api/create_volume.py":[{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"a014b4ff52ca8b59d577bcf48bac7a6b8879d480","unresolved":false,"context_lines":[{"line_number":461,"context_line":"    Reversion strategy: remove the volume_id created from the database."},{"line_number":462,"context_line":"    \"\"\""},{"line_number":463,"context_line":""},{"line_number":464,"context_line":"    default_provides \u003d set([\u0027volume_properties\u0027, \u0027volume_id\u0027, \u0027volume\u0027, \u0027micro_states\u0027])"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    def __init__(self, db):"},{"line_number":467,"context_line":"        requires \u003d [\u0027availability_zone\u0027, \u0027description\u0027, \u0027metadata\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_3107f51a","line":464,"updated":"2014-09-26 01:19:00.000000000","message":"too long as 1 line","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"03210a90f88010252b2de91a8a5a268b9391c4fd","unresolved":false,"context_lines":[{"line_number":504,"context_line":"        vol_id \u003d volume[\u0027id\u0027]"},{"line_number":505,"context_line":"        micro_states_properties \u003d {"},{"line_number":506,"context_line":"            \u0027resource_id\u0027: vol_id,"},{"line_number":507,"context_line":"            \u0027micro_state\u0027: \u0027volumecreate_entrycreatetask\u0027,"},{"line_number":508,"context_line":"        }"},{"line_number":509,"context_line":"        micro_states \u003d self.db.micro_states_create(context, micro_states_properties)"},{"line_number":510,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_180856d9","line":507,"updated":"2014-09-25 22:56:26.000000000","message":"Should this be using the constant from the states file?","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"a014b4ff52ca8b59d577bcf48bac7a6b8879d480","unresolved":false,"context_lines":[{"line_number":506,"context_line":"            \u0027resource_id\u0027: vol_id,"},{"line_number":507,"context_line":"            \u0027micro_state\u0027: \u0027volumecreate_entrycreatetask\u0027,"},{"line_number":508,"context_line":"        }"},{"line_number":509,"context_line":"        micro_states \u003d self.db.micro_states_create(context, micro_states_properties)"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"        return {"},{"line_number":512,"context_line":"            \u0027volume_id\u0027: volume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_91150142","line":509,"updated":"2014-09-26 01:19:00.000000000","message":"too long as 1 line","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"03210a90f88010252b2de91a8a5a268b9391c4fd","unresolved":false,"context_lines":[{"line_number":565,"context_line":"        super(QuotaReserveTask, self).__init__(addons\u003d[ACTION])"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"    def _pre_execute(self, micro_states):"},{"line_number":568,"context_line":"        new_state \u003d \u0027volumecreate_quotareservetask\u0027    "},{"line_number":569,"context_line":"        is_transition_ok \u003d states.check_volume_create_microstate_transition(micro_states, new_state, quite)"},{"line_number":570,"context_line":"        #TODO : Add logic to retry, revert, gracefully exit in case"},{"line_number":571,"context_line":"        #of failure "}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_380d1aea","line":568,"updated":"2014-09-25 22:56:26.000000000","message":"Use the constant? Also whitespace issues.","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"a014b4ff52ca8b59d577bcf48bac7a6b8879d480","unresolved":false,"context_lines":[{"line_number":566,"context_line":""},{"line_number":567,"context_line":"    def _pre_execute(self, micro_states):"},{"line_number":568,"context_line":"        new_state \u003d \u0027volumecreate_quotareservetask\u0027    "},{"line_number":569,"context_line":"        is_transition_ok \u003d states.check_volume_create_microstate_transition(micro_states, new_state, quite)"},{"line_number":570,"context_line":"        #TODO : Add logic to retry, revert, gracefully exit in case"},{"line_number":571,"context_line":"        #of failure "},{"line_number":572,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_b1404535","line":569,"updated":"2014-09-26 01:19:00.000000000","message":"too long","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"03210a90f88010252b2de91a8a5a268b9391c4fd","unresolved":false,"context_lines":[{"line_number":567,"context_line":"    def _pre_execute(self, micro_states):"},{"line_number":568,"context_line":"        new_state \u003d \u0027volumecreate_quotareservetask\u0027    "},{"line_number":569,"context_line":"        is_transition_ok \u003d states.check_volume_create_microstate_transition(micro_states, new_state, quite)"},{"line_number":570,"context_line":"        #TODO : Add logic to retry, revert, gracefully exit in case"},{"line_number":571,"context_line":"        #of failure "},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"    # vilobhmm : State Machine Update "}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_782a422d","line":570,"updated":"2014-09-25 22:56:26.000000000","message":"So the idea is that this would blow up here and not execute any further right if this transition was invalid, that would then stop further execution correct (and also further progress)? This would make cinder strongly consistent (although it would also as a side-effect that it would block further progress without reset-state or similar), something to consider...","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"03210a90f88010252b2de91a8a5a268b9391c4fd","unresolved":false,"context_lines":[{"line_number":571,"context_line":"        #of failure "},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"    # vilobhmm : State Machine Update "},{"line_number":574,"context_line":"    def _post_execute(self, context, micro_states):"},{"line_number":575,"context_line":"        new_micro_state \u003d \u0027volumecreate_quotareservetask\u0027 "},{"line_number":576,"context_line":"        self.db.micro_states_update(context, micro_states[\u0027resource_id\u0027], {\u0027micro_state\u0027: new_micro_state})"},{"line_number":577,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_98228650","line":574,"updated":"2014-09-25 22:56:26.000000000","message":"Use the constant? Also whitespace issues.","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"a014b4ff52ca8b59d577bcf48bac7a6b8879d480","unresolved":false,"context_lines":[{"line_number":573,"context_line":"    # vilobhmm : State Machine Update "},{"line_number":574,"context_line":"    def _post_execute(self, context, micro_states):"},{"line_number":575,"context_line":"        new_micro_state \u003d \u0027volumecreate_quotareservetask\u0027 "},{"line_number":576,"context_line":"        self.db.micro_states_update(context, micro_states[\u0027resource_id\u0027], {\u0027micro_state\u0027: new_micro_state})"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"    def execute(self, context, size, volume_type_id, optional_args):"},{"line_number":579,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_91434141","line":576,"updated":"2014-09-26 01:19:00.000000000","message":"too long","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"03210a90f88010252b2de91a8a5a268b9391c4fd","unresolved":false,"context_lines":[{"line_number":661,"context_line":"    def __init__(self):"},{"line_number":662,"context_line":"        super(QuotaCommitTask, self).__init__(addons\u003d[ACTION])"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"    def _pre_execute(self, micro_states):"},{"line_number":665,"context_line":"        new_state \u003d \u0027volumecreate_quotacommittask\u0027    "},{"line_number":666,"context_line":"        is_transition_ok \u003d states.check_volume_create_microstate_transition(micro_states, new_state, quite)"},{"line_number":667,"context_line":"        #TODO : Add logic to retry, revert, gracefully exit in case"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_d8188e20","line":664,"updated":"2014-09-25 22:56:26.000000000","message":"Use the constant? Also whitespace issues.","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"a014b4ff52ca8b59d577bcf48bac7a6b8879d480","unresolved":false,"context_lines":[{"line_number":663,"context_line":""},{"line_number":664,"context_line":"    def _pre_execute(self, micro_states):"},{"line_number":665,"context_line":"        new_state \u003d \u0027volumecreate_quotacommittask\u0027    "},{"line_number":666,"context_line":"        is_transition_ok \u003d states.check_volume_create_microstate_transition(micro_states, new_state, quite)"},{"line_number":667,"context_line":"        #TODO : Add logic to retry, revert, gracefully exit in case"},{"line_number":668,"context_line":"        #of failure "},{"line_number":669,"context_line":"    "}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_d1494961","line":666,"updated":"2014-09-26 01:19:00.000000000","message":"where did quite come from?\ntoo long as 1 line","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"03210a90f88010252b2de91a8a5a268b9391c4fd","unresolved":false,"context_lines":[{"line_number":669,"context_line":"    "},{"line_number":670,"context_line":"    # vilobhmm : State Machine Update "},{"line_number":671,"context_line":"    def _post_execute(self, context, micro_states):"},{"line_number":672,"context_line":"        new_micro_state \u003d \u0027volumecreate_quotacommittask\u0027 "},{"line_number":673,"context_line":"        self.db.micro_states_update(context, micro_states[\u0027resource_id\u0027], {\u0027micro_state\u0027: new_micro_state})"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"    def execute(self, context, reservations, volume_properties,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_f81552e5","line":672,"updated":"2014-09-25 22:56:26.000000000","message":"Use the constant? Also whitespace issues.","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"03210a90f88010252b2de91a8a5a268b9391c4fd","unresolved":false,"context_lines":[{"line_number":783,"context_line":"                consistencygroup_id\u003dgroup_id)"},{"line_number":784,"context_line":""},{"line_number":785,"context_line":"    def _pre_execute(self, micro_states):"},{"line_number":786,"context_line":"        new_state \u003d \u0027volumecreate_volumecasttask\u0027    "},{"line_number":787,"context_line":"        is_transition_ok \u003d states.check_volume_create_microstate_transition(micro_states, new_state, quite)"},{"line_number":788,"context_line":"        #TODO : Add logic to retry, revert, gracefully exit in case"},{"line_number":789,"context_line":"        #of failure "}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_38db5a51","line":786,"updated":"2014-09-25 22:56:26.000000000","message":"Use the constant? Also whitespace issues.","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"a014b4ff52ca8b59d577bcf48bac7a6b8879d480","unresolved":false,"context_lines":[{"line_number":784,"context_line":""},{"line_number":785,"context_line":"    def _pre_execute(self, micro_states):"},{"line_number":786,"context_line":"        new_state \u003d \u0027volumecreate_volumecasttask\u0027    "},{"line_number":787,"context_line":"        is_transition_ok \u003d states.check_volume_create_microstate_transition(micro_states, new_state, quite)"},{"line_number":788,"context_line":"        #TODO : Add logic to retry, revert, gracefully exit in case"},{"line_number":789,"context_line":"        #of failure "},{"line_number":790,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_f15d6d16","line":787,"updated":"2014-09-26 01:19:00.000000000","message":"where did quite come from?\ntoo long as 1 line","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"d0add5f2b25fbc7289911230d5696b35a4910e65","unresolved":false,"context_lines":[{"line_number":461,"context_line":"    Reversion strategy: remove the volume_id created from the database."},{"line_number":462,"context_line":"    \"\"\""},{"line_number":463,"context_line":""},{"line_number":464,"context_line":"    default_provides \u003d set([\u0027volume_properties\u0027, \u0027volume_id\u0027, \u0027volume\u0027, \u0027micro_states\u0027])"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    def __init__(self, db):"},{"line_number":467,"context_line":"        requires \u003d [\u0027availability_zone\u0027, \u0027description\u0027, \u0027metadata\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_8e4990d2","line":464,"updated":"2014-10-14 08:21:52.000000000","message":"too long.","commit_id":"0879394e8cdf04caa64b11a45268ec1d0ac4cd3c"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"d0add5f2b25fbc7289911230d5696b35a4910e65","unresolved":false,"context_lines":[{"line_number":566,"context_line":""},{"line_number":567,"context_line":"    def _pre_execute(self, micro_states):"},{"line_number":568,"context_line":"        new_state \u003d \u0027VOLUME_CREATE_MICROSTATE_QUOTA_RESERVE\u0027"},{"line_number":569,"context_line":"        is_transition_ok \u003d states.check_volume_create_microstate_transition(micro_states, new_state, quite)"},{"line_number":570,"context_line":"        \"\"\""},{"line_number":571,"context_line":"        TODO : Add logic to retry, revert, gracefully exit in case"},{"line_number":572,"context_line":"        of failure. Failure can be because of several reason one"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_8ef27098","line":569,"updated":"2014-10-14 08:21:52.000000000","message":"too long","commit_id":"0879394e8cdf04caa64b11a45268ec1d0ac4cd3c"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"d0add5f2b25fbc7289911230d5696b35a4910e65","unresolved":false,"context_lines":[{"line_number":582,"context_line":"    # vilobhmm : State Machine Update"},{"line_number":583,"context_line":"    def _post_execute(self, context, micro_states):"},{"line_number":584,"context_line":"        new_state \u003d \u0027VOLUME_CREATE_MICROSTATE_QUOTA_RESERVE\u0027"},{"line_number":585,"context_line":"        self.db.micro_states_update(context, micro_states[\u0027resource_id\u0027], {\u0027state\u0027: new_state})"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    def execute(self, context, size, volume_type_id, optional_args):"},{"line_number":588,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_ce2b98e9","line":585,"updated":"2014-10-14 08:21:52.000000000","message":"too long","commit_id":"0879394e8cdf04caa64b11a45268ec1d0ac4cd3c"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"85e0536fd5d2c679155b743aed26d0c2f8560778","unresolved":false,"context_lines":[{"line_number":506,"context_line":"        vol_id \u003d volume[\u0027id\u0027]"},{"line_number":507,"context_line":"        micro_states_properties \u003d {"},{"line_number":508,"context_line":"            \u0027resource_id\u0027: vol_id,"},{"line_number":509,"context_line":"            #\u0027state\u0027: \u0027VOLUME_CREATE_MICROSTATE_ENTRY_CREATE\u0027,"},{"line_number":510,"context_line":"            \u0027state\u0027: \u0027entry_create\u0027,"},{"line_number":511,"context_line":"        }"},{"line_number":512,"context_line":"        micro_states \u003d self.db.micro_states_create(context,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9aa7fdbe_22c94a59","line":509,"updated":"2014-10-25 01:44:59.000000000","message":"Was this intended to be commented out?","commit_id":"ef0c37264c17e0d2d979a4f04e8271ba16f99a2b"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"9a137ff3cbe93b0de9009314cc47fa293e91d231","unresolved":false,"context_lines":[{"line_number":506,"context_line":"        vol_id \u003d volume[\u0027id\u0027]"},{"line_number":507,"context_line":"        micro_states_properties \u003d {"},{"line_number":508,"context_line":"            \u0027resource_id\u0027: vol_id,"},{"line_number":509,"context_line":"            #\u0027state\u0027: \u0027VOLUME_CREATE_MICROSTATE_ENTRY_CREATE\u0027,"},{"line_number":510,"context_line":"            \u0027state\u0027: \u0027entry_create\u0027,"},{"line_number":511,"context_line":"        }"},{"line_number":512,"context_line":"        micro_states \u003d self.db.micro_states_create(context,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9aa7fdbe_a2329a5c","line":509,"in_reply_to":"9aa7fdbe_22c94a59","updated":"2014-10-27 19:02:03.000000000","message":"Sure.","commit_id":"ef0c37264c17e0d2d979a4f04e8271ba16f99a2b"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"19c95e09997e9daa8e29c07785e608de2ddc4cc7","unresolved":false,"context_lines":[{"line_number":538,"context_line":"            return"},{"line_number":539,"context_line":"        vol_id \u003d result[\u0027volume_id\u0027]"},{"line_number":540,"context_line":"        try:"},{"line_number":541,"context_line":"            self.db.micro_states_destroy(context.elevated(), vol_id)"},{"line_number":542,"context_line":"            self.db.volume_destroy(context.elevated(), vol_id)"},{"line_number":543,"context_line":"        except exception.CinderException:"},{"line_number":544,"context_line":"            # We are already reverting, therefore we should silence this"}],"source_content_type":"text/x-python","patch_set":12,"id":"9aa7fdbe_62d6f2f2","line":541,"updated":"2014-10-25 01:47:26.000000000","message":"So an interesting observation. If the db.micro_states_destroy fails for some reason, then the volume_destroy call will never be made, this leaves an orphan volume entry in the database. Did u intend to have them happen in the same transaction; did u want some other type of error recovery? It\u0027d be nice to not have orphans if we could, since thats garbage that can\u0027t be cleaned up easily by operators (and likely will confuse users).","commit_id":"ef0c37264c17e0d2d979a4f04e8271ba16f99a2b"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"9a137ff3cbe93b0de9009314cc47fa293e91d231","unresolved":false,"context_lines":[{"line_number":538,"context_line":"            return"},{"line_number":539,"context_line":"        vol_id \u003d result[\u0027volume_id\u0027]"},{"line_number":540,"context_line":"        try:"},{"line_number":541,"context_line":"            self.db.micro_states_destroy(context.elevated(), vol_id)"},{"line_number":542,"context_line":"            self.db.volume_destroy(context.elevated(), vol_id)"},{"line_number":543,"context_line":"        except exception.CinderException:"},{"line_number":544,"context_line":"            # We are already reverting, therefore we should silence this"}],"source_content_type":"text/x-python","patch_set":12,"id":"9aa7fdbe_822d9600","line":541,"in_reply_to":"9aa7fdbe_62d6f2f2","updated":"2014-10-27 19:02:03.000000000","message":"Good observation. This should be part of a single transaction as you mentioned I agree to it, we want to have all or nothing. Lemme discuss about this in Cinder Weekly this week on Wednesday. I should have an answer for you.","commit_id":"ef0c37264c17e0d2d979a4f04e8271ba16f99a2b"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"85e0536fd5d2c679155b743aed26d0c2f8560778","unresolved":false,"context_lines":[{"line_number":655,"context_line":"        self.db \u003d db"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"    def _pre_execute(self, micro_states):"},{"line_number":658,"context_line":"        #new_state \u003d \u0027VOLUME_CREATE_MICROSTATE_QUOTA_COMMIT\u0027"},{"line_number":659,"context_line":"        new_state \u003d \u0027quota_commit\u0027"},{"line_number":660,"context_line":"        is_ok \u003d states.check_volume_create_microstate_transition(micro_states,"},{"line_number":661,"context_line":"                                                                 new_state)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9aa7fdbe_62bfd2aa","line":658,"updated":"2014-10-25 01:44:59.000000000","message":"Same question, better to just remove commented out code then keep it, since the context for why it is commented out isn\u0027t present (and this is new code anyway).","commit_id":"ef0c37264c17e0d2d979a4f04e8271ba16f99a2b"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"9a137ff3cbe93b0de9009314cc47fa293e91d231","unresolved":false,"context_lines":[{"line_number":655,"context_line":"        self.db \u003d db"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"    def _pre_execute(self, micro_states):"},{"line_number":658,"context_line":"        #new_state \u003d \u0027VOLUME_CREATE_MICROSTATE_QUOTA_COMMIT\u0027"},{"line_number":659,"context_line":"        new_state \u003d \u0027quota_commit\u0027"},{"line_number":660,"context_line":"        is_ok \u003d states.check_volume_create_microstate_transition(micro_states,"},{"line_number":661,"context_line":"                                                                 new_state)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9aa7fdbe_c2331e60","line":658,"in_reply_to":"9aa7fdbe_62bfd2aa","updated":"2014-10-27 19:02:03.000000000","message":"Sure.","commit_id":"ef0c37264c17e0d2d979a4f04e8271ba16f99a2b"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"43744f4dde6c86b3a7545a5441ba43946a47f7ef","unresolved":false,"context_lines":[{"line_number":793,"context_line":"        is_ok \u003d states.check_volume_create_microstate_transition(micro_states,"},{"line_number":794,"context_line":"                                                                 new_state)"},{"line_number":795,"context_line":"        if(is_ok):"},{"line_number":796,"context_line":"            pass"},{"line_number":797,"context_line":"        \"\"\""},{"line_number":798,"context_line":"        TODO : Add logic to retry, revert, gracefully exit in case"},{"line_number":799,"context_line":"        of failure. Failure can be because of several reason one"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_f9c6eb98","line":796,"updated":"2014-10-28 03:51:16.000000000","message":"Nit, the parenthesis aren\u0027t needed here around is_ok.","commit_id":"7c265508f8affab003e039a0909ca72ae5e0127f"},{"author":{"_account_id":8475,"name":"AmitKumarDas","email":"amit.das@cloudbyte.com","username":"AmitKumarDas"},"change_message_id":"3eae319249a99c65f89fe34842724f506469a375","unresolved":false,"context_lines":[{"line_number":541,"context_line":"            return"},{"line_number":542,"context_line":"        vol_id \u003d result[\u0027volume_id\u0027]"},{"line_number":543,"context_line":"        try:"},{"line_number":544,"context_line":"            try:"},{"line_number":545,"context_line":"                self.db.micro_states_destroy(context.elevated(), vol_id)"},{"line_number":546,"context_line":"            except exception.MicroStatesNotFound:"},{"line_number":547,"context_line":"                raise exception.MicroStatesNotFound"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a961159_7a043ec6","line":544,"updated":"2014-12-31 07:15:09.000000000","message":"What advantage we have by having a nested try block ?","commit_id":"ac9778cd67e23ba4535332a0af293d0eb47aaa78"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c4fd372828ac437720d19d79c3f5d4e76cfbd68f","unresolved":false,"context_lines":[{"line_number":651,"context_line":"        super(QuotaCommitTask, self).__init__(addons\u003d[ACTION])"},{"line_number":652,"context_line":"        self.db \u003d db"},{"line_number":653,"context_line":""},{"line_number":654,"context_line":"    def _pre_execute(self, micro_states):"},{"line_number":655,"context_line":"        new_state \u003d \u0027quota_commit\u0027"},{"line_number":656,"context_line":"        key \u003d \u0027micro_states\u0027"},{"line_number":657,"context_line":"        is_ok \u003d states.validate_transition(micro_states[\u0027state\u0027],"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa81d914_e5d7edbd","line":654,"updated":"2015-01-28 00:13:48.000000000","message":"_pre_execute and _post_execute are the same between tasks. Why not move it to a common decorator to simplify them? Tip: use six.wraps to make decorators TaskFlow-compatible, otherwise using them will throw an error.","commit_id":"8840f06d1b823f28460233ad31f4d1d04ae7d436"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"8959c7cb8c803e47edb3e1d01879007cd2d94bce","unresolved":false,"context_lines":[{"line_number":536,"context_line":"            return"},{"line_number":537,"context_line":"        vol_id \u003d result[\u0027volume_id\u0027]"},{"line_number":538,"context_line":"        try:"},{"line_number":539,"context_line":"            # TODO(e0ne): make it in a single DB transaction"},{"line_number":540,"context_line":"            self.db.volume_micro_states_destroy(context.elevated(), vol_id)"},{"line_number":541,"context_line":"            self.db.volume_destroy(context.elevated(), vol_id)"},{"line_number":542,"context_line":"        except exception.CinderException:"}],"source_content_type":"text/x-python","patch_set":27,"id":"da86d52c_7582d301","line":539,"updated":"2015-01-31 01:20:15.000000000","message":"+1 please do ;)","commit_id":"56ec246e7569b1ca433e7023a46ac35d63143743"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"fe59c57687661b8a0c79eea5ce8771fdfe9ef83a","unresolved":false,"context_lines":[{"line_number":658,"context_line":"        key \u003d \u0027volume_micro_states\u0027"},{"line_number":659,"context_line":"        is_ok \u003d states.validate_transition(volume_micro_state[\u0027state\u0027],"},{"line_number":660,"context_line":"                                           new_state, key)"},{"line_number":661,"context_line":"        if(is_ok):"},{"line_number":662,"context_line":"            pass"},{"line_number":663,"context_line":"        \"\"\""},{"line_number":664,"context_line":"        TODO : Add logic to retry, revert, gracefully exit in case"}],"source_content_type":"text/x-python","patch_set":27,"id":"da86d52c_15b6f73d","line":661,"updated":"2015-01-31 01:12:21.000000000","message":"This seems not so useful/useless; remove it.","commit_id":"56ec246e7569b1ca433e7023a46ac35d63143743"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"fe59c57687661b8a0c79eea5ce8771fdfe9ef83a","unresolved":false,"context_lines":[{"line_number":803,"context_line":"        is_ok \u003d states.validate_transition(volume_micro_state[\u0027state\u0027],"},{"line_number":804,"context_line":"                                           new_state, key)"},{"line_number":805,"context_line":"        if(is_ok):"},{"line_number":806,"context_line":"            pass"},{"line_number":807,"context_line":"        \"\"\""},{"line_number":808,"context_line":"        TODO : Add logic to retry, revert, gracefully exit in case"},{"line_number":809,"context_line":"        of failure. Failure can be because of several reason one"}],"source_content_type":"text/x-python","patch_set":27,"id":"da86d52c_9581074d","line":806,"updated":"2015-01-31 01:12:21.000000000","message":"Same, this does nothing.","commit_id":"56ec246e7569b1ca433e7023a46ac35d63143743"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"23f1ab1b0ae228fc966a4f5622e6761701dcb1c4","unresolved":false,"context_lines":[{"line_number":820,"context_line":"    # NOTE (vilobhmm): State Machine Update"},{"line_number":821,"context_line":"    def _post_execute(self, context, volume_micro_state):"},{"line_number":822,"context_line":"        volume_micro_state[\u0027state\u0027] \u003d \u0027volume_cast\u0027"},{"line_number":823,"context_line":"        self.db.volume_micro_state_update(context,"},{"line_number":824,"context_line":"                                          volume_micro_state[\u0027volume_id\u0027],"},{"line_number":825,"context_line":"                                          volume_micro_state)"},{"line_number":826,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"da86d52c_15c1972e","line":823,"updated":"2015-01-31 01:26:08.000000000","message":"Another question/comment.\n\nIf this fails (say the db is down); what do u want to happen?\n\nAt that point the cast to scheduler will have already been done (and at any point the scheduler could now act on that change). A further followup/weirdness is that say this takes 10 seconds to complete but the scheduler gets the message (and starts doing its own things) before that finishes; what do u want this to do?\n\nShould the state change happen before the cast to ensure this doesn\u0027t happen?","commit_id":"56ec246e7569b1ca433e7023a46ac35d63143743"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"161f05b9c217cb005c7b82ad169d6e036d7fef78","unresolved":false,"context_lines":[{"line_number":654,"context_line":"    def _pre_execute(self, micro_states):"},{"line_number":655,"context_line":"        new_state \u003d \u0027quota_commit\u0027"},{"line_number":656,"context_line":"        transition_key \u003d \u0027MICRO_STATES\u0027"},{"line_number":657,"context_line":"        is_ok \u003d states.validate_transition(micro_states[\u0027state\u0027],"},{"line_number":658,"context_line":"                                           new_state, transition_key)"},{"line_number":659,"context_line":"        \"\"\""},{"line_number":660,"context_line":"        TODO(vilobhmm) : Add logic to retry, revert, gracefully exit in case"}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_8690c996","line":657,"updated":"2015-02-02 17:12:23.000000000","message":"Where is \u0027is_ok\u0027 being used?","commit_id":"421fb4e2846f9422c48f0b02d4ae8c0cbe0be963"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"161f05b9c217cb005c7b82ad169d6e036d7fef78","unresolved":false,"context_lines":[{"line_number":657,"context_line":"        is_ok \u003d states.validate_transition(micro_states[\u0027state\u0027],"},{"line_number":658,"context_line":"                                           new_state, transition_key)"},{"line_number":659,"context_line":"        \"\"\""},{"line_number":660,"context_line":"        TODO(vilobhmm) : Add logic to retry, revert, gracefully exit in case"},{"line_number":661,"context_line":"        of failure. Failure can be because of several reason one"},{"line_number":662,"context_line":"        primary reason being the state transition is not allowed."},{"line_number":663,"context_line":"        As of now we need to decide whether its a transitive failure"}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_e6a0a5f6","line":660,"updated":"2015-02-02 17:12:23.000000000","message":"So a big problem that I think I have (or others will have) with this code getting merged is that there really shouldn\u0027t be big TODO in code that wants to get merged (or there should be a dependent patch set already ready that has it implemented); if this goes into cinder for a release it would seem questionable that they will have partially implemented code in a release... Just something to think about...","commit_id":"421fb4e2846f9422c48f0b02d4ae8c0cbe0be963"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"161f05b9c217cb005c7b82ad169d6e036d7fef78","unresolved":false,"context_lines":[{"line_number":794,"context_line":"        \u0027state\u0027            in micro_states table"},{"line_number":795,"context_line":"        \u0027migration_status\u0027 in migration table,"},{"line_number":796,"context_line":"        \u0027status\u0027           in volumes table and so on\"\"\""},{"line_number":797,"context_line":"        transition_key \u003d \u0027MICRO_STATES\u0027"},{"line_number":798,"context_line":"        is_ok \u003d states.validate_transition(micro_states[\u0027state\u0027],"},{"line_number":799,"context_line":"                                           new_state, transition_key)"},{"line_number":800,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_86be09fe","line":797,"updated":"2015-02-02 17:12:23.000000000","message":"Use module level constants for strings u are duplicating....","commit_id":"421fb4e2846f9422c48f0b02d4ae8c0cbe0be963"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"161f05b9c217cb005c7b82ad169d6e036d7fef78","unresolved":false,"context_lines":[{"line_number":798,"context_line":"        is_ok \u003d states.validate_transition(micro_states[\u0027state\u0027],"},{"line_number":799,"context_line":"                                           new_state, transition_key)"},{"line_number":800,"context_line":"        \"\"\""},{"line_number":801,"context_line":"        TODO(vilobhmm) : Add logic to retry, revert, gracefully exit in case"},{"line_number":802,"context_line":"        of failure. Failure can be because of several reason one"},{"line_number":803,"context_line":"        primary reason being the state transition is not allowed."},{"line_number":804,"context_line":"        As of now we need to decide whether its a transitive failure"}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_265e3de7","line":801,"updated":"2015-02-02 17:12:23.000000000","message":"Same issue with getting this merged; huge TODO statements likely won\u0027t make the cinder core developers think this is ready to go into a cinder release (imho)...","commit_id":"421fb4e2846f9422c48f0b02d4ae8c0cbe0be963"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"a6ad2b18c0919cae19d779b5a3e5c5197ee6ab7f","unresolved":false,"context_lines":[{"line_number":798,"context_line":"        is_ok \u003d states.validate_transition(micro_states[\u0027state\u0027],"},{"line_number":799,"context_line":"                                           new_state, transition_key)"},{"line_number":800,"context_line":"        \"\"\""},{"line_number":801,"context_line":"        TODO(vilobhmm) : Add logic to retry, revert, gracefully exit in case"},{"line_number":802,"context_line":"        of failure. Failure can be because of several reason one"},{"line_number":803,"context_line":"        primary reason being the state transition is not allowed."},{"line_number":804,"context_line":"        As of now we need to decide whether its a transitive failure"}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_b7afb893","line":801,"in_reply_to":"da86d52c_265e3de7","updated":"2015-02-02 18:16:14.000000000","message":"Have you been in the cinder weekly meeting; asking them for there feedback... Having a big review that is partially done like this is going to require close collaboration and understanding of the other cinder folks (and not just me).","commit_id":"421fb4e2846f9422c48f0b02d4ae8c0cbe0be963"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"161f05b9c217cb005c7b82ad169d6e036d7fef78","unresolved":false,"context_lines":[{"line_number":823,"context_line":"        filter_properties \u003d {}"},{"line_number":824,"context_line":"        if scheduler_hints:"},{"line_number":825,"context_line":"            filter_properties[\u0027scheduler_hints\u0027] \u003d scheduler_hints"},{"line_number":826,"context_line":"        self._post_execute(context, micro_states)"},{"line_number":827,"context_line":"        self._cast_create_volume(context, request_spec, filter_properties)"},{"line_number":828,"context_line":""},{"line_number":829,"context_line":"    def revert(self, context, result, flow_failures, **kwargs):"}],"source_content_type":"text/x-python","patch_set":28,"id":"da86d52c_861a8915","line":826,"updated":"2015-02-02 17:12:23.000000000","message":"So this name \u0027post_execute\u0027 doesn\u0027t make sense anymore; its not post since the cast is occuring after it, probably pick a better name...","commit_id":"421fb4e2846f9422c48f0b02d4ae8c0cbe0be963"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"b794eb6b6f834c39ee952d132652492a05f06b42","unresolved":false,"context_lines":[{"line_number":656,"context_line":"        new_state \u003d \u0027quota_commit\u0027"},{"line_number":657,"context_line":"        is_ok \u003d states.validate_transition(micro_states[\u0027state\u0027],"},{"line_number":658,"context_line":"                                           new_state, TRANSITION_KEY)"},{"line_number":659,"context_line":"        if (is_ok):"},{"line_number":660,"context_line":"            pass"},{"line_number":661,"context_line":"        else:"},{"line_number":662,"context_line":"            msg \u003d _(\"Failed to validate transition for\""}],"source_content_type":"text/x-python","patch_set":29,"id":"da86d52c_7d96faf1","line":659,"updated":"2015-02-02 21:13:48.000000000","message":"Just do \u0027if not is_ok\u0027??","commit_id":"95ee015a15a4d66aa567394b6d86205ffb123a76"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"b794eb6b6f834c39ee952d132652492a05f06b42","unresolved":false,"context_lines":[{"line_number":798,"context_line":"        \u0027status\u0027           in volumes table and so on\"\"\""},{"line_number":799,"context_line":"        is_ok \u003d states.validate_transition(micro_states[\u0027state\u0027],"},{"line_number":800,"context_line":"                                           new_state, TRANSITION_KEY)"},{"line_number":801,"context_line":"        if (is_ok):"},{"line_number":802,"context_line":"            pass"},{"line_number":803,"context_line":"        else:"},{"line_number":804,"context_line":"            msg \u003d _(\"Failed to validate transition for\""}],"source_content_type":"text/x-python","patch_set":29,"id":"da86d52c_1d85feac","line":801,"updated":"2015-02-02 21:13:48.000000000","message":"Same, less no-op code the better.","commit_id":"95ee015a15a4d66aa567394b6d86205ffb123a76"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":506,"context_line":"            micro_states \u003d self.db.micro_states_create(context,"},{"line_number":507,"context_line":"                                                       micro_states_properties)"},{"line_number":508,"context_line":"        except exception.MicroStatesRecordExists:"},{"line_number":509,"context_line":"            LOG.exception(_(\"Micro states record already exists\"))"},{"line_number":510,"context_line":"            raise exception.MicroStatesRecordExists"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"        return {"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_36b8532a","line":509,"updated":"2015-02-08 04:14:19.000000000","message":"Use _LE.  Please add resource_id to the message.","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":507,"context_line":"                                                       micro_states_properties)"},{"line_number":508,"context_line":"        except exception.MicroStatesRecordExists:"},{"line_number":509,"context_line":"            LOG.exception(_(\"Micro states record already exists\"))"},{"line_number":510,"context_line":"            raise exception.MicroStatesRecordExists"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"        return {"},{"line_number":513,"context_line":"            \u0027volume_id\u0027: volume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_16ab4fd7","line":510,"updated":"2015-02-08 04:14:19.000000000","message":"Should just \"raise\" rather than creating another exception object.","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":535,"context_line":"            return"},{"line_number":536,"context_line":"        vol_id \u003d result[\u0027volume_id\u0027]"},{"line_number":537,"context_line":"        try:"},{"line_number":538,"context_line":"            # TODO(e0ne): make it in a single DB transaction"},{"line_number":539,"context_line":"            self.db.micro_states_destroy(context.elevated(), vol_id)"},{"line_number":540,"context_line":"            self.db.volume_destroy(context.elevated(), vol_id)"},{"line_number":541,"context_line":"        except exception.CinderException:"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_56b5c72f","line":538,"updated":"2015-02-08 04:14:19.000000000","message":"Nice TODO item.","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":653,"context_line":"        self.db \u003d db"},{"line_number":654,"context_line":""},{"line_number":655,"context_line":"    def _state_transition_validate(self, micro_states):"},{"line_number":656,"context_line":"        new_state \u003d \u0027quota_commit\u0027"},{"line_number":657,"context_line":"        is_ok \u003d states.validate_transition(micro_states[\u0027state\u0027],"},{"line_number":658,"context_line":"                                           new_state, TRANSITION_KEY)"},{"line_number":659,"context_line":"        if (is_ok):"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_96865f64","line":656,"updated":"2015-02-08 04:14:19.000000000","message":"Can you use constant for \u0027quota_commit\u0027? You have them all defined in states.py.  Why not use them?","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":656,"context_line":"        new_state \u003d \u0027quota_commit\u0027"},{"line_number":657,"context_line":"        is_ok \u003d states.validate_transition(micro_states[\u0027state\u0027],"},{"line_number":658,"context_line":"                                           new_state, TRANSITION_KEY)"},{"line_number":659,"context_line":"        if (is_ok):"},{"line_number":660,"context_line":"            pass"},{"line_number":661,"context_line":"        else:"},{"line_number":662,"context_line":"            msg \u003d _(\"Failed to validate transition for\""}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_b67b637a","line":659,"updated":"2015-02-08 04:14:19.000000000","message":"() is not needed.","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":663,"context_line":"                    \"resource \u0027%(resource_id)s\u0027 with current\""},{"line_number":664,"context_line":"                    \"state \u0027(micro_state)%s\u0027\")"},{"line_number":665,"context_line":"            msg \u003d msg % {\u0027resource_id\u0027: micro_states[\u0027resource_id\u0027],"},{"line_number":666,"context_line":"                         \u0027micro_state\u0027: new_state}"},{"line_number":667,"context_line":"            raise exception.InvalidMicroStateTransition(reason\u003dmsg)"},{"line_number":668,"context_line":""},{"line_number":669,"context_line":"    # NOTE (vilobhmm): State Machine Update"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_d680d748","line":666,"updated":"2015-02-08 04:14:19.000000000","message":"Can you combine 662-666 into one statement?","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":668,"context_line":""},{"line_number":669,"context_line":"    # NOTE (vilobhmm): State Machine Update"},{"line_number":670,"context_line":"    def _state_transition_update(self, context, micro_states):"},{"line_number":671,"context_line":"        micro_states[\u0027state\u0027] \u003d \u0027quota_commit\u0027"},{"line_number":672,"context_line":"        self.db.micro_states_update(context,"},{"line_number":673,"context_line":"                                    micro_states[\u0027resource_id\u0027],"},{"line_number":674,"context_line":"                                    micro_states)"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_f694fb8d","line":671,"updated":"2015-02-08 04:14:19.000000000","message":"Use constant.","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":788,"context_line":"                consistencygroup_id\u003dgroup_id)"},{"line_number":789,"context_line":""},{"line_number":790,"context_line":"    def _state_transition_validate(self, micro_states):"},{"line_number":791,"context_line":"        new_state \u003d \u0027volume_cast\u0027"},{"line_number":792,"context_line":"        \"\"\"Here transition key is the table name. Depending on the table used"},{"line_number":793,"context_line":"        and the db object used it will be the reposonsibility of"},{"line_number":794,"context_line":"        the developer to make sure to pass proper field which can"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_16926f9f","line":791,"updated":"2015-02-08 04:14:19.000000000","message":"Use constant.  Please move this line below the docstings.","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":789,"context_line":""},{"line_number":790,"context_line":"    def _state_transition_validate(self, micro_states):"},{"line_number":791,"context_line":"        new_state \u003d \u0027volume_cast\u0027"},{"line_number":792,"context_line":"        \"\"\"Here transition key is the table name. Depending on the table used"},{"line_number":793,"context_line":"        and the db object used it will be the reposonsibility of"},{"line_number":794,"context_line":"        the developer to make sure to pass proper field which can"},{"line_number":795,"context_line":"        get us the \u0027state\u0027 details. For example"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_368f7377","line":792,"updated":"2015-02-08 04:14:19.000000000","message":"First line should end with a period, followed by a blank line, then followed by more lines.","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":805,"context_line":"                    \"resource \u0027%(resource_id)s\u0027 with current\""},{"line_number":806,"context_line":"                    \"state \u0027(micro_state)%s\u0027\")"},{"line_number":807,"context_line":"            msg \u003d msg % {\u0027resource_id\u0027: micro_states[\u0027resource_id\u0027],"},{"line_number":808,"context_line":"                         \u0027micro_state\u0027: new_state}"},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"    # NOTE (vilobhmm): State Machine Update"},{"line_number":811,"context_line":"    def _state_transition_update(self, context, micro_states):"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_568ce77f","line":808,"updated":"2015-02-08 04:14:19.000000000","message":"Combine the two \"msg\u003d\"","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"941de81c6db69777c91ef55ba4b325e9d184ac23","unresolved":false,"context_lines":[{"line_number":809,"context_line":""},{"line_number":810,"context_line":"    # NOTE (vilobhmm): State Machine Update"},{"line_number":811,"context_line":"    def _state_transition_update(self, context, micro_states):"},{"line_number":812,"context_line":"        micro_states[\u0027state\u0027] \u003d \u0027volume_cast\u0027"},{"line_number":813,"context_line":"        self.db.micro_states_update(context,"},{"line_number":814,"context_line":"                                    micro_states[\u0027resource_id\u0027],"},{"line_number":815,"context_line":"                                    micro_states)"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_76e80b17","line":812,"updated":"2015-02-08 04:14:19.000000000","message":"Constant","commit_id":"9233f1cf69be9e6b3415d6bf4661adde93ee7a59"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"9fe039a6502a98c2eded145f5c32e809480930ba","unresolved":false,"context_lines":[{"line_number":786,"context_line":"                consistencygroup_id\u003dgroup_id)"},{"line_number":787,"context_line":""},{"line_number":788,"context_line":"    def _state_transition_validate(self, micro_states):"},{"line_number":789,"context_line":"        new_state \u003d \u0027volume_cast\u0027"},{"line_number":790,"context_line":"        \"\"\"Validate state transition."},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"        :param micro_states: details of the current micro_state the"}],"source_content_type":"text/x-python","patch_set":36,"id":"da86d52c_87f95550","line":789,"updated":"2015-02-11 05:59:22.000000000","message":"Why is the docstring for this method after a variable declaration. I\u0027ve never seen that before.","commit_id":"d63d60da116af45f49e3b6efae7e943e600e4bc9"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8a8d1bc392f5b93beb14bce127ad60a0648d2a87","unresolved":false,"context_lines":[{"line_number":652,"context_line":"        super(QuotaCommitTask, self).__init__(addons\u003d[ACTION])"},{"line_number":653,"context_line":"        self.db \u003d db"},{"line_number":654,"context_line":""},{"line_number":655,"context_line":"    def _state_transition_validate(self, micro_states):"},{"line_number":656,"context_line":"        new_state \u003d \u0027quota_commit\u0027"},{"line_number":657,"context_line":"        is_ok \u003d states.validate_transition(micro_states[\u0027state\u0027],"},{"line_number":658,"context_line":"                                           new_state, TRANSITION_KEY)"}],"source_content_type":"text/x-python","patch_set":37,"id":"da86d52c_3ba8c1da","line":655,"updated":"2015-02-11 09:05:45.000000000","message":"This method is almost the same like in 788, can we move it to flow_utils.py as as a decorator (with new_state as a parameter) and just apply it to execute?","commit_id":"e666ba4204cc96a8faefc057d407a84a49fd011b"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8a8d1bc392f5b93beb14bce127ad60a0648d2a87","unresolved":false,"context_lines":[{"line_number":665,"context_line":"            raise exception.InvalidMicroStateTransition(reason\u003dmsg)"},{"line_number":666,"context_line":""},{"line_number":667,"context_line":"    # NOTE (vilobhmm): State Machine Update"},{"line_number":668,"context_line":"    def _state_transition_update(self, context, micro_states):"},{"line_number":669,"context_line":"        micro_states[\u0027state\u0027] \u003d \u0027quota_commit\u0027"},{"line_number":670,"context_line":"        self.db.micro_states_update(context,"},{"line_number":671,"context_line":"                                    micro_states[\u0027resource_id\u0027],"}],"source_content_type":"text/x-python","patch_set":37,"id":"da86d52c_bbb3d14b","line":668,"updated":"2015-02-11 09:05:45.000000000","message":"This one may be trickier to change for a decorator because it isn\u0027t always the last call in the execute.","commit_id":"e666ba4204cc96a8faefc057d407a84a49fd011b"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8a8d1bc392f5b93beb14bce127ad60a0648d2a87","unresolved":false,"context_lines":[{"line_number":676,"context_line":"        try:"},{"line_number":677,"context_line":"            self._state_transition_validate(micro_states)"},{"line_number":678,"context_line":"        except exception.InvalidMicroStateTransition:"},{"line_number":679,"context_line":"            LOG.exception(_LE(\"Failed to validate transition\"))"},{"line_number":680,"context_line":""},{"line_number":681,"context_line":"        QUOTAS.commit(context, reservations)"},{"line_number":682,"context_line":"        # updating is_quota_committed attribute of optional_args dictionary"}],"source_content_type":"text/x-python","patch_set":37,"id":"da86d52c_5b21f54b","line":679,"updated":"2015-02-11 09:05:45.000000000","message":"Just a question. If we\u0027re unable to validate transition we just log it and let the flow execute further? Is this intentional?","commit_id":"e666ba4204cc96a8faefc057d407a84a49fd011b"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8a8d1bc392f5b93beb14bce127ad60a0648d2a87","unresolved":false,"context_lines":[{"line_number":822,"context_line":"        filter_properties \u003d {}"},{"line_number":823,"context_line":"        if scheduler_hints:"},{"line_number":824,"context_line":"            filter_properties[\u0027scheduler_hints\u0027] \u003d scheduler_hints"},{"line_number":825,"context_line":"        self._state_transition_update(context, micro_states)"},{"line_number":826,"context_line":"        self._cast_create_volume(context, request_spec, filter_properties)"},{"line_number":827,"context_line":""},{"line_number":828,"context_line":"    def revert(self, context, result, flow_failures, **kwargs):"}],"source_content_type":"text/x-python","patch_set":37,"id":"da86d52c_bbb83112","line":825,"updated":"2015-02-11 09:05:45.000000000","message":"Just a question - is it required to have it here before the cast?","commit_id":"e666ba4204cc96a8faefc057d407a84a49fd011b"}],"cinder/volume/flows/manager/create_volume.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"fe59c57687661b8a0c79eea5ce8771fdfe9ef83a","unresolved":false,"context_lines":[{"line_number":481,"context_line":"        copy_image_to_volume \u003d self.driver.copy_image_to_volume"},{"line_number":482,"context_line":"        volume_id \u003d volume_ref[\u0027id\u0027]"},{"line_number":483,"context_line":"        LOG.debug(\"Attempting download of %(image_id)s (%(image_location)s)\""},{"line_number":484,"context_line":"                  \" to volume %(volume_id)s.\","},{"line_number":485,"context_line":"                  {\u0027image_id\u0027: image_id, \u0027volume_id\u0027: volume_id,"},{"line_number":486,"context_line":"                   \u0027image_location\u0027: image_location})"},{"line_number":487,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":27,"id":"da86d52c_f58fa373","line":484,"updated":"2015-01-31 01:12:21.000000000","message":"I\u0027m confused why your change affected this files strings?","commit_id":"56ec246e7569b1ca433e7023a46ac35d63143743"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"fe59c57687661b8a0c79eea5ce8771fdfe9ef83a","unresolved":false,"context_lines":[{"line_number":699,"context_line":"            # or are there other side-effects that this will cause if the"},{"line_number":700,"context_line":"            # status isn\u0027t updated correctly (aka it will likely be stuck in"},{"line_number":701,"context_line":"            # \u0027building\u0027 if this fails)??"},{"line_number":702,"context_line":"            # TODO(e0ne): make it in a single DB transaction"},{"line_number":703,"context_line":"            volume_ref \u003d self.db.volume_update(context, volume_id, update)"},{"line_number":704,"context_line":"            self.db.volume_micro_state_update(context,"},{"line_number":705,"context_line":"                                              volume_id,"}],"source_content_type":"text/x-python","patch_set":27,"id":"da86d52c_355e9bea","line":702,"updated":"2015-01-31 01:12:21.000000000","message":"I\u0027m unsure the usage of this try: except block makes sense.\n\nIf the \u0027self.db.volume_micro_state_update\u0027 fails then the except block will LOG that the \u0027updating volume\u0027 call failed; which doesn\u0027t seem like the correct warning...\n\nPerhaps use a different try/except block and have a appropriate handling of the failure with a LOG message that is useful.","commit_id":"56ec246e7569b1ca433e7023a46ac35d63143743"}],"cinder/volume/states.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"03210a90f88010252b2de91a8a5a268b9391c4fd","unresolved":false,"context_lines":[{"line_number":231,"context_line":"Based on the well-defined set of rules a decision is made whether"},{"line_number":232,"context_line":"a particular state trantion is allowed or now and which operation"},{"line_number":233,"context_line":"takes precedence over another one."},{"line_number":234,"context_line":"\"\"\""},{"line_number":235,"context_line":"VOLUME_CREATE_MICROSTATE_EXTRACTVOLUMEREQUESTTASK \u003d \u0027volumecreate_extractvolumerequesttask\u0027"},{"line_number":236,"context_line":"VOLUME_CREATE_MICROSTATE_ENTRYCREATETASK \u003d \u0027volumecreate_entrycreatetask\u0027"},{"line_number":237,"context_line":"VOLUME_CREATE_MICROSTATE_QUOTARESERVETASK \u003d \u0027volumecreate_quotareservetask\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_58401e07","line":234,"updated":"2014-09-25 22:56:26.000000000","message":"I wonder if we can make the naming here better.\n\n  VOLUMECASTTASK -\u003e VOLUME_CAST\n\nDoesn\u0027t seem much benefit in the TASK postfix since its not relevant to what is actually happening.","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"a014b4ff52ca8b59d577bcf48bac7a6b8879d480","unresolved":false,"context_lines":[{"line_number":232,"context_line":"a particular state trantion is allowed or now and which operation"},{"line_number":233,"context_line":"takes precedence over another one."},{"line_number":234,"context_line":"\"\"\""},{"line_number":235,"context_line":"VOLUME_CREATE_MICROSTATE_EXTRACTVOLUMEREQUESTTASK \u003d \u0027volumecreate_extractvolumerequesttask\u0027"},{"line_number":236,"context_line":"VOLUME_CREATE_MICROSTATE_ENTRYCREATETASK \u003d \u0027volumecreate_entrycreatetask\u0027"},{"line_number":237,"context_line":"VOLUME_CREATE_MICROSTATE_QUOTARESERVETASK \u003d \u0027volumecreate_quotareservetask\u0027"},{"line_number":238,"context_line":"VOLUME_CREATE_MICROSTATE_QUOTACOMMITTASK \u003d \u0027volumecreate_quotacommittask\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_11d3d160","line":235,"updated":"2014-09-26 01:19:00.000000000","message":"too long as 1 line","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"03210a90f88010252b2de91a8a5a268b9391c4fd","unresolved":false,"context_lines":[{"line_number":246,"context_line":"    VOLUME_CREATE_MICROSTATE_VOLUMECASTTASK,"},{"line_number":247,"context_line":")"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"VOLUME_CREATE_MICROSTATE_TRANSITIONS \u003d frozenset(["},{"line_number":250,"context_line":"    (VOLUME_CREATE_MICROSTATE_EXTRACTVOLUMEREQUESTTASK, VOLUME_CREATE_MICROSTATE_ENTRYCREATETASK),"},{"line_number":251,"context_line":"    (VOLUME_CREATE_MICROSTATE_ENTRYCREATETASK, VOLUME_CREATE_MICROSTATE_QUOTARESERVETASK),"},{"line_number":252,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTARESERVETASK, VOLUME_CREATE_MICROSTATE_QUOTACOMMITTASK),"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_785c02ee","line":249,"updated":"2014-09-25 22:56:26.000000000","message":"Hmmm, this is going to get unwieldy, we should probably think of a better way to have these tables defined.","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"a014b4ff52ca8b59d577bcf48bac7a6b8879d480","unresolved":false,"context_lines":[{"line_number":247,"context_line":")"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"VOLUME_CREATE_MICROSTATE_TRANSITIONS \u003d frozenset(["},{"line_number":250,"context_line":"    (VOLUME_CREATE_MICROSTATE_EXTRACTVOLUMEREQUESTTASK, VOLUME_CREATE_MICROSTATE_ENTRYCREATETASK),"},{"line_number":251,"context_line":"    (VOLUME_CREATE_MICROSTATE_ENTRYCREATETASK, VOLUME_CREATE_MICROSTATE_QUOTARESERVETASK),"},{"line_number":252,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTARESERVETASK, VOLUME_CREATE_MICROSTATE_QUOTACOMMITTASK),"},{"line_number":253,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTACOMMITTASK, VOLUME_CREATE_MICROSTATE_VOLUMECASTTASK),"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_313ff589","line":250,"updated":"2014-09-26 01:19:00.000000000","message":"too long as 1 line","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"a014b4ff52ca8b59d577bcf48bac7a6b8879d480","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"VOLUME_CREATE_MICROSTATE_TRANSITIONS \u003d frozenset(["},{"line_number":250,"context_line":"    (VOLUME_CREATE_MICROSTATE_EXTRACTVOLUMEREQUESTTASK, VOLUME_CREATE_MICROSTATE_ENTRYCREATETASK),"},{"line_number":251,"context_line":"    (VOLUME_CREATE_MICROSTATE_ENTRYCREATETASK, VOLUME_CREATE_MICROSTATE_QUOTARESERVETASK),"},{"line_number":252,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTARESERVETASK, VOLUME_CREATE_MICROSTATE_QUOTACOMMITTASK),"},{"line_number":253,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTACOMMITTASK, VOLUME_CREATE_MICROSTATE_VOLUMECASTTASK),"},{"line_number":254,"context_line":"])"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_d16a2980","line":251,"updated":"2014-09-26 01:19:00.000000000","message":"same","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"a014b4ff52ca8b59d577bcf48bac7a6b8879d480","unresolved":false,"context_lines":[{"line_number":249,"context_line":"VOLUME_CREATE_MICROSTATE_TRANSITIONS \u003d frozenset(["},{"line_number":250,"context_line":"    (VOLUME_CREATE_MICROSTATE_EXTRACTVOLUMEREQUESTTASK, VOLUME_CREATE_MICROSTATE_ENTRYCREATETASK),"},{"line_number":251,"context_line":"    (VOLUME_CREATE_MICROSTATE_ENTRYCREATETASK, VOLUME_CREATE_MICROSTATE_QUOTARESERVETASK),"},{"line_number":252,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTARESERVETASK, VOLUME_CREATE_MICROSTATE_QUOTACOMMITTASK),"},{"line_number":253,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTACOMMITTASK, VOLUME_CREATE_MICROSTATE_VOLUMECASTTASK),"},{"line_number":254,"context_line":"])"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_110831d9","line":252,"updated":"2014-09-26 01:19:00.000000000","message":"same","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"a014b4ff52ca8b59d577bcf48bac7a6b8879d480","unresolved":false,"context_lines":[{"line_number":250,"context_line":"    (VOLUME_CREATE_MICROSTATE_EXTRACTVOLUMEREQUESTTASK, VOLUME_CREATE_MICROSTATE_ENTRYCREATETASK),"},{"line_number":251,"context_line":"    (VOLUME_CREATE_MICROSTATE_ENTRYCREATETASK, VOLUME_CREATE_MICROSTATE_QUOTARESERVETASK),"},{"line_number":252,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTARESERVETASK, VOLUME_CREATE_MICROSTATE_QUOTACOMMITTASK),"},{"line_number":253,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTACOMMITTASK, VOLUME_CREATE_MICROSTATE_VOLUMECASTTASK),"},{"line_number":254,"context_line":"])"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"def check_volume_create_microstate_transition(micro_states, new_state, quiet\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_510e39e6","line":253,"updated":"2014-09-26 01:19:00.000000000","message":"same","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"a014b4ff52ca8b59d577bcf48bac7a6b8879d480","unresolved":false,"context_lines":[{"line_number":253,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTACOMMITTASK, VOLUME_CREATE_MICROSTATE_VOLUMECASTTASK),"},{"line_number":254,"context_line":"])"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"def check_volume_create_microstate_transition(micro_states, new_state, quiet\u003dFalse):"},{"line_number":257,"context_line":"    \"\"\"Check that a volume create microstate can transition."},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    If transition can be performed, it returns True. If transition"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_f1ec8df5","line":256,"updated":"2014-09-26 01:19:00.000000000","message":"same","commit_id":"fd29428789e17f352e5929d700c42adffc798299"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c9d6dfffe005497cb1428e2204347d3f126ce263","unresolved":false,"context_lines":[{"line_number":229,"context_line":"\"\"\""},{"line_number":230,"context_line":"Fetch the state from state transition manager or to Zookeeper."},{"line_number":231,"context_line":"Based on the well-defined set of rules a decision is made whether"},{"line_number":232,"context_line":"a particular state trantion is allowed or now and which operation"},{"line_number":233,"context_line":"takes precedence over another one."},{"line_number":234,"context_line":"\"\"\""},{"line_number":235,"context_line":"VOLUME_CREATE_MICROSTATE_EXTRACT_VOLUME_REQUEST \u003d \u0027extract_volume_request\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9df570_c77507fb","line":232,"updated":"2014-09-26 05:06:39.000000000","message":"trantion -\u003e transition, now -\u003e not","commit_id":"8e1ea5d19920be0396373ae2d636af9e012f2ab3"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"acdbbe0e3d3ff6bb8f4dee25168fb01f95035b4c","unresolved":false,"context_lines":[{"line_number":229,"context_line":"\"\"\""},{"line_number":230,"context_line":"Fetch the state from state transition manager or to Zookeeper."},{"line_number":231,"context_line":"Based on the well-defined set of rules a decision is made whether"},{"line_number":232,"context_line":"a particular state trantion is allowed or now and which operation"},{"line_number":233,"context_line":"takes precedence over another one."},{"line_number":234,"context_line":"\"\"\""},{"line_number":235,"context_line":"VOLUME_CREATE_MICROSTATE_EXTRACT_VOLUME_REQUEST \u003d \u0027extract_volume_request\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_1d5b6255","line":232,"in_reply_to":"da9df570_c77507fb","updated":"2014-09-29 22:11:55.000000000","message":"Done","commit_id":"8e1ea5d19920be0396373ae2d636af9e012f2ab3"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c9d6dfffe005497cb1428e2204347d3f126ce263","unresolved":false,"context_lines":[{"line_number":275,"context_line":"    except (ValueError, excp.InvalidTransition) as e:"},{"line_number":276,"context_line":"        if quiet:"},{"line_number":277,"context_line":"            LOG.warn(_(\"Invalid/unknown \u0027volume\u0027 micro-state transition\""},{"line_number":278,"context_line":"                       \" attempted: %(details)s\") % ({\u0027details\u0027: e}))"},{"line_number":279,"context_line":"            return True"},{"line_number":280,"context_line":"        else:"},{"line_number":281,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9df570_67d53bb8","line":278,"updated":"2014-09-26 05:06:39.000000000","message":"e -\u003e six.text_type(e)","commit_id":"8e1ea5d19920be0396373ae2d636af9e012f2ab3"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"acdbbe0e3d3ff6bb8f4dee25168fb01f95035b4c","unresolved":false,"context_lines":[{"line_number":275,"context_line":"    except (ValueError, excp.InvalidTransition) as e:"},{"line_number":276,"context_line":"        if quiet:"},{"line_number":277,"context_line":"            LOG.warn(_(\"Invalid/unknown \u0027volume\u0027 micro-state transition\""},{"line_number":278,"context_line":"                       \" attempted: %(details)s\") % ({\u0027details\u0027: e}))"},{"line_number":279,"context_line":"            return True"},{"line_number":280,"context_line":"        else:"},{"line_number":281,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_bd3b36ea","line":278,"in_reply_to":"da9df570_67d53bb8","updated":"2014-09-29 22:11:55.000000000","message":"Done","commit_id":"8e1ea5d19920be0396373ae2d636af9e012f2ab3"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"b86a6e9fadc23c434a823160148fe65060622f9d","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":"# The allowed state transition"},{"line_number":252,"context_line":"VOLUME_CREATE_MICROSTATE_TRANSITIONS \u003d frozenset(["},{"line_number":253,"context_line":"    (VOLUME_CREATE_MICROSTATE_EXTRACT_VOLUME_REQUEST, VOLUME_CREATE_MICROSTATE_ENTRY_CREATE),"},{"line_number":254,"context_line":"    (VOLUME_CREATE_MICROSTATE_ENTRY_CREATE, VOLUME_CREATE_MICROSTATE_QUOTA_RESERVE),"},{"line_number":255,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTA_RESERVE, VOLUME_CREATE_MICROSTATE_QUOTA_COMMIT),"},{"line_number":256,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTA_COMMIT, VOLUME_CREATE_MICROSTATE_VOLUME_CAST),"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_6f067122","line":253,"updated":"2014-09-30 05:04:54.000000000","message":"too long","commit_id":"63c514dff8a5d6277f7a48da12cc4d1df44883bf"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"b86a6e9fadc23c434a823160148fe65060622f9d","unresolved":false,"context_lines":[{"line_number":251,"context_line":"# The allowed state transition"},{"line_number":252,"context_line":"VOLUME_CREATE_MICROSTATE_TRANSITIONS \u003d frozenset(["},{"line_number":253,"context_line":"    (VOLUME_CREATE_MICROSTATE_EXTRACT_VOLUME_REQUEST, VOLUME_CREATE_MICROSTATE_ENTRY_CREATE),"},{"line_number":254,"context_line":"    (VOLUME_CREATE_MICROSTATE_ENTRY_CREATE, VOLUME_CREATE_MICROSTATE_QUOTA_RESERVE),"},{"line_number":255,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTA_RESERVE, VOLUME_CREATE_MICROSTATE_QUOTA_COMMIT),"},{"line_number":256,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTA_COMMIT, VOLUME_CREATE_MICROSTATE_VOLUME_CAST),"},{"line_number":257,"context_line":"])"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_b2ffdc00","line":254,"updated":"2014-09-30 05:04:54.000000000","message":"same","commit_id":"63c514dff8a5d6277f7a48da12cc4d1df44883bf"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"b86a6e9fadc23c434a823160148fe65060622f9d","unresolved":false,"context_lines":[{"line_number":252,"context_line":"VOLUME_CREATE_MICROSTATE_TRANSITIONS \u003d frozenset(["},{"line_number":253,"context_line":"    (VOLUME_CREATE_MICROSTATE_EXTRACT_VOLUME_REQUEST, VOLUME_CREATE_MICROSTATE_ENTRY_CREATE),"},{"line_number":254,"context_line":"    (VOLUME_CREATE_MICROSTATE_ENTRY_CREATE, VOLUME_CREATE_MICROSTATE_QUOTA_RESERVE),"},{"line_number":255,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTA_RESERVE, VOLUME_CREATE_MICROSTATE_QUOTA_COMMIT),"},{"line_number":256,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTA_COMMIT, VOLUME_CREATE_MICROSTATE_VOLUME_CAST),"},{"line_number":257,"context_line":"])"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_8f03950e","line":255,"updated":"2014-09-30 05:04:54.000000000","message":"same","commit_id":"63c514dff8a5d6277f7a48da12cc4d1df44883bf"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"b86a6e9fadc23c434a823160148fe65060622f9d","unresolved":false,"context_lines":[{"line_number":253,"context_line":"    (VOLUME_CREATE_MICROSTATE_EXTRACT_VOLUME_REQUEST, VOLUME_CREATE_MICROSTATE_ENTRY_CREATE),"},{"line_number":254,"context_line":"    (VOLUME_CREATE_MICROSTATE_ENTRY_CREATE, VOLUME_CREATE_MICROSTATE_QUOTA_RESERVE),"},{"line_number":255,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTA_RESERVE, VOLUME_CREATE_MICROSTATE_QUOTA_COMMIT),"},{"line_number":256,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTA_COMMIT, VOLUME_CREATE_MICROSTATE_VOLUME_CAST),"},{"line_number":257,"context_line":"])"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"# Verify if the state transition is allowed from previous state to new state"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_d2046017","line":256,"updated":"2014-09-30 05:04:54.000000000","message":"same","commit_id":"63c514dff8a5d6277f7a48da12cc4d1df44883bf"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"b86a6e9fadc23c434a823160148fe65060622f9d","unresolved":false,"context_lines":[{"line_number":255,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTA_RESERVE, VOLUME_CREATE_MICROSTATE_QUOTA_COMMIT),"},{"line_number":256,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTA_COMMIT, VOLUME_CREATE_MICROSTATE_VOLUME_CAST),"},{"line_number":257,"context_line":"])"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"# Verify if the state transition is allowed from previous state to new state"},{"line_number":260,"context_line":"def check_volume_create_microstate_transition(micro_states, new_state, quiet\u003dFalse):"},{"line_number":261,"context_line":"    \"\"\"Check that a volume create microstate can transition."}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_5210704e","line":258,"updated":"2014-09-30 05:04:54.000000000","message":"one more blank line is needed.","commit_id":"63c514dff8a5d6277f7a48da12cc4d1df44883bf"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"b86a6e9fadc23c434a823160148fe65060622f9d","unresolved":false,"context_lines":[{"line_number":257,"context_line":"])"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"# Verify if the state transition is allowed from previous state to new state"},{"line_number":260,"context_line":"def check_volume_create_microstate_transition(micro_states, new_state, quiet\u003dFalse):"},{"line_number":261,"context_line":"    \"\"\"Check that a volume create microstate can transition."},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    If transition can be performed, it returns True. If transition"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_120fc831","line":260,"updated":"2014-09-30 05:04:54.000000000","message":"too long.","commit_id":"63c514dff8a5d6277f7a48da12cc4d1df44883bf"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"b86a6e9fadc23c434a823160148fe65060622f9d","unresolved":false,"context_lines":[{"line_number":275,"context_line":"    except (ValueError, excp.InvalidTransition) as e:"},{"line_number":276,"context_line":"        if quiet:"},{"line_number":277,"context_line":"            LOG.warn(_(\"Invalid/unknown \u0027volume\u0027 micro-state transition\""},{"line_number":278,"context_line":"                       \" attempted: %(details)s\") % ({\u0027details\u0027: six.text_type(e)}))"},{"line_number":279,"context_line":"            return True"},{"line_number":280,"context_line":"        else:"},{"line_number":281,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_921ad86c","line":278,"updated":"2014-09-30 05:04:54.000000000","message":"same","commit_id":"63c514dff8a5d6277f7a48da12cc4d1df44883bf"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"d0add5f2b25fbc7289911230d5696b35a4910e65","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":"# The allowed state transition"},{"line_number":252,"context_line":"VOLUME_CREATE_MICROSTATE_TRANSITIONS \u003d frozenset(["},{"line_number":253,"context_line":"    (VOLUME_CREATE_MICROSTATE_EXTRACT_VOLUME_REQUEST, VOLUME_CREATE_MICROSTATE_ENTRY_CREATE),"},{"line_number":254,"context_line":"    (VOLUME_CREATE_MICROSTATE_ENTRY_CREATE, VOLUME_CREATE_MICROSTATE_QUOTA_RESERVE),"},{"line_number":255,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTA_RESERVE, VOLUME_CREATE_MICROSTATE_QUOTA_COMMIT),"},{"line_number":256,"context_line":"    (VOLUME_CREATE_MICROSTATE_QUOTA_COMMIT, VOLUME_CREATE_MICROSTATE_VOLUME_CAST),"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_6ec54c3c","line":253,"updated":"2014-10-14 08:21:52.000000000","message":"too long, line 253, 254, 255 and 256.","commit_id":"0879394e8cdf04caa64b11a45268ec1d0ac4cd3c"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"d0add5f2b25fbc7289911230d5696b35a4910e65","unresolved":false,"context_lines":[{"line_number":258,"context_line":""},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"# Verify if the state transition is allowed from previous state to new state"},{"line_number":261,"context_line":"def check_volume_create_microstate_transition(micro_states, new_state, quiet\u003dFalse):"},{"line_number":262,"context_line":"    \"\"\"Check that a volume create microstate can transition."},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    If transition can be performed, it returns True. If transition"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_4ed168fa","line":261,"updated":"2014-10-14 08:21:52.000000000","message":"too long","commit_id":"0879394e8cdf04caa64b11a45268ec1d0ac4cd3c"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"d0add5f2b25fbc7289911230d5696b35a4910e65","unresolved":false,"context_lines":[{"line_number":276,"context_line":"    except (ValueError, excp.InvalidTransition) as e:"},{"line_number":277,"context_line":"        if quiet:"},{"line_number":278,"context_line":"            LOG.warn(_(\"Invalid/unknown \u0027volume\u0027 micro-state transition\""},{"line_number":279,"context_line":"                       \" attempted: %(details)s\") % ({\u0027details\u0027: six.text_type(e)}))"},{"line_number":280,"context_line":"            return True"},{"line_number":281,"context_line":"        else:"},{"line_number":282,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_6ecc6c62","line":279,"updated":"2014-10-14 08:21:52.000000000","message":"too long","commit_id":"0879394e8cdf04caa64b11a45268ec1d0ac4cd3c"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"dba30a5364c6f16257bf5dada78497fef728481a","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"transition_states_map \u003d {\u0027attach\u0027: [ATTACH_TRANSITIONS, ATTACH_STATES],"},{"line_number":289,"context_line":"    \u0027micro_states\u0027: [VOLUME_CREATE_MICROSTATE_TRANSITIONS,"},{"line_number":290,"context_line":"                     VOLUME_CREATE_STATES],"},{"line_number":291,"context_line":"    \u0027migration\u0027: [MIGRATION_TRANSITIONS, MIGRATION_STATES],"},{"line_number":292,"context_line":"    \u0027volume\u0027: [VOLUME_TRANSITIONS, VOLUME_STATES],"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a8c0949_7d03a373","line":289,"updated":"2014-10-30 04:06:54.000000000","message":"bad indent.","commit_id":"475369d7c9d8b6a8a821476e94edde6c3b27d4c6"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"9219fd9294e07a19810dfe16d57a9cf8e71571a6","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"transition_states_map \u003d {\u0027attach\u0027: [ATTACH_TRANSITIONS, ATTACH_STATES],"},{"line_number":289,"context_line":"    \u0027micro_states\u0027: [VOLUME_CREATE_MICROSTATE_TRANSITIONS,"},{"line_number":290,"context_line":"                     VOLUME_CREATE_STATES],"},{"line_number":291,"context_line":"    \u0027migration\u0027: [MIGRATION_TRANSITIONS, MIGRATION_STATES],"},{"line_number":292,"context_line":"    \u0027volume\u0027: [VOLUME_TRANSITIONS, VOLUME_STATES],"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a8c0949_5746adc0","line":289,"in_reply_to":"7a8c0949_7d03a373","updated":"2014-10-30 19:42:55.000000000","message":"Done","commit_id":"475369d7c9d8b6a8a821476e94edde6c3b27d4c6"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"86b12f497a43ed10ae1550495ccba6ec51e16ecd","unresolved":false,"context_lines":[{"line_number":285,"context_line":"])"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"transition_states_map \u003d {\u0027attach\u0027: [ATTACH_TRANSITIONS, ATTACH_STATES],"},{"line_number":289,"context_line":"                         \u0027micro_states\u0027: [VOLUME_CREATE_MICROSTATE_TRANSITIONS,"},{"line_number":290,"context_line":"                                          VOLUME_CREATE_STATES],"},{"line_number":291,"context_line":"                         \u0027migration\u0027: [MIGRATION_TRANSITIONS,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a8c0949_b2999f70","line":288,"updated":"2014-10-30 20:36:34.000000000","message":"This indentation is definitely not right.\n\nI downloaded the file myself and ran flake8;\n\n\u0027E124 closing bracket does not match visual indentation\u0027","commit_id":"a5518c527a57c1d4e675a57ae8a0d141576fb302"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"b4f3ac6c63bcd732a58b9fcebfbe1eae2fd15db3","unresolved":false,"context_lines":[{"line_number":285,"context_line":"])"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"transition_states_map \u003d {\u0027attach\u0027: [ATTACH_TRANSITIONS, ATTACH_STATES],"},{"line_number":289,"context_line":"                         \u0027micro_states\u0027: [VOLUME_CREATE_MICROSTATE_TRANSITIONS,"},{"line_number":290,"context_line":"                                          VOLUME_CREATE_STATES],"},{"line_number":291,"context_line":"                         \u0027migration\u0027: [MIGRATION_TRANSITIONS,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a8c0949_4de45c3b","line":288,"in_reply_to":"7a8c0949_b2999f70","updated":"2014-10-30 21:19:23.000000000","message":"Thats strange. Submitted new patch hopefully it should pass because run_tests and flake8 gave a thumbs up.\n\nhttp://paste.openstack.org/show/127238/","commit_id":"a5518c527a57c1d4e675a57ae8a0d141576fb302"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"2c108025407bdda26a357706cff33f7ef68320e9","unresolved":false,"context_lines":[{"line_number":284,"context_line":"    (ATTACH_DETACHED, ATTACH_ATTACHED),"},{"line_number":285,"context_line":"])"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"transition_states_map \u003d {\u0027attach\u0027: [ATTACH_TRANSITIONS, ATTACH_STATES],"},{"line_number":288,"context_line":"                         \u0027micro_states\u0027: [VOLUME_CREATE_MICROSTATE_TRANSITIONS,"},{"line_number":289,"context_line":"                                          VOLUME_CREATE_STATES],"},{"line_number":290,"context_line":"                         \u0027migration\u0027: [MIGRATION_TRANSITIONS,"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a890539_111fa771","line":287,"updated":"2014-11-30 18:02:49.000000000","message":"If this is a constant you should make it upper case.\n\nhttps://www.python.org/dev/peps/pep-0008#constants","commit_id":"ac9778cd67e23ba4535332a0af293d0eb47aaa78"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"fe59c57687661b8a0c79eea5ce8771fdfe9ef83a","unresolved":false,"context_lines":[{"line_number":271,"context_line":"    (ATTACH_DETACHED, ATTACH_ATTACHED),"},{"line_number":272,"context_line":"])"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"transition_states_map \u003d {\u0027attach\u0027: [ATTACH_TRANSITIONS, ATTACH_STATES],"},{"line_number":275,"context_line":"                         \u0027volume_micro_states\u0027:"},{"line_number":276,"context_line":"                             [VOLUME_CREATE_MICROSTATE_TRANSITIONS,"},{"line_number":277,"context_line":"                              VOLUME_CREATE_STATES],"}],"source_content_type":"text/x-python","patch_set":27,"id":"da86d52c_550a2fd3","line":274,"updated":"2015-01-31 01:12:21.000000000","message":"Is this a constant map? If so it should be upper-case.\n\nhttps://www.python.org/dev/peps/pep-0008/#constants","commit_id":"56ec246e7569b1ca433e7023a46ac35d63143743"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"fe59c57687661b8a0c79eea5ce8771fdfe9ef83a","unresolved":false,"context_lines":[{"line_number":282,"context_line":""},{"line_number":283,"context_line":"# Verify if the state transition is allowed from previous state to new state"},{"line_number":284,"context_line":"def validate_transition(state,"},{"line_number":285,"context_line":"                        new_state, key,"},{"line_number":286,"context_line":"                        quiet\u003dFalse):"},{"line_number":287,"context_line":"    \"\"\"Check that a volume create microstate can transition."},{"line_number":288,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"da86d52c_d5f53fcc","line":285,"updated":"2015-01-31 01:12:21.000000000","message":"Do u have a better name than \u0027key\u0027? One that conveys what this actually is more appropriately...","commit_id":"56ec246e7569b1ca433e7023a46ac35d63143743"}]}
