)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"78e50f44d56498078eda40c4fe27b55614447f98","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"6b624c4b_2ed79019","updated":"2021-12-30 07:34:46.000000000","message":"Not sure if this is still relevant. Was there ever any consistent testing as to how much impact this might have?","commit_id":"d291c00d8d0a5f54799322ea21b8c178b65128cf"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"9aaa7e7631cafe06a2dfa87ac8c164c73d49ad55","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"40a958a2_55e89621","in_reply_to":"6b624c4b_2ed79019","updated":"2022-01-12 19:20:59.000000000","message":"I think where we ended up with OSC is the best way to speed it up was to remove it and use dedicated scripts with the sdk instead. THe reason for this is dedicated scripts can issue a single token and use that for many many API requests rather than needing a new one per openstack client command. Additionally you reduce the python startup overhead from pkg_resources since there are fewer python invocations.\n\nThis can be abandoned.","commit_id":"d291c00d8d0a5f54799322ea21b8c178b65128cf"}],"functions-common":[{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"bda1414dda9818dece6844583ac2f118aab07dab","unresolved":false,"context_lines":[{"line_number":882,"context_line":"    user_role_id\u003d$(openstack role assignment list \\"},{"line_number":883,"context_line":"        --user $2 \\"},{"line_number":884,"context_line":"        --project $3 \\"},{"line_number":885,"context_line":"        -f csv \\"},{"line_number":886,"context_line":"        $domain_args \\"},{"line_number":887,"context_line":"        | grep \" $1 \" | get_field_csv 1)"},{"line_number":888,"context_line":"    if [[ -z \"$user_role_id\" ]]; then"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"bf091321_61090cdc","line":885,"updated":"2017-06-07 21:43:09.000000000","message":"I would consider using \u0027-f shell -c id\u0027 in these commands, it is more explicit and probably a better example of self-documenting scripting OSC to specify the fields you want rather than an index into the returned fields.\n\nI wouldn\u0027t hold this up for that though...","commit_id":"5af063b66753604ea49f678bce972c86c963bc3d"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"1ecbab06e990d0a34c3d0da7bf6e5f8490f9d73d","unresolved":false,"context_lines":[{"line_number":696,"context_line":"# Reverse syntax is supported: -1 is the last field, -2 is second to last, etc."},{"line_number":697,"context_line":"# get_field field-number"},{"line_number":698,"context_line":"function get_field {"},{"line_number":699,"context_line":"    local data field"},{"line_number":700,"context_line":"    if [ \"$1\" -lt 0 ]; then"},{"line_number":701,"context_line":"        field\u003d\"(\\$(NF$1))\""},{"line_number":702,"context_line":"    else"}],"source_content_type":"application/x-shellscript","patch_set":9,"id":"7f231b9d_bb9ee8b5","line":699,"updated":"2017-06-13 06:07:27.000000000","message":"we have unit tests for this sort of thing in ./tests ... though I don\u0027t think this explicitly ... but some testing would be welcome","commit_id":"5fada3628f26a91476fd8653d8a6d3be3cf5fde3"}],"lib/neutron_plugins/services/l3":[{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"bda1414dda9818dece6844583ac2f118aab07dab","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    if is_networking_extension_supported \"auto-allocated-topology\"; then"},{"line_number":170,"context_line":"        if [[ \"$USE_SUBNETPOOL\" \u003d\u003d \"True\" ]]; then"},{"line_number":171,"context_line":"            if [[ \"$IP_VERSION\" \u003d~ 4.* ]]; then"},{"line_number":172,"context_line":"                SUBNETPOOL_V4_ID\u003d$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" subnet pool create -f csv $SUBNETPOOL_NAME --default-prefix-length $SUBNETPOOL_SIZE_V4 --pool-prefix $SUBNETPOOL_PREFIX_V4 --share --default | grep \u0027 id \u0027 | get_field_csv 2)"},{"line_number":173,"context_line":"            fi"},{"line_number":174,"context_line":"            if [[ \"$IP_VERSION\" \u003d~ .*6 ]]; then"},{"line_number":175,"context_line":"                SUBNETPOOL_V6_ID\u003d$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" subnet pool create -f csv $SUBNETPOOL_NAME --default-prefix-length $SUBNETPOOL_SIZE_V6 --pool-prefix $SUBNETPOOL_PREFIX_V6 --share --default | grep \u0027 id \u0027 | get_field_csv 2)"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"bf091321_a19a846b","line":172,"updated":"2017-06-07 21:43:09.000000000","message":"\u0027-f value -c id\u0027 gets rid of the grep and get_field* commands\n\nbelow too","commit_id":"5af063b66753604ea49f678bce972c86c963bc3d"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"bda1414dda9818dece6844583ac2f118aab07dab","unresolved":false,"context_lines":[{"line_number":364,"context_line":"                sudo ip addr add $ext_gw_ip/$cidr_len dev $ext_gw_interface"},{"line_number":365,"context_line":"                sudo ip link set $ext_gw_interface up"},{"line_number":366,"context_line":"            fi"},{"line_number":367,"context_line":"            # TODO(clarkb) make this not use slow default table output"},{"line_number":368,"context_line":"            ROUTER_GW_IP\u003d$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" port list -c \u0027Fixed IP Addresses\u0027 --device-owner network:router_gateway | awk -F\u0027ip_address\u0027  \u0027{ print $2 }\u0027 | cut -f2 -d\\\u0027 | tr \u0027\\n\u0027 \u0027 \u0027)"},{"line_number":369,"context_line":"            die_if_not_set $LINENO ROUTER_GW_IP \"Failure retrieving ROUTER_GW_IP\""},{"line_number":370,"context_line":"        fi"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"bf091321_61990c1e","line":367,"updated":"2017-06-07 21:43:09.000000000","message":"Try this:\n... -f value -c \"Fixed IP Addresses | cut -f2 -d\\\u0027 | ...\n\nie, adding \u0027-f value\u0027 makes the awk redundant","commit_id":"5af063b66753604ea49f678bce972c86c963bc3d"}],"lib/nova":[{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"bda1414dda9818dece6844583ac2f118aab07dab","unresolved":false,"context_lines":[{"line_number":948,"context_line":"            openstack --os-region-name\u003d\"$REGION_NAME\" flavor create -f value --id d1 --ram 512 --disk 5 --vcpus 1 ds512M"},{"line_number":949,"context_line":"            openstack --os-region-name\u003d\"$REGION_NAME\" flavor create -f value --id d2 --ram 1024 --disk 10 --vcpus 1 ds1G"},{"line_number":950,"context_line":"            openstack --os-region-name\u003d\"$REGION_NAME\" flavor create -f value --id d3 --ram 2048 --disk 10 --vcpus 2 ds2G"},{"line_number":951,"context_line":"            openstack --os-region-name\u003d\"$REGION_NAME\" flavor create -f value --id d4 --ram 4096 --disk 20 --vcpus 4 ds4G"},{"line_number":952,"context_line":"        fi"},{"line_number":953,"context_line":""},{"line_number":954,"context_line":"        if ! openstack --os-region-name\u003d\"$REGION_NAME\" flavor list -f value | grep -q m1.tiny; then"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"bf091321_2c266bb9","line":951,"updated":"2017-06-07 21:43:09.000000000","message":"So here\u0027s an opportunity for some _real_ speedups:\n\n  openstack --os-region-name\u003d\"$REGION_NAME\" \u003c\u003cEOF\n    flavor create -f value --id c1 --ram 256 --disk 0 --vcpus 1 cirros256\n    flavor create -f value --id d1 --ram 512 --disk 5 --vcpus 1 ds512M\n    flavor create -f value --id d2 --ram 1024 --disk 10 --vcpus 1 ds1G\n    flavor create -f value --id d3 --ram 2048 --disk 10 --vcpus 2 ds2G\n    flavor create -f value --id d4 --ram 4096 --disk 20 --vcpus 4 ds4G\n  EOF","commit_id":"5af063b66753604ea49f678bce972c86c963bc3d"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"bda1414dda9818dece6844583ac2f118aab07dab","unresolved":false,"context_lines":[{"line_number":956,"context_line":"            openstack --os-region-name\u003d\"$REGION_NAME\" flavor create -f value --id 2 --ram 2048 --disk 20 --vcpus 1 m1.small"},{"line_number":957,"context_line":"            openstack --os-region-name\u003d\"$REGION_NAME\" flavor create -f value --id 3 --ram 4096 --disk 40 --vcpus 2 m1.medium"},{"line_number":958,"context_line":"            openstack --os-region-name\u003d\"$REGION_NAME\" flavor create -f value --id 4 --ram 8192 --disk 80 --vcpus 4 m1.large"},{"line_number":959,"context_line":"            openstack --os-region-name\u003d\"$REGION_NAME\" flavor create -f value --id 5 --ram 16384 --disk 160 --vcpus 8 m1.xlarge"},{"line_number":960,"context_line":"        fi"},{"line_number":961,"context_line":"    fi"},{"line_number":962,"context_line":"}"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"bf091321_0c3ba7d1","line":959,"updated":"2017-06-07 21:43:09.000000000","message":"ditto above","commit_id":"5af063b66753604ea49f678bce972c86c963bc3d"}],"lib/tempest":[{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"bda1414dda9818dece6844583ac2f118aab07dab","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            fi"},{"line_number":148,"context_line":"            images+\u003d($IMAGE_UUID)"},{"line_number":149,"context_line":"        done \u003c \u003c(openstack image list --property status\u003dactive | awk -F\u0027|\u0027 \u0027!/^(+--)|ID|aki|ari/ { print $3,$2 }\u0027)"},{"line_number":150,"context_line":"        # TODO(clarkb) make above openstack command use -f csv"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        case \"${#images[*]}\" in"},{"line_number":153,"context_line":"            0)"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"bf091321_2cf78bf8","line":150,"updated":"2017-06-07 21:43:09.000000000","message":"image list --property status\u003dactive -f value -c Name -c ID\n\n(only tested in my master devstack with no aki/ari images)","commit_id":"5af063b66753604ea49f678bce972c86c963bc3d"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"bda1414dda9818dece6844583ac2f118aab07dab","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    local alt_username\u003d${ALT_USERNAME:-alt_demo}"},{"line_number":184,"context_line":"    local alt_project_name\u003d${ALT_TENANT_NAME:-alt_demo}"},{"line_number":185,"context_line":"    local admin_project_id"},{"line_number":186,"context_line":"    # TODO(clarkb) make openstack command use -f csv"},{"line_number":187,"context_line":"    admin_project_id\u003d$(openstack project list | awk \"/ admin / { print \\$2 }\")"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    if is_service_enabled nova; then"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"bf091321_8c9a17c3","line":186,"updated":"2017-06-07 21:43:09.000000000","message":"project show admin -f value -c id","commit_id":"5af063b66753604ea49f678bce972c86c963bc3d"}],"tools/create_userrc.sh":[{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"bda1414dda9818dece6844583ac2f118aab07dab","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"# Provides empty string when the user does not exists"},{"line_number":235,"context_line":"function get_user_id {"},{"line_number":236,"context_line":"    openstack user list | grep \" $1 \" | cut -d \" \" -f2"},{"line_number":237,"context_line":"}"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"if [ $MODE !\u003d \"create\" ]; then"}],"source_content_type":"text/x-sh","patch_set":1,"id":"bf091321_ac503bd6","side":"PARENT","line":236,"updated":"2017-06-07 21:43:09.000000000","message":"Does this not work?\n\n  user show $1 -f value -c id","commit_id":"986da6428df9f1b7514f423386d6fe8326588350"}]}
