)]}'
{"functions-common":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"794acaf3120acdc6a27ce995f5fee9a2bd392f7f","unresolved":false,"context_lines":[{"line_number":798,"context_line":"           -f value -c id) || rc\u003d$?"},{"line_number":799,"context_line":"    if [[ $rc !\u003d 0 ]]; then"},{"line_number":800,"context_line":"        # Creates new domain"},{"line_number":801,"context_line":"        domain_id\u003d$(openstack domain create $1 \\"},{"line_number":802,"context_line":"            --description \"$2\" \\"},{"line_number":803,"context_line":"            -f value -c id)"},{"line_number":804,"context_line":"    fi"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"3fa7e38b_288e152e","line":801,"updated":"2019-09-23 09:02:57.000000000","message":"Is there a reason not to use \"--or-show\" here like in get_or_create_group below? That should obsolete all that error handling code.","commit_id":"d9b026993c43456ca9c6a16ab6f3d707938c3cae"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"cc11b3db818f1df178e3a836a88bf6ed6de458b2","unresolved":false,"context_lines":[{"line_number":798,"context_line":"           -f value -c id) || rc\u003d$?"},{"line_number":799,"context_line":"    if [[ $rc !\u003d 0 ]]; then"},{"line_number":800,"context_line":"        # Creates new domain"},{"line_number":801,"context_line":"        domain_id\u003d$(openstack domain create $1 \\"},{"line_number":802,"context_line":"            --description \"$2\" \\"},{"line_number":803,"context_line":"            -f value -c id)"},{"line_number":804,"context_line":"    fi"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"3fa7e38b_7d87dbb6","line":801,"in_reply_to":"3fa7e38b_288e152e","updated":"2020-09-17 05:16:09.000000000","message":"Done","commit_id":"d9b026993c43456ca9c6a16ab6f3d707938c3cae"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"794acaf3120acdc6a27ce995f5fee9a2bd392f7f","unresolved":false,"context_lines":[{"line_number":900,"context_line":"        --project $3 \\"},{"line_number":901,"context_line":"        $domain_args) || rc\u003d$?"},{"line_number":902,"context_line":""},{"line_number":903,"context_line":"    if [[ $rc !\u003d 0 ]]; then"},{"line_number":904,"context_line":"        # Adds role to user and re-get it"},{"line_number":905,"context_line":"        openstack role add $1 \\"},{"line_number":906,"context_line":"            --user $2 \\"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"3fa7e38b_c8350148","line":903,"updated":"2019-09-23 09:02:57.000000000","message":"This doesn\u0027t work, for a non-existing assignment, \"openstack role assignment list\" simply gives no output, but still rc\u003d0.","commit_id":"d9b026993c43456ca9c6a16ab6f3d707938c3cae"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"794acaf3120acdc6a27ce995f5fee9a2bd392f7f","unresolved":false,"context_lines":[{"line_number":902,"context_line":""},{"line_number":903,"context_line":"    if [[ $rc !\u003d 0 ]]; then"},{"line_number":904,"context_line":"        # Adds role to user and re-get it"},{"line_number":905,"context_line":"        openstack role add $1 \\"},{"line_number":906,"context_line":"            --user $2 \\"},{"line_number":907,"context_line":"            --project $3 \\"},{"line_number":908,"context_line":"            $domain_args"},{"line_number":909,"context_line":"        user_role_id\u003d$(openstack role assignment list \\"},{"line_number":910,"context_line":"            --role $1 \\"},{"line_number":911,"context_line":"            --user $2 \\"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"3fa7e38b_883f0924","line":908,"range":{"start_line":905,"start_character":8,"end_line":908,"end_character":24},"updated":"2019-09-23 09:02:57.000000000","message":"From my testing, this command seems to be idempotent, so possibly we could just execute it unconditionally and retrieve the role id afterwards.","commit_id":"d9b026993c43456ca9c6a16ab6f3d707938c3cae"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"794acaf3120acdc6a27ce995f5fee9a2bd392f7f","unresolved":false,"context_lines":[{"line_number":910,"context_line":"            --role $1 \\"},{"line_number":911,"context_line":"            --user $2 \\"},{"line_number":912,"context_line":"            --project $3 \\"},{"line_number":913,"context_line":"            $domain_args)"},{"line_number":914,"context_line":"    fi"},{"line_number":915,"context_line":"    echo $user_role_id | grep \u0027^|\\s[a-f0-9]\\+\u0027 | get_field 1"},{"line_number":916,"context_line":"}"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"3fa7e38b_e811ddad","line":913,"updated":"2019-09-23 09:02:57.000000000","message":"If you add \"-c Role -f value\" here, you can skip the \"| grep ... | get_field 1\" part.","commit_id":"d9b026993c43456ca9c6a16ab6f3d707938c3cae"}]}
