)]}'
{"functions-common":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"f83c4fb267579d96af9164306665c38495e753c8","unresolved":false,"context_lines":[{"line_number":888,"context_line":"function get_or_add_user_project_role {"},{"line_number":889,"context_line":"    local user_role_id"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"    user_rule_id\u003d$($PYTHON $TOP_DIR/tools/get_or_add_user_project_role.py $1 $2 $3 $4 $5)"},{"line_number":892,"context_line":"    echo $user_role_id"},{"line_number":893,"context_line":"}"},{"line_number":894,"context_line":""}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"7faddb67_5998f7be","line":891,"updated":"2019-07-30 10:05:40.000000000","message":"So I queried the last 7 days of runs of the \"devstack\" job where they were successful, on master branch, and extracted the osc timing metric.  The results are in [1]; in short 292s with a standard deviation of 50\n\nThis run reported \n\n osc                  168\n\nso you could draw some conclusions maybe that even if you went down the bell curve to about 242 seconds being a fast run, we were still ~74 seconds lower here.\n\nBut I would like to see this using the timer wrappers to get accounting from the start; maybe we want some new category that\u0027s not quite like \"osc\" but \"api\" or something -- to indicate time we\u0027re talking to the cloud and setting things up (as opposed to installing things, etc).\n\n[1] https://ethercalc.openstack.org/rzuhevxz7793","commit_id":"aa4c4d514aaa9535a65b1f2b45dca6001028d0d0"}],"tools/get_or_add_user_project_role.py":[{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"7e75a4f98b945abce8bf07a5778632409926470a","unresolved":false,"context_lines":[{"line_number":12,"context_line":"if len(sys.argv) \u003e\u003d 6):"},{"line_number":13,"context_line":"    project_domain \u003d sys.argv[5]"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"# Use env vars"},{"line_number":16,"context_line":"conn \u003d openstack.connect()"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"assignments \u003d conn.identity.role_assignments_filter("}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_1c8374ab","line":15,"updated":"2019-07-26 16:55:51.000000000","message":"devstack has clouds.yaml too","commit_id":"c43ea9042ff0ffb5a30d77aee1683525ab33c3f5"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"12276eb1def33e8d7a50bbba2e646ba2a9ab40f8","unresolved":false,"context_lines":[{"line_number":12,"context_line":"if len(sys.argv) \u003e\u003d 6):"},{"line_number":13,"context_line":"    project_domain \u003d sys.argv[5]"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"# Use env vars"},{"line_number":16,"context_line":"conn \u003d openstack.connect()"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"assignments \u003d conn.identity.role_assignments_filter("}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_17c02d7c","line":15,"in_reply_to":"7faddb67_1c8374ab","updated":"2019-07-26 17:27:55.000000000","message":"It gets written after the keystone setup.","commit_id":"c43ea9042ff0ffb5a30d77aee1683525ab33c3f5"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"7e75a4f98b945abce8bf07a5778632409926470a","unresolved":false,"context_lines":[{"line_number":25,"context_line":"else:"},{"line_number":26,"context_line":"    conn.identity.assign_project_role_to_user(project, user, role)"},{"line_number":27,"context_line":"    assignments \u003d conn.identity.role_assignments_filter("},{"line_number":28,"context_line":"                        domain\u003duser_domain,"},{"line_number":29,"context_line":"                        project\u003dproject,"},{"line_number":30,"context_line":"                        user\u003duser,"},{"line_number":31,"context_line":"                    )"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_5ca1ec45","line":28,"range":{"start_line":28,"start_character":24,"end_line":28,"end_character":30},"updated":"2019-07-26 16:55:51.000000000","message":"This should probably be something like user_domain, \u0027domain\u0027 on its own would look for the role assignments a user has on the domain, but user_domain is the namespace the user is owned by.","commit_id":"c43ea9042ff0ffb5a30d77aee1683525ab33c3f5"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"12276eb1def33e8d7a50bbba2e646ba2a9ab40f8","unresolved":false,"context_lines":[{"line_number":25,"context_line":"else:"},{"line_number":26,"context_line":"    conn.identity.assign_project_role_to_user(project, user, role)"},{"line_number":27,"context_line":"    assignments \u003d conn.identity.role_assignments_filter("},{"line_number":28,"context_line":"                        domain\u003duser_domain,"},{"line_number":29,"context_line":"                        project\u003dproject,"},{"line_number":30,"context_line":"                        user\u003duser,"},{"line_number":31,"context_line":"                    )"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_773641b7","line":28,"range":{"start_line":28,"start_character":24,"end_line":28,"end_character":30},"in_reply_to":"7faddb67_5ca1ec45","updated":"2019-07-26 17:27:55.000000000","message":"https://docs.openstack.org/openstacksdk/latest/user/proxies/identity_v3.html#openstack.identity.v3._proxy.Proxy.role_assignments_filter says domain is valid but user_domain is not. Not sure if the api docs are accurate here. I can switch the value and see if it works once generally working.","commit_id":"c43ea9042ff0ffb5a30d77aee1683525ab33c3f5"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"e4ebe2e43d192c34d82f530b1cf2a4e3ad5506b6","unresolved":false,"context_lines":[{"line_number":25,"context_line":"else:"},{"line_number":26,"context_line":"    conn.identity.assign_project_role_to_user(project, user, role)"},{"line_number":27,"context_line":"    assignments \u003d conn.identity.role_assignments_filter("},{"line_number":28,"context_line":"                        domain\u003duser_domain,"},{"line_number":29,"context_line":"                        project\u003dproject,"},{"line_number":30,"context_line":"                        user\u003duser,"},{"line_number":31,"context_line":"                    )"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_f772317c","line":28,"range":{"start_line":28,"start_character":24,"end_line":28,"end_character":30},"in_reply_to":"7faddb67_773641b7","updated":"2019-07-26 17:31:09.000000000","message":"In that case user needs to either be an ID or a User object, not a username. domain here will still mean role assignments on the domain, which is not the same thing as the user_domain and project_domain that _get_domain_args is getting in the bash function.","commit_id":"c43ea9042ff0ffb5a30d77aee1683525ab33c3f5"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"7e75a4f98b945abce8bf07a5778632409926470a","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    conn.identity.assign_project_role_to_user(project, user, role)"},{"line_number":27,"context_line":"    assignments \u003d conn.identity.role_assignments_filter("},{"line_number":28,"context_line":"                        domain\u003duser_domain,"},{"line_number":29,"context_line":"                        project\u003dproject,"},{"line_number":30,"context_line":"                        user\u003duser,"},{"line_number":31,"context_line":"                    )"},{"line_number":32,"context_line":"    if assignments:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_fc8778b5","line":29,"updated":"2019-07-26 16:55:51.000000000","message":"You probably need project_domain too if project is expected to be a name rather than ID","commit_id":"c43ea9042ff0ffb5a30d77aee1683525ab33c3f5"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"12276eb1def33e8d7a50bbba2e646ba2a9ab40f8","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    conn.identity.assign_project_role_to_user(project, user, role)"},{"line_number":27,"context_line":"    assignments \u003d conn.identity.role_assignments_filter("},{"line_number":28,"context_line":"                        domain\u003duser_domain,"},{"line_number":29,"context_line":"                        project\u003dproject,"},{"line_number":30,"context_line":"                        user\u003duser,"},{"line_number":31,"context_line":"                    )"},{"line_number":32,"context_line":"    if assignments:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_97397da4","line":29,"in_reply_to":"7faddb67_fc8778b5","updated":"2019-07-26 17:27:55.000000000","message":"See above.","commit_id":"c43ea9042ff0ffb5a30d77aee1683525ab33c3f5"}]}
