)]}'
{"rally/plugins/openstack/context/keystone/users.py":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"2673b0418b8a0e5d45aedefa0ce99e4a249f8b1d","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    cfg.StrOpt(\"user_domain\","},{"line_number":47,"context_line":"               default\u003d\"default\","},{"line_number":48,"context_line":"               help\u003d\"ID of domain in which users will be created.\"),"},{"line_number":49,"context_line":"    cfg.BoolOpt(\"random_user_choice\","},{"line_number":50,"context_line":"                default\u003dTrue,"},{"line_number":51,"context_line":"                help\u003d\"Defines approach for picking up users. If set to True, \""},{"line_number":52,"context_line":"                     \"then user will be chosen randomly. If set to False, \""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_5013a90d","line":49,"updated":"2015-10-02 09:21:57.000000000","message":"Actually I am really not sure that we need to have this in our rally.conf file\n\n(more over I am thinking about removing other options from it) so let\u0027s not add this.","commit_id":"5c32685c9e80862b7621ffa5bd8061cc9d7cff63"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"23f6ab457e33ada87fd718cf6466692dfa04778f","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    cfg.StrOpt(\"user_domain\","},{"line_number":47,"context_line":"               default\u003d\"default\","},{"line_number":48,"context_line":"               help\u003d\"ID of domain in which users will be created.\"),"},{"line_number":49,"context_line":"    cfg.BoolOpt(\"random_user_choice\","},{"line_number":50,"context_line":"                default\u003dTrue,"},{"line_number":51,"context_line":"                help\u003d\"Defines approach for picking up users. If set to True, \""},{"line_number":52,"context_line":"                     \"then user will be chosen randomly. If set to False, \""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_90e141d3","line":49,"updated":"2015-10-02 09:21:20.000000000","message":"I dislike `random_user_choice \u003d False` option. Why not `round_robin \u003d True`? or, maybe it would be better to make this variable named \"algorithm_to_process_users\" or something like that, with default value \"random_user_choice\"","commit_id":"5c32685c9e80862b7621ffa5bd8061cc9d7cff63"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"2dcc727ff46cd9c298f956157d06b5a7f0526b40","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    cfg.StrOpt(\"user_domain\","},{"line_number":47,"context_line":"               default\u003d\"default\","},{"line_number":48,"context_line":"               help\u003d\"ID of domain in which users will be created.\"),"},{"line_number":49,"context_line":"    cfg.BoolOpt(\"random_user_choice\","},{"line_number":50,"context_line":"                default\u003dTrue,"},{"line_number":51,"context_line":"                help\u003d\"Defines approach for picking up users. If set to True, \""},{"line_number":52,"context_line":"                     \"then user will be chosen randomly. If set to False, \""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_6b5b5b55","line":49,"in_reply_to":"9a1a9d01_5013a90d","updated":"2015-10-02 11:58:37.000000000","message":"Removed.","commit_id":"5c32685c9e80862b7621ffa5bd8061cc9d7cff63"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"2673b0418b8a0e5d45aedefa0ce99e4a249f8b1d","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            if key not in [\"users\", \"tenants\"]:"},{"line_number":76,"context_line":"                scenario_ctx[key] \u003d value"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        if self.context[\"config\"][\"users\"][\"random_user_choice\"]:"},{"line_number":79,"context_line":"            user \u003d random.choice(context_obj[\"users\"])"},{"line_number":80,"context_line":"        else:"},{"line_number":81,"context_line":"            user \u003d context_obj[\"users\"]["}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_f0c99d5b","line":78,"updated":"2015-10-02 09:21:57.000000000","message":"This won\u0027t work in case of using \"existing_users\" context where we don\u0027t have [\"config\"][\"users\"] at all","commit_id":"5c32685c9e80862b7621ffa5bd8061cc9d7cff63"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"0d87bb4bc526a28e89f4da562fc368961deedaa0","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            if key not in [\"users\", \"tenants\"]:"},{"line_number":76,"context_line":"                scenario_ctx[key] \u003d value"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        if self.context[\"config\"][\"users\"][\"random_user_choice\"]:"},{"line_number":79,"context_line":"            user \u003d random.choice(context_obj[\"users\"])"},{"line_number":80,"context_line":"        else:"},{"line_number":81,"context_line":"            user \u003d context_obj[\"users\"]["}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_ab2ad32a","line":78,"in_reply_to":"9a1a9d01_66039777","updated":"2015-10-02 11:45:44.000000000","message":"Also, if we do not combine them but make \"existing_users\" context public, then it requires lots of under-the-hood refactor. Also, update of validator is required.\n\nSo, it is huge amount of code change.\n\nCan we make it for this one context now?","commit_id":"5c32685c9e80862b7621ffa5bd8061cc9d7cff63"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"928d09be498558c58ca8fdfb48113c7d3b18dd4b","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            if key not in [\"users\", \"tenants\"]:"},{"line_number":76,"context_line":"                scenario_ctx[key] \u003d value"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        if self.context[\"config\"][\"users\"][\"random_user_choice\"]:"},{"line_number":79,"context_line":"            user \u003d random.choice(context_obj[\"users\"])"},{"line_number":80,"context_line":"        else:"},{"line_number":81,"context_line":"            user \u003d context_obj[\"users\"]["}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_66039777","line":78,"in_reply_to":"9a1a9d01_f0c99d5b","updated":"2015-10-02 10:03:51.000000000","message":"Then contexts \"users\" and \"existing\" users should be combined.","commit_id":"5c32685c9e80862b7621ffa5bd8061cc9d7cff63"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"2673b0418b8a0e5d45aedefa0ce99e4a249f8b1d","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            \"user_domain\": {"},{"line_number":113,"context_line":"                \"type\": \"string\","},{"line_number":114,"context_line":"            },"},{"line_number":115,"context_line":"            \"random_user_choice\": {"},{"line_number":116,"context_line":"                \"type\": \"boolean\","},{"line_number":117,"context_line":"            },"},{"line_number":118,"context_line":"        },"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_7087cd12","line":115,"updated":"2015-10-02 09:21:57.000000000","message":"I would prefer to see something more flexible here. \n\n  \"user_choice_method\": {\"enum\": [\"random\", \"round_robin\"] }","commit_id":"5c32685c9e80862b7621ffa5bd8061cc9d7cff63"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"2dcc727ff46cd9c298f956157d06b5a7f0526b40","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            \"user_domain\": {"},{"line_number":113,"context_line":"                \"type\": \"string\","},{"line_number":114,"context_line":"            },"},{"line_number":115,"context_line":"            \"random_user_choice\": {"},{"line_number":116,"context_line":"                \"type\": \"boolean\","},{"line_number":117,"context_line":"            },"},{"line_number":118,"context_line":"        },"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_0b589f55","line":115,"in_reply_to":"9a1a9d01_7087cd12","updated":"2015-10-02 11:58:37.000000000","message":"Done","commit_id":"5c32685c9e80862b7621ffa5bd8061cc9d7cff63"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"f77f4c95d048120c0dc223a482b86789fccaeb82","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            if key not in [\"users\", \"tenants\"]:"},{"line_number":70,"context_line":"                scenario_ctx[key] \u003d value"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        user_choice_method \u003d self.context[\"config\"].get("},{"line_number":73,"context_line":"            \"users\", {}).get(\"user_choice_method\")"},{"line_number":74,"context_line":"        if user_choice_method is None:"},{"line_number":75,"context_line":"            # NOTE(vponomaryov): consider \u0027existing_users\u0027 context picking up"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_d9809349","line":72,"updated":"2016-03-24 17:02:21.000000000","message":"Do we actually need to support \"random\" users choice? Balancing looks better solution for all cases","commit_id":"862ccb19c0f504400b3d10ae3350cef0c6deb1ea"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"566a41825913100ad72643eff3008925791d03ee","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            if key not in [\"users\", \"tenants\"]:"},{"line_number":70,"context_line":"                scenario_ctx[key] \u003d value"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        user_choice_method \u003d self.context[\"config\"].get("},{"line_number":73,"context_line":"            \"users\", {}).get(\"user_choice_method\")"},{"line_number":74,"context_line":"        if user_choice_method is None:"},{"line_number":75,"context_line":"            # NOTE(vponomaryov): consider \u0027existing_users\u0027 context picking up"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_d91093ab","line":72,"in_reply_to":"da0c15f0_d9809349","updated":"2016-03-24 17:09:40.000000000","message":"I\u0027ve put this question to our weekly meeting agenda","commit_id":"862ccb19c0f504400b3d10ae3350cef0c6deb1ea"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"72fb212cf3f96055079e9a1d070104567a7aa138","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            if key not in [\"users\", \"tenants\"]:"},{"line_number":70,"context_line":"                scenario_ctx[key] \u003d value"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        user_choice_method \u003d self.context[\"config\"].get("},{"line_number":73,"context_line":"            \"users\", {}).get(\"user_choice_method\")"},{"line_number":74,"context_line":"        if user_choice_method is None:"},{"line_number":75,"context_line":"            # NOTE(vponomaryov): consider \u0027existing_users\u0027 context picking up"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_9930dba0","line":72,"in_reply_to":"da0c15f0_d9809349","updated":"2016-03-25 17:20:13.000000000","message":"It can be useful exactly to get to know possible time spending dispersion making different load based on users/tenants.","commit_id":"862ccb19c0f504400b3d10ae3350cef0c6deb1ea"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"870ff381fdcdf00d41ec5981dfff630b72c826d5","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            if key not in [\"users\", \"tenants\"]:"},{"line_number":68,"context_line":"                scenario_ctx[key] \u003d value"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        user_choice_method \u003d self.context[\"config\"].get("},{"line_number":71,"context_line":"            \"users\", {}).get(\"user_choice_method\")"},{"line_number":72,"context_line":"        if user_choice_method is None:"},{"line_number":73,"context_line":"            # NOTE(vponomaryov): consider \u0027existing_users\u0027 context picking up"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_3c03130f","line":70,"updated":"2016-05-09 20:51:33.000000000","message":"Actually this code is bad written. \nWe are running this on each iteration! which is overhead on each iteration which makes our code slower. \n\nWhat I would suggest is to calculate once the value of user_choice_method (maybe during intialzation of this class) and just keep here: \n\n   if user_choice_method \u003d\u003d \"random\":\n      ...\n   else:\n      ....","commit_id":"4edab4ab4b2b35e20fb1c321b00c5aad027725a5"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"29d576fa1b95719079c4550ec7df8111899f59a7","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            if key not in [\"users\", \"tenants\"]:"},{"line_number":68,"context_line":"                scenario_ctx[key] \u003d value"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        user_choice_method \u003d self.context[\"config\"].get("},{"line_number":71,"context_line":"            \"users\", {}).get(\"user_choice_method\")"},{"line_number":72,"context_line":"        if user_choice_method is None:"},{"line_number":73,"context_line":"            # NOTE(vponomaryov): consider \u0027existing_users\u0027 context picking up"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_a3b9807b","line":70,"in_reply_to":"dab17558_3c03130f","updated":"2016-05-10 15:01:25.000000000","message":"\"self.context[\"config\"]\" is absent on \"init\" step. Therefore, I made it property with single calculation and further reusage of calculated value.","commit_id":"4edab4ab4b2b35e20fb1c321b00c5aad027725a5"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"78603ce2c634c36716c39d837ded2ae7043fb7c9","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            user \u003d random.choice(context_obj[\"users\"])"},{"line_number":80,"context_line":"        elif user_choice_method \u003d\u003d \"round_robin\":"},{"line_number":81,"context_line":"            user \u003d context_obj[\"users\"]["},{"line_number":82,"context_line":"                context_obj[\"iteration\"] % len(context_obj[\"users\"])]"},{"line_number":83,"context_line":"        else:"},{"line_number":84,"context_line":"            msg \u003d _(\"Provided unsupported value \u0027%s\u0027 for enum \""},{"line_number":85,"context_line":"                    \"\u0027user_choice_method\u0027.\") % user_choice_method"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_f97d1db2","line":82,"updated":"2016-05-09 20:49:36.000000000","message":"so this iteratates over users one by one but on over tenants, e.g. what would be nicer is \n\n  tenant1 user1\n  tenant2 user1\n\n  .....\n\n  tenant1 user2 \n  tenant2 user2","commit_id":"4edab4ab4b2b35e20fb1c321b00c5aad027725a5"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"29d576fa1b95719079c4550ec7df8111899f59a7","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            user \u003d random.choice(context_obj[\"users\"])"},{"line_number":80,"context_line":"        elif user_choice_method \u003d\u003d \"round_robin\":"},{"line_number":81,"context_line":"            user \u003d context_obj[\"users\"]["},{"line_number":82,"context_line":"                context_obj[\"iteration\"] % len(context_obj[\"users\"])]"},{"line_number":83,"context_line":"        else:"},{"line_number":84,"context_line":"            msg \u003d _(\"Provided unsupported value \u0027%s\u0027 for enum \""},{"line_number":85,"context_line":"                    \"\u0027user_choice_method\u0027.\") % user_choice_method"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_27de33dd","line":82,"in_reply_to":"dab17558_f97d1db2","updated":"2016-05-10 15:01:25.000000000","message":"Done","commit_id":"4edab4ab4b2b35e20fb1c321b00c5aad027725a5"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"78603ce2c634c36716c39d837ded2ae7043fb7c9","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        elif user_choice_method \u003d\u003d \"round_robin\":"},{"line_number":81,"context_line":"            user \u003d context_obj[\"users\"]["},{"line_number":82,"context_line":"                context_obj[\"iteration\"] % len(context_obj[\"users\"])]"},{"line_number":83,"context_line":"        else:"},{"line_number":84,"context_line":"            msg \u003d _(\"Provided unsupported value \u0027%s\u0027 for enum \""},{"line_number":85,"context_line":"                    \"\u0027user_choice_method\u0027.\") % user_choice_method"},{"line_number":86,"context_line":"            raise exceptions.ContextSetupFailure("}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_19ac6133","line":83,"updated":"2016-05-09 20:49:36.000000000","message":"This is dead code please remove it.","commit_id":"4edab4ab4b2b35e20fb1c321b00c5aad027725a5"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"29d576fa1b95719079c4550ec7df8111899f59a7","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        elif user_choice_method \u003d\u003d \"round_robin\":"},{"line_number":81,"context_line":"            user \u003d context_obj[\"users\"]["},{"line_number":82,"context_line":"                context_obj[\"iteration\"] % len(context_obj[\"users\"])]"},{"line_number":83,"context_line":"        else:"},{"line_number":84,"context_line":"            msg \u003d _(\"Provided unsupported value \u0027%s\u0027 for enum \""},{"line_number":85,"context_line":"                    \"\u0027user_choice_method\u0027.\") % user_choice_method"},{"line_number":86,"context_line":"            raise exceptions.ContextSetupFailure("}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_b8d40fbd","line":83,"in_reply_to":"dab17558_19ac6133","updated":"2016-05-10 15:01:25.000000000","message":"Done","commit_id":"4edab4ab4b2b35e20fb1c321b00c5aad027725a5"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"23c8221e1c37ca9dfe2ffcdc096932b48c8926ba","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            cfg.CONF.users_context.resource_management_workers,"},{"line_number":132,"context_line":"        \"project_domain\": cfg.CONF.users_context.project_domain,"},{"line_number":133,"context_line":"        \"user_domain\": cfg.CONF.users_context.user_domain,"},{"line_number":134,"context_line":"        \"user_choice_method\": \"random\","},{"line_number":135,"context_line":"    }"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def __init__(self, context):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_040f9b39","line":134,"range":{"start_line":134,"start_character":30,"end_line":134,"end_character":39},"updated":"2016-04-27 13:17:34.000000000","message":"I prefer to switch to \"round_robin\" by default, but it can be done in separate patch after wider discussion.","commit_id":"4edab4ab4b2b35e20fb1c321b00c5aad027725a5"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"78603ce2c634c36716c39d837ded2ae7043fb7c9","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            cfg.CONF.users_context.resource_management_workers,"},{"line_number":132,"context_line":"        \"project_domain\": cfg.CONF.users_context.project_domain,"},{"line_number":133,"context_line":"        \"user_domain\": cfg.CONF.users_context.user_domain,"},{"line_number":134,"context_line":"        \"user_choice_method\": \"random\","},{"line_number":135,"context_line":"    }"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def __init__(self, context):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_795e4d77","line":134,"range":{"start_line":134,"start_character":30,"end_line":134,"end_character":39},"in_reply_to":"1a122d0e_040f9b39","updated":"2016-05-09 20:49:36.000000000","message":"Andrey, \n\nI am not sure that we need to switch to roundrobin, imho \"random\" is creates way more realist load to the cloud.","commit_id":"4edab4ab4b2b35e20fb1c321b00c5aad027725a5"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"29d576fa1b95719079c4550ec7df8111899f59a7","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            cfg.CONF.users_context.resource_management_workers,"},{"line_number":132,"context_line":"        \"project_domain\": cfg.CONF.users_context.project_domain,"},{"line_number":133,"context_line":"        \"user_domain\": cfg.CONF.users_context.user_domain,"},{"line_number":134,"context_line":"        \"user_choice_method\": \"random\","},{"line_number":135,"context_line":"    }"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def __init__(self, context):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_fe6affb1","line":134,"range":{"start_line":134,"start_character":30,"end_line":134,"end_character":39},"in_reply_to":"dab17558_795e4d77","updated":"2016-05-10 15:01:25.000000000","message":"One of the reasons \"round-robin\" being added is that \"random\" doesn\u0027t do \"realist load\" in case of Manila project, where first run and all consecutive differ from each other in one of its configurations. But I leave \"random\" here anyway for now.","commit_id":"4edab4ab4b2b35e20fb1c321b00c5aad027725a5"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"8fb194881c69ba03e3e4c4cf30842cdadb1b8f67","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            # Second and last case - \u0027round_robin\u0027."},{"line_number":89,"context_line":"            tenants_amount \u003d len(context_obj[\"tenants\"])"},{"line_number":90,"context_line":"            tenant_id \u003d list(context_obj[\"tenants\"].keys())["},{"line_number":91,"context_line":"                context_obj[\"iteration\"] % tenants_amount]"},{"line_number":92,"context_line":"            tenant \u003d context_obj[\"tenants\"][tenant_id]"},{"line_number":93,"context_line":"            users \u003d context_obj[\"tenants\"][tenant_id][\"users\"]"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_0be631e8","line":90,"range":{"start_line":90,"start_character":24,"end_line":90,"end_character":59},"updated":"2016-05-12 09:12:48.000000000","message":"python3 suc*s...","commit_id":"02c8c17df0f0598b38f91102c1e008f7e2d6f75a"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"21a58ee25a0873ba510452f0dc8b382abbd45041","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            user \u003d random.choice(context_obj[\"users\"])"},{"line_number":86,"context_line":"            tenant \u003d context_obj[\"tenants\"][user[\"tenant_id\"]]"},{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            # Second and last case - \u0027round_robin\u0027."},{"line_number":89,"context_line":"            tenants_amount \u003d len(context_obj[\"tenants\"])"},{"line_number":90,"context_line":"            tenant_id \u003d sorted(context_obj[\"tenants\"].keys())["},{"line_number":91,"context_line":"                context_obj[\"iteration\"] % tenants_amount]"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_df4d303f","line":88,"updated":"2016-05-17 13:07:03.000000000","message":"This calculation must be simplified:\n\ninstead of:\n\n round-robin choosing of a tenant and then round-robin\n choosing a user from this tenant\n\nwe can simply do this:\n\n make round-robin choice of a user and then simply get his tenant\n\nThis is simpler, faster and does not require to prepare per-tenant users list at L316-317","commit_id":"ff7b05094afc8b0df1f74504f7cfbcf3f8815779"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"6ad71b0dce0fff6eeeda3444fe2ff4b945a6a44e","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            user \u003d random.choice(context_obj[\"users\"])"},{"line_number":86,"context_line":"            tenant \u003d context_obj[\"tenants\"][user[\"tenant_id\"]]"},{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            # Second and last case - \u0027round_robin\u0027."},{"line_number":89,"context_line":"            tenants_amount \u003d len(context_obj[\"tenants\"])"},{"line_number":90,"context_line":"            tenant_id \u003d sorted(context_obj[\"tenants\"].keys())["},{"line_number":91,"context_line":"                context_obj[\"iteration\"] % tenants_amount]"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_c8bfd75e","line":88,"in_reply_to":"dab17558_3a4f2a93","updated":"2016-05-19 00:04:22.000000000","message":"The second one is way better. even if it is more complicated.","commit_id":"ff7b05094afc8b0df1f74504f7cfbcf3f8815779"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"7dfa5335fa97ac27864e4eef74bb9b08948a47de","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            user \u003d random.choice(context_obj[\"users\"])"},{"line_number":86,"context_line":"            tenant \u003d context_obj[\"tenants\"][user[\"tenant_id\"]]"},{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            # Second and last case - \u0027round_robin\u0027."},{"line_number":89,"context_line":"            tenants_amount \u003d len(context_obj[\"tenants\"])"},{"line_number":90,"context_line":"            tenant_id \u003d sorted(context_obj[\"tenants\"].keys())["},{"line_number":91,"context_line":"                context_obj[\"iteration\"] % tenants_amount]"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_3a4f2a93","line":88,"in_reply_to":"dab17558_5a066e86","updated":"2016-05-17 13:28:57.000000000","message":"Okay, let it be so","commit_id":"ff7b05094afc8b0df1f74504f7cfbcf3f8815779"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"29180b0b1a4195f599eac64044305fd7663513fd","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            user \u003d random.choice(context_obj[\"users\"])"},{"line_number":86,"context_line":"            tenant \u003d context_obj[\"tenants\"][user[\"tenant_id\"]]"},{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            # Second and last case - \u0027round_robin\u0027."},{"line_number":89,"context_line":"            tenants_amount \u003d len(context_obj[\"tenants\"])"},{"line_number":90,"context_line":"            tenant_id \u003d sorted(context_obj[\"tenants\"].keys())["},{"line_number":91,"context_line":"                context_obj[\"iteration\"] % tenants_amount]"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_5a066e86","line":88,"in_reply_to":"dab17558_df4d303f","updated":"2016-05-17 13:25:00.000000000","message":"Alexander,\n\nit was done so before, and it had different order.\n\nusers didn\u0027t have strict order, so we could get following:\n\ntenant 1, user 1\ntenant 1, user 2\ntenant 1, user 3\ntenant 2, user 1\ntenant 1, user 4\ntenant 2, user 2\ntenant 2, user 3\ntenant 2, user 4\n\nNow, it always will be as of following:\ntenant 1, user 1\ntenant 2, user 1\ntenant 1, user 2\ntenant 2, user 2\ntenant 1, user 3\ntenant 2, user 3\ntenant 1, user 4\ntenant 2, user 4\n\nAlso, your request contradicts to previous one from Boris, that was the reason of doing so.\nIn conclusion, decide first on your side among all of you who has concerns how it should be, then I will change it to accepted variant.\n\nBut I, personally, prefer exactly current users distribution - balanced among tenants.","commit_id":"ff7b05094afc8b0df1f74504f7cfbcf3f8815779"}],"tests/unit/plugins/openstack/context/keystone/test_users.py":[{"author":{"_account_id":7369,"name":"Sergey Skripnick","email":"sskripnick@mirantis.com","username":"redixin"},"change_message_id":"c9a7cda662953d738230c06fd9b1c5709c195e19","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            user \u003d self.mixin.map_for_scenario(context)"},{"line_number":117,"context_line":"            id_counter[user[\"user\"][\"id\"]] +\u003d 1"},{"line_number":118,"context_line":"        for value in id_counter.values():"},{"line_number":119,"context_line":"            # NOTE(vponomaryov): all users were used same amount of times"},{"line_number":120,"context_line":"            self.assertEqual(4, value)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_d8be8163","line":119,"updated":"2016-05-13 09:58:20.000000000","message":"This often is true for \"random\"\n\nThis may be tested like this:\n\n expected_ids \u003d [\"0_0\", \"0_1\", \"1_0\", \"1_1\"] * 4\n assertEqual(expected_ids, mapped_ids)","commit_id":"02c8c17df0f0598b38f91102c1e008f7e2d6f75a"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"06d8a44268b756b46fc2b9a040bb38afa6fa2af9","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            user \u003d self.mixin.map_for_scenario(context)"},{"line_number":117,"context_line":"            id_counter[user[\"user\"][\"id\"]] +\u003d 1"},{"line_number":118,"context_line":"        for value in id_counter.values():"},{"line_number":119,"context_line":"            # NOTE(vponomaryov): all users were used same amount of times"},{"line_number":120,"context_line":"            self.assertEqual(4, value)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_8503d7b7","line":119,"in_reply_to":"dab17558_d8be8163","updated":"2016-05-13 18:00:21.000000000","message":"Done","commit_id":"02c8c17df0f0598b38f91102c1e008f7e2d6f75a"}]}
