)]}'
{"rally-jobs/rally.yaml":[{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"9c483d4796611a8a374c16e1256969f220587128","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        failure_rate:"},{"line_number":47,"context_line":"          max: 0"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"  KeystoneBasic.assign_and_remove_user_role:"},{"line_number":50,"context_line":"    -"},{"line_number":51,"context_line":"      args:"},{"line_number":52,"context_line":"        name_length: 10"}],"source_content_type":"text/x-yaml","patch_set":12,"id":"baa041b7_63d7e323","line":49,"updated":"2015-04-06 09:52:36.000000000","message":"As long as you have this in the validator for this scenario:\n\n    @validation.required_openstack(admin\u003dTrue, users\u003dTrue)\n\nyou have to put the users context in the task file. Otherwise it fails (http://logs.openstack.org/09/165409/12/check/gate-rally-dsvm-rally/2fc413f/console.html)","commit_id":"0238607903352f58de193f43918e99e4888c0d2b"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"9c483d4796611a8a374c16e1256969f220587128","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        failure_rate:"},{"line_number":69,"context_line":"          max: 0"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"  KeystoneBasic.create_and_list_user_roles:"},{"line_number":72,"context_line":"    -"},{"line_number":73,"context_line":"      args:"},{"line_number":74,"context_line":"        name_length: 10"}],"source_content_type":"text/x-yaml","patch_set":12,"id":"baa041b7_23e1dbfe","line":71,"updated":"2015-04-06 09:52:36.000000000","message":"Same here","commit_id":"0238607903352f58de193f43918e99e4888c0d2b"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"6ea6aa523d12220c882b49e48f922db68ecfad9b","unresolved":false,"context_lines":[{"line_number":166,"context_line":"      args:"},{"line_number":167,"context_line":"        name: \"Rally_test_service\""},{"line_number":168,"context_line":"        service_type: \"Really_test_type\""},{"line_number":169,"context_line":"        description: \"test_description\""},{"line_number":170,"context_line":"      runner:"},{"line_number":171,"context_line":"        type: \"constant\""},{"line_number":172,"context_line":"        times: 10"}],"source_content_type":"text/x-yaml","patch_set":28,"id":"7ad32947_02ee4722","line":169,"updated":"2015-04-27 18:54:20.000000000","message":"Why are these changes here? They seem unrelated to the rest of the patchset. If they are related, then typo: Really_test_type","commit_id":"7ff505648b8ee1d2a7f604501d373271c42e7bae"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"a5642170be4a39325ab6fbeb57e15477e1855262","unresolved":false,"context_lines":[{"line_number":166,"context_line":"      args:"},{"line_number":167,"context_line":"        name: \"Rally_test_service\""},{"line_number":168,"context_line":"        service_type: \"Really_test_type\""},{"line_number":169,"context_line":"        description: \"test_description\""},{"line_number":170,"context_line":"      runner:"},{"line_number":171,"context_line":"        type: \"constant\""},{"line_number":172,"context_line":"        times: 10"}],"source_content_type":"text/x-yaml","patch_set":28,"id":"5ad0253b_9893e3a3","line":169,"in_reply_to":"7ad32947_02ee4722","updated":"2015-04-29 03:12:34.000000000","message":"Agree, please remove or explain in the commit message.","commit_id":"7ff505648b8ee1d2a7f604501d373271c42e7bae"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"5434a1ca28baae150f170fe4e965c1dbc4c38f8b","unresolved":false,"context_lines":[{"line_number":166,"context_line":"      args:"},{"line_number":167,"context_line":"        name: \"Rally_test_service\""},{"line_number":168,"context_line":"        service_type: \"Really_test_type\""},{"line_number":169,"context_line":"        description: \"test_description\""},{"line_number":170,"context_line":"      runner:"},{"line_number":171,"context_line":"        type: \"constant\""},{"line_number":172,"context_line":"        times: 10"}],"source_content_type":"text/x-yaml","patch_set":32,"id":"7a016987_ea866612","line":169,"updated":"2015-05-14 15:44:03.000000000","message":"Why are these changes here?","commit_id":"69a2fdd247993d20738341c37b9de9de44863f53"}],"rally/benchmark/scenarios/keystone/basic.py":[{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"b8b1f2c0d58a7d4678645d3a80aebe049ddaa39a","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        :param name_length: length of the random part of tenant name"},{"line_number":109,"context_line":"        \"\"\""},{"line_number":110,"context_line":"        tenant \u003d self._tenant_create(name_length\u003dname_length)"},{"line_number":111,"context_line":"        user \u003d self._user_create(name_length\u003dname_length * 2)"},{"line_number":112,"context_line":"        role \u003d self._role_create()"},{"line_number":113,"context_line":"        self._role_assign(user, role, tenant)"},{"line_number":114,"context_line":"        self._role_remove(user, role, tenant)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6ced46_e53fb223","line":111,"updated":"2015-03-24 08:42:30.000000000","message":"why name_length * 2 ?","commit_id":"d54fe4196368553b28cd36f5aadaee81957003d0"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"b8b1f2c0d58a7d4678645d3a80aebe049ddaa39a","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    @validation.required_openstack(admin\u003dTrue)"},{"line_number":124,"context_line":"    @base.scenario(context\u003d{\"admin_cleanup\": [\"keystone\"]})"},{"line_number":125,"context_line":"    def create_and_list_user_roles(self):"},{"line_number":126,"context_line":"        \"\"\"Create user role, assign it and list user roles for given user.\"\"\""},{"line_number":127,"context_line":"        tenant \u003d self._tenant_create(name_length\u003d5)"},{"line_number":128,"context_line":"        user \u003d self._user_create(name_length\u003d10)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6ced46_852fdef5","line":125,"updated":"2015-03-24 08:42:30.000000000","message":"add param name_length here as assign_and_remove_user_role did","commit_id":"d54fe4196368553b28cd36f5aadaee81957003d0"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"44b5e2e5da836f7711a85be86d8301ef70184357","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        :param name_length: length of the random part of tenant name"},{"line_number":109,"context_line":"        \"\"\""},{"line_number":110,"context_line":"        tenant \u003d self._tenant_create(name_length\u003dname_length)"},{"line_number":111,"context_line":"        user \u003d self._user_create(name_length\u003dname_length)"},{"line_number":112,"context_line":"        role \u003d self._role_create()"},{"line_number":113,"context_line":"        self._role_assign(user, role, tenant)"},{"line_number":114,"context_line":"        self._role_remove(user, role, tenant)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a6ced46_af19abd8","line":111,"updated":"2015-03-26 11:56:13.000000000","message":"This scenarios creates new tenants and users, and after that it doesn\u0027t delete them.\n\nSo we have some kind of volume testing for tenant and users resource. \n\nWhy we can\u0027t use current user and tenant and asing/remove to them roles?","commit_id":"a692b5964b416b79b7a8514839d8f4f7e1b9bc3a"},{"author":{"_account_id":13420,"name":"Serhii Vasheka","email":"svasheka@mirantis.com","username":"svasheka"},"change_message_id":"765ac3c5b4066b036b5453e38ee9e02739d7df6d","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        :param name_length: length of the random part of tenant name"},{"line_number":109,"context_line":"        \"\"\""},{"line_number":110,"context_line":"        tenant \u003d self._tenant_create(name_length\u003dname_length)"},{"line_number":111,"context_line":"        user \u003d self._user_create(name_length\u003dname_length)"},{"line_number":112,"context_line":"        role \u003d self._role_create()"},{"line_number":113,"context_line":"        self._role_assign(user, role, tenant)"},{"line_number":114,"context_line":"        self._role_remove(user, role, tenant)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa963961_e5cb701d","line":111,"in_reply_to":"1a6ced46_af19abd8","updated":"2015-03-26 13:52:32.000000000","message":"What do you mean by current user and tenant?","commit_id":"a692b5964b416b79b7a8514839d8f4f7e1b9bc3a"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"19c4cd1c729b9e01636a4d420c6fceda080598a9","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        :param name_length: length of the random part of tenant name"},{"line_number":109,"context_line":"        \"\"\""},{"line_number":110,"context_line":"        tenant \u003d self._tenant_create(name_length\u003dname_length)"},{"line_number":111,"context_line":"        user \u003d self._user_create(name_length\u003dname_length)"},{"line_number":112,"context_line":"        role \u003d self._role_create()"},{"line_number":113,"context_line":"        self._role_assign(user, role, tenant)"},{"line_number":114,"context_line":"        self._role_remove(user, role, tenant)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa963961_b786ba11","line":111,"in_reply_to":"fa963961_e5cb701d","updated":"2015-03-26 15:44:07.000000000","message":"you have information about admin and user credential that are running this senario. \n\n\nyou should put \n\n   @validation.required_openstack(admin\u003dTrue, users\u003dTrue)\n\n\nafter that inside the scenario: \n\n     self.context[\"user\"] \u003d\u003d {\"id\": user.id, \"endpoint\": user_endpoint, \"tenant_id\": tenant_id}\n     self.context[\"tenant\"] \u003d\u003d {\"id\": tenant.id, \"name\": tenant.name}\n\nso basically what you need is to assign role self.context[\"user\"][\"id\"] in tenant self.context[\"user\"][\"tenant_id\"]","commit_id":"a692b5964b416b79b7a8514839d8f4f7e1b9bc3a"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"44b5e2e5da836f7711a85be86d8301ef70184357","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        :param name_length: length of the random part of tenant name"},{"line_number":129,"context_line":"        \"\"\""},{"line_number":130,"context_line":"        tenant \u003d self._tenant_create(name_length\u003dname_length)"},{"line_number":131,"context_line":"        user \u003d self._user_create(name_length\u003dname_length)"},{"line_number":132,"context_line":"        role \u003d self._role_create()"},{"line_number":133,"context_line":"        self._role_assign(user, role, tenant)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a6ced46_ef0f2386","line":130,"updated":"2015-03-26 11:56:13.000000000","message":"same here","commit_id":"a692b5964b416b79b7a8514839d8f4f7e1b9bc3a"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"9c483d4796611a8a374c16e1256969f220587128","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    @validation.required_openstack(admin\u003dTrue, users\u003dTrue)"},{"line_number":120,"context_line":"    @base.scenario(context\u003d{\"admin_cleanup\": [\"keystone\"]})"},{"line_number":121,"context_line":"    def create_and_list_user_roles(self):"},{"line_number":122,"context_line":"        \"\"\"Create user role, assign it and list user roles for given user.\"\"\""},{"line_number":123,"context_line":"        tenant \u003d self.context[\"tenant\"][\"id\"]"},{"line_number":124,"context_line":"        user \u003d self.context[\"user\"][\"id\"]"}],"source_content_type":"text/x-python","patch_set":12,"id":"baa041b7_63bec3d5","line":121,"updated":"2015-04-06 09:52:36.000000000","message":"Let\u0027s rename this to \u0027create_assign_and_list_user_roles\u0027, then it will be more clear what this scenario is doing","commit_id":"0238607903352f58de193f43918e99e4888c0d2b"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"4a5e86005589919f9b85e03dbee2ba8ed1d39f35","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    def create_and_delete_role(self):"},{"line_number":115,"context_line":"        \"\"\"Create a user role and delete it.\"\"\""},{"line_number":116,"context_line":"        role \u003d self._role_create()"},{"line_number":117,"context_line":"        self._delete_role(role)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    @validation.required_openstack(admin\u003dTrue, users\u003dTrue)"},{"line_number":120,"context_line":"    @base.scenario(context\u003d{\"admin_cleanup\": [\"keystone\"]})"}],"source_content_type":"text/x-python","patch_set":21,"id":"7aaa499b_857ec8e2","line":117,"updated":"2015-04-13 08:46:41.000000000","message":"We have a common method for keystone resource deletion, could you please use it here instead of _delete_role()?\nhttps://github.com/stackforge/rally/blob/master/rally/benchmark/scenarios/keystone/utils.py#L48-L52","commit_id":"6caf051c2888fe0e40b8f3d14952ff5b415cb628"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"96bac7ab4825a88fdf0b4e041cb8d10a5cb96e0c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self._tenant_create(name_length\u003dname_length, **kwargs)"},{"line_number":100,"context_line":"        self._list_tenants()"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @validation.required_openstack(admin\u003dTrue, users\u003dTrue)"},{"line_number":103,"context_line":"    @base.scenario(context\u003d{\"admin_cleanup\": [\"keystone\"]})"},{"line_number":104,"context_line":"    def assign_and_remove_user_role(self):"},{"line_number":105,"context_line":"        \"\"\"Create a user role assign with a user and disassociate.\"\"\""}],"source_content_type":"text/x-python","patch_set":29,"id":"3acd31a7_6250185f","line":102,"updated":"2015-05-01 19:46:37.000000000","message":"Looks a bit strange. Users \u003d True, but in utils function we use admin_client. What if we don\u0027t have admin credentials?","commit_id":"3a33bfa538d5668c062107f5d548952ec9365942"},{"author":{"_account_id":13420,"name":"Serhii Vasheka","email":"svasheka@mirantis.com","username":"svasheka"},"change_message_id":"f7e8a0662a8bd37f2926edb37a5af765702acf26","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self._tenant_create(name_length\u003dname_length, **kwargs)"},{"line_number":100,"context_line":"        self._list_tenants()"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @validation.required_openstack(admin\u003dTrue, users\u003dTrue)"},{"line_number":103,"context_line":"    @base.scenario(context\u003d{\"admin_cleanup\": [\"keystone\"]})"},{"line_number":104,"context_line":"    def assign_and_remove_user_role(self):"},{"line_number":105,"context_line":"        \"\"\"Create a user role assign with a user and disassociate.\"\"\""}],"source_content_type":"text/x-python","patch_set":29,"id":"1aca2d91_b5391344","line":102,"in_reply_to":"3acd31a7_6250185f","updated":"2015-05-06 08:53:05.000000000","message":"I\u0027m not following. explain please what do you \nmean.","commit_id":"3a33bfa538d5668c062107f5d548952ec9365942"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"f936f5f326ed5f678b85ca663106374679d7a807","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @validation.required_openstack(admin\u003dTrue, users\u003dTrue)"},{"line_number":103,"context_line":"    @base.scenario(context\u003d{\"admin_cleanup\": [\"keystone\"]})"},{"line_number":104,"context_line":"    def assign_and_remove_user_role(self):"},{"line_number":105,"context_line":"        \"\"\"Create a user role assign with a user and disassociate.\"\"\""},{"line_number":106,"context_line":"        tenant \u003d self.context[\"tenant\"][\"id\"]"},{"line_number":107,"context_line":"        user \u003d self.context[\"user\"][\"id\"]"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a0c5dc1_98ca816d","line":104,"updated":"2015-05-13 10:54:26.000000000","message":"If you rename the utils functions following the rule \u0027assign\u0027 -\u003e \u0027add\u0027, please do the same for scenarios to be consistent. So this should be called \"add_and_remove_user_role\".\n\nPlease also edit the docstring replacing \u0027assign\u0027 -\u003e \u0027add\u0027.","commit_id":"e9197bfb8c9cd8ab0d1ced96b35f0649e21787ad"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"f936f5f326ed5f678b85ca663106374679d7a807","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    @validation.required_openstack(admin\u003dTrue, users\u003dTrue)"},{"line_number":120,"context_line":"    @base.scenario(context\u003d{\"admin_cleanup\": [\"keystone\"]})"},{"line_number":121,"context_line":"    def create_assign_and_list_user_roles(self):"},{"line_number":122,"context_line":"        \"\"\"Create user role, assign it and list user roles for given user.\"\"\""},{"line_number":123,"context_line":"        tenant \u003d self.context[\"tenant\"][\"id\"]"},{"line_number":124,"context_line":"        user \u003d self.context[\"user\"][\"id\"]"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a0c5dc1_d8aeb997","line":121,"updated":"2015-05-13 10:54:26.000000000","message":"Same here","commit_id":"e9197bfb8c9cd8ab0d1ced96b35f0649e21787ad"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"be699849f986e19c80bc9327e6b4acafe6a554fc","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        tenant \u003d self.context[\"tenant\"][\"id\"]"},{"line_number":107,"context_line":"        user \u003d self.context[\"user\"][\"id\"]"},{"line_number":108,"context_line":"        role \u003d self._role_create()"},{"line_number":109,"context_line":"        self._role_add(user, role, tenant)"},{"line_number":110,"context_line":"        self._role_remove(user, role, tenant)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    @validation.required_openstack(admin\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":33,"id":"7a016987_88de9a6b","line":109,"updated":"2015-05-16 17:22:09.000000000","message":"I would prefer to call this user_id, tenant_id.","commit_id":"300e809034b5c1c899dcb55e480550b53d08f4bf"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"27ba7428986254ddb55b116168d3e9fe5213e45a","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        tenant \u003d self.context[\"tenant\"][\"id\"]"},{"line_number":107,"context_line":"        user \u003d self.context[\"user\"][\"id\"]"},{"line_number":108,"context_line":"        role \u003d self._role_create()"},{"line_number":109,"context_line":"        self._role_add(user, role, tenant)"},{"line_number":110,"context_line":"        self._role_remove(user, role, tenant)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    @validation.required_openstack(admin\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":33,"id":"7a016987_9e98aa6b","line":109,"in_reply_to":"7a016987_88de9a6b","updated":"2015-05-21 22:47:56.000000000","message":"Done","commit_id":"300e809034b5c1c899dcb55e480550b53d08f4bf"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"be699849f986e19c80bc9327e6b4acafe6a554fc","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        tenant \u003d self.context[\"tenant\"][\"id\"]"},{"line_number":124,"context_line":"        user \u003d self.context[\"user\"][\"id\"]"},{"line_number":125,"context_line":"        role \u003d self._role_create()"},{"line_number":126,"context_line":"        self._role_add(user, role, tenant)"},{"line_number":127,"context_line":"        self._list_roles_for_user(user, tenant)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    @validation.required_openstack(admin\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":33,"id":"7a016987_c8ca52a1","line":126,"updated":"2015-05-16 17:22:09.000000000","message":"same here","commit_id":"300e809034b5c1c899dcb55e480550b53d08f4bf"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"27ba7428986254ddb55b116168d3e9fe5213e45a","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        tenant \u003d self.context[\"tenant\"][\"id\"]"},{"line_number":124,"context_line":"        user \u003d self.context[\"user\"][\"id\"]"},{"line_number":125,"context_line":"        role \u003d self._role_create()"},{"line_number":126,"context_line":"        self._role_add(user, role, tenant)"},{"line_number":127,"context_line":"        self._list_roles_for_user(user, tenant)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    @validation.required_openstack(admin\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":33,"id":"7a016987_be95a633","line":126,"in_reply_to":"7a016987_c8ca52a1","updated":"2015-05-21 22:47:56.000000000","message":"Done","commit_id":"300e809034b5c1c899dcb55e480550b53d08f4bf"}],"rally/benchmark/scenarios/keystone/utils.py":[{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"b8b1f2c0d58a7d4678645d3a80aebe049ddaa39a","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    @base.atomic_action_timer(\"keystone.assign_role\")"},{"line_number":113,"context_line":"    def _role_assign(self, user, role, tenant):"},{"line_number":114,"context_line":"        \"\"\"Get service with given service id."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        :param user: user to be assigned with a role"},{"line_number":117,"context_line":"        :param role: user role to be assigned with"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6ced46_a5b13ae3","line":114,"updated":"2015-03-24 08:42:30.000000000","message":"description need to be updated.","commit_id":"d54fe4196368553b28cd36f5aadaee81957003d0"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"9c483d4796611a8a374c16e1256969f220587128","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    @base.atomic_action_timer(\"keystone.assign_role\")"},{"line_number":130,"context_line":"    def _role_assign(self, user, role, tenant):"},{"line_number":131,"context_line":"        \"\"\"Assign role with given user on a tenant."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        :param user: user to be assigned with a role"},{"line_number":134,"context_line":"        :param role: user role to be assigned with"}],"source_content_type":"text/x-python","patch_set":12,"id":"baa041b7_03d0171e","line":131,"updated":"2015-04-06 09:52:36.000000000","message":"please edit \u0027with given user\u0027 -\u003e \u0027to a given user\u0027","commit_id":"0238607903352f58de193f43918e99e4888c0d2b"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"9c483d4796611a8a374c16e1256969f220587128","unresolved":false,"context_lines":[{"line_number":130,"context_line":"    def _role_assign(self, user, role, tenant):"},{"line_number":131,"context_line":"        \"\"\"Assign role with given user on a tenant."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        :param user: user to be assigned with a role"},{"line_number":134,"context_line":"        :param role: user role to be assigned with"},{"line_number":135,"context_line":"        :param tenant: tenant on which assignation will take place"},{"line_number":136,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"baa041b7_c3c90f7a","line":133,"updated":"2015-04-06 09:52:36.000000000","message":"Correction:\n\n    :param user: user to assign the role to","commit_id":"0238607903352f58de193f43918e99e4888c0d2b"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"9c483d4796611a8a374c16e1256969f220587128","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        \"\"\"Assign role with given user on a tenant."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        :param user: user to be assigned with a role"},{"line_number":134,"context_line":"        :param role: user role to be assigned with"},{"line_number":135,"context_line":"        :param tenant: tenant on which assignation will take place"},{"line_number":136,"context_line":"        \"\"\""},{"line_number":137,"context_line":"        self.admin_clients(\"keystone\").roles.add_user_role(user, role, tenant)"}],"source_content_type":"text/x-python","patch_set":12,"id":"baa041b7_a3c4cb5e","line":134,"updated":"2015-04-06 09:52:36.000000000","message":"\u0027to be assigned\u0027 -\u003e \u0027to assign\u0027","commit_id":"0238607903352f58de193f43918e99e4888c0d2b"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"9c483d4796611a8a374c16e1256969f220587128","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        \"\"\"Dissociate user with role."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        :param user: user to be stripped with role"},{"line_number":144,"context_line":"        :param role: role to be dissociate with user"},{"line_number":145,"context_line":"        :param tenant: tenant on which assignation took place"},{"line_number":146,"context_line":"        \"\"\""},{"line_number":147,"context_line":"        self.admin_clients(\"keystone\").roles.remove_user_role(user,"}],"source_content_type":"text/x-python","patch_set":12,"id":"baa041b7_63a5a3b3","line":144,"updated":"2015-04-06 09:52:36.000000000","message":"to be dissociated","commit_id":"0238607903352f58de193f43918e99e4888c0d2b"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"0e7c3652c54dfba44c49b1c70cce1a306c69df9b","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        :param role: user role to assign with"},{"line_number":135,"context_line":"        :param tenant: tenant on which assignation will take place"},{"line_number":136,"context_line":"        \"\"\""},{"line_number":137,"context_line":"        self.admin_clients(\"keystone\").roles.add_user_role(user, role, tenant)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    @base.atomic_action_timer(\"keystone.remove_role\")"},{"line_number":140,"context_line":"    def _role_remove(self, user, role, tenant):"}],"source_content_type":"text/x-python","patch_set":24,"id":"dac4157f_2371d6a8","line":137,"updated":"2015-04-22 15:34:45.000000000","message":"`tenant` is an optional kwarg in keystoneclient add_user_role(); do we want to make it optional in _role_assign(), too?","commit_id":"dfd8b4b8678c3a40b2d7b3201d9cd783570f4d05"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"0e7c3652c54dfba44c49b1c70cce1a306c69df9b","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        :param tenant: tenant on which assignation took place"},{"line_number":146,"context_line":"        \"\"\""},{"line_number":147,"context_line":"        self.admin_clients(\"keystone\").roles.remove_user_role(user,"},{"line_number":148,"context_line":"                                                              role, tenant)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    @base.atomic_action_timer(\"keystone.get_tenant\")"},{"line_number":151,"context_line":"    def _get_tenant(self, tenant_id):"}],"source_content_type":"text/x-python","patch_set":24,"id":"dac4157f_036b72b8","line":148,"updated":"2015-04-22 15:34:45.000000000","message":"Ditto.","commit_id":"dfd8b4b8678c3a40b2d7b3201d9cd783570f4d05"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"e1ae21e4a8eef9af5f1033d952b042579202e568","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    @base.atomic_action_timer(\"keystone.list_roles\")"},{"line_number":124,"context_line":"    def _list_roles_for_user(self, user, tenant):"},{"line_number":125,"context_line":"        \"\"\"List user roles.\"\"\""},{"line_number":126,"context_line":"        return self.admin_clients(\"keystone\").roles.roles_for_user("},{"line_number":127,"context_line":"            user, tenant)"},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"3acd31a7_77e33806","line":125,"updated":"2015-05-01 18:10:54.000000000","message":"I think its not normal don\u0027t document parameters.","commit_id":"3a33bfa538d5668c062107f5d548952ec9365942"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"e1ae21e4a8eef9af5f1033d952b042579202e568","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    @base.atomic_action_timer(\"keystone.assign_role\")"},{"line_number":130,"context_line":"    def _role_assign(self, user, role, tenant):"},{"line_number":131,"context_line":"        \"\"\"Assign role to a given user on a tenant."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        :param user: user to be assigned the role to"},{"line_number":134,"context_line":"        :param role: user role to assign with"}],"source_content_type":"text/x-python","patch_set":29,"id":"3acd31a7_97e814e4","line":131,"updated":"2015-05-01 18:10:54.000000000","message":"Sorry but I can understand why you use here word assign and etc. There is a specific name for this operation in keystone. https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/v2_0/roles.py#L58 add_user_role This name can make confussion among keystone users. This refer bigger to the name of the function then to the docstring.","commit_id":"3a33bfa538d5668c062107f5d548952ec9365942"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"5f99be36c719288953262b9eb77ceb4d1e724fdb","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    @base.atomic_action_timer(\"keystone.assign_role\")"},{"line_number":130,"context_line":"    def _role_assign(self, user, role, tenant):"},{"line_number":131,"context_line":"        \"\"\"Assign role to a given user on a tenant."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        :param user: user to be assigned the role to"},{"line_number":134,"context_line":"        :param role: user role to assign with"}],"source_content_type":"text/x-python","patch_set":29,"id":"1aca2d91_5de88f7c","line":131,"in_reply_to":"1aca2d91_f5e1cbd1","updated":"2015-05-06 16:44:45.000000000","message":"I think Roman\u0027s complaint is that keystoneclient calls this operation \"add,\" while you call it \"assign.\" Both make sense to me, but in the interest of consistency we might want to rename this function to \"_add_user_role\" or \"_role_add\" or similar.","commit_id":"3a33bfa538d5668c062107f5d548952ec9365942"},{"author":{"_account_id":13420,"name":"Serhii Vasheka","email":"svasheka@mirantis.com","username":"svasheka"},"change_message_id":"f7e8a0662a8bd37f2926edb37a5af765702acf26","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    @base.atomic_action_timer(\"keystone.assign_role\")"},{"line_number":130,"context_line":"    def _role_assign(self, user, role, tenant):"},{"line_number":131,"context_line":"        \"\"\"Assign role to a given user on a tenant."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        :param user: user to be assigned the role to"},{"line_number":134,"context_line":"        :param role: user role to assign with"}],"source_content_type":"text/x-python","patch_set":29,"id":"1aca2d91_f5e1cbd1","line":131,"in_reply_to":"3acd31a7_97e814e4","updated":"2015-05-06 08:53:05.000000000","message":"So you \"can\", or can\u0027t understand?\nAssign is what actually happening. Role being assigned. docstring should document what method does, it assigns role.","commit_id":"3a33bfa538d5668c062107f5d548952ec9365942"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"f936f5f326ed5f678b85ca663106374679d7a807","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        return self.admin_clients(\"keystone\").roles.roles_for_user("},{"line_number":131,"context_line":"            user, tenant)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    @base.atomic_action_timer(\"keystone.assign_role\")"},{"line_number":134,"context_line":"    def _role_add(self, user, role, tenant):"},{"line_number":135,"context_line":"        \"\"\"Add role to a given user on a tenant."},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"9a0c5dc1_78a0ed9f","line":133,"updated":"2015-05-13 10:54:26.000000000","message":"Same here. If you call the function \u0027_role_add\u0027, atomic action should be \u0027keystone.add_role\u0027","commit_id":"e9197bfb8c9cd8ab0d1ced96b35f0649e21787ad"}],"tests/unit/benchmark/scenarios/keystone/test_basic.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"0e7c3652c54dfba44c49b1c70cce1a306c69df9b","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        fake_user \u003d self.context[\"user\"][\"id\"]"},{"line_number":112,"context_line":"        fake_role \u003d mock.MagicMock()"},{"line_number":113,"context_line":"        scenario._tenant_create \u003d mock.MagicMock(return_value\u003dfake_tenant)"},{"line_number":114,"context_line":"        scenario._user_create \u003d mock.MagicMock(return_value\u003dfake_user)"},{"line_number":115,"context_line":"        scenario._role_create \u003d mock.MagicMock(return_value\u003dfake_role)"},{"line_number":116,"context_line":"        scenario._role_assign \u003d mock.MagicMock()"},{"line_number":117,"context_line":"        scenario._role_remove \u003d mock.MagicMock()"}],"source_content_type":"text/x-python","patch_set":24,"id":"dac4157f_83d5421d","line":114,"updated":"2015-04-22 15:34:45.000000000","message":"_tenant_create and _user_create do not need to be mocked here.","commit_id":"dfd8b4b8678c3a40b2d7b3201d9cd783570f4d05"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"0e7c3652c54dfba44c49b1c70cce1a306c69df9b","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        fake_user \u003d self.context[\"user\"][\"id\"]"},{"line_number":140,"context_line":"        fake_role \u003d mock.MagicMock()"},{"line_number":141,"context_line":"        scenario._tenant_create \u003d mock.MagicMock(return_value\u003dfake_tenant)"},{"line_number":142,"context_line":"        scenario._user_create \u003d mock.MagicMock(return_value\u003dfake_user)"},{"line_number":143,"context_line":"        scenario._role_create \u003d mock.MagicMock(return_value\u003dfake_role)"},{"line_number":144,"context_line":"        scenario._role_assign \u003d mock.MagicMock()"},{"line_number":145,"context_line":"        scenario._list_roles_for_user \u003d mock.MagicMock()"}],"source_content_type":"text/x-python","patch_set":24,"id":"dac4157f_23e0b6f9","line":142,"updated":"2015-04-22 15:34:45.000000000","message":"Ditto.","commit_id":"dfd8b4b8678c3a40b2d7b3201d9cd783570f4d05"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"f936f5f326ed5f678b85ca663106374679d7a807","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def setUp(self):"},{"line_number":28,"context_line":"        super(KeystoneBasicTestCase, self).setUp()"},{"line_number":29,"context_line":"        self.context \u003d {"},{"line_number":30,"context_line":"            \"user\": {\"id\": \"fake\"},"},{"line_number":31,"context_line":"            \"tenant\": {\"id\": \"fake\"}"},{"line_number":32,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a0c5dc1_18933151","line":29,"updated":"2015-05-13 10:54:26.000000000","message":"Creating mutable variables in setUp() is a kind of antipattern. Could you please create a function that returns this context each time it is called? Something like this:\n\n    def _get_context():\n        return {\n            \"user\": {\"id\": \"fake\"},\n            \"tenant\": {\"id\": \"fake\"}\n        }","commit_id":"e9197bfb8c9cd8ab0d1ced96b35f0649e21787ad"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"be699849f986e19c80bc9327e6b4acafe6a554fc","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def setUp(self):"},{"line_number":28,"context_line":"        super(KeystoneBasicTestCase, self).setUp()"},{"line_number":29,"context_line":"        self.context \u003d {"},{"line_number":30,"context_line":"            \"user\": {\"id\": \"fake\"},"},{"line_number":31,"context_line":"            \"tenant\": {\"id\": \"fake\"}"},{"line_number":32,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":33,"id":"7a016987_a8cdd6b8","line":29,"updated":"2015-05-16 17:22:09.000000000","message":"sharing variables via setUp and self is unittest antipattern.\n\nWe are trying to replace this from rally. \nBetter approach is to create method: \n\n  _get_context() \n\nand use it directly","commit_id":"300e809034b5c1c899dcb55e480550b53d08f4bf"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"27ba7428986254ddb55b116168d3e9fe5213e45a","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def setUp(self):"},{"line_number":28,"context_line":"        super(KeystoneBasicTestCase, self).setUp()"},{"line_number":29,"context_line":"        self.context \u003d {"},{"line_number":30,"context_line":"            \"user\": {\"id\": \"fake\"},"},{"line_number":31,"context_line":"            \"tenant\": {\"id\": \"fake\"}"},{"line_number":32,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":33,"id":"7a016987_febe7eac","line":29,"in_reply_to":"7a016987_a8cdd6b8","updated":"2015-05-21 22:47:56.000000000","message":"Done","commit_id":"300e809034b5c1c899dcb55e480550b53d08f4bf"}],"tests/unit/benchmark/scenarios/keystone/test_utils.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"0e7c3652c54dfba44c49b1c70cce1a306c69df9b","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        fake_clients._keystone \u003d fake_keystone"},{"line_number":119,"context_line":"        scenario \u003d utils.KeystoneScenario(admin_clients\u003dfake_clients)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        scenario._role_assign(user\u003duser.id, role\u003drole.id, tenant\u003dtenant.id)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        fake_keystone.roles.add_user_role.assert_called_once_with(user.id,"},{"line_number":124,"context_line":"                                                                  role.id,"}],"source_content_type":"text/x-python","patch_set":24,"id":"dac4157f_a3716646","line":121,"updated":"2015-04-22 15:34:45.000000000","message":"Calling this with the .id properties isn\u0027t wrong per se, it\u0027s just odd, and doesn\u0027t match the code in test_role_remove() below. Unless there\u0027s a reason to test with .id, I\u0027d remove it to keep things tidy. (If there is a reason to use .id in this test, please document it in a comment.)","commit_id":"dfd8b4b8678c3a40b2d7b3201d9cd783570f4d05"}],"tests/unit/fakes.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"0e7c3652c54dfba44c49b1c70cce1a306c69df9b","unresolved":false,"context_lines":[{"line_number":711,"context_line":"        role.name \u003d \"admin\""},{"line_number":712,"context_line":"        return [role, ]"},{"line_number":713,"context_line":""},{"line_number":714,"context_line":"    def add_user_role(self, user, role, tenant):"},{"line_number":715,"context_line":"        pass"},{"line_number":716,"context_line":""},{"line_number":717,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"dac4157f_c3f0da93","line":714,"updated":"2015-04-22 15:34:45.000000000","message":"This isn\u0027t used in your tests, AFAICT; and it\u0027s not matched with a remove_user_role() function. I\u0027d suggest either removing this stub, or fully implementing a fake role adding/removing mechanism in FakeRolesManager, and using that in your unit tests. (The former is obviously lots and lots simpler, and it\u0027s where I\u0027d lean.)","commit_id":"dfd8b4b8678c3a40b2d7b3201d9cd783570f4d05"}]}
