)]}'
{"tools/make_test_data.sh":[{"author":{"_account_id":17289,"name":"Su Zhengwei","email":"su.zhengwei@zte.com.cn","username":"su-zhengwei"},"change_message_id":"a643316532fb28f79ed9febb77cda4598684a565","unresolved":false,"context_lines":[{"line_number":16,"context_line":"fi"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"# Convert a possible project name to an id, if we have"},{"line_number":19,"context_line":"# keystone installed."},{"line_number":20,"context_line":"if which openstack \u003e/dev/null"},{"line_number":21,"context_line":"then"},{"line_number":22,"context_line":"    # TODO(zqfan): what if there is a project named \"admin lol\"?"}],"source_content_type":"text/x-sh","patch_set":1,"id":"1a122d0e_bc3f1cd5","line":19,"updated":"2016-04-19 01:10:41.000000000","message":"comment \u0027keystone\u0027 need to change to \u0027openstack\u0027","commit_id":"a52f7d0cca9c530b78c1f873fbbea94f0990c4a5"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"a90270b447e7ce00b001b86dd4058d17125422b7","unresolved":false,"context_lines":[{"line_number":16,"context_line":"fi"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"# Convert a possible project name to an id, if we have"},{"line_number":19,"context_line":"# keystone installed."},{"line_number":20,"context_line":"if which openstack \u003e/dev/null"},{"line_number":21,"context_line":"then"},{"line_number":22,"context_line":"    # TODO(zqfan): what if there is a project named \"admin lol\"?"}],"source_content_type":"text/x-sh","patch_set":1,"id":"1a122d0e_f469a8bf","line":19,"in_reply_to":"1a122d0e_bc3f1cd5","updated":"2016-04-19 04:37:56.000000000","message":"Done","commit_id":"a52f7d0cca9c530b78c1f873fbbea94f0990c4a5"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f34297d9b8b1d226d109d1e9e5e8275ad4a56bae","unresolved":false,"context_lines":[{"line_number":20,"context_line":"if which openstack \u003e/dev/null"},{"line_number":21,"context_line":"then"},{"line_number":22,"context_line":"    # TODO(zqfan): what if there is a project named \"admin lol\"?"},{"line_number":23,"context_line":"    project\u003d$(openstack project list | grep \" $project_name \" | cut -f2 -d\u0027|\u0027 | cut -f2 -d\u0027 \u0027)"},{"line_number":24,"context_line":"else"},{"line_number":25,"context_line":"    # Assume they gave us the project id as argument."},{"line_number":26,"context_line":"    project\u003d\"$project_name\""}],"source_content_type":"text/x-sh","patch_set":1,"id":"1a122d0e_1c2730cb","line":23,"updated":"2016-04-19 00:55:02.000000000","message":"if you want to just get the ID from the name do:\n\n  project\u003d$(openstack project show $project_name -c id -f value)\n\nhere\u0027s a working example, even works with quotes in the project name\n\n$ project_name\u003dadmin   \n$ project_name_q\u003d\"admin\"   \n$ openstack project show admin\n+-------------+-----------------------------------------------+\n| Field       | Value                                         |\n+-------------+-----------------------------------------------+\n| description | Bootstrap project for initializing the cloud. |\n| enabled     | True                                          |\n| id          | 551af8a6b12b40f2bbf703729673a71e              |\n| name        | admin                                         |\n| properties  |                                               |\n+-------------+-----------------------------------------------+\n\n$ project_id\u003d$(openstack project show $project_name -f value -c id)\n$ echo $project_id\n551af8a6b12b40f2bbf703729673a71e\n\n$ project_id2\u003d$(openstack project show $project_name_q -f value -c id)\n$ echo $project_id2\n551af8a6b12b40f2bbf703729673a71e","commit_id":"a52f7d0cca9c530b78c1f873fbbea94f0990c4a5"},{"author":{"_account_id":17289,"name":"Su Zhengwei","email":"su.zhengwei@zte.com.cn","username":"su-zhengwei"},"change_message_id":"a643316532fb28f79ed9febb77cda4598684a565","unresolved":false,"context_lines":[{"line_number":20,"context_line":"if which openstack \u003e/dev/null"},{"line_number":21,"context_line":"then"},{"line_number":22,"context_line":"    # TODO(zqfan): what if there is a project named \"admin lol\"?"},{"line_number":23,"context_line":"    project\u003d$(openstack project list | grep \" $project_name \" | cut -f2 -d\u0027|\u0027 | cut -f2 -d\u0027 \u0027)"},{"line_number":24,"context_line":"else"},{"line_number":25,"context_line":"    # Assume they gave us the project id as argument."},{"line_number":26,"context_line":"    project\u003d\"$project_name\""}],"source_content_type":"text/x-sh","patch_set":1,"id":"1a122d0e_375207de","line":23,"in_reply_to":"1a122d0e_1c2730cb","updated":"2016-04-19 01:10:41.000000000","message":"I don\u0027t think it isbetter than the old method.","commit_id":"a52f7d0cca9c530b78c1f873fbbea94f0990c4a5"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"a90270b447e7ce00b001b86dd4058d17125422b7","unresolved":false,"context_lines":[{"line_number":20,"context_line":"if which openstack \u003e/dev/null"},{"line_number":21,"context_line":"then"},{"line_number":22,"context_line":"    # TODO(zqfan): what if there is a project named \"admin lol\"?"},{"line_number":23,"context_line":"    project\u003d$(openstack project list | grep \" $project_name \" | cut -f2 -d\u0027|\u0027 | cut -f2 -d\u0027 \u0027)"},{"line_number":24,"context_line":"else"},{"line_number":25,"context_line":"    # Assume they gave us the project id as argument."},{"line_number":26,"context_line":"    project\u003d\"$project_name\""}],"source_content_type":"text/x-sh","patch_set":1,"id":"1a122d0e_d40f4c2c","line":23,"in_reply_to":"1a122d0e_1c2730cb","updated":"2016-04-19 04:37:56.000000000","message":"fantastic, just add \"$project_name\" will make it perfect, thanks","commit_id":"a52f7d0cca9c530b78c1f873fbbea94f0990c4a5"}]}
