)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"3d6196c5b09bd0a5427093d087818411bafdc4bf","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Script to test horizon with wget or curl"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This script checks whether wget or curl are installed and uses one of them to  perform"},{"line_number":10,"context_line":"some http requests to the controller node trough the horizon (dashboard) interface, in"},{"line_number":11,"context_line":"order to ensure that the service is working properly."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bacf61ea_4c0f0188","line":9,"updated":"2016-08-01 05:50:23.000000000","message":"This line is too long for a commit message. The gate checks will complain. Keep them below 80 chars.","commit_id":"a8f3902ba54db1a4693aa21711af4ed504fdf6aa"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"3d6196c5b09bd0a5427093d087818411bafdc4bf","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Script to test horizon with wget or curl"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This script checks whether wget or curl are installed and uses one of them to  perform"},{"line_number":10,"context_line":"some http requests to the controller node trough the horizon (dashboard) interface, in"},{"line_number":11,"context_line":"order to ensure that the service is working properly."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Update: wget needs \"\u003d\" between --arg\u003dvalue while curl doesn\u0027t. I fixed that."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bacf61ea_8c25790a","line":10,"updated":"2016-08-01 05:50:23.000000000","message":"s/trough/through/","commit_id":"a8f3902ba54db1a4693aa21711af4ed504fdf6aa"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"3d6196c5b09bd0a5427093d087818411bafdc4bf","unresolved":false,"context_lines":[{"line_number":10,"context_line":"some http requests to the controller node trough the horizon (dashboard) interface, in"},{"line_number":11,"context_line":"order to ensure that the service is working properly."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Update: wget needs \"\u003d\" between --arg\u003dvalue while curl doesn\u0027t. I fixed that."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I986d46de2b70964b6de2be679f2fb26a11c26b74"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bacf61ea_6cb48581","line":13,"updated":"2016-08-01 05:50:23.000000000","message":"Notes like this one are very helpful. They go into git review comments, not into the commit message.\nCheckout out https://wiki.openstack.org/wiki/GitCommitMessages, especially the section \"Do not include patch set-specific comments.\"","commit_id":"a8f3902ba54db1a4693aa21711af4ed504fdf6aa"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"e445310c8b66d4ed5c8a315d6c0905a701669c7a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Script to test horizon with wget or curl"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This script logs in into horizon using wget or curl and checks credentials and basic"},{"line_number":10,"context_line":"functionality."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I986d46de2b70964b6de2be679f2fb26a11c26b74"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"bacf61ea_d6d3dad3","line":9,"updated":"2016-08-03 18:00:58.000000000","message":"You must have missed the past where I said to keep lines shorter than 80 characters. That\u0027s just as well, because according to the document I linked to earlier it\u0027s 72 anyway.\n\nFeel free to leave it that way and see your patch get automatically rejected by the gatekeeper :). It is an educational experience.","commit_id":"9ac78ecf158805da96641a9ddf8cc20886b7106e"}],"labs/osbash/scripts/test/test_horizon.sh":[{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"3d6196c5b09bd0a5427093d087818411bafdc4bf","unresolved":false,"context_lines":[{"line_number":15,"context_line":"USER\u003d\"admin\""},{"line_number":16,"context_line":"PASSWORD\u003d\"admin_user_secret\""},{"line_number":17,"context_line":"COOKIE_FILE\u003d\"cookie.txt\""},{"line_number":18,"context_line":"OUTPUT_FILE1\u003d\"output.1.html\""},{"line_number":19,"context_line":"OUTPUT_FILE2\u003d\"output.2.html\""},{"line_number":20,"context_line":"OUTPUT_FILE3\u003d\"output.3.html\""},{"line_number":21,"context_line":"OUTPUT_FILE4\u003d\"output.4.html\""}],"source_content_type":"text/x-sh","patch_set":2,"id":"bacf61ea_0f2dfb94","line":18,"updated":"2016-08-01 05:50:23.000000000","message":"Can you create a test_horizon directory for the files and/or give them names that give some indication about their origin or purpose? A user may wonder why they have files with names like output.1.html.","commit_id":"a8f3902ba54db1a4693aa21711af4ed504fdf6aa"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"3d6196c5b09bd0a5427093d087818411bafdc4bf","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"# Ensure wget or curl are installed"},{"line_number":31,"context_line":"if which wget \u0026\u003e /dev/null ; then"},{"line_number":32,"context_line":"   #echo \"wget is installed, using wget\""},{"line_number":33,"context_line":"   REQUEST_TOOL\u003d\"wget\""},{"line_number":34,"context_line":"elif which curl \u0026\u003e /dev/null; then"},{"line_number":35,"context_line":"   #echo \"curl is installed, using curl\""}],"source_content_type":"text/x-sh","patch_set":2,"id":"bacf61ea_ec6a3580","line":32,"updated":"2016-08-01 05:50:23.000000000","message":"Check the script with bashate. It will complain about indentation. You don\u0027t need to fix everything bashate complains about, but indentation errors yes.","commit_id":"a8f3902ba54db1a4693aa21711af4ed504fdf6aa"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"3d6196c5b09bd0a5427093d087818411bafdc4bf","unresolved":false,"context_lines":[{"line_number":40,"context_line":"   exit 1"},{"line_number":41,"context_line":"fi"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"request_cmd () {"},{"line_number":44,"context_line":"    # Usage:"},{"line_number":45,"context_line":"    # request_cmd URL OUT_FILE POST_DATA REFERER"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-sh","patch_set":2,"id":"bacf61ea_6ca92590","line":43,"updated":"2016-08-01 05:50:23.000000000","message":"In openstack (we are following devstack here) it is common to use this instead:\nfunction request_cmd {","commit_id":"a8f3902ba54db1a4693aa21711af4ed504fdf6aa"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"3d6196c5b09bd0a5427093d087818411bafdc4bf","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    if [ \"$REQUEST_TOOL\" \u003d \"wget\" ]; then"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        [ -f $COOKIE_FILE ] \u0026\u0026 COOKIE_ARG\u003d\"--load-cookies\u003d$COOKIE_FILE\""},{"line_number":55,"context_line":"        [ ! -z $DATA ] \u0026\u0026 POST_ARG\u003d\"--post-data\u003d$DATA\""},{"line_number":56,"context_line":"        [ ! -z $REFERER ] \u0026\u0026 REFERER_ARG\u003d\"--referer\u003d$REFERER\""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        #echo \"wget --quiet --keep-session-cookies --save-cookies $COOKIE_FILE \\"}],"source_content_type":"text/x-sh","patch_set":2,"id":"bacf61ea_aca5dda2","line":55,"updated":"2016-08-01 05:50:23.000000000","message":"Test wit shellcheck and fix what\u0027s easy to fix (quoting). Also, use \"-n\" instead of \"! -z\".","commit_id":"a8f3902ba54db1a4693aa21711af4ed504fdf6aa"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"3d6196c5b09bd0a5427093d087818411bafdc4bf","unresolved":false,"context_lines":[{"line_number":75,"context_line":"# Step 1: get the cookie"},{"line_number":76,"context_line":"request_cmd $AUTH_URL $OUTPUT_FILE1"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"TOKEN\u003d`cat $COOKIE_FILE | grep csrftoken | sed \u0027s/^.*csrftoken\\s*//\u0027`"},{"line_number":79,"context_line":"DATA\u003d\"username\u003d$USER\u0026password\u003d$PASSWORD\u0026domain\u003d$DOMAIN\u0026csrfmiddlewaretoken\u003d$TOKEN\""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"# Step 2: check the login credentials and obtains the session ID"}],"source_content_type":"text/x-sh","patch_set":2,"id":"bacf61ea_8cc9f95b","line":78,"updated":"2016-08-01 05:50:23.000000000","message":"No need for cat here, just use \"\u003c $COOKIE_FILE grep csrftoken\"","commit_id":"a8f3902ba54db1a4693aa21711af4ed504fdf6aa"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"3d6196c5b09bd0a5427093d087818411bafdc4bf","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"# Check that \"sessionid\" appears in the cookie file"},{"line_number":87,"context_line":"SESSIONID\u003d`cat $COOKIE_FILE | grep sessionid | sed \u0027s/^.*sessionid\\s*//\u0027`"},{"line_number":88,"context_line":"if [ \"$SESSIONID\" \u003d\u003d \"\" ]; then"},{"line_number":89,"context_line":"    echo \"Error: sessionid not present on file $COOKIE_FILE ...Exit\""},{"line_number":90,"context_line":"    exit 1"},{"line_number":91,"context_line":"else"}],"source_content_type":"text/x-sh","patch_set":2,"id":"bacf61ea_0c1fc96c","line":88,"updated":"2016-08-01 05:50:23.000000000","message":"why not:\nif [ -z \"$SESSIONID\" ]; then","commit_id":"a8f3902ba54db1a4693aa21711af4ed504fdf6aa"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"3d6196c5b09bd0a5427093d087818411bafdc4bf","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    echo \"Login successful\""},{"line_number":93,"context_line":"fi"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"TOKEN\u003d`cat $COOKIE_FILE | grep csrftoken | sed \u0027s/^.*csrftoken\\s*//\u0027`"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"NET_URL\u003d\"http://10.0.0.11/horizon/project/networks/\""},{"line_number":98,"context_line":"REFERER\u003d\"http://10.0.0.11/horizon/identity/\""}],"source_content_type":"text/x-sh","patch_set":2,"id":"bacf61ea_6cae4582","line":95,"updated":"2016-08-01 05:50:23.000000000","message":"This is redundant. Why create the token again?","commit_id":"a8f3902ba54db1a4693aa21711af4ed504fdf6aa"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"3d6196c5b09bd0a5427093d087818411bafdc4bf","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"NET_URL\u003d\"http://10.0.0.11/horizon/project/networks/\""},{"line_number":98,"context_line":"REFERER\u003d\"http://10.0.0.11/horizon/identity/\""},{"line_number":99,"context_line":"DATA\u003d\"login_region\u003d\u0027http://controller:5000/v3\u0027\u0026login_domain\u003ddefault\u0026csrfmiddlewaretoken\u003d\\"},{"line_number":100,"context_line":"$TOKEN\u0026sessionid\u003d$SESSIONID\""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"# Step 3: Load the page with the networks"}],"source_content_type":"text/x-sh","patch_set":2,"id":"bacf61ea_8cd0d9f7","line":99,"updated":"2016-08-01 05:50:23.000000000","message":"Here you are breaking the line but it still ends up too long for bashate. If you break it, you should break it early enough to shut up bashate :).","commit_id":"a8f3902ba54db1a4693aa21711af4ed504fdf6aa"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"3d6196c5b09bd0a5427093d087818411bafdc4bf","unresolved":false,"context_lines":[{"line_number":148,"context_line":"#request_cmd $LAUNCH_URL $OUTPUT_FILE5 $DATA $REFERER"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"## The last command doesn\u0027t work because there is something wrong either in DATA or"},{"line_number":151,"context_line":"## in LAUNCH_URL (maybe GET parameters?)"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-sh","patch_set":2,"id":"bacf61ea_0c3869ee","line":151,"updated":"2016-08-01 05:50:23.000000000","message":"If it doesn\u0027t work, we can merge the code that does work. It is useful already.","commit_id":"a8f3902ba54db1a4693aa21711af4ed504fdf6aa"},{"author":{"_account_id":7007,"name":"Pranav Salunke","email":"dguitarbite@gmail.com","username":"dguitarbite"},"change_message_id":"bd1f85542f31cb265415fd48a45723b378836b35","unresolved":false,"context_lines":[{"line_number":9,"context_line":"## 4: similar to step 3 but get the ID of the cirros image"},{"line_number":10,"context_line":"## 5: launch an instance using the data from steps 2,3 and 4"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"HOST\u003d\"http://10.0.0.11\""},{"line_number":13,"context_line":"AUTH_URL\u003d\"$HOST/horizon/auth/login/\""},{"line_number":14,"context_line":"DOMAIN\u003d\"default\""},{"line_number":15,"context_line":"USER\u003d\"admin\""}],"source_content_type":"text/x-sh","patch_set":3,"id":"bacf61ea_3c1a9417","line":12,"updated":"2016-08-01 18:20:41.000000000","message":"Please use the variable for controller node to resolve this IP address.","commit_id":"10cea90beeda6415545922f51bcf7b590a29d0d8"},{"author":{"_account_id":7007,"name":"Pranav Salunke","email":"dguitarbite@gmail.com","username":"dguitarbite"},"change_message_id":"bd1f85542f31cb265415fd48a45723b378836b35","unresolved":false,"context_lines":[{"line_number":97,"context_line":"# We need a new token, because it changes after step 2"},{"line_number":98,"context_line":"TOKEN\u003d$(grep csrftoken $COOKIE_FILE | sed \u0027s/^.*csrftoken\\s*//\u0027)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"NET_URL\u003d\"http://10.0.0.11/horizon/project/networks/\""},{"line_number":101,"context_line":"REFERER\u003d\"http://10.0.0.11/horizon/identity/\""},{"line_number":102,"context_line":"DATA\u003d\"login_region\u003d\u0027http://controller:5000/v3\u0027\u0026login_domain\u003ddefault\u0026\\"},{"line_number":103,"context_line":"csrfmiddlewaretoken\u003d$TOKEN\u0026sessionid\u003d$SESSIONID\""}],"source_content_type":"text/x-sh","patch_set":3,"id":"bacf61ea_bce684e5","line":100,"updated":"2016-08-01 18:20:41.000000000","message":"Use variables to resolve this address. Same goes for the next two lines.","commit_id":"10cea90beeda6415545922f51bcf7b590a29d0d8"},{"author":{"_account_id":7007,"name":"Pranav Salunke","email":"dguitarbite@gmail.com","username":"dguitarbite"},"change_message_id":"bd1f85542f31cb265415fd48a45723b378836b35","unresolved":false,"context_lines":[{"line_number":113,"context_line":"echo \"provider NET_ID\u003d\"$NET_ID"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"NET_URL\u003d\"http://10.0.0.11/horizon/project/images/\""},{"line_number":117,"context_line":"REFERER\u003d\"http://10.0.0.11/horizon/identity/\""},{"line_number":118,"context_line":"DATA\u003d\"login_region\u003d\u0027http://controller:5000/v3\u0027\u0026login_domain\u003ddefault\u0026\\"},{"line_number":119,"context_line":"csrfmiddlewaretoken\u003d$TOKEN\u0026sessionid\u003d$SESSIONID\""}],"source_content_type":"text/x-sh","patch_set":3,"id":"bacf61ea_dccff853","line":116,"updated":"2016-08-01 18:20:41.000000000","message":"Repeating content ... does it really do something different here?","commit_id":"10cea90beeda6415545922f51bcf7b590a29d0d8"},{"author":{"_account_id":7007,"name":"Pranav Salunke","email":"dguitarbite@gmail.com","username":"dguitarbite"},"change_message_id":"bd1f85542f31cb265415fd48a45723b378836b35","unresolved":false,"context_lines":[{"line_number":116,"context_line":"NET_URL\u003d\"http://10.0.0.11/horizon/project/images/\""},{"line_number":117,"context_line":"REFERER\u003d\"http://10.0.0.11/horizon/identity/\""},{"line_number":118,"context_line":"DATA\u003d\"login_region\u003d\u0027http://controller:5000/v3\u0027\u0026login_domain\u003ddefault\u0026\\"},{"line_number":119,"context_line":"csrfmiddlewaretoken\u003d$TOKEN\u0026sessionid\u003d$SESSIONID\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"# Step 4: Load the page with the available images"},{"line_number":122,"context_line":"request_cmd $NET_URL $OUTPUT_FILE4 $DATA $REFERER"}],"source_content_type":"text/x-sh","patch_set":3,"id":"bacf61ea_7c07ec81","line":119,"updated":"2016-08-01 18:20:41.000000000","message":"Would be good to have a comment here explaining what this token is used for :).","commit_id":"10cea90beeda6415545922f51bcf7b590a29d0d8"},{"author":{"_account_id":7007,"name":"Pranav Salunke","email":"dguitarbite@gmail.com","username":"dguitarbite"},"change_message_id":"bd1f85542f31cb265415fd48a45723b378836b35","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"## Launching an instance"},{"line_number":135,"context_line":"#TOKEN\u003d`cat $COOKIE_FILE | grep csrftoken | sed \u0027s/^.*csrftoken\\s*//\u0027`"},{"line_number":136,"context_line":"#"},{"line_number":137,"context_line":"#LAUNCH_URL\u003d\"http://10.0.0.11/horizon/project/instances/\""}],"source_content_type":"text/x-sh","patch_set":3,"id":"bacf61ea_dcf6d88d","line":134,"updated":"2016-08-01 18:20:41.000000000","message":"I suggest adding this section as a part of next patch. Lets keep it as small as possible.","commit_id":"10cea90beeda6415545922f51bcf7b590a29d0d8"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"e445310c8b66d4ed5c8a315d6c0905a701669c7a","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"echo \"Testing horizon.\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"IP\u003d$(echo $NET_IF_1 |awk \u0027{print $2}\u0027)"},{"line_number":23,"context_line":"HOST\u003d\"http://$IP\""},{"line_number":24,"context_line":"AUTH_URL\u003d\"$HOST/horizon/auth/login/\""},{"line_number":25,"context_line":"DOMAIN\u003d\"default\""}],"source_content_type":"text/x-sh","patch_set":5,"id":"bacf61ea_0be70fe5","line":22,"updated":"2016-08-03 18:00:58.000000000","message":"Here and in quite a few other places, shellcheck will ask you to double quote. Now we know that this won\u0027t make the code better, but it will make it easier to check with shellcheck.","commit_id":"9ac78ecf158805da96641a9ddf8cc20886b7106e"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"e445310c8b66d4ed5c8a315d6c0905a701669c7a","unresolved":false,"context_lines":[{"line_number":20,"context_line":"echo \"Testing horizon.\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"IP\u003d$(echo $NET_IF_1 |awk \u0027{print $2}\u0027)"},{"line_number":23,"context_line":"HOST\u003d\"http://$IP\""},{"line_number":24,"context_line":"AUTH_URL\u003d\"$HOST/horizon/auth/login/\""},{"line_number":25,"context_line":"DOMAIN\u003d\"default\""},{"line_number":26,"context_line":"USER\u003d${ADMIN_USER_NAME}"}],"source_content_type":"text/x-sh","patch_set":5,"id":"bacf61ea_ab14039f","line":23,"updated":"2016-08-03 18:00:58.000000000","message":"This is not a host. HOST would have to be equal to IP. This is a string which cannot be named. I\u0027d stick with the IP address and write an extra \"http://\" where necessary.","commit_id":"9ac78ecf158805da96641a9ddf8cc20886b7106e"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"e445310c8b66d4ed5c8a315d6c0905a701669c7a","unresolved":false,"context_lines":[{"line_number":25,"context_line":"DOMAIN\u003d\"default\""},{"line_number":26,"context_line":"USER\u003d${ADMIN_USER_NAME}"},{"line_number":27,"context_line":"PASSWORD\u003d${ADMIN_PASS}"},{"line_number":28,"context_line":"OUTPUT_DIR\u003d\"./test_horizon_out/\""},{"line_number":29,"context_line":"COOKIE_FILE\u003d$OUTPUT_DIR\"cookie.txt\""},{"line_number":30,"context_line":"OUTPUT_FILE1\u003d$OUTPUT_DIR\"1.get_cookie.html\""},{"line_number":31,"context_line":"OUTPUT_FILE2\u003d$OUTPUT_DIR\"2.check_credentials.html\""}],"source_content_type":"text/x-sh","patch_set":5,"id":"bacf61ea_8b901f97","line":28,"updated":"2016-08-03 18:00:58.000000000","message":"Just \"test_horizon_out\" will do.","commit_id":"9ac78ecf158805da96641a9ddf8cc20886b7106e"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"e445310c8b66d4ed5c8a315d6c0905a701669c7a","unresolved":false,"context_lines":[{"line_number":26,"context_line":"USER\u003d${ADMIN_USER_NAME}"},{"line_number":27,"context_line":"PASSWORD\u003d${ADMIN_PASS}"},{"line_number":28,"context_line":"OUTPUT_DIR\u003d\"./test_horizon_out/\""},{"line_number":29,"context_line":"COOKIE_FILE\u003d$OUTPUT_DIR\"cookie.txt\""},{"line_number":30,"context_line":"OUTPUT_FILE1\u003d$OUTPUT_DIR\"1.get_cookie.html\""},{"line_number":31,"context_line":"OUTPUT_FILE2\u003d$OUTPUT_DIR\"2.check_credentials.html\""},{"line_number":32,"context_line":"OUTPUT_FILE3\u003d$OUTPUT_DIR\"3.check_net_id.html\""}],"source_content_type":"text/x-sh","patch_set":5,"id":"bacf61ea_6bb96b15","line":29,"updated":"2016-08-03 18:00:58.000000000","message":"I realize that the slash is redundant, but nobody does that :). The extra slash makes the whole thing easier to read.\nCOOKIE_FILE\u003d\"$OUTPUT_DIR/cookie.txt\"\n\nDitto for the other file paths.","commit_id":"9ac78ecf158805da96641a9ddf8cc20886b7106e"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"e445310c8b66d4ed5c8a315d6c0905a701669c7a","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"mkdir -p $OUTPUT_DIR"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"unset REQUEST_TOOL COOKIE_ARG POST_ARG DATA TOKEN SESSIONID request_cmd"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"# Ensure wget or curl are installed"},{"line_number":45,"context_line":"echo \"Testing availability of wget or curl.\""}],"source_content_type":"text/x-sh","patch_set":5,"id":"bacf61ea_4b6d8731","line":42,"updated":"2016-08-03 18:00:58.000000000","message":"Can you describe a scenario where this line is necessary?","commit_id":"9ac78ecf158805da96641a9ddf8cc20886b7106e"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"e445310c8b66d4ed5c8a315d6c0905a701669c7a","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    echo \"ERROR: neither wget nor curl were found. Please install one with:\""},{"line_number":52,"context_line":"    echo \" apt-get -y install wget\""},{"line_number":53,"context_line":"    exit 1"},{"line_number":54,"context_line":"fi"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"function request_cmd {"},{"line_number":57,"context_line":"    # Usage:"}],"source_content_type":"text/x-sh","patch_set":5,"id":"bacf61ea_0b5a6f83","line":54,"updated":"2016-08-03 18:00:58.000000000","message":"echo \"Found $REQUEST_TOOL.\" You can also merge this with the previous echo line by adding a \"-n\" there.","commit_id":"9ac78ecf158805da96641a9ddf8cc20886b7106e"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"e445310c8b66d4ed5c8a315d6c0905a701669c7a","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    elif [ \"$REQUEST_TOOL\" \u003d \"curl\" ]; then"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        [ -n $DATA ] \u0026\u0026 POST_ARG\u003d\"-d $DATA\""},{"line_number":102,"context_line":"        [ -n $REFERER ] \u0026\u0026 REFERER_ARG\u003d\"--referer $REFERER\""},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        curl -L -c $COOKIE_FILE -b $COOKIE_FILE $POST_ARG --output $OUTPUT_FILE \\"}],"source_content_type":"text/x-sh","patch_set":5,"id":"bacf61ea_968a0219","line":101,"updated":"2016-08-03 18:00:58.000000000","message":"In case you were wondering why I keep going on about shellcheck -- that tool will tell you that this is buggy, and the tool is correct. It\u0027s not all that obvious, now is it? :)","commit_id":"9ac78ecf158805da96641a9ddf8cc20886b7106e"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"e445310c8b66d4ed5c8a315d6c0905a701669c7a","unresolved":false,"context_lines":[{"line_number":126,"context_line":"# Check that \"sessionid\" appears in the cookie file"},{"line_number":127,"context_line":"# This SESSIONID keeps the session open to avoid sending the user/password"},{"line_number":128,"context_line":"# at every new request"},{"line_number":129,"context_line":"SESSIONID\u003d`cat $COOKIE_FILE | grep sessionid | sed \u0027s/^.*sessionid\\s*//\u0027`"},{"line_number":130,"context_line":"if [ -z \"$SESSIONID\" ]; then"},{"line_number":131,"context_line":"    echo \"Error: sessionid not present on file $COOKIE_FILE ...Exiting.\""},{"line_number":132,"context_line":"    exit 1"}],"source_content_type":"text/x-sh","patch_set":5,"id":"bacf61ea_d69bda64","line":129,"updated":"2016-08-03 18:00:58.000000000","message":"Listen to shellcheck here.","commit_id":"9ac78ecf158805da96641a9ddf8cc20886b7106e"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"e445310c8b66d4ed5c8a315d6c0905a701669c7a","unresolved":false,"context_lines":[{"line_number":140,"context_line":"NET_URL\u003d\"$HOST/horizon/project/networks/\""},{"line_number":141,"context_line":"REFERER\u003d\"$HOST/horizon/identity/\""},{"line_number":142,"context_line":"DATA\u003d\"login_region\u003d\u0027http://controller:5000/v3\u0027\u0026login_domain\u003ddefault\u0026\\"},{"line_number":143,"context_line":"csrfmiddlewaretoken\u003d$TOKEN\u0026sessionid\u003d$SESSIONID\""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"# Step 3: Load the page with the networks"},{"line_number":146,"context_line":"echo \"Loading the networks tab and parsing the network ID for provider.\""}],"source_content_type":"text/x-sh","patch_set":5,"id":"bacf61ea_36ca3650","line":143,"updated":"2016-08-03 18:00:58.000000000","message":"Now I _think_ you can ignore shellcheck here, but I\u0027d have to check.","commit_id":"9ac78ecf158805da96641a9ddf8cc20886b7106e"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"e445310c8b66d4ed5c8a315d6c0905a701669c7a","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"## Launching an instance"},{"line_number":176,"context_line":"#TOKEN\u003d`cat $COOKIE_FILE | grep csrftoken | sed \u0027s/^.*csrftoken\\s*//\u0027`"},{"line_number":177,"context_line":"#"},{"line_number":178,"context_line":"#LAUNCH_URL\u003d\"$HOST/horizon/project/instances/\""}],"source_content_type":"text/x-sh","patch_set":5,"id":"bacf61ea_1621f2fc","line":175,"updated":"2016-08-03 18:00:58.000000000","message":"Either fix or remove this line and the rest below before we merge it. This belongs into your private tree :). Fortunately, this script is already all we really need to test horizon.","commit_id":"9ac78ecf158805da96641a9ddf8cc20886b7106e"},{"author":{"_account_id":11109,"name":"Roger Luethi","email":"rl@patchworkscience.org","username":"rluethi"},"change_message_id":"2a61f20542d476b25b3b701cba83785223f7649c","unresolved":false,"context_lines":[{"line_number":117,"context_line":"DATA\u003d\"username\u003d$USER\u0026password\u003d$PASSWORD\u0026domain\u003d$DOMAIN\u0026csrfmiddlewaretoken\u003d$TOKEN\""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"# Step 2: check the login credentials and obtains the session ID"},{"line_number":120,"context_line":"echo \"Authenticaing with the $USER credentials.\""},{"line_number":121,"context_line":"request_cmd \"$AUTH_URL\" $OUTPUT_FILE2 \"$DATA\""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""}],"source_content_type":"text/x-sh","patch_set":6,"id":"bacf61ea_6a7ac989","line":120,"updated":"2016-08-04 17:02:33.000000000","message":"s/Authenticaing/Authenticating/","commit_id":"9a36ac238a64ea89715f82b4440f945245a3b4e1"}]}
