)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"62dbbb96ac6286f885834a562f33da7809565ec8","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Rewrite devstack/tools/ironic/scripts/create-node.sh in Python."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This script is used for making libvirt guest domains during Devstack"},{"line_number":10,"context_line":"deployment. Replaced create-node.sh with create-node.py."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I2ee2fc8ac32f8de50768f5d7725265b16fff11da"},{"line_number":13,"context_line":"Closes-Bug: 1596726"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3a98d1f4_739c900f","line":10,"updated":"2016-09-30 16:51:10.000000000","message":"Can a comment about why pyroute2 and ryu were added be in here to?","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"22ae69c06c1aa46f947aeab8b8f2b67a56049302","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Rewrite devstack/tools/ironic/scripts/create-node.sh in Python."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This script is used for making libvirt guest domains during Devstack"},{"line_number":10,"context_line":"deployment. Replaced create-node.sh with create-node.py."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I2ee2fc8ac32f8de50768f5d7725265b16fff11da"},{"line_number":13,"context_line":"Closes-Bug: 1596726"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3a98d1f4_de0c883d","line":10,"in_reply_to":"3a98d1f4_739c900f","updated":"2016-09-30 17:54:22.000000000","message":"Done. Added short description of all specialized modules uses, since it seems kind of arbitrary to just include pyroute2 and ryu and not the others.","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"}],"devstack/lib/ironic":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6cb46a0d4a3a04c5f80b013e86b5d8492f5af917","unresolved":false,"context_lines":[{"line_number":912,"context_line":"    local vbmc_port\u003d$IRONIC_VBMC_PORT_RANGE_START"},{"line_number":913,"context_line":"    local vm_name"},{"line_number":914,"context_line":"    for vm_name in $(_ironic_bm_vm_names); do"},{"line_number":915,"context_line":"        sudo -E su $STACK_USER -c \"sudo $IRONIC_SCRIPTS_DIR/create-node.py -n $vm_name \\"},{"line_number":916,"context_line":"            -c $IRONIC_VM_SPECS_CPU -m $IRONIC_VM_SPECS_RAM -d $IRONIC_VM_SPECS_DISK \\"},{"line_number":917,"context_line":"            -a $IRONIC_VM_SPECS_CPU_ARCH -b $IRONIC_VM_NETWORK_BRIDGE -e $IRONIC_VM_EMULATOR \\"},{"line_number":918,"context_line":"            -p $vbmc_port -f $IRONIC_VM_SPECS_DISK_FORMAT $log_arg\" \u003e\u003e $IRONIC_VM_MACS_CSV_FILE"}],"source_content_type":"application/x-shellscript","patch_set":11,"id":"3ac371cc_f6f2936e","line":915,"updated":"2016-08-15 10:19:54.000000000","message":"I don\u0027t think we need double sudo... I think you can leave only the 2nd one (also, why this change?)","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"6b1b86251ce123e463b6e5bec99a944b53b44cc2","unresolved":false,"context_lines":[{"line_number":912,"context_line":"    local vbmc_port\u003d$IRONIC_VBMC_PORT_RANGE_START"},{"line_number":913,"context_line":"    local vm_name"},{"line_number":914,"context_line":"    for vm_name in $(_ironic_bm_vm_names); do"},{"line_number":915,"context_line":"        sudo -E su $STACK_USER -c \"sudo $IRONIC_SCRIPTS_DIR/create-node.py -n $vm_name \\"},{"line_number":916,"context_line":"            -c $IRONIC_VM_SPECS_CPU -m $IRONIC_VM_SPECS_RAM -d $IRONIC_VM_SPECS_DISK \\"},{"line_number":917,"context_line":"            -a $IRONIC_VM_SPECS_CPU_ARCH -b $IRONIC_VM_NETWORK_BRIDGE -e $IRONIC_VM_EMULATOR \\"},{"line_number":918,"context_line":"            -p $vbmc_port -f $IRONIC_VM_SPECS_DISK_FORMAT $log_arg\" \u003e\u003e $IRONIC_VM_MACS_CSV_FILE"}],"source_content_type":"application/x-shellscript","patch_set":11,"id":"3ac371cc_5d1e1164","line":915,"in_reply_to":"3ac371cc_f6f2936e","updated":"2016-08-15 19:25:59.000000000","message":"Done","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6cb46a0d4a3a04c5f80b013e86b5d8492f5af917","unresolved":false,"context_lines":[{"line_number":1402,"context_line":""},{"line_number":1403,"context_line":"    local vm_name"},{"line_number":1404,"context_line":"    for vm_name in $(_ironic_bm_vm_names); do"},{"line_number":1405,"context_line":"        sudo su $STACK_USER -c \"sudo $IRONIC_SCRIPTS_DIR/cleanup-node.sh $vm_name\""},{"line_number":1406,"context_line":"        # Cleanup node bridge/interfaces"},{"line_number":1407,"context_line":"        sudo ip link set ovs-$vm_name down"},{"line_number":1408,"context_line":"        sudo ip link set br-$vm_name down"}],"source_content_type":"application/x-shellscript","patch_set":11,"id":"3ac371cc_56e8c77c","line":1405,"updated":"2016-08-15 10:19:54.000000000","message":"ditto","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"6b1b86251ce123e463b6e5bec99a944b53b44cc2","unresolved":false,"context_lines":[{"line_number":1402,"context_line":""},{"line_number":1403,"context_line":"    local vm_name"},{"line_number":1404,"context_line":"    for vm_name in $(_ironic_bm_vm_names); do"},{"line_number":1405,"context_line":"        sudo su $STACK_USER -c \"sudo $IRONIC_SCRIPTS_DIR/cleanup-node.sh $vm_name\""},{"line_number":1406,"context_line":"        # Cleanup node bridge/interfaces"},{"line_number":1407,"context_line":"        sudo ip link set ovs-$vm_name down"},{"line_number":1408,"context_line":"        sudo ip link set br-$vm_name down"}],"source_content_type":"application/x-shellscript","patch_set":11,"id":"3ac371cc_3d1b5574","line":1405,"in_reply_to":"3ac371cc_56e8c77c","updated":"2016-08-15 19:25:59.000000000","message":"Done","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"3b206e202657750ae30046c4caeee1bcbe73fd87","unresolved":false,"context_lines":[{"line_number":1474,"context_line":""},{"line_number":1475,"context_line":"    local vm_name"},{"line_number":1476,"context_line":"    for vm_name in $(_ironic_bm_vm_names); do"},{"line_number":1477,"context_line":"        sudo su $STACK_USER -c \"$IRONIC_SCRIPTS_DIR/cleanup-node.sh $vm_name\""},{"line_number":1478,"context_line":"        # Cleanup node bridge/interfaces"},{"line_number":1479,"context_line":"        sudo ip link set ovs-$vm_name down"},{"line_number":1480,"context_line":"        sudo ip link set br-$vm_name down"}],"source_content_type":"application/x-shellscript","patch_set":20,"id":"fa6399be_1984675c","side":"PARENT","line":1477,"range":{"start_line":1477,"start_character":13,"end_line":1477,"end_character":30},"updated":"2016-10-13 10:38:16.000000000","message":"I have concerns that we are moving from running the ironic virtual machines as the stack user, to running the virtual machines as root. This patch now runs every part of the node creation via the root user, instead of mostly as the stack user and only doing the ovs/bridge manipulation via sudo.","commit_id":"338e4544f86e2d2e5995eb56fcaafb21ec86a04d"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"f820c51c933f6df037d093ac9ea123e91bcf3f63","unresolved":false,"context_lines":[{"line_number":1474,"context_line":""},{"line_number":1475,"context_line":"    local vm_name"},{"line_number":1476,"context_line":"    for vm_name in $(_ironic_bm_vm_names); do"},{"line_number":1477,"context_line":"        sudo su $STACK_USER -c \"$IRONIC_SCRIPTS_DIR/cleanup-node.sh $vm_name\""},{"line_number":1478,"context_line":"        # Cleanup node bridge/interfaces"},{"line_number":1479,"context_line":"        sudo ip link set ovs-$vm_name down"},{"line_number":1480,"context_line":"        sudo ip link set br-$vm_name down"}],"source_content_type":"application/x-shellscript","patch_set":20,"id":"fa6399be_41edf6ed","side":"PARENT","line":1477,"range":{"start_line":1477,"start_character":13,"end_line":1477,"end_character":30},"in_reply_to":"fa6399be_1984675c","updated":"2016-10-13 14:51:42.000000000","message":"The only way to fix this is to break the parts requiring sudo out of create-node.py and run them in a subprocess() call with sudo. That would be rather ugly.\n\nWhat kind of problems do you think having the VMs as root will cause down the line?","commit_id":"338e4544f86e2d2e5995eb56fcaafb21ec86a04d"}],"devstack/tools/ironic/scripts/create-node.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"205eadc3bcc1cf339b8d265d9ce86850f1de25a2","unresolved":false,"context_lines":[{"line_number":63,"context_line":"args \u003d parser.parse_args()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"# Store command-line arguments in vars"},{"line_number":66,"context_line":"dom_name \u003d args.n"},{"line_number":67,"context_line":"cpus \u003d str(args.c)"},{"line_number":68,"context_line":"mem \u003d str(args.m * 1024)"},{"line_number":69,"context_line":"# Append extra gig to disk size to allow fuzz for partition table"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_f792674a","line":66,"updated":"2016-07-28 16:22:16.000000000","message":"Let\u0027s do all this stuff in main(), so that it is not executed on import of this module, like in configure-vm.","commit_id":"0733210f8454494ccd5100c93885aa45fe3a0ed8"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"ed95ee4e9629fb4d25e1d7483576235edafc94e1","unresolved":false,"context_lines":[{"line_number":63,"context_line":"args \u003d parser.parse_args()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"# Store command-line arguments in vars"},{"line_number":66,"context_line":"dom_name \u003d args.n"},{"line_number":67,"context_line":"cpus \u003d str(args.c)"},{"line_number":68,"context_line":"mem \u003d str(args.m * 1024)"},{"line_number":69,"context_line":"# Append extra gig to disk size to allow fuzz for partition table"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_3b0793cb","line":66,"in_reply_to":"bacf61ea_f792674a","updated":"2016-07-29 15:38:44.000000000","message":"Done","commit_id":"0733210f8454494ccd5100c93885aa45fe3a0ed8"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"5d36d2a38cad65013134d2a906fc2eb792883788","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"# Use environment defined or defaults for storage pool name and NIC driver"},{"line_number":89,"context_line":"pool_name \u003d get_env(\u0027LIBVIRT_STORAGE_pool\u0027, \u0027default\u0027)"},{"line_number":90,"context_line":"nic_driver \u003d get_env(\u0027LIBVIRT_NIC_DRIVER\u0027, \u0027virtio\u0027)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"# Make sure target directory exists"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_ca8ca681","line":89,"updated":"2016-07-29 15:13:28.000000000","message":"Typo: \"_POOL\"","commit_id":"0733210f8454494ccd5100c93885aa45fe3a0ed8"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"ed95ee4e9629fb4d25e1d7483576235edafc94e1","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"# Use environment defined or defaults for storage pool name and NIC driver"},{"line_number":89,"context_line":"pool_name \u003d get_env(\u0027LIBVIRT_STORAGE_pool\u0027, \u0027default\u0027)"},{"line_number":90,"context_line":"nic_driver \u003d get_env(\u0027LIBVIRT_NIC_DRIVER\u0027, \u0027virtio\u0027)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"# Make sure target directory exists"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_fb6a1b80","line":89,"in_reply_to":"bacf61ea_ca8ca681","updated":"2016-07-29 15:38:44.000000000","message":"Done","commit_id":"0733210f8454494ccd5100c93885aa45fe3a0ed8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"205eadc3bcc1cf339b8d265d9ce86850f1de25a2","unresolved":false,"context_lines":[{"line_number":92,"context_line":"# Make sure target directory exists"},{"line_number":93,"context_line":"tar_dir \u003d \"/var/lib/libvirt/images\""},{"line_number":94,"context_line":"if os.path.exists(tar_dir) is False:"},{"line_number":95,"context_line":"    if sp.call([\"sudo\", \"mkdir\", tar_dir]) !\u003d 0:"},{"line_number":96,"context_line":"        err_exit(\"unable to create target directory: \" + tar_dir)"},{"line_number":97,"context_line":"elif os.path.isdir(tar_dir) is False:"},{"line_number":98,"context_line":"    err_exit(\"target directory (\" + tar_dir + \") exists as a regular file\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_0506e8cd","line":95,"updated":"2016-07-28 16:22:16.000000000","message":"As we\u0027re in python now, why not just use os.mkdir? This whole script can be run under sudo.","commit_id":"0733210f8454494ccd5100c93885aa45fe3a0ed8"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"ed95ee4e9629fb4d25e1d7483576235edafc94e1","unresolved":false,"context_lines":[{"line_number":92,"context_line":"# Make sure target directory exists"},{"line_number":93,"context_line":"tar_dir \u003d \"/var/lib/libvirt/images\""},{"line_number":94,"context_line":"if os.path.exists(tar_dir) is False:"},{"line_number":95,"context_line":"    if sp.call([\"sudo\", \"mkdir\", tar_dir]) !\u003d 0:"},{"line_number":96,"context_line":"        err_exit(\"unable to create target directory: \" + tar_dir)"},{"line_number":97,"context_line":"elif os.path.isdir(tar_dir) is False:"},{"line_number":98,"context_line":"    err_exit(\"target directory (\" + tar_dir + \") exists as a regular file\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_db6757b5","line":95,"in_reply_to":"bacf61ea_0506e8cd","updated":"2016-07-29 15:38:44.000000000","message":"Done","commit_id":"0733210f8454494ccd5100c93885aa45fe3a0ed8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"205eadc3bcc1cf339b8d265d9ce86850f1de25a2","unresolved":false,"context_lines":[{"line_number":145,"context_line":"with open(os.devnull, \"w\") as devnull:"},{"line_number":146,"context_line":"    sp.call([\"sudo\", \"brctl\", \"addbr\", \"br-\" + dom_name], stderr\u003ddevnull)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"if 0 !\u003d sp.call([\"sudo\", \"ip\", \"link\", \"set\", \"br-\" + dom_name, \"up\"]):"},{"line_number":149,"context_line":"    err_exit(\"unable to set link state to UP: br-\" + dom_name)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"if 0 !\u003d sp.call([\"sudo\", \"ovs-vsctl\", \"--may-exist\", \"add-br\", bridge]):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_e51bd47e","line":148,"updated":"2016-07-28 16:22:16.000000000","message":"pyroute2 and ovs libraries are in global requirements, so maybe lets use them too?","commit_id":"0733210f8454494ccd5100c93885aa45fe3a0ed8"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"5d36d2a38cad65013134d2a906fc2eb792883788","unresolved":false,"context_lines":[{"line_number":145,"context_line":"with open(os.devnull, \"w\") as devnull:"},{"line_number":146,"context_line":"    sp.call([\"sudo\", \"brctl\", \"addbr\", \"br-\" + dom_name], stderr\u003ddevnull)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"if 0 !\u003d sp.call([\"sudo\", \"ip\", \"link\", \"set\", \"br-\" + dom_name, \"up\"]):"},{"line_number":149,"context_line":"    err_exit(\"unable to set link state to UP: br-\" + dom_name)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"if 0 !\u003d sp.call([\"sudo\", \"ovs-vsctl\", \"--may-exist\", \"add-br\", bridge]):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_6a5bfa87","line":148,"in_reply_to":"bacf61ea_0f742d66","updated":"2016-07-29 15:13:28.000000000","message":"Could you use Ryu? http://specs.openstack.org/openstack/neutron-specs/specs/kilo/ovs-ofctl-to-python.html#ryu-ofproto","commit_id":"0733210f8454494ccd5100c93885aa45fe3a0ed8"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"ed95ee4e9629fb4d25e1d7483576235edafc94e1","unresolved":false,"context_lines":[{"line_number":145,"context_line":"with open(os.devnull, \"w\") as devnull:"},{"line_number":146,"context_line":"    sp.call([\"sudo\", \"brctl\", \"addbr\", \"br-\" + dom_name], stderr\u003ddevnull)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"if 0 !\u003d sp.call([\"sudo\", \"ip\", \"link\", \"set\", \"br-\" + dom_name, \"up\"]):"},{"line_number":149,"context_line":"    err_exit(\"unable to set link state to UP: br-\" + dom_name)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"if 0 !\u003d sp.call([\"sudo\", \"ovs-vsctl\", \"--may-exist\", \"add-br\", bridge]):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_bb226350","line":148,"in_reply_to":"bacf61ea_6a5bfa87","updated":"2016-07-29 15:38:44.000000000","message":"Thanks!. Will take a look at using Ryu.","commit_id":"0733210f8454494ccd5100c93885aa45fe3a0ed8"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"34f6ade57d64614d9cc159f9d4ac25d611706962","unresolved":false,"context_lines":[{"line_number":145,"context_line":"with open(os.devnull, \"w\") as devnull:"},{"line_number":146,"context_line":"    sp.call([\"sudo\", \"brctl\", \"addbr\", \"br-\" + dom_name], stderr\u003ddevnull)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"if 0 !\u003d sp.call([\"sudo\", \"ip\", \"link\", \"set\", \"br-\" + dom_name, \"up\"]):"},{"line_number":149,"context_line":"    err_exit(\"unable to set link state to UP: br-\" + dom_name)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"if 0 !\u003d sp.call([\"sudo\", \"ovs-vsctl\", \"--may-exist\", \"add-br\", bridge]):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_0f742d66","line":148,"in_reply_to":"bacf61ea_e51bd47e","updated":"2016-07-29 02:42:00.000000000","message":"I was able to use Pyroute2 for \"ip\" calls. But I couldn\u0027t find a library providing a high level API for OVS. Neutron Agent implemented a wrapper around the low-level ovs lib that talks directly to the database, essentially implementing ovs-vsctl in Python. It seems overkill to have to do all that for just these two calls.","commit_id":"0733210f8454494ccd5100c93885aa45fe3a0ed8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"9f706b041f939855d9761eab7bd27f4ff9cf8f99","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from xml.dom import minidom"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def getEnvVar(var_name, def_value):"},{"line_number":29,"context_line":"    \"\"\"Fetch OS env var by name defaulting to backup value if not defined.\"\"\""},{"line_number":30,"context_line":"    if var_name in os.environ:"},{"line_number":31,"context_line":"        return os.environ[var_name]"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_283b403a","line":28,"updated":"2016-08-02 14:46:16.000000000","message":"python naming convention for functions in openstack is get_env_var, ditto for all others.","commit_id":"9e5a4c3e78afa913f92e32ffec252b09d72ea158"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"9f706b041f939855d9761eab7bd27f4ff9cf8f99","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        description\u003d\u0027Creates baremetal poseur\u0027 +"},{"line_number":46,"context_line":"                    \u0027nodes for ironic testing purposes.\u0027)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    parser.add_argument(\u0027-n\u0027, required\u003dTrue, metavar\u003d\u0027\u003cname\u003e\u0027,"},{"line_number":49,"context_line":"                        help\u003d\u0027domain name\u0027)"},{"line_number":50,"context_line":"    parser.add_argument(\u0027-c\u0027, required\u003dTrue, metavar\u003d\u0027\u003ccpus\u003e\u0027, type\u003dint,"},{"line_number":51,"context_line":"                        help\u003d\u0027number of CPUs\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_08af5c7e","line":48,"updated":"2016-08-02 14:46:16.000000000","message":"Please add a destination to write these (I think it\u0027s dest\u003d in argparse?) so that the names are more meaningful than parser.n/c/m/d... :)","commit_id":"9e5a4c3e78afa913f92e32ffec252b09d72ea158"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"28338c4118684092dcbbb0eba3a07f5d5c4dfe2b","unresolved":false,"context_lines":[{"line_number":19,"context_line":"import libvirt"},{"line_number":20,"context_line":"import netifaces"},{"line_number":21,"context_line":"import os.path"},{"line_number":22,"context_line":"from pyroute2 import IPRoute"},{"line_number":23,"context_line":"import ryu.lib.ovs.vsctl as ovs_vsctl"},{"line_number":24,"context_line":"import subprocess as sp"},{"line_number":25,"context_line":"from xml.dom import minidom"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_6ab4f7d0","line":22,"updated":"2016-08-02 22:34:32.000000000","message":"Please fix the ordering here to follow:\n\n http://docs.openstack.org/developer/hacking/#import-order-template\n\npyroute2 is not a built-in Python library so should be after this section.\n\nAs should the ryu.lib.ovs.vsctl","commit_id":"f25a381f4aba7d9fe78cd26cb1020bb004b353fe"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"2bc5478c3b1eb3e81a4ca44cc4c0c4492b9e5db8","unresolved":false,"context_lines":[{"line_number":19,"context_line":"import libvirt"},{"line_number":20,"context_line":"import netifaces"},{"line_number":21,"context_line":"import os.path"},{"line_number":22,"context_line":"from pyroute2 import IPRoute"},{"line_number":23,"context_line":"import ryu.lib.ovs.vsctl as ovs_vsctl"},{"line_number":24,"context_line":"import subprocess as sp"},{"line_number":25,"context_line":"from xml.dom import minidom"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_2dcb3920","line":22,"in_reply_to":"bacf61ea_6ab4f7d0","updated":"2016-08-02 23:17:57.000000000","message":"Done","commit_id":"f25a381f4aba7d9fe78cd26cb1020bb004b353fe"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"28338c4118684092dcbbb0eba3a07f5d5c4dfe2b","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import os.path"},{"line_number":22,"context_line":"from pyroute2 import IPRoute"},{"line_number":23,"context_line":"import ryu.lib.ovs.vsctl as ovs_vsctl"},{"line_number":24,"context_line":"import subprocess as sp"},{"line_number":25,"context_line":"from xml.dom import minidom"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_aa78af2c","line":24,"updated":"2016-08-02 22:34:32.000000000","message":"Not a fan of this. I\u0027d prefer just to do:\n\n import subprocess\n\nThere only appear to be about six instances.","commit_id":"f25a381f4aba7d9fe78cd26cb1020bb004b353fe"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"2bc5478c3b1eb3e81a4ca44cc4c0c4492b9e5db8","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import os.path"},{"line_number":22,"context_line":"from pyroute2 import IPRoute"},{"line_number":23,"context_line":"import ryu.lib.ovs.vsctl as ovs_vsctl"},{"line_number":24,"context_line":"import subprocess as sp"},{"line_number":25,"context_line":"from xml.dom import minidom"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_6dd531b8","line":24,"in_reply_to":"bacf61ea_aa78af2c","updated":"2016-08-02 23:17:57.000000000","message":"Done","commit_id":"f25a381f4aba7d9fe78cd26cb1020bb004b353fe"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"28338c4118684092dcbbb0eba3a07f5d5c4dfe2b","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def get_env_var(var_name, default_value):"},{"line_number":29,"context_line":"    \"\"\"Fetch OS env var by name defaulting to backup value if not defined.\"\"\""},{"line_number":30,"context_line":"    if var_name in os.environ:"},{"line_number":31,"context_line":"        return os.environ[var_name]"},{"line_number":32,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_8ae68be6","line":29,"updated":"2016-08-02 22:34:32.000000000","message":"This seems like it could just be:\n\n return os.environ.get(var_name, default_value)\n\nWhich also seems like it isn\u0027t deserving of a function.","commit_id":"f25a381f4aba7d9fe78cd26cb1020bb004b353fe"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"2bc5478c3b1eb3e81a4ca44cc4c0c4492b9e5db8","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def get_env_var(var_name, default_value):"},{"line_number":29,"context_line":"    \"\"\"Fetch OS env var by name defaulting to backup value if not defined.\"\"\""},{"line_number":30,"context_line":"    if var_name in os.environ:"},{"line_number":31,"context_line":"        return os.environ[var_name]"},{"line_number":32,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_cdda5de9","line":29,"in_reply_to":"bacf61ea_8ae68be6","updated":"2016-08-02 23:17:57.000000000","message":"Done","commit_id":"f25a381f4aba7d9fe78cd26cb1020bb004b353fe"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"28338c4118684092dcbbb0eba3a07f5d5c4dfe2b","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        return default_value"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def err_exit(msg, code\u003d1):"},{"line_number":37,"context_line":"    \"\"\"Output error message and exit program with specified code.\"\"\""},{"line_number":38,"context_line":"    print(\"Error: \" + msg)"},{"line_number":39,"context_line":"    exit(code)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_caf7e38a","line":36,"updated":"2016-08-02 22:34:32.000000000","message":"I don\u0027t think this function is needed.\n\nJust do:\n\n sys.exit(\"Some message\")\n\nAlso I think sys.exit() is preferred over exit()","commit_id":"f25a381f4aba7d9fe78cd26cb1020bb004b353fe"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"2bc5478c3b1eb3e81a4ca44cc4c0c4492b9e5db8","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        return default_value"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def err_exit(msg, code\u003d1):"},{"line_number":37,"context_line":"    \"\"\"Output error message and exit program with specified code.\"\"\""},{"line_number":38,"context_line":"    print(\"Error: \" + msg)"},{"line_number":39,"context_line":"    exit(code)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_add729be","line":36,"in_reply_to":"bacf61ea_caf7e38a","updated":"2016-08-02 23:17:57.000000000","message":"Done","commit_id":"f25a381f4aba7d9fe78cd26cb1020bb004b353fe"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"28338c4118684092dcbbb0eba3a07f5d5c4dfe2b","unresolved":false,"context_lines":[{"line_number":72,"context_line":"def make_log_dir(log_dir):"},{"line_number":73,"context_line":"    \"\"\"Create log directory if -l argument supplied.\"\"\""},{"line_number":74,"context_line":"    if log_dir:"},{"line_number":75,"context_line":"        if os.path.exists(log_dir) is False:"},{"line_number":76,"context_line":"            # Note: ignoring possible exceptions to stop execution if bad input"},{"line_number":77,"context_line":"            os.makedirs(log_dir)"},{"line_number":78,"context_line":"        elif os.path.isdir(log_dir) is False:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_ca3ec328","line":75,"updated":"2016-08-02 22:34:32.000000000","message":"if not os.path.exists(log_dir):","commit_id":"f25a381f4aba7d9fe78cd26cb1020bb004b353fe"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"2bc5478c3b1eb3e81a4ca44cc4c0c4492b9e5db8","unresolved":false,"context_lines":[{"line_number":72,"context_line":"def make_log_dir(log_dir):"},{"line_number":73,"context_line":"    \"\"\"Create log directory if -l argument supplied.\"\"\""},{"line_number":74,"context_line":"    if log_dir:"},{"line_number":75,"context_line":"        if os.path.exists(log_dir) is False:"},{"line_number":76,"context_line":"            # Note: ignoring possible exceptions to stop execution if bad input"},{"line_number":77,"context_line":"            os.makedirs(log_dir)"},{"line_number":78,"context_line":"        elif os.path.isdir(log_dir) is False:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_ed1c81c3","line":75,"in_reply_to":"bacf61ea_ca3ec328","updated":"2016-08-02 23:17:57.000000000","message":"Done","commit_id":"f25a381f4aba7d9fe78cd26cb1020bb004b353fe"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"28338c4118684092dcbbb0eba3a07f5d5c4dfe2b","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        if os.path.exists(log_dir) is False:"},{"line_number":76,"context_line":"            # Note: ignoring possible exceptions to stop execution if bad input"},{"line_number":77,"context_line":"            os.makedirs(log_dir)"},{"line_number":78,"context_line":"        elif os.path.isdir(log_dir) is False:"},{"line_number":79,"context_line":"            err_exit(\"logs dir (\" + log_dir + \") exists as a regular file\")"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_8a820bc7","line":78,"updated":"2016-08-02 22:34:32.000000000","message":"How would this condition ever be met? If it doesn\u0027t exist then there would be no directory.","commit_id":"f25a381f4aba7d9fe78cd26cb1020bb004b353fe"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b2121105cc88223c275f3c92c8179f0ac6d923f7","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        if os.path.exists(log_dir) is False:"},{"line_number":76,"context_line":"            # Note: ignoring possible exceptions to stop execution if bad input"},{"line_number":77,"context_line":"            os.makedirs(log_dir)"},{"line_number":78,"context_line":"        elif os.path.isdir(log_dir) is False:"},{"line_number":79,"context_line":"            err_exit(\"logs dir (\" + log_dir + \") exists as a regular file\")"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_d88859c9","line":78,"in_reply_to":"bacf61ea_4dc66d17","updated":"2016-08-02 23:57:14.000000000","message":"Ah thanks","commit_id":"f25a381f4aba7d9fe78cd26cb1020bb004b353fe"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"2bc5478c3b1eb3e81a4ca44cc4c0c4492b9e5db8","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        if os.path.exists(log_dir) is False:"},{"line_number":76,"context_line":"            # Note: ignoring possible exceptions to stop execution if bad input"},{"line_number":77,"context_line":"            os.makedirs(log_dir)"},{"line_number":78,"context_line":"        elif os.path.isdir(log_dir) is False:"},{"line_number":79,"context_line":"            err_exit(\"logs dir (\" + log_dir + \") exists as a regular file\")"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_4dc66d17","line":78,"in_reply_to":"bacf61ea_8a820bc7","updated":"2016-08-02 23:17:57.000000000","message":"if log_dir path doesn\u0027t exist -\u003e create\nelse: log_dir path exists\n      check if it\u0027s a directory, if not -\u003e error","commit_id":"f25a381f4aba7d9fe78cd26cb1020bb004b353fe"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3c47eb4d9861c688828f2622a6b3a58792beefb9","unresolved":false,"context_lines":[{"line_number":16,"context_line":"\"\"\"Create baremetal poseur nodes for ironic testing purposes.\"\"\""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import argparse"},{"line_number":19,"context_line":"import libvirt"},{"line_number":20,"context_line":"import netifaces"},{"line_number":21,"context_line":"import os.path"},{"line_number":22,"context_line":"import subprocess"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_cd0b7d2a","line":19,"updated":"2016-08-02 23:58:17.000000000","message":"Not a built-in library\n\nhttps://docs.python.org/2/library/","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"0ec95bd6e4370c7cc32bee03eed10fbb44dc4722","unresolved":false,"context_lines":[{"line_number":16,"context_line":"\"\"\"Create baremetal poseur nodes for ironic testing purposes.\"\"\""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import argparse"},{"line_number":19,"context_line":"import libvirt"},{"line_number":20,"context_line":"import netifaces"},{"line_number":21,"context_line":"import os.path"},{"line_number":22,"context_line":"import subprocess"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_f87d5db2","line":19,"in_reply_to":"bacf61ea_cd0b7d2a","updated":"2016-08-03 01:09:41.000000000","message":"Done","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3c47eb4d9861c688828f2622a6b3a58792beefb9","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import argparse"},{"line_number":19,"context_line":"import libvirt"},{"line_number":20,"context_line":"import netifaces"},{"line_number":21,"context_line":"import os.path"},{"line_number":22,"context_line":"import subprocess"},{"line_number":23,"context_line":"import sys"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_ad08c92e","line":20,"updated":"2016-08-02 23:58:17.000000000","message":"Not a built-in library\n\nhttps://docs.python.org/2/library/","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"0ec95bd6e4370c7cc32bee03eed10fbb44dc4722","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import argparse"},{"line_number":19,"context_line":"import libvirt"},{"line_number":20,"context_line":"import netifaces"},{"line_number":21,"context_line":"import os.path"},{"line_number":22,"context_line":"import subprocess"},{"line_number":23,"context_line":"import sys"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_9357e2c9","line":20,"in_reply_to":"bacf61ea_ad08c92e","updated":"2016-08-03 01:09:41.000000000","message":"Done","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3c47eb4d9861c688828f2622a6b3a58792beefb9","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def make_log_dir(log_dir):"},{"line_number":61,"context_line":"    \"\"\"Create log directory if -l argument supplied.\"\"\""},{"line_number":62,"context_line":"    if log_dir:"},{"line_number":63,"context_line":"        if not os.path.exists(log_dir): "},{"line_number":64,"context_line":"            # Note: ignoring possible exceptions to stop execution if bad input"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_7824cdae","line":61,"updated":"2016-08-02 23:58:17.000000000","message":"I think there should be a generic \"make_dir\" function as code is duplicated in this and the next function.","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"0ec95bd6e4370c7cc32bee03eed10fbb44dc4722","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def make_log_dir(log_dir):"},{"line_number":61,"context_line":"    \"\"\"Create log directory if -l argument supplied.\"\"\""},{"line_number":62,"context_line":"    if log_dir:"},{"line_number":63,"context_line":"        if not os.path.exists(log_dir): "},{"line_number":64,"context_line":"            # Note: ignoring possible exceptions to stop execution if bad input"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_735ceeed","line":61,"in_reply_to":"bacf61ea_7824cdae","updated":"2016-08-03 01:09:41.000000000","message":"Done","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3c47eb4d9861c688828f2622a6b3a58792beefb9","unresolved":false,"context_lines":[{"line_number":60,"context_line":"def make_log_dir(log_dir):"},{"line_number":61,"context_line":"    \"\"\"Create log directory if -l argument supplied.\"\"\""},{"line_number":62,"context_line":"    if log_dir:"},{"line_number":63,"context_line":"        if not os.path.exists(log_dir): "},{"line_number":64,"context_line":"            # Note: ignoring possible exceptions to stop execution if bad input"},{"line_number":65,"context_line":"            os.makedirs(log_dir)"},{"line_number":66,"context_line":"        elif not os.path.isdir(log_dir):"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_780ded36","line":63,"updated":"2016-08-02 23:58:17.000000000","message":"Trailing whitespace","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"0ec95bd6e4370c7cc32bee03eed10fbb44dc4722","unresolved":false,"context_lines":[{"line_number":60,"context_line":"def make_log_dir(log_dir):"},{"line_number":61,"context_line":"    \"\"\"Create log directory if -l argument supplied.\"\"\""},{"line_number":62,"context_line":"    if log_dir:"},{"line_number":63,"context_line":"        if not os.path.exists(log_dir): "},{"line_number":64,"context_line":"            # Note: ignoring possible exceptions to stop execution if bad input"},{"line_number":65,"context_line":"            os.makedirs(log_dir)"},{"line_number":66,"context_line":"        elif not os.path.isdir(log_dir):"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_b36e6694","line":63,"in_reply_to":"bacf61ea_780ded36","updated":"2016-08-03 01:09:41.000000000","message":"Done","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3c47eb4d9861c688828f2622a6b3a58792beefb9","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            # Note: ignoring possible exceptions to stop execution if bad input"},{"line_number":65,"context_line":"            os.makedirs(log_dir)"},{"line_number":66,"context_line":"        elif not os.path.isdir(log_dir):"},{"line_number":67,"context_line":"            sys.exit(\"logs dir (\" + log_dir + \") exists as a regular file\")"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"def make_target_dir():"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_1862f1d8","line":67,"updated":"2016-08-02 23:58:17.000000000","message":"I\u0027d recommend using Python string formatting instead of +\n\n \"logs dir ({}) exists as a regular file\".format(log_dir)\n\nor\n\n \"logs dir (%s) exists as a regular file\" % log_dir\n\nEither one is fine, just pick one and be consistent.","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"0ec95bd6e4370c7cc32bee03eed10fbb44dc4722","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            # Note: ignoring possible exceptions to stop execution if bad input"},{"line_number":65,"context_line":"            os.makedirs(log_dir)"},{"line_number":66,"context_line":"        elif not os.path.isdir(log_dir):"},{"line_number":67,"context_line":"            sys.exit(\"logs dir (\" + log_dir + \") exists as a regular file\")"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"def make_target_dir():"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_f3d73eeb","line":67,"in_reply_to":"bacf61ea_1862f1d8","updated":"2016-08-03 01:09:41.000000000","message":"Done","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3c47eb4d9861c688828f2622a6b3a58792beefb9","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    try:"},{"line_number":129,"context_line":"        command \u003d ovs_vsctl.VSCtlCommand(\"add-br\", [bridge])"},{"line_number":130,"context_line":"        vsctl.run_command([command], 1, None)"},{"line_number":131,"context_line":"    except Exception as e:"},{"line_number":132,"context_line":"        # This is a hack to overcome limitation of ovs library"},{"line_number":133,"context_line":"        # not supporting --may-exist option for add-br command"},{"line_number":134,"context_line":"        if \"already exists\" not in e.message:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_180311ba","line":131,"updated":"2016-08-02 23:58:17.000000000","message":"Please make the except more specific. Exception is any error that occurs, which is too generic.","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"0ec95bd6e4370c7cc32bee03eed10fbb44dc4722","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    try:"},{"line_number":129,"context_line":"        command \u003d ovs_vsctl.VSCtlCommand(\"add-br\", [bridge])"},{"line_number":130,"context_line":"        vsctl.run_command([command], 1, None)"},{"line_number":131,"context_line":"    except Exception as e:"},{"line_number":132,"context_line":"        # This is a hack to overcome limitation of ovs library"},{"line_number":133,"context_line":"        # not supporting --may-exist option for add-br command"},{"line_number":134,"context_line":"        if \"already exists\" not in e.message:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_b322e6ff","line":131,"in_reply_to":"bacf61ea_180311ba","updated":"2016-08-03 01:09:41.000000000","message":"ovs library raises generic Exception only, hence cannot be more specific.","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3c47eb4d9861c688828f2622a6b3a58792beefb9","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        cmd_set \u003d ovs_vsctl.VSCtlCommand(\"set\", ("},{"line_number":142,"context_line":"            \"Interface\", \"ovs-\" + dom_name, \"type\u003dinternal\"))"},{"line_number":143,"context_line":"        vsctl.run_command([cmd_add, cmd_set], 1, None)"},{"line_number":144,"context_line":"    except Exception as e:"},{"line_number":145,"context_line":"        print(e)"},{"line_number":146,"context_line":"        sys.exit(\"unable to add openvswitch port\")"},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_3830959e","line":144,"updated":"2016-08-02 23:58:17.000000000","message":"Please make the except more specific. Exception is any error that occurs, which is too generic.","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"0ec95bd6e4370c7cc32bee03eed10fbb44dc4722","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        cmd_set \u003d ovs_vsctl.VSCtlCommand(\"set\", ("},{"line_number":142,"context_line":"            \"Interface\", \"ovs-\" + dom_name, \"type\u003dinternal\"))"},{"line_number":143,"context_line":"        vsctl.run_command([cmd_add, cmd_set], 1, None)"},{"line_number":144,"context_line":"    except Exception as e:"},{"line_number":145,"context_line":"        print(e)"},{"line_number":146,"context_line":"        sys.exit(\"unable to add openvswitch port\")"},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_f31c5ec3","line":144,"in_reply_to":"bacf61ea_3830959e","updated":"2016-08-03 01:09:41.000000000","message":"ovs library raises generic Exception only, hence cannot be more specific","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3c47eb4d9861c688828f2622a6b3a58792beefb9","unresolved":false,"context_lines":[{"line_number":158,"context_line":"    \"\"\"Wipe and remove existing storage libvirt storage volume.\"\"\""},{"line_number":159,"context_line":"    try:"},{"line_number":160,"context_line":"        # Remove existing storage volume"},{"line_number":161,"context_line":"        vol_name \u003d \".\".join([dom_name, disk_format])"},{"line_number":162,"context_line":"        storage_volume \u003d storage_pool.storageVolLookupByName(vol_name)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        if storage_volume.wipe(0) \u003c 0:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_18fcb13d","line":161,"updated":"2016-08-02 23:58:17.000000000","message":"Move out of try block","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"0ec95bd6e4370c7cc32bee03eed10fbb44dc4722","unresolved":false,"context_lines":[{"line_number":158,"context_line":"    \"\"\"Wipe and remove existing storage libvirt storage volume.\"\"\""},{"line_number":159,"context_line":"    try:"},{"line_number":160,"context_line":"        # Remove existing storage volume"},{"line_number":161,"context_line":"        vol_name \u003d \".\".join([dom_name, disk_format])"},{"line_number":162,"context_line":"        storage_volume \u003d storage_pool.storageVolLookupByName(vol_name)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        if storage_volume.wipe(0) \u003c 0:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_33643648","line":161,"in_reply_to":"bacf61ea_18fcb13d","updated":"2016-08-03 01:09:41.000000000","message":"Done","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3c47eb4d9861c688828f2622a6b3a58792beefb9","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        storage_volume \u003d storage_pool.storageVolLookupByName(vol_name)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        if storage_volume.wipe(0) \u003c 0:"},{"line_number":165,"context_line":"            sys.exit(\"unable to physically wipe the volume form disk\")"},{"line_number":166,"context_line":"        if storage_volume.delete(0) \u003c 0:"},{"line_number":167,"context_line":"            sys.exit(\"unable to logically remove the volume from storage pool\")"},{"line_number":168,"context_line":"    except libvirt.libvirtError:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_58ed898d","line":165,"range":{"start_line":165,"start_character":59,"end_line":165,"end_character":63},"updated":"2016-08-02 23:58:17.000000000","message":"from","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"0ec95bd6e4370c7cc32bee03eed10fbb44dc4722","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        storage_volume \u003d storage_pool.storageVolLookupByName(vol_name)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        if storage_volume.wipe(0) \u003c 0:"},{"line_number":165,"context_line":"            sys.exit(\"unable to physically wipe the volume form disk\")"},{"line_number":166,"context_line":"        if storage_volume.delete(0) \u003c 0:"},{"line_number":167,"context_line":"            sys.exit(\"unable to logically remove the volume from storage pool\")"},{"line_number":168,"context_line":"    except libvirt.libvirtError:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_5378caf8","line":165,"range":{"start_line":165,"start_character":59,"end_line":165,"end_character":63},"in_reply_to":"bacf61ea_58ed898d","updated":"2016-08-03 01:09:41.000000000","message":"Done","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3c47eb4d9861c688828f2622a6b3a58792beefb9","unresolved":false,"context_lines":[{"line_number":189,"context_line":"      \u003c/target\u003e"},{"line_number":190,"context_line":"    \u003c/volume\u003e\"\"\""},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    vol_path \u003d \"/\".join([tar_dir, vol_name])"},{"line_number":193,"context_line":"    stgvol_xml \u003d xml % (vol_name, disk_size, vol_path, disk_format)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    if os.path.exists(\"/etc/debian_version\") and disk_format \u003d\u003d \"qcow2\":"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_b81c8514","line":192,"updated":"2016-08-02 23:58:17.000000000","message":"vol_path \u003d os.path.join(tar_dir, vol_name)","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"0ec95bd6e4370c7cc32bee03eed10fbb44dc4722","unresolved":false,"context_lines":[{"line_number":189,"context_line":"      \u003c/target\u003e"},{"line_number":190,"context_line":"    \u003c/volume\u003e\"\"\""},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    vol_path \u003d \"/\".join([tar_dir, vol_name])"},{"line_number":193,"context_line":"    stgvol_xml \u003d xml % (vol_name, disk_size, vol_path, disk_format)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    if os.path.exists(\"/etc/debian_version\") and disk_format \u003d\u003d \"qcow2\":"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_735eae77","line":192,"in_reply_to":"bacf61ea_b81c8514","updated":"2016-08-03 01:09:41.000000000","message":"Done","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3c47eb4d9861c688828f2622a6b3a58792beefb9","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    # Construct input for and call the configure-vm.py script"},{"line_number":220,"context_line":"    cmd_dir \u003d os.path.dirname(os.path.abspath(__file__))"},{"line_number":221,"context_line":"    configure_cmd_path \u003d \"/\".join([cmd_dir, \"configure-vm.py\"])"},{"line_number":222,"context_line":"    configure_vm_cmd \u003d \" \".join([configure_cmd_path, \"--bootdev\","},{"line_number":223,"context_line":"                                 \"network\", \"--name\", dom_name, \"--image\","},{"line_number":224,"context_line":"                                 \"\\\"\" + vol_path + \"\\\"\", \"--arch\", arch,"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_9898a16c","line":221,"updated":"2016-08-02 23:58:17.000000000","message":"os.path.join()","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"0ec95bd6e4370c7cc32bee03eed10fbb44dc4722","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    # Construct input for and call the configure-vm.py script"},{"line_number":220,"context_line":"    cmd_dir \u003d os.path.dirname(os.path.abspath(__file__))"},{"line_number":221,"context_line":"    configure_cmd_path \u003d \"/\".join([cmd_dir, \"configure-vm.py\"])"},{"line_number":222,"context_line":"    configure_vm_cmd \u003d \" \".join([configure_cmd_path, \"--bootdev\","},{"line_number":223,"context_line":"                                 \"network\", \"--name\", dom_name, \"--image\","},{"line_number":224,"context_line":"                                 \"\\\"\" + vol_path + \"\\\"\", \"--arch\", arch,"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_53c60a17","line":221,"in_reply_to":"bacf61ea_9898a16c","updated":"2016-08-03 01:09:41.000000000","message":"Done","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3c47eb4d9861c688828f2622a6b3a58792beefb9","unresolved":false,"context_lines":[{"line_number":219,"context_line":"    # Construct input for and call the configure-vm.py script"},{"line_number":220,"context_line":"    cmd_dir \u003d os.path.dirname(os.path.abspath(__file__))"},{"line_number":221,"context_line":"    configure_cmd_path \u003d \"/\".join([cmd_dir, \"configure-vm.py\"])"},{"line_number":222,"context_line":"    configure_vm_cmd \u003d \" \".join([configure_cmd_path, \"--bootdev\","},{"line_number":223,"context_line":"                                 \"network\", \"--name\", dom_name, \"--image\","},{"line_number":224,"context_line":"                                 \"\\\"\" + vol_path + \"\\\"\", \"--arch\", arch,"},{"line_number":225,"context_line":"                                 \"--cpus\", cpus, \"--memory\", mem,"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_78396d41","line":222,"updated":"2016-08-02 23:58:17.000000000","message":"Why does this need to be made a string?","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3c47eb4d9861c688828f2622a6b3a58792beefb9","unresolved":false,"context_lines":[{"line_number":221,"context_line":"    configure_cmd_path \u003d \"/\".join([cmd_dir, \"configure-vm.py\"])"},{"line_number":222,"context_line":"    configure_vm_cmd \u003d \" \".join([configure_cmd_path, \"--bootdev\","},{"line_number":223,"context_line":"                                 \"network\", \"--name\", dom_name, \"--image\","},{"line_number":224,"context_line":"                                 \"\\\"\" + vol_path + \"\\\"\", \"--arch\", arch,"},{"line_number":225,"context_line":"                                 \"--cpus\", cpus, \"--memory\", mem,"},{"line_number":226,"context_line":"                                 \"--libvirt-nic-driver\", nic_driver,"},{"line_number":227,"context_line":"                                 \"--emulator\", emu, \"--bridge\","}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_b822c5ff","line":224,"updated":"2016-08-02 23:58:17.000000000","message":"If it was left as a list then the quoting wouldn\u0027t be necessary for vol_path.","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3c47eb4d9861c688828f2622a6b3a58792beefb9","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                                 disk_format, vm_log])"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    with open(os.devnull, \"w\") as devnull:"},{"line_number":232,"context_line":"        subprocess.call(configure_vm_cmd, shell\u003dTrue, stdout\u003ddevnull)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    # Lookup newly created domain"},{"line_number":235,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_d83e9928","line":232,"updated":"2016-08-02 23:58:17.000000000","message":"Why does this need to be \"shell\u003dTrue\"?","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"0ec95bd6e4370c7cc32bee03eed10fbb44dc4722","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                                 disk_format, vm_log])"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    with open(os.devnull, \"w\") as devnull:"},{"line_number":232,"context_line":"        subprocess.call(configure_vm_cmd, shell\u003dTrue, stdout\u003ddevnull)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    # Lookup newly created domain"},{"line_number":235,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_5e81f14c","line":232,"in_reply_to":"bacf61ea_d83e9928","updated":"2016-08-03 01:09:41.000000000","message":"configure_vm.py call fails unless I use shell\u003dTrue. Subprocess does not pass the named arguments correctly. I couldn\u0027t figure out how to get it to work. Hence the need for configure_vm_cmd as a string instead of list above.","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3c47eb4d9861c688828f2622a6b3a58792beefb9","unresolved":false,"context_lines":[{"line_number":260,"context_line":"    try:"},{"line_number":261,"context_line":"        ifaces \u003d netifaces.ifaddresses(bridge)"},{"line_number":262,"context_line":"        link \u003d ifaces[netifaces.AF_LINK]"},{"line_number":263,"context_line":"        if len(link) \u003d\u003d 0:"},{"line_number":264,"context_line":"            sys.exit(\"link layer interface for \u0027%s\u0027 does not exist\" % bridge)"},{"line_number":265,"context_line":"    except ValueError:"},{"line_number":266,"context_line":"        sys.exit(\"bridge \u0027%s\u0027 does not exist\" % bridge)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_b8500560","line":263,"updated":"2016-08-02 23:58:17.000000000","message":"nit: I think could just do\n\n if not link:","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"0ec95bd6e4370c7cc32bee03eed10fbb44dc4722","unresolved":false,"context_lines":[{"line_number":260,"context_line":"    try:"},{"line_number":261,"context_line":"        ifaces \u003d netifaces.ifaddresses(bridge)"},{"line_number":262,"context_line":"        link \u003d ifaces[netifaces.AF_LINK]"},{"line_number":263,"context_line":"        if len(link) \u003d\u003d 0:"},{"line_number":264,"context_line":"            sys.exit(\"link layer interface for \u0027%s\u0027 does not exist\" % bridge)"},{"line_number":265,"context_line":"    except ValueError:"},{"line_number":266,"context_line":"        sys.exit(\"bridge \u0027%s\u0027 does not exist\" % bridge)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_93e7e2ab","line":263,"in_reply_to":"bacf61ea_b8500560","updated":"2016-08-03 01:09:41.000000000","message":"Done","commit_id":"f467934f95f1c6c9be4ec42aea9208d252c35e17"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"a9562e238e9cbe202cbe24c543fe87a20cd40893","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import libvirt"},{"line_number":25,"context_line":"import netifaces"},{"line_number":26,"context_line":"from pyroute2 import IPRoute"},{"line_number":27,"context_line":"import ryu.lib.ovs.vsctl as ovs_vsctl"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def parse_args():"}],"source_content_type":"text/x-python","patch_set":8,"id":"bacf61ea_e66c779e","line":27,"updated":"2016-08-03 15:44:54.000000000","message":"I don\u0027t see this listed in test-requirements.txt. I kind of think it should be.","commit_id":"9373b8a78471a6ac05553904e10968f9b0f8a00a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6cb46a0d4a3a04c5f80b013e86b5d8492f5af917","unresolved":false,"context_lines":[{"line_number":60,"context_line":"def make_dir(path, hier\u003dFalse, mode\u003d0o775):"},{"line_number":61,"context_line":"    \"\"\"Create the directory path indicated."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    Args:"},{"line_number":64,"context_line":"        path: single name or hierachical path of directory to create"},{"line_number":65,"context_line":"        hier: create full path if true, otherwise signle directory"},{"line_number":66,"context_line":"        mode: use permissions mode if supported by the system"}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_16c76f13","line":63,"updated":"2016-08-15 10:19:54.000000000","message":"please use standard python convention for documenting arguments:\n\n :param path: blah-blah","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"6b1b86251ce123e463b6e5bec99a944b53b44cc2","unresolved":false,"context_lines":[{"line_number":60,"context_line":"def make_dir(path, hier\u003dFalse, mode\u003d0o775):"},{"line_number":61,"context_line":"    \"\"\"Create the directory path indicated."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    Args:"},{"line_number":64,"context_line":"        path: single name or hierachical path of directory to create"},{"line_number":65,"context_line":"        hier: create full path if true, otherwise signle directory"},{"line_number":66,"context_line":"        mode: use permissions mode if supported by the system"}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_234056a5","line":63,"in_reply_to":"3ac371cc_16c76f13","updated":"2016-08-15 19:25:59.000000000","message":"Done","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6cb46a0d4a3a04c5f80b013e86b5d8492f5af917","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    Args:"},{"line_number":64,"context_line":"        path: single name or hierachical path of directory to create"},{"line_number":65,"context_line":"        hier: create full path if true, otherwise signle directory"},{"line_number":66,"context_line":"        mode: use permissions mode if supported by the system"},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    if path:"},{"line_number":69,"context_line":"        if not os.path.exists(path):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_f6cbb31c","line":66,"updated":"2016-08-15 10:19:54.000000000","message":"\"permissions to use for the new directory\"","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"6b1b86251ce123e463b6e5bec99a944b53b44cc2","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    Args:"},{"line_number":64,"context_line":"        path: single name or hierachical path of directory to create"},{"line_number":65,"context_line":"        hier: create full path if true, otherwise signle directory"},{"line_number":66,"context_line":"        mode: use permissions mode if supported by the system"},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    if path:"},{"line_number":69,"context_line":"        if not os.path.exists(path):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_c38862ea","line":66,"in_reply_to":"3ac371cc_f6cbb31c","updated":"2016-08-15 19:25:59.000000000","message":"Done","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6cb46a0d4a3a04c5f80b013e86b5d8492f5af917","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        hier: create full path if true, otherwise signle directory"},{"line_number":66,"context_line":"        mode: use permissions mode if supported by the system"},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    if path:"},{"line_number":69,"context_line":"        if not os.path.exists(path):"},{"line_number":70,"context_line":"            # Note: ignoring possible exceptions to stop execution if bad input"},{"line_number":71,"context_line":"            if hier:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_56d1e7cc","line":68,"updated":"2016-08-15 10:19:54.000000000","message":"better\n\n if not path:\n    return","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"6b1b86251ce123e463b6e5bec99a944b53b44cc2","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        hier: create full path if true, otherwise signle directory"},{"line_number":66,"context_line":"        mode: use permissions mode if supported by the system"},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    if path:"},{"line_number":69,"context_line":"        if not os.path.exists(path):"},{"line_number":70,"context_line":"            # Note: ignoring possible exceptions to stop execution if bad input"},{"line_number":71,"context_line":"            if hier:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_c3d6a2c4","line":68,"in_reply_to":"3ac371cc_56d1e7cc","updated":"2016-08-15 19:25:59.000000000","message":"Done","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6cb46a0d4a3a04c5f80b013e86b5d8492f5af917","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        # This is a hack to overcome limitation of ovs library"},{"line_number":132,"context_line":"        # not supporting --may-exist option for add-br command"},{"line_number":133,"context_line":"        # Note: the library throws a generic Exception"},{"line_number":134,"context_line":"        if \"already exists\" not in e.message:"},{"line_number":135,"context_line":"            sys.exit(\"unable to add openvswitch bridge: %s\" % bridge)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_36d6ebc5","line":134,"updated":"2016-08-15 10:19:54.000000000","message":"s/e.message/str(e)/","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"6b1b86251ce123e463b6e5bec99a944b53b44cc2","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        # This is a hack to overcome limitation of ovs library"},{"line_number":132,"context_line":"        # not supporting --may-exist option for add-br command"},{"line_number":133,"context_line":"        # Note: the library throws a generic Exception"},{"line_number":134,"context_line":"        if \"already exists\" not in e.message:"},{"line_number":135,"context_line":"            sys.exit(\"unable to add openvswitch bridge: %s\" % bridge)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_23033644","line":134,"in_reply_to":"3ac371cc_36d6ebc5","updated":"2016-08-15 19:25:59.000000000","message":"Done","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6cb46a0d4a3a04c5f80b013e86b5d8492f5af917","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        vsctl.run_command([cmd_add, cmd_set], 1, None)"},{"line_number":144,"context_line":"    except Exception as e:"},{"line_number":145,"context_line":"        print(e)"},{"line_number":146,"context_line":"        sys.exit(\"unable to add openvswitch port\")"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    try:"},{"line_number":149,"context_line":"        idx \u003d ip.link_lookup(ifname\u003d\"ovs-\" + dom_name)[0]"}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_96db5fed","line":146,"updated":"2016-08-15 10:19:54.000000000","message":"let\u0027s merge the print and the error:\n\n sys.exit(\"unable to add openvswitch port: %s\" % e)","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"6b1b86251ce123e463b6e5bec99a944b53b44cc2","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        vsctl.run_command([cmd_add, cmd_set], 1, None)"},{"line_number":144,"context_line":"    except Exception as e:"},{"line_number":145,"context_line":"        print(e)"},{"line_number":146,"context_line":"        sys.exit(\"unable to add openvswitch port\")"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    try:"},{"line_number":149,"context_line":"        idx \u003d ip.link_lookup(ifname\u003d\"ovs-\" + dom_name)[0]"}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_439112f0","line":146,"in_reply_to":"3ac371cc_96db5fed","updated":"2016-08-15 19:25:59.000000000","message":"Done","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6cb46a0d4a3a04c5f80b013e86b5d8492f5af917","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        sys.exit(\"unable to set link state to UP: ovs-%s\" % dom_name)"},{"line_number":152,"context_line":"    ip.link(\"set\", index\u003didx, state\u003d\"up\")"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    subprocess.call([\"brctl\", \"addif\", \"br-\" + dom_name, \"ovs-\" + dom_name])"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"def del_storage_vol_if_exists(dom_name, disk_format, storage_pool):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_76d863f0","line":154,"updated":"2016-08-15 10:19:54.000000000","message":"call does not check the resulting exit code. if you do intend to ignore it, please leave a comment why","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"6b1b86251ce123e463b6e5bec99a944b53b44cc2","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        sys.exit(\"unable to set link state to UP: ovs-%s\" % dom_name)"},{"line_number":152,"context_line":"    ip.link(\"set\", index\u003didx, state\u003d\"up\")"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    subprocess.call([\"brctl\", \"addif\", \"br-\" + dom_name, \"ovs-\" + dom_name])"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"def del_storage_vol_if_exists(dom_name, disk_format, storage_pool):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_09961b4c","line":154,"in_reply_to":"3ac371cc_76d863f0","updated":"2016-08-15 19:25:59.000000000","message":"Done: switched to using pybrctl module and checking exception instead of direct shell call.","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6cb46a0d4a3a04c5f80b013e86b5d8492f5af917","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                                 disk_format, vm_log])"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    with open(os.devnull, \"w\") as devnull:"},{"line_number":230,"context_line":"        subprocess.call(configure_vm_cmd, shell\u003dTrue, stdout\u003ddevnull)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    # Lookup newly created domain"},{"line_number":233,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_d6e5d7a8","line":230,"updated":"2016-08-15 10:19:54.000000000","message":"ditto about call not checking the exit status","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"6b1b86251ce123e463b6e5bec99a944b53b44cc2","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                                 disk_format, vm_log])"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    with open(os.devnull, \"w\") as devnull:"},{"line_number":230,"context_line":"        subprocess.call(configure_vm_cmd, shell\u003dTrue, stdout\u003ddevnull)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    # Lookup newly created domain"},{"line_number":233,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_34b7ea3a","line":230,"in_reply_to":"3ac371cc_d6e5d7a8","updated":"2016-08-15 19:25:59.000000000","message":"Added comment.","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6cb46a0d4a3a04c5f80b013e86b5d8492f5af917","unresolved":false,"context_lines":[{"line_number":233,"context_line":"    try:"},{"line_number":234,"context_line":"        domain \u003d conn.lookupByName(dom_name)"},{"line_number":235,"context_line":"    except libvirt.libvirtError:"},{"line_number":236,"context_line":"        sys.exit(\"domain creation failed, check the logs\")"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    return domain"},{"line_number":239,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_b6e2db9d","line":236,"updated":"2016-08-15 10:19:54.000000000","message":"let\u0027s at least include the error message","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"6b1b86251ce123e463b6e5bec99a944b53b44cc2","unresolved":false,"context_lines":[{"line_number":233,"context_line":"    try:"},{"line_number":234,"context_line":"        domain \u003d conn.lookupByName(dom_name)"},{"line_number":235,"context_line":"    except libvirt.libvirtError:"},{"line_number":236,"context_line":"        sys.exit(\"domain creation failed, check the logs\")"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    return domain"},{"line_number":239,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_49301302","line":236,"in_reply_to":"3ac371cc_b6e2db9d","updated":"2016-08-15 19:25:59.000000000","message":"Done","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6cb46a0d4a3a04c5f80b013e86b5d8492f5af917","unresolved":false,"context_lines":[{"line_number":251,"context_line":"    \"\"\"Echo interface MAC address to stdout.\"\"\""},{"line_number":252,"context_line":"    xml \u003d minidom.parseString(domain.XMLDesc())"},{"line_number":253,"context_line":"    macs \u003d xml.getElementsByTagName(\"mac\")"},{"line_number":254,"context_line":"    if len(macs) \u003d\u003d 0:"},{"line_number":255,"context_line":"        sys.exit(\"no mac address for domain, something went wrong\")"},{"line_number":256,"context_line":"    vm_mac \u003d macs[0].getAttribute(\"address\")"},{"line_number":257,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_16ee4f8b","line":254,"updated":"2016-08-15 10:19:54.000000000","message":"nit: \"if not macs\"","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"6b1b86251ce123e463b6e5bec99a944b53b44cc2","unresolved":false,"context_lines":[{"line_number":251,"context_line":"    \"\"\"Echo interface MAC address to stdout.\"\"\""},{"line_number":252,"context_line":"    xml \u003d minidom.parseString(domain.XMLDesc())"},{"line_number":253,"context_line":"    macs \u003d xml.getElementsByTagName(\"mac\")"},{"line_number":254,"context_line":"    if len(macs) \u003d\u003d 0:"},{"line_number":255,"context_line":"        sys.exit(\"no mac address for domain, something went wrong\")"},{"line_number":256,"context_line":"    vm_mac \u003d macs[0].getAttribute(\"address\")"},{"line_number":257,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3ac371cc_691d0f73","line":254,"in_reply_to":"3ac371cc_16ee4f8b","updated":"2016-08-15 19:25:59.000000000","message":"Done","commit_id":"42a3fe9817612d2adda43c0412d6af6dab79c1bf"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"0047b67f78675131c8ef0e9a4b43abffcef83f52","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    \"\"\"Create the directory path indicated."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    :param path: single name or hierachical path of directory to create"},{"line_number":65,"context_line":"    :param hier: create full path if true, otherwise signle directory"},{"line_number":66,"context_line":"    :param mode: permissions to use for the new directory"},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    if not path:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3ac371cc_7a05c8c0","line":65,"updated":"2016-08-15 20:01:39.000000000","message":"s/signle/single/\n\nAlso, what if the parameter was \u0027create_path\u0027 ?","commit_id":"e088df7d2adb52de98df465cc4471a03e1d9f1a6"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"dbee101fa1a630f8cbf6325b4d69e6f8e29db32b","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    \"\"\"Create the directory path indicated."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    :param path: single name or hierachical path of directory to create"},{"line_number":65,"context_line":"    :param hier: create full path if true, otherwise signle directory"},{"line_number":66,"context_line":"    :param mode: permissions to use for the new directory"},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    if not path:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3ac371cc_f0af17e1","line":65,"in_reply_to":"3ac371cc_7a05c8c0","updated":"2016-08-15 21:14:40.000000000","message":"Done","commit_id":"e088df7d2adb52de98df465cc4471a03e1d9f1a6"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"0047b67f78675131c8ef0e9a4b43abffcef83f52","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    :param path: single name or hierachical path of directory to create"},{"line_number":65,"context_line":"    :param hier: create full path if true, otherwise signle directory"},{"line_number":66,"context_line":"    :param mode: permissions to use for the new directory"},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    if not path:"},{"line_number":69,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":12,"id":"3ac371cc_5a0a8cd3","line":66,"updated":"2016-08-15 20:01:39.000000000","message":"Maybe a note that permissions should be in octal.","commit_id":"e088df7d2adb52de98df465cc4471a03e1d9f1a6"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"dbee101fa1a630f8cbf6325b4d69e6f8e29db32b","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    :param path: single name or hierachical path of directory to create"},{"line_number":65,"context_line":"    :param hier: create full path if true, otherwise signle directory"},{"line_number":66,"context_line":"    :param mode: permissions to use for the new directory"},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    if not path:"},{"line_number":69,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":12,"id":"3ac371cc_30ba4f24","line":66,"in_reply_to":"3ac371cc_5a0a8cd3","updated":"2016-08-15 21:14:40.000000000","message":"Done","commit_id":"e088df7d2adb52de98df465cc4471a03e1d9f1a6"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"0047b67f78675131c8ef0e9a4b43abffcef83f52","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    try:"},{"line_number":169,"context_line":"        br.addif(\"ovs-\" + dom_name)"},{"line_number":170,"context_line":"    except pybrctl.pybrctl.BridgeException as e:"},{"line_number":171,"context_line":"        sys.exit(\"unable to interface for ovs-%s: %s\" % dom_name, str(e))"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"def del_storage_vol_if_exists(vol_name, storage_pool):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3ac371cc_ba0f40e0","line":171,"updated":"2016-08-15 20:01:39.000000000","message":"This message doesn\u0027t make sense to me:  Unable to interface??","commit_id":"e088df7d2adb52de98df465cc4471a03e1d9f1a6"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"dbee101fa1a630f8cbf6325b4d69e6f8e29db32b","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    try:"},{"line_number":169,"context_line":"        br.addif(\"ovs-\" + dom_name)"},{"line_number":170,"context_line":"    except pybrctl.pybrctl.BridgeException as e:"},{"line_number":171,"context_line":"        sys.exit(\"unable to interface for ovs-%s: %s\" % dom_name, str(e))"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"def del_storage_vol_if_exists(vol_name, storage_pool):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3ac371cc_9081834d","line":171,"in_reply_to":"3ac371cc_ba0f40e0","updated":"2016-08-15 21:14:40.000000000","message":"Done","commit_id":"e088df7d2adb52de98df465cc4471a03e1d9f1a6"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"0047b67f78675131c8ef0e9a4b43abffcef83f52","unresolved":false,"context_lines":[{"line_number":373,"context_line":"                                    args.disk_format, storage_pool, pool_name)"},{"line_number":374,"context_line":"        domain \u003d make_domain(args.log_dir, args.dom_name, vol_path,"},{"line_number":375,"context_line":"                             args.arch, cpus, mem_size, args.emu,"},{"line_number":376,"context_line":"                             args.disk_format, nic_driver, conn)"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    if domain:"},{"line_number":379,"context_line":"        make_vbmc(args.dom_name, port)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3ac371cc_9a1404f6","line":376,"updated":"2016-08-15 20:01:39.000000000","message":"This seems like a good candidate for specifying keyword arguments\n  domain \u003d make_domain(log_dir\u003dargs.log_dir, dom_name\u003dargs.dom_name, vol_path\u003dvol_path, ...\n\nSince there are 10 arguments here.","commit_id":"e088df7d2adb52de98df465cc4471a03e1d9f1a6"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"dbee101fa1a630f8cbf6325b4d69e6f8e29db32b","unresolved":false,"context_lines":[{"line_number":373,"context_line":"                                    args.disk_format, storage_pool, pool_name)"},{"line_number":374,"context_line":"        domain \u003d make_domain(args.log_dir, args.dom_name, vol_path,"},{"line_number":375,"context_line":"                             args.arch, cpus, mem_size, args.emu,"},{"line_number":376,"context_line":"                             args.disk_format, nic_driver, conn)"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    if domain:"},{"line_number":379,"context_line":"        make_vbmc(args.dom_name, port)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3ac371cc_f002773d","line":376,"in_reply_to":"3ac371cc_9a1404f6","updated":"2016-08-15 21:14:40.000000000","message":"Done","commit_id":"e088df7d2adb52de98df465cc4471a03e1d9f1a6"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"529ea5d7e1c430a7932f1dac451a4d7ef3d1a822","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    \"\"\"Create the directory path indicated."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    :param create_path: single name or hierachical path of directory to create"},{"line_number":65,"context_line":"    :param hier: create full path if true, otherwise single directory"},{"line_number":66,"context_line":"    :param mode: permissions value (octal) to use for the new directory"},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    if not create_path:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3ac371cc_abb6d487","line":65,"updated":"2016-08-15 21:34:58.000000000","message":"I meant, instead of \u0027heir\u0027 the parameter was \u0027create_path\u0027.  What do you think?","commit_id":"3e06de6466fd3545b5c9c2c5b9f6a4adff7eeed7"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"ee1eb82798df4ed2012b0372c94ffba06eb539c7","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    \"\"\"Create the directory path indicated."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    :param create_path: single name or hierachical path of directory to create"},{"line_number":65,"context_line":"    :param hier: create full path if true, otherwise single directory"},{"line_number":66,"context_line":"    :param mode: permissions value (octal) to use for the new directory"},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    if not create_path:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3ac371cc_0b7f28ab","line":65,"in_reply_to":"3ac371cc_abb6d487","updated":"2016-08-15 21:36:35.000000000","message":"Oh, ok. Sure I can change that.","commit_id":"3e06de6466fd3545b5c9c2c5b9f6a4adff7eeed7"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"529ea5d7e1c430a7932f1dac451a4d7ef3d1a822","unresolved":false,"context_lines":[{"line_number":369,"context_line":"    except libvirt.libvirtError:"},{"line_number":370,"context_line":"        vol_name \u003d \".\".join([args.dom_name, args.disk_format])"},{"line_number":371,"context_line":"        del_storage_vol_if_exists(vol_name, storage_pool)"},{"line_number":372,"context_line":"        vol_path \u003d make_storage_vol(tar_dir\u003dtar_dir,"},{"line_number":373,"context_line":"                                    vol_name\u003dvol_name,"},{"line_number":374,"context_line":"                                    disk_size\u003ddisk_size,"},{"line_number":375,"context_line":"                                    disk_format\u003dargs.disk_format,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3ac371cc_8bbb1872","line":372,"updated":"2016-08-15 21:34:58.000000000","message":"nit: might look better as:\n  vol_path \u003d make_storage_vol(\n     tar_dir\u003dtar_dir, vol_name\u003dvol_name, ...","commit_id":"3e06de6466fd3545b5c9c2c5b9f6a4adff7eeed7"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"ee1eb82798df4ed2012b0372c94ffba06eb539c7","unresolved":false,"context_lines":[{"line_number":369,"context_line":"    except libvirt.libvirtError:"},{"line_number":370,"context_line":"        vol_name \u003d \".\".join([args.dom_name, args.disk_format])"},{"line_number":371,"context_line":"        del_storage_vol_if_exists(vol_name, storage_pool)"},{"line_number":372,"context_line":"        vol_path \u003d make_storage_vol(tar_dir\u003dtar_dir,"},{"line_number":373,"context_line":"                                    vol_name\u003dvol_name,"},{"line_number":374,"context_line":"                                    disk_size\u003ddisk_size,"},{"line_number":375,"context_line":"                                    disk_format\u003dargs.disk_format,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3ac371cc_6b4a1c85","line":372,"in_reply_to":"3ac371cc_8bbb1872","updated":"2016-08-15 21:36:35.000000000","message":"Done","commit_id":"3e06de6466fd3545b5c9c2c5b9f6a4adff7eeed7"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"529ea5d7e1c430a7932f1dac451a4d7ef3d1a822","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                                    disk_format\u003dargs.disk_format,"},{"line_number":376,"context_line":"                                    storage_pool\u003dstorage_pool,"},{"line_number":377,"context_line":"                                    pool_name\u003dpool_name)"},{"line_number":378,"context_line":"        domain \u003d make_domain(log_dir\u003dargs.log_dir,"},{"line_number":379,"context_line":"                             dom_name\u003dargs.dom_name,"},{"line_number":380,"context_line":"                             vol_path\u003dvol_path,"},{"line_number":381,"context_line":"                             arch\u003dargs.arch,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3ac371cc_ebb0cc8d","line":378,"updated":"2016-08-15 21:34:58.000000000","message":"nit: Same as comment above","commit_id":"3e06de6466fd3545b5c9c2c5b9f6a4adff7eeed7"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"ee1eb82798df4ed2012b0372c94ffba06eb539c7","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                                    disk_format\u003dargs.disk_format,"},{"line_number":376,"context_line":"                                    storage_pool\u003dstorage_pool,"},{"line_number":377,"context_line":"                                    pool_name\u003dpool_name)"},{"line_number":378,"context_line":"        domain \u003d make_domain(log_dir\u003dargs.log_dir,"},{"line_number":379,"context_line":"                             dom_name\u003dargs.dom_name,"},{"line_number":380,"context_line":"                             vol_path\u003dvol_path,"},{"line_number":381,"context_line":"                             arch\u003dargs.arch,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3ac371cc_4b4f6092","line":378,"in_reply_to":"3ac371cc_ebb0cc8d","updated":"2016-08-15 21:36:35.000000000","message":"Done","commit_id":"3e06de6466fd3545b5c9c2c5b9f6a4adff7eeed7"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"62dbbb96ac6286f885834a562f33da7809565ec8","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    \"\"\""},{"line_number":87,"context_line":"    xmldesc \u003d \"\"\""},{"line_number":88,"context_line":"    \u003cpool type\u003d\u0027dir\u0027\u003e"},{"line_number":89,"context_line":"      \u003cname\u003e%s\u003c/name\u003e"},{"line_number":90,"context_line":"      \u003ccapacity unit\u003d\u0027bytes\u0027\u003e84516978688\u003c/capacity\u003e"},{"line_number":91,"context_line":"      \u003callocation unit\u003d\u0027bytes\u0027\u003e5916213248\u003c/allocation\u003e"},{"line_number":92,"context_line":"      \u003cavailable unit\u003d\u0027bytes\u0027\u003e78600765440\u003c/available\u003e"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_a5a88f8e","line":89,"updated":"2016-09-30 16:51:10.000000000","message":"Can it be:\n\n \u003cname\u003e%(pool_name)s\u003c/name\u003e\n\nAnd then below use:\n\n  xmldesc % {\u0027pool_name\u0027: pool_name, \u0027tar-dir\u0027: tar_dir}","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"22ae69c06c1aa46f947aeab8b8f2b67a56049302","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    \"\"\""},{"line_number":87,"context_line":"    xmldesc \u003d \"\"\""},{"line_number":88,"context_line":"    \u003cpool type\u003d\u0027dir\u0027\u003e"},{"line_number":89,"context_line":"      \u003cname\u003e%s\u003c/name\u003e"},{"line_number":90,"context_line":"      \u003ccapacity unit\u003d\u0027bytes\u0027\u003e84516978688\u003c/capacity\u003e"},{"line_number":91,"context_line":"      \u003callocation unit\u003d\u0027bytes\u0027\u003e5916213248\u003c/allocation\u003e"},{"line_number":92,"context_line":"      \u003cavailable unit\u003d\u0027bytes\u0027\u003e78600765440\u003c/available\u003e"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_bedb3c4e","line":89,"in_reply_to":"3a98d1f4_a5a88f8e","updated":"2016-09-30 17:54:22.000000000","message":"Done","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"62dbbb96ac6286f885834a562f33da7809565ec8","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    xmldesc \u003d \"\"\""},{"line_number":88,"context_line":"    \u003cpool type\u003d\u0027dir\u0027\u003e"},{"line_number":89,"context_line":"      \u003cname\u003e%s\u003c/name\u003e"},{"line_number":90,"context_line":"      \u003ccapacity unit\u003d\u0027bytes\u0027\u003e84516978688\u003c/capacity\u003e"},{"line_number":91,"context_line":"      \u003callocation unit\u003d\u0027bytes\u0027\u003e5916213248\u003c/allocation\u003e"},{"line_number":92,"context_line":"      \u003cavailable unit\u003d\u0027bytes\u0027\u003e78600765440\u003c/available\u003e"},{"line_number":93,"context_line":"      \u003ctarget\u003e"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_e5e0d7fc","line":90,"updated":"2016-09-30 16:51:10.000000000","message":"Where did these magic numbers come from? Can they be documented?","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"22ae69c06c1aa46f947aeab8b8f2b67a56049302","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    xmldesc \u003d \"\"\""},{"line_number":88,"context_line":"    \u003cpool type\u003d\u0027dir\u0027\u003e"},{"line_number":89,"context_line":"      \u003cname\u003e%s\u003c/name\u003e"},{"line_number":90,"context_line":"      \u003ccapacity unit\u003d\u0027bytes\u0027\u003e84516978688\u003c/capacity\u003e"},{"line_number":91,"context_line":"      \u003callocation unit\u003d\u0027bytes\u0027\u003e5916213248\u003c/allocation\u003e"},{"line_number":92,"context_line":"      \u003cavailable unit\u003d\u0027bytes\u0027\u003e78600765440\u003c/available\u003e"},{"line_number":93,"context_line":"      \u003ctarget\u003e"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_dee008fd","line":90,"in_reply_to":"3a98d1f4_e5e0d7fc","updated":"2016-09-30 17:54:22.000000000","message":"Done","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"62dbbb96ac6286f885834a562f33da7809565ec8","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                                         options\u003d[\"--may_exist\"])"},{"line_number":157,"context_line":"        cmd_set \u003d ovs_vsctl.VSCtlCommand(\"set\", ("},{"line_number":158,"context_line":"            \"Interface\", \"ovs-\" + dom_name, \"type\u003dinternal\"))"},{"line_number":159,"context_line":"        vsctl.run_command([cmd_add, cmd_set], 1, None)"},{"line_number":160,"context_line":"    except Exception as e:"},{"line_number":161,"context_line":"        sys.exit(\"unable to add openvswitch port: %s\" % str(e))"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_a5388ff0","line":159,"updated":"2016-09-30 16:51:10.000000000","message":"Can this use keyword args to help understand code? And in other places.\n\n vsctl.run_command(commands\u003d[cmd_add, cmd_set], timeout_sec\u003d1, exception\u003dNone)\n\nBasically without going and looking at the ryu library I had no idea what \u00271\u0027 was for.\n\nI\u0027m not suggesting to do it everywhere. But where it can help make the code easier to understand.","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"22ae69c06c1aa46f947aeab8b8f2b67a56049302","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                                         options\u003d[\"--may_exist\"])"},{"line_number":157,"context_line":"        cmd_set \u003d ovs_vsctl.VSCtlCommand(\"set\", ("},{"line_number":158,"context_line":"            \"Interface\", \"ovs-\" + dom_name, \"type\u003dinternal\"))"},{"line_number":159,"context_line":"        vsctl.run_command([cmd_add, cmd_set], 1, None)"},{"line_number":160,"context_line":"    except Exception as e:"},{"line_number":161,"context_line":"        sys.exit(\"unable to add openvswitch port: %s\" % str(e))"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_b907d616","line":159,"in_reply_to":"3a98d1f4_a5388ff0","updated":"2016-09-30 17:54:22.000000000","message":"Done","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"62dbbb96ac6286f885834a562f33da7809565ec8","unresolved":false,"context_lines":[{"line_number":328,"context_line":"def main():"},{"line_number":329,"context_line":"    args \u003d parse_args()"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    cpus \u003d str(args.cpus)"},{"line_number":332,"context_line":"    # Memory size is supplied in kilobytes"},{"line_number":333,"context_line":"    mem_size \u003d str(args.mem_size * 1024)"},{"line_number":334,"context_line":"    # Append extra gig to disk size to allow fuzz for partition table"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_a57b2f8b","line":331,"updated":"2016-09-30 16:51:10.000000000","message":"Maybe a top comment that \u0027make_domain\u0027 requires all arguments to be strings.","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6ab15fca661f6e4516d0542e837ec0f7812910b1","unresolved":false,"context_lines":[{"line_number":328,"context_line":"def main():"},{"line_number":329,"context_line":"    args \u003d parse_args()"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    cpus \u003d str(args.cpus)"},{"line_number":332,"context_line":"    # Memory size is supplied in kilobytes"},{"line_number":333,"context_line":"    mem_size \u003d str(args.mem_size * 1024)"},{"line_number":334,"context_line":"    # Append extra gig to disk size to allow fuzz for partition table"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_0a95ca3d","line":331,"in_reply_to":"3a98d1f4_5916d2f1","updated":"2016-09-30 19:10:58.000000000","message":"Arguments are not all strings as argparse says cpus is an integer value. See Line 38. Which is probably a good thing as don\u0027t want someone passing in \u0027blah\u0027 for cpus.","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"22ae69c06c1aa46f947aeab8b8f2b67a56049302","unresolved":false,"context_lines":[{"line_number":328,"context_line":"def main():"},{"line_number":329,"context_line":"    args \u003d parse_args()"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    cpus \u003d str(args.cpus)"},{"line_number":332,"context_line":"    # Memory size is supplied in kilobytes"},{"line_number":333,"context_line":"    mem_size \u003d str(args.mem_size * 1024)"},{"line_number":334,"context_line":"    # Append extra gig to disk size to allow fuzz for partition table"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_5916d2f1","line":331,"in_reply_to":"3a98d1f4_a57b2f8b","updated":"2016-09-30 17:54:22.000000000","message":"Not sure that\u0027s helpful here. Arguments to configure-vm.py are strings, because it\u0027s being called from the command line. Eventually (subsequent patch), configure-vm.py should get integrated into this module.","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"62dbbb96ac6286f885834a562f33da7809565ec8","unresolved":false,"context_lines":[{"line_number":329,"context_line":"    args \u003d parse_args()"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    cpus \u003d str(args.cpus)"},{"line_number":332,"context_line":"    # Memory size is supplied in kilobytes"},{"line_number":333,"context_line":"    mem_size \u003d str(args.mem_size * 1024)"},{"line_number":334,"context_line":"    # Append extra gig to disk size to allow fuzz for partition table"},{"line_number":335,"context_line":"    # flavor size and registered size need to be different to actual size."}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_a5540fff","line":332,"updated":"2016-09-30 16:51:10.000000000","message":"supplied how? By the caller? By the call to make_domain?","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6ab15fca661f6e4516d0542e837ec0f7812910b1","unresolved":false,"context_lines":[{"line_number":329,"context_line":"    args \u003d parse_args()"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    cpus \u003d str(args.cpus)"},{"line_number":332,"context_line":"    # Memory size is supplied in kilobytes"},{"line_number":333,"context_line":"    mem_size \u003d str(args.mem_size * 1024)"},{"line_number":334,"context_line":"    # Append extra gig to disk size to allow fuzz for partition table"},{"line_number":335,"context_line":"    # flavor size and registered size need to be different to actual size."}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_4ad7d2ec","line":332,"in_reply_to":"3a98d1f4_19e7ea11","updated":"2016-09-30 19:10:58.000000000","message":"Okay. Maybe say, make_domain() requires value in mibibytes or something.","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"22ae69c06c1aa46f947aeab8b8f2b67a56049302","unresolved":false,"context_lines":[{"line_number":329,"context_line":"    args \u003d parse_args()"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    cpus \u003d str(args.cpus)"},{"line_number":332,"context_line":"    # Memory size is supplied in kilobytes"},{"line_number":333,"context_line":"    mem_size \u003d str(args.mem_size * 1024)"},{"line_number":334,"context_line":"    # Append extra gig to disk size to allow fuzz for partition table"},{"line_number":335,"context_line":"    # flavor size and registered size need to be different to actual size."}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_19e7ea11","line":332,"in_reply_to":"3a98d1f4_a5540fff","updated":"2016-09-30 17:54:22.000000000","message":"Supplied by the caller, it\u0027s called out in the arguments help text. I added a clarifying comment.","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"62dbbb96ac6286f885834a562f33da7809565ec8","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        print_mac(domain, args.bridge, port, args.dom_name)"},{"line_number":397,"context_line":"    else:"},{"line_number":398,"context_line":"        sys.exit(\"domain creation failed\")"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":402,"context_line":"    main()"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_332be895","line":399,"updated":"2016-09-30 16:51:10.000000000","message":"Final:\n\n return 0\n\nTechnically not needed since:\nsys.exit(None)  will return 0.","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"22ae69c06c1aa46f947aeab8b8f2b67a56049302","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        print_mac(domain, args.bridge, port, args.dom_name)"},{"line_number":397,"context_line":"    else:"},{"line_number":398,"context_line":"        sys.exit(\"domain creation failed\")"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":402,"context_line":"    main()"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_d9b3c2e7","line":399,"in_reply_to":"3a98d1f4_332be895","updated":"2016-09-30 17:54:22.000000000","message":"+1 not needed","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"62dbbb96ac6286f885834a562f33da7809565ec8","unresolved":false,"context_lines":[{"line_number":399,"context_line":""},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":402,"context_line":"    main()"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_534cf49d","line":402,"updated":"2016-09-30 16:51:10.000000000","message":"In case want to return an error from main.\n\n sys.exit(main())","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"22ae69c06c1aa46f947aeab8b8f2b67a56049302","unresolved":false,"context_lines":[{"line_number":399,"context_line":""},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":402,"context_line":"    main()"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_39c3c639","line":402,"in_reply_to":"3a98d1f4_534cf49d","updated":"2016-09-30 17:54:22.000000000","message":"Done","commit_id":"49af63554ef3cef81cc48fb6a14bef96f97e46bd"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def parse_args():"},{"line_number":31,"context_line":"    \"\"\"Parse command-line arguments and return them in a dictionary.\"\"\""},{"line_number":32,"context_line":"    parser \u003d argparse.ArgumentParser("},{"line_number":33,"context_line":"        description\u003d\u0027Creates baremetal poseur\u0027 +"},{"line_number":34,"context_line":"                    \u0027nodes for ironic testing purposes.\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_a8df34d4","line":31,"range":{"start_line":31,"start_character":57,"end_line":31,"end_character":67},"updated":"2016-10-03 23:28:31.000000000","message":"nit: It doesn\u0027t return them as a dictionary.","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"ea8ce421dbb7dacdd395bff6d754577f0a091fad","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def parse_args():"},{"line_number":31,"context_line":"    \"\"\"Parse command-line arguments and return them in a dictionary.\"\"\""},{"line_number":32,"context_line":"    parser \u003d argparse.ArgumentParser("},{"line_number":33,"context_line":"        description\u003d\u0027Creates baremetal poseur\u0027 +"},{"line_number":34,"context_line":"                    \u0027nodes for ironic testing purposes.\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a95cdbc_67dd3070","line":31,"range":{"start_line":31,"start_character":57,"end_line":31,"end_character":67},"in_reply_to":"3a98d1f4_a8df34d4","updated":"2016-10-04 20:44:41.000000000","message":"Done","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        else:"},{"line_number":76,"context_line":"            os.mkdir(path, mode)"},{"line_number":77,"context_line":"    elif not os.path.isdir(path):"},{"line_number":78,"context_line":"        sys.exit(\"directory (%s) exists as a regular file\" % path)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"def make_storage_pool(conn, pool_name, tar_dir):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_086ca806","line":78,"updated":"2016-10-03 23:28:31.000000000","message":"nit: Path (%s) exists but is not a directory\n\nMight be over-stating to say it is a regular file. But this is a nit.","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"3dd0babb9c38b005f1d3dc0593641316af7f406e","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        else:"},{"line_number":76,"context_line":"            os.mkdir(path, mode)"},{"line_number":77,"context_line":"    elif not os.path.isdir(path):"},{"line_number":78,"context_line":"        sys.exit(\"directory (%s) exists as a regular file\" % path)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"def make_storage_pool(conn, pool_name, tar_dir):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_3a57e358","line":78,"in_reply_to":"3a98d1f4_086ca806","updated":"2016-10-04 03:41:46.000000000","message":"Done","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    :param conn: libvirt connection object"},{"line_number":85,"context_line":"    :param pool: name of the storage pool to create"},{"line_number":86,"context_line":"    :param tar_dir: target directory for volume storage"},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":"    # NOTE (abashmak): the following xml description uses default values for"},{"line_number":89,"context_line":"    #      \u0027capacity\u0027, \u0027allocation\u0027, and \u0027available\u0027 fields to describe the"},{"line_number":90,"context_line":"    #      storage pool. These values are arbitrary and were picked originally"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_c3454143","line":87,"updated":"2016-10-03 23:28:31.000000000","message":":returns: A new storage pool object\n\nOr whatever it returns.","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"3dd0babb9c38b005f1d3dc0593641316af7f406e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    :param conn: libvirt connection object"},{"line_number":85,"context_line":"    :param pool: name of the storage pool to create"},{"line_number":86,"context_line":"    :param tar_dir: target directory for volume storage"},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":"    # NOTE (abashmak): the following xml description uses default values for"},{"line_number":89,"context_line":"    #      \u0027capacity\u0027, \u0027allocation\u0027, and \u0027available\u0027 fields to describe the"},{"line_number":90,"context_line":"    #      storage pool. These values are arbitrary and were picked originally"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_1ad307d6","line":87,"in_reply_to":"3a98d1f4_c3454143","updated":"2016-10-04 03:41:46.000000000","message":"Done","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    :param tar_dir: target directory for volume storage"},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":"    # NOTE (abashmak): the following xml description uses default values for"},{"line_number":89,"context_line":"    #      \u0027capacity\u0027, \u0027allocation\u0027, and \u0027available\u0027 fields to describe the"},{"line_number":90,"context_line":"    #      storage pool. These values are arbitrary and were picked originally"},{"line_number":91,"context_line":"    #      by running libvirt\u0027s command-line utility: \"virsh\" with the"},{"line_number":92,"context_line":"    #      pool-dumpxml option."}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_480f9036","line":89,"updated":"2016-10-03 23:28:31.000000000","message":"Can the values be stated in this comment in human readable values?\n\ncapacity \u003d 78.71257019042969 GB ??\nalocation \u003d 5.509765625 GB ??","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"3dd0babb9c38b005f1d3dc0593641316af7f406e","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    :param tar_dir: target directory for volume storage"},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":"    # NOTE (abashmak): the following xml description uses default values for"},{"line_number":89,"context_line":"    #      \u0027capacity\u0027, \u0027allocation\u0027, and \u0027available\u0027 fields to describe the"},{"line_number":90,"context_line":"    #      storage pool. These values are arbitrary and were picked originally"},{"line_number":91,"context_line":"    #      by running libvirt\u0027s command-line utility: \"virsh\" with the"},{"line_number":92,"context_line":"    #      pool-dumpxml option."}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_da36ff01","line":89,"in_reply_to":"3a98d1f4_480f9036","updated":"2016-10-04 03:41:46.000000000","message":"I removed capacity, allocation and available fields from the xml description completely. Letting libvirt use default values, which is what create-node.sh did.","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    xmldesc \u003d \"\"\""},{"line_number":94,"context_line":"    \u003cpool type\u003d\u0027dir\u0027\u003e"},{"line_number":95,"context_line":"      \u003cname\u003e%(pool_name)s\u003c/name\u003e"},{"line_number":96,"context_line":"      \u003ccapacity unit\u003d\u0027bytes\u0027\u003e84516978688\u003c/capacity\u003e"},{"line_number":97,"context_line":"      \u003callocation unit\u003d\u0027bytes\u0027\u003e5916213248\u003c/allocation\u003e"},{"line_number":98,"context_line":"      \u003cavailable unit\u003d\u0027bytes\u0027\u003e78600765440\u003c/available\u003e"},{"line_number":99,"context_line":"      \u003ctarget\u003e"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_63fb8d79","line":96,"updated":"2016-10-03 23:28:31.000000000","message":"Maybe a different \u0027unit\u0027 would make this more readable? M or G?","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":107,"context_line":"    \u003c/pool\u003e\"\"\""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    storage_pool \u003d conn.storagePoolDefineXML(xmldesc % {\u0027pool_name\u0027: pool_name,"},{"line_number":110,"context_line":"                                                        \u0027tar_dir\u0027: tar_dir}, 0)"},{"line_number":111,"context_line":"    if storage_pool is None:"},{"line_number":112,"context_line":"        sys.exit(\"Failed to create storage pool: %s\" % pool_name)"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_c32e218b","line":110,"range":{"start_line":110,"start_character":77,"end_line":110,"end_character":79},"updated":"2016-10-03 23:28:31.000000000","message":"What is the 0 for?\n\nA link to the API might be useful somewhere in the program.","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"3dd0babb9c38b005f1d3dc0593641316af7f406e","unresolved":false,"context_lines":[{"line_number":107,"context_line":"    \u003c/pool\u003e\"\"\""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    storage_pool \u003d conn.storagePoolDefineXML(xmldesc % {\u0027pool_name\u0027: pool_name,"},{"line_number":110,"context_line":"                                                        \u0027tar_dir\u0027: tar_dir}, 0)"},{"line_number":111,"context_line":"    if storage_pool is None:"},{"line_number":112,"context_line":"        sys.exit(\"Failed to create storage pool: %s\" % pool_name)"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_ba2db3ff","line":110,"range":{"start_line":110,"start_character":77,"end_line":110,"end_character":79},"in_reply_to":"3a98d1f4_c32e218b","updated":"2016-10-04 03:41:46.000000000","message":"added named arguments:\n...xml\u003dxmldesc, flags\u003d0...","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    :param dom_name: appended to create ip bridge and interface name for domain"},{"line_number":129,"context_line":"    :param bridge: ovs bridge name"},{"line_number":130,"context_line":"    \"\"\""},{"line_number":131,"context_line":"    ip \u003d IPRoute()"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    try:"},{"line_number":134,"context_line":"        # Check if bridge exists already"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_03d6494e","line":131,"updated":"2016-10-03 23:28:31.000000000","message":"bikeshedding/nit:\n\n bridge_name \u003d \"br-{}\".format(dom_name)\n\ninstead of creating it on L135 and L138","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"3dd0babb9c38b005f1d3dc0593641316af7f406e","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    :param dom_name: appended to create ip bridge and interface name for domain"},{"line_number":129,"context_line":"    :param bridge: ovs bridge name"},{"line_number":130,"context_line":"    \"\"\""},{"line_number":131,"context_line":"    ip \u003d IPRoute()"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    try:"},{"line_number":134,"context_line":"        # Check if bridge exists already"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_fa801bf9","line":131,"in_reply_to":"3a98d1f4_03d6494e","updated":"2016-10-04 03:41:46.000000000","message":"Done","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    try:"},{"line_number":134,"context_line":"        # Check if bridge exists already"},{"line_number":135,"context_line":"        br_index \u003d ip.link_lookup(ifname\u003d\"br-\" + dom_name)[0]"},{"line_number":136,"context_line":"    except IndexError:"},{"line_number":137,"context_line":"        # Bridge doesn\u0027t exist, add a new one"},{"line_number":138,"context_line":"        ip.link(\"add\", ifname\u003d\"br-\" + dom_name, kind\u003d\"bridge\")"},{"line_number":139,"context_line":"        br_index \u003d ip.link_lookup(ifname\u003d\"br-\" + dom_name)[0]"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_8394198b","line":136,"updated":"2016-10-03 23:28:31.000000000","message":"Is the IndexError because [0] doesn\u0027t exist? As in an empty list is returned.\n\nIf so then maybe instead of a try.\n\n  if not br_index:\n    # Bridge doesn\u0027t exist, add a new one.\n    ...\n  br_index \u003d br_index[0]\n\nBut if ip.link_lookup() causes the IndexError then never-mind.","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"d14c0483bc886977da3fa3c6025ed116124b0e4f","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    try:"},{"line_number":134,"context_line":"        # Check if bridge exists already"},{"line_number":135,"context_line":"        br_index \u003d ip.link_lookup(ifname\u003d\"br-\" + dom_name)[0]"},{"line_number":136,"context_line":"    except IndexError:"},{"line_number":137,"context_line":"        # Bridge doesn\u0027t exist, add a new one"},{"line_number":138,"context_line":"        ip.link(\"add\", ifname\u003d\"br-\" + dom_name, kind\u003d\"bridge\")"},{"line_number":139,"context_line":"        br_index \u003d ip.link_lookup(ifname\u003d\"br-\" + dom_name)[0]"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_dd7ef9e2","line":136,"in_reply_to":"3a98d1f4_7a9ecb63","updated":"2016-10-04 04:15:02.000000000","message":"I\u0027ll disagree. EAFP is (in my opinion) better when the alternative would be to trying to check many cases.\n\nBut in this case it is checking if the result returned is an empty list or not. I would be interested to hear other opinions.","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"ea8ce421dbb7dacdd395bff6d754577f0a091fad","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    try:"},{"line_number":134,"context_line":"        # Check if bridge exists already"},{"line_number":135,"context_line":"        br_index \u003d ip.link_lookup(ifname\u003d\"br-\" + dom_name)[0]"},{"line_number":136,"context_line":"    except IndexError:"},{"line_number":137,"context_line":"        # Bridge doesn\u0027t exist, add a new one"},{"line_number":138,"context_line":"        ip.link(\"add\", ifname\u003d\"br-\" + dom_name, kind\u003d\"bridge\")"},{"line_number":139,"context_line":"        br_index \u003d ip.link_lookup(ifname\u003d\"br-\" + dom_name)[0]"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a95cdbc_e7cf80b1","line":136,"in_reply_to":"3a98d1f4_7dfb2547","updated":"2016-10-04 20:44:41.000000000","message":"At the end of the day it\u0027s just a style change. Done.","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"3dd0babb9c38b005f1d3dc0593641316af7f406e","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    try:"},{"line_number":134,"context_line":"        # Check if bridge exists already"},{"line_number":135,"context_line":"        br_index \u003d ip.link_lookup(ifname\u003d\"br-\" + dom_name)[0]"},{"line_number":136,"context_line":"    except IndexError:"},{"line_number":137,"context_line":"        # Bridge doesn\u0027t exist, add a new one"},{"line_number":138,"context_line":"        ip.link(\"add\", ifname\u003d\"br-\" + dom_name, kind\u003d\"bridge\")"},{"line_number":139,"context_line":"        br_index \u003d ip.link_lookup(ifname\u003d\"br-\" + dom_name)[0]"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_7a9ecb63","line":136,"in_reply_to":"3a98d1f4_8394198b","updated":"2016-10-04 03:41:46.000000000","message":"-1 your suggestion is not pythonic\nhttps://docs.python.org/2/glossary.html#term-eafp","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"8e3c346d49103b8a3e9d331fc5d5ff672d624d5c","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    try:"},{"line_number":134,"context_line":"        # Check if bridge exists already"},{"line_number":135,"context_line":"        br_index \u003d ip.link_lookup(ifname\u003d\"br-\" + dom_name)[0]"},{"line_number":136,"context_line":"    except IndexError:"},{"line_number":137,"context_line":"        # Bridge doesn\u0027t exist, add a new one"},{"line_number":138,"context_line":"        ip.link(\"add\", ifname\u003d\"br-\" + dom_name, kind\u003d\"bridge\")"},{"line_number":139,"context_line":"        br_index \u003d ip.link_lookup(ifname\u003d\"br-\" + dom_name)[0]"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_7dfb2547","line":136,"in_reply_to":"3a98d1f4_dd7ef9e2","updated":"2016-10-04 04:21:40.000000000","message":"I of course can be wrong :) I\u0027ll do some more reading tomorrow!","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    except Exception as e:"},{"line_number":169,"context_line":"        sys.exit(\"unable to add openvswitch port: %s\" % str(e))"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    try:"},{"line_number":172,"context_line":"        # Make sure OVS bridge interface exists"},{"line_number":173,"context_line":"        ovs_index \u003d ip.link_lookup(ifname\u003d\"ovs-\" + dom_name)[0]"},{"line_number":174,"context_line":"    except IndexError:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_23b3450b","line":171,"updated":"2016-10-03 23:28:31.000000000","message":"bikeshedding/nit:\n\n ovs_name \u003d \"ovs-{}\".format(dom_name)\n\nCould be used on L173 L175","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"3dd0babb9c38b005f1d3dc0593641316af7f406e","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    except Exception as e:"},{"line_number":169,"context_line":"        sys.exit(\"unable to add openvswitch port: %s\" % str(e))"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    try:"},{"line_number":172,"context_line":"        # Make sure OVS bridge interface exists"},{"line_number":173,"context_line":"        ovs_index \u003d ip.link_lookup(ifname\u003d\"ovs-\" + dom_name)[0]"},{"line_number":174,"context_line":"    except IndexError:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_3ad1a323","line":171,"in_reply_to":"3a98d1f4_23b3450b","updated":"2016-10-04 03:41:46.000000000","message":"Done","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":190,"context_line":"    \"\"\""},{"line_number":191,"context_line":"    try:"},{"line_number":192,"context_line":"        storage_volume \u003d storage_pool.storageVolLookupByName(vol_name)"},{"line_number":193,"context_line":"        if storage_volume.wipe(0) \u003c 0:"},{"line_number":194,"context_line":"            sys.exit(\"unable to physically wipe the volume from disk\")"},{"line_number":195,"context_line":"        if storage_volume.delete(0) \u003c 0:"},{"line_number":196,"context_line":"            sys.exit(\"unable to logically remove the volume from storage pool\")"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_c3be21ad","line":193,"updated":"2016-10-03 23:28:31.000000000","message":"Why do we want to wipe? Seems time consuming and this is test code. Did create-node.sh wipe?","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"3dd0babb9c38b005f1d3dc0593641316af7f406e","unresolved":false,"context_lines":[{"line_number":190,"context_line":"    \"\"\""},{"line_number":191,"context_line":"    try:"},{"line_number":192,"context_line":"        storage_volume \u003d storage_pool.storageVolLookupByName(vol_name)"},{"line_number":193,"context_line":"        if storage_volume.wipe(0) \u003c 0:"},{"line_number":194,"context_line":"            sys.exit(\"unable to physically wipe the volume from disk\")"},{"line_number":195,"context_line":"        if storage_volume.delete(0) \u003c 0:"},{"line_number":196,"context_line":"            sys.exit(\"unable to logically remove the volume from storage pool\")"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_1a286732","line":193,"in_reply_to":"3a98d1f4_c3be21ad","updated":"2016-10-04 03:41:46.000000000","message":"Just to be thorough. Removed the wiping.","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":207,"context_line":"    :param disk_size: volume disk capacity"},{"line_number":208,"context_line":"    :param disk_format: volume disk format style"},{"line_number":209,"context_line":"    :param storage_pool: storage pool to hold the volume"},{"line_number":210,"context_line":"    :param pool_name: storage pool name"},{"line_number":211,"context_line":"    \"\"\""},{"line_number":212,"context_line":"    xml \u003d \"\"\""},{"line_number":213,"context_line":"    \u003cvolume type\u003d\u0027file\u0027\u003e"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_e314fda0","line":210,"updated":"2016-10-03 23:28:31.000000000","message":":returns: Path to the created storage volume","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"3dd0babb9c38b005f1d3dc0593641316af7f406e","unresolved":false,"context_lines":[{"line_number":207,"context_line":"    :param disk_size: volume disk capacity"},{"line_number":208,"context_line":"    :param disk_format: volume disk format style"},{"line_number":209,"context_line":"    :param storage_pool: storage pool to hold the volume"},{"line_number":210,"context_line":"    :param pool_name: storage pool name"},{"line_number":211,"context_line":"    \"\"\""},{"line_number":212,"context_line":"    xml \u003d \"\"\""},{"line_number":213,"context_line":"    \u003cvolume type\u003d\u0027file\u0027\u003e"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_9ae1d72c","line":210,"in_reply_to":"3a98d1f4_e314fda0","updated":"2016-10-04 03:41:46.000000000","message":"Done","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    \"\"\""},{"line_number":212,"context_line":"    xml \u003d \"\"\""},{"line_number":213,"context_line":"    \u003cvolume type\u003d\u0027file\u0027\u003e"},{"line_number":214,"context_line":"      \u003cname\u003e%s\u003c/name\u003e"},{"line_number":215,"context_line":"      \u003ccapacity unit\u003d\u0027G\u0027\u003e%s\u003c/capacity\u003e"},{"line_number":216,"context_line":"      \u003ctarget\u003e"},{"line_number":217,"context_line":"        \u003cpath\u003e%s\u003c/path\u003e"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_83cfb954","line":214,"updated":"2016-10-03 23:28:31.000000000","message":"Can this also used named variables?  For example \"\u003cname\u003e%(name)s\u003c/name\u003e\"","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"3dd0babb9c38b005f1d3dc0593641316af7f406e","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    \"\"\""},{"line_number":212,"context_line":"    xml \u003d \"\"\""},{"line_number":213,"context_line":"    \u003cvolume type\u003d\u0027file\u0027\u003e"},{"line_number":214,"context_line":"      \u003cname\u003e%s\u003c/name\u003e"},{"line_number":215,"context_line":"      \u003ccapacity unit\u003d\u0027G\u0027\u003e%s\u003c/capacity\u003e"},{"line_number":216,"context_line":"      \u003ctarget\u003e"},{"line_number":217,"context_line":"        \u003cpath\u003e%s\u003c/path\u003e"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_7ae6cb44","line":214,"in_reply_to":"3a98d1f4_83cfb954","updated":"2016-10-04 03:41:46.000000000","message":"Done","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    :param emu: path to VM emulator"},{"line_number":257,"context_line":"    :param disk_format: disk format style"},{"line_number":258,"context_line":"    :param nic_driver: libvirt network interface driver"},{"line_number":259,"context_line":"    :param conn: libvirt connection object"},{"line_number":260,"context_line":"    \"\"\""},{"line_number":261,"context_line":"    if log_dir:"},{"line_number":262,"context_line":"        vm_log \u003d \"--console-log \" + log_dir + \"/\" + dom_name + \"_console.log\""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_230b457e","line":259,"updated":"2016-10-03 23:28:31.000000000","message":":returns: .......","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"3dd0babb9c38b005f1d3dc0593641316af7f406e","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    :param emu: path to VM emulator"},{"line_number":257,"context_line":"    :param disk_format: disk format style"},{"line_number":258,"context_line":"    :param nic_driver: libvirt network interface driver"},{"line_number":259,"context_line":"    :param conn: libvirt connection object"},{"line_number":260,"context_line":"    \"\"\""},{"line_number":261,"context_line":"    if log_dir:"},{"line_number":262,"context_line":"        vm_log \u003d \"--console-log \" + log_dir + \"/\" + dom_name + \"_console.log\""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_5adbcf7b","line":259,"in_reply_to":"3a98d1f4_230b457e","updated":"2016-10-04 03:41:46.000000000","message":"Done","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":268,"context_line":"    #      will be verified by looking up the newly created domain below."},{"line_number":269,"context_line":"    cmd_dir \u003d os.path.dirname(os.path.abspath(__file__))"},{"line_number":270,"context_line":"    configure_cmd_path \u003d os.path.join(cmd_dir, \"configure-vm.py\")"},{"line_number":271,"context_line":"    configure_vm_cmd \u003d \" \".join([configure_cmd_path, \"--bootdev\","},{"line_number":272,"context_line":"                                 \"network\", \"--name\", dom_name, \"--image\","},{"line_number":273,"context_line":"                                 \"\\\"\" + vol_path + \"\\\"\", \"--arch\", arch,"},{"line_number":274,"context_line":"                                 \"--cpus\", cpus, \"--memory\", mem,"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_63de2dde","line":271,"updated":"2016-10-03 23:28:31.000000000","message":"I think configure_vm_cmd should be a list and not a string. From looking at: https://docs.python.org/2/library/subprocess.html","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"3dd0babb9c38b005f1d3dc0593641316af7f406e","unresolved":false,"context_lines":[{"line_number":268,"context_line":"    #      will be verified by looking up the newly created domain below."},{"line_number":269,"context_line":"    cmd_dir \u003d os.path.dirname(os.path.abspath(__file__))"},{"line_number":270,"context_line":"    configure_cmd_path \u003d os.path.join(cmd_dir, \"configure-vm.py\")"},{"line_number":271,"context_line":"    configure_vm_cmd \u003d \" \".join([configure_cmd_path, \"--bootdev\","},{"line_number":272,"context_line":"                                 \"network\", \"--name\", dom_name, \"--image\","},{"line_number":273,"context_line":"                                 \"\\\"\" + vol_path + \"\\\"\", \"--arch\", arch,"},{"line_number":274,"context_line":"                                 \"--cpus\", cpus, \"--memory\", mem,"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_3ae0c328","line":271,"in_reply_to":"3a98d1f4_63de2dde","updated":"2016-10-04 03:41:46.000000000","message":"Done","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    configure_cmd_path \u003d os.path.join(cmd_dir, \"configure-vm.py\")"},{"line_number":271,"context_line":"    configure_vm_cmd \u003d \" \".join([configure_cmd_path, \"--bootdev\","},{"line_number":272,"context_line":"                                 \"network\", \"--name\", dom_name, \"--image\","},{"line_number":273,"context_line":"                                 \"\\\"\" + vol_path + \"\\\"\", \"--arch\", arch,"},{"line_number":274,"context_line":"                                 \"--cpus\", cpus, \"--memory\", mem,"},{"line_number":275,"context_line":"                                 \"--libvirt-nic-driver\", nic_driver,"},{"line_number":276,"context_line":"                                 \"--emulator\", emu, \"--bridge\","}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_c3df01d4","line":273,"updated":"2016-10-03 23:28:31.000000000","message":"If it is a list then doing the quoting will not be needed.","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"3dd0babb9c38b005f1d3dc0593641316af7f406e","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    configure_cmd_path \u003d os.path.join(cmd_dir, \"configure-vm.py\")"},{"line_number":271,"context_line":"    configure_vm_cmd \u003d \" \".join([configure_cmd_path, \"--bootdev\","},{"line_number":272,"context_line":"                                 \"network\", \"--name\", dom_name, \"--image\","},{"line_number":273,"context_line":"                                 \"\\\"\" + vol_path + \"\\\"\", \"--arch\", arch,"},{"line_number":274,"context_line":"                                 \"--cpus\", cpus, \"--memory\", mem,"},{"line_number":275,"context_line":"                                 \"--libvirt-nic-driver\", nic_driver,"},{"line_number":276,"context_line":"                                 \"--emulator\", emu, \"--bridge\","}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_1af5c7eb","line":273,"in_reply_to":"3a98d1f4_c3df01d4","updated":"2016-10-04 03:41:46.000000000","message":"Done","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                                 \"br-\" + dom_name, \"--disk-format\","},{"line_number":278,"context_line":"                                 disk_format, vm_log])"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    with open(os.devnull, \"w\") as devnull:"},{"line_number":281,"context_line":"        subprocess.call(configure_vm_cmd, shell\u003dTrue, stdout\u003ddevnull)"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    # Lookup newly created domain"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_239ee506","line":280,"updated":"2016-10-03 23:28:31.000000000","message":"In create-node.sh stdout is sent to stderr ( \u003e\u00262 )","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"3dd0babb9c38b005f1d3dc0593641316af7f406e","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                                 \"br-\" + dom_name, \"--disk-format\","},{"line_number":278,"context_line":"                                 disk_format, vm_log])"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    with open(os.devnull, \"w\") as devnull:"},{"line_number":281,"context_line":"        subprocess.call(configure_vm_cmd, shell\u003dTrue, stdout\u003ddevnull)"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    # Lookup newly created domain"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_daeeff20","line":280,"in_reply_to":"3a98d1f4_239ee506","updated":"2016-10-04 03:41:46.000000000","message":"Fixed.","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":297,"context_line":"    \"\"\""},{"line_number":298,"context_line":"    with open(os.devnull, \"w\") as devnull:"},{"line_number":299,"context_line":"        if subprocess.call([\"which\", \"vbmc\"], stdout\u003ddevnull) \u003d\u003d 0:"},{"line_number":300,"context_line":"            subprocess.call([\"vbmc\", \"add\", dom_name, \"--port\", port],"},{"line_number":301,"context_line":"                            stderr\u003ddevnull)"},{"line_number":302,"context_line":"            subprocess.call([\"vbmc\", \"start\", dom_name], stderr\u003ddevnull)"},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_63b38d98","line":300,"updated":"2016-10-03 23:28:31.000000000","message":"In create-node.sh the output (stdout/stderr) is not sent to /dev/null","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"3dd0babb9c38b005f1d3dc0593641316af7f406e","unresolved":false,"context_lines":[{"line_number":297,"context_line":"    \"\"\""},{"line_number":298,"context_line":"    with open(os.devnull, \"w\") as devnull:"},{"line_number":299,"context_line":"        if subprocess.call([\"which\", \"vbmc\"], stdout\u003ddevnull) \u003d\u003d 0:"},{"line_number":300,"context_line":"            subprocess.call([\"vbmc\", \"add\", dom_name, \"--port\", port],"},{"line_number":301,"context_line":"                            stderr\u003ddevnull)"},{"line_number":302,"context_line":"            subprocess.call([\"vbmc\", \"start\", dom_name], stderr\u003ddevnull)"},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_baebf311","line":300,"in_reply_to":"3a98d1f4_63b38d98","updated":"2016-10-04 03:41:46.000000000","message":"Fixed.","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ca8c347bb2141c3fd829f10ca4db5ce8289bca5","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        if subprocess.call([\"which\", \"vbmc\"], stdout\u003ddevnull) \u003d\u003d 0:"},{"line_number":300,"context_line":"            subprocess.call([\"vbmc\", \"add\", dom_name, \"--port\", port],"},{"line_number":301,"context_line":"                            stderr\u003ddevnull)"},{"line_number":302,"context_line":"            subprocess.call([\"vbmc\", \"start\", dom_name], stderr\u003ddevnull)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"def print_mac(domain, bridge, port, dom_name):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_a3a91526","line":302,"updated":"2016-10-03 23:28:31.000000000","message":"In create-node.sh the output (stdout/stderr) is not sent to /dev/null","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"3dd0babb9c38b005f1d3dc0593641316af7f406e","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        if subprocess.call([\"which\", \"vbmc\"], stdout\u003ddevnull) \u003d\u003d 0:"},{"line_number":300,"context_line":"            subprocess.call([\"vbmc\", \"add\", dom_name, \"--port\", port],"},{"line_number":301,"context_line":"                            stderr\u003ddevnull)"},{"line_number":302,"context_line":"            subprocess.call([\"vbmc\", \"start\", dom_name], stderr\u003ddevnull)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"def print_mac(domain, bridge, port, dom_name):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_9a8ab762","line":302,"in_reply_to":"3a98d1f4_a3a91526","updated":"2016-10-04 03:41:46.000000000","message":"Fixed.","commit_id":"851507b38cc7fa32423448fbd22700e0dcf6a2ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"1a30155cae34e52633e31560c45cf4f2741d6240","unresolved":false,"context_lines":[{"line_number":264,"context_line":"    #      will be verified by looking up the newly created domain below."},{"line_number":265,"context_line":"    cmd_dir \u003d os.path.dirname(os.path.abspath(__file__))"},{"line_number":266,"context_line":"    configure_cmd_path \u003d os.path.join(cmd_dir, \"configure-vm.py\")"},{"line_number":267,"context_line":"    if log_dir:"},{"line_number":268,"context_line":"        configure_vm_cmd \u003d [configure_cmd_path, \"--bootdev\","},{"line_number":269,"context_line":"                            \"network\", \"--name\", dom_name, \"--image\", vol_path,"},{"line_number":270,"context_line":"                            \"--arch\", arch, \"--cpus\", cpus, \"--memory\", mem,"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a98d1f4_3d235d57","line":267,"updated":"2016-10-04 04:04:53.000000000","message":"configure_vm_cmd \u003d [ ...... ]\n if log_dir:\n   configure_vm_cmd.extend([\"--console-log\", ....])\n\nI think that should have less duplication of code.","commit_id":"6095c94837306c6211161f4b5c4fd2cc1ce894e5"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"07e363313fcad524f52fa063c84efc5f32e18636","unresolved":false,"context_lines":[{"line_number":264,"context_line":"    #      will be verified by looking up the newly created domain below."},{"line_number":265,"context_line":"    cmd_dir \u003d os.path.dirname(os.path.abspath(__file__))"},{"line_number":266,"context_line":"    configure_cmd_path \u003d os.path.join(cmd_dir, \"configure-vm.py\")"},{"line_number":267,"context_line":"    if log_dir:"},{"line_number":268,"context_line":"        configure_vm_cmd \u003d [configure_cmd_path, \"--bootdev\","},{"line_number":269,"context_line":"                            \"network\", \"--name\", dom_name, \"--image\", vol_path,"},{"line_number":270,"context_line":"                            \"--arch\", arch, \"--cpus\", cpus, \"--memory\", mem,"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a95cdbc_674b702c","line":267,"in_reply_to":"3a98d1f4_3d235d57","updated":"2016-10-04 20:45:22.000000000","message":"Done","commit_id":"6095c94837306c6211161f4b5c4fd2cc1ce894e5"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"1a30155cae34e52633e31560c45cf4f2741d6240","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                            \"--libvirt-nic-driver\", nic_driver, \"--emulator\","},{"line_number":272,"context_line":"                            emu, \"--bridge\", \"br-\" + dom_name, \"--disk-format\","},{"line_number":273,"context_line":"                            disk_format, \"--console-log\","},{"line_number":274,"context_line":"                            log_dir + \"/\" + dom_name + \"_console.log\"]"},{"line_number":275,"context_line":"    else:"},{"line_number":276,"context_line":"        configure_vm_cmd \u003d [configure_cmd_path, \"--bootdev\","},{"line_number":277,"context_line":"                            \"network\", \"--name\", dom_name, \"--image\", vol_path,"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a98d1f4_5dcca988","line":274,"range":{"start_line":274,"start_character":28,"end_line":274,"end_character":69},"updated":"2016-10-04 04:04:53.000000000","message":"os.path.join(log_dir, \"{}_console.log\".format(dom_name))\n\nor\n\n os.path.join(log_dir, dom_name + \"_console.log\")","commit_id":"6095c94837306c6211161f4b5c4fd2cc1ce894e5"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"07e363313fcad524f52fa063c84efc5f32e18636","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                            \"--libvirt-nic-driver\", nic_driver, \"--emulator\","},{"line_number":272,"context_line":"                            emu, \"--bridge\", \"br-\" + dom_name, \"--disk-format\","},{"line_number":273,"context_line":"                            disk_format, \"--console-log\","},{"line_number":274,"context_line":"                            log_dir + \"/\" + dom_name + \"_console.log\"]"},{"line_number":275,"context_line":"    else:"},{"line_number":276,"context_line":"        configure_vm_cmd \u003d [configure_cmd_path, \"--bootdev\","},{"line_number":277,"context_line":"                            \"network\", \"--name\", dom_name, \"--image\", vol_path,"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a95cdbc_87487c2f","line":274,"range":{"start_line":274,"start_character":28,"end_line":274,"end_character":69},"in_reply_to":"3a98d1f4_5dcca988","updated":"2016-10-04 20:45:22.000000000","message":"Done","commit_id":"6095c94837306c6211161f4b5c4fd2cc1ce894e5"},{"author":{"_account_id":11929,"name":"Michael Turek","email":"mjturek@linux.vnet.ibm.com","username":"mjturek"},"change_message_id":"34bdbcc77aac8f3c2a41b2f263cf075a73cfc0fe","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    parser.add_argument(\u0027-c\u0027, required\u003dTrue, metavar\u003d\u0027\u003ccpus\u003e\u0027, type\u003dint,"},{"line_number":39,"context_line":"                        help\u003d\u0027number of CPUs\u0027, dest\u003d\u0027cpus\u0027)"},{"line_number":40,"context_line":"    parser.add_argument(\u0027-m\u0027, required\u003dTrue, metavar\u003d\u0027\u003cmem\u003e\u0027, type\u003dint,"},{"line_number":41,"context_line":"                        help\u003d\u0027memory size in kilobytes\u0027, dest\u003d\u0027mem_size\u0027)"},{"line_number":42,"context_line":"    parser.add_argument(\u0027-d\u0027, required\u003dTrue, metavar\u003d\u0027\u003cdisk\u003e\u0027, type\u003dint,"},{"line_number":43,"context_line":"                        help\u003d\u0027volume disk size in gigabytes\u0027, dest\u003d\u0027disk_size\u0027)"},{"line_number":44,"context_line":"    parser.add_argument(\u0027-a\u0027, required\u003dTrue, metavar\u003d\u0027\u003carch\u003e\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba5da102_3c556bf9","line":41,"range":{"start_line":41,"start_character":63,"end_line":41,"end_character":71},"updated":"2016-11-02 17:24:43.000000000","message":"I would probably make this match the name of the field used by ironic \u0027memory_mb\u0027","commit_id":"1b10c10887f39dc41e89c1f852e45e7f33ac2883"},{"author":{"_account_id":11929,"name":"Michael Turek","email":"mjturek@linux.vnet.ibm.com","username":"mjturek"},"change_message_id":"34bdbcc77aac8f3c2a41b2f263cf075a73cfc0fe","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    parser.add_argument(\u0027-m\u0027, required\u003dTrue, metavar\u003d\u0027\u003cmem\u003e\u0027, type\u003dint,"},{"line_number":41,"context_line":"                        help\u003d\u0027memory size in kilobytes\u0027, dest\u003d\u0027mem_size\u0027)"},{"line_number":42,"context_line":"    parser.add_argument(\u0027-d\u0027, required\u003dTrue, metavar\u003d\u0027\u003cdisk\u003e\u0027, type\u003dint,"},{"line_number":43,"context_line":"                        help\u003d\u0027volume disk size in gigabytes\u0027, dest\u003d\u0027disk_size\u0027)"},{"line_number":44,"context_line":"    parser.add_argument(\u0027-a\u0027, required\u003dTrue, metavar\u003d\u0027\u003carch\u003e\u0027,"},{"line_number":45,"context_line":"                        help\u003d\u0027CPU architecture\u0027, dest\u003d\u0027arch\u0027)"},{"line_number":46,"context_line":"    parser.add_argument(\u0027-b\u0027, required\u003dTrue, metavar\u003d\u0027\u003cbridge\u003e\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba5da102_bc8edb76","line":43,"range":{"start_line":43,"start_character":68,"end_line":43,"end_character":77},"updated":"2016-11-02 17:24:43.000000000","message":"ditto here \u0027disk_gb\u0027","commit_id":"1b10c10887f39dc41e89c1f852e45e7f33ac2883"},{"author":{"_account_id":11929,"name":"Michael Turek","email":"mjturek@linux.vnet.ibm.com","username":"mjturek"},"change_message_id":"34bdbcc77aac8f3c2a41b2f263cf075a73cfc0fe","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    parser.add_argument(\u0027-d\u0027, required\u003dTrue, metavar\u003d\u0027\u003cdisk\u003e\u0027, type\u003dint,"},{"line_number":43,"context_line":"                        help\u003d\u0027volume disk size in gigabytes\u0027, dest\u003d\u0027disk_size\u0027)"},{"line_number":44,"context_line":"    parser.add_argument(\u0027-a\u0027, required\u003dTrue, metavar\u003d\u0027\u003carch\u003e\u0027,"},{"line_number":45,"context_line":"                        help\u003d\u0027CPU architecture\u0027, dest\u003d\u0027arch\u0027)"},{"line_number":46,"context_line":"    parser.add_argument(\u0027-b\u0027, required\u003dTrue, metavar\u003d\u0027\u003cbridge\u003e\u0027,"},{"line_number":47,"context_line":"                        help\u003d\u0027bridge name\u0027, dest\u003d\u0027bridge\u0027)"},{"line_number":48,"context_line":"    parser.add_argument(\u0027-e\u0027, required\u003dTrue, metavar\u003d\u0027\u003cemu\u003e\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba5da102_3cf1eb01","line":45,"range":{"start_line":45,"start_character":55,"end_line":45,"end_character":59},"updated":"2016-11-02 17:24:43.000000000","message":"and here as well \u0027cpu_arch\u0027","commit_id":"1b10c10887f39dc41e89c1f852e45e7f33ac2883"},{"author":{"_account_id":11929,"name":"Michael Turek","email":"mjturek@linux.vnet.ibm.com","username":"mjturek"},"change_message_id":"34bdbcc77aac8f3c2a41b2f263cf075a73cfc0fe","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        vol_name \u003d \".\".join([args.dom_name, args.disk_format])"},{"line_number":383,"context_line":"        del_storage_vol_if_exists(vol_name, storage_pool)"},{"line_number":384,"context_line":"        vol_path \u003d make_storage_vol("},{"line_number":385,"context_line":"            tar_dir\u003dtar_dir,"},{"line_number":386,"context_line":"            vol_name\u003dvol_name,"},{"line_number":387,"context_line":"            disk_size\u003ddisk_size,"},{"line_number":388,"context_line":"            disk_format\u003dargs.disk_format,"},{"line_number":389,"context_line":"            storage_pool\u003dstorage_pool,"},{"line_number":390,"context_line":"            pool_name\u003dpool_name)"},{"line_number":391,"context_line":"        domain \u003d make_domain("},{"line_number":392,"context_line":"            log_dir\u003dargs.log_dir,"},{"line_number":393,"context_line":"            dom_name\u003dargs.dom_name,"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba5da102_3cb48b80","line":390,"range":{"start_line":385,"start_character":0,"end_line":390,"end_character":31},"updated":"2016-11-02 17:24:43.000000000","message":"I might recommend making a dict for these values (ie - vol_dict) and then have \u0027make_storage_vol(**vol_dict)\u0027. Or have make_storage_vol take a dict instead.","commit_id":"1b10c10887f39dc41e89c1f852e45e7f33ac2883"},{"author":{"_account_id":11929,"name":"Michael Turek","email":"mjturek@linux.vnet.ibm.com","username":"mjturek"},"change_message_id":"34bdbcc77aac8f3c2a41b2f263cf075a73cfc0fe","unresolved":false,"context_lines":[{"line_number":389,"context_line":"            storage_pool\u003dstorage_pool,"},{"line_number":390,"context_line":"            pool_name\u003dpool_name)"},{"line_number":391,"context_line":"        domain \u003d make_domain("},{"line_number":392,"context_line":"            log_dir\u003dargs.log_dir,"},{"line_number":393,"context_line":"            dom_name\u003dargs.dom_name,"},{"line_number":394,"context_line":"            vol_path\u003dvol_path,"},{"line_number":395,"context_line":"            arch\u003dargs.arch,"},{"line_number":396,"context_line":"            cpus\u003dcpus,"},{"line_number":397,"context_line":"            mem\u003dmem_size,"},{"line_number":398,"context_line":"            emu\u003dargs.emu,"},{"line_number":399,"context_line":"            disk_format\u003dargs.disk_format,"},{"line_number":400,"context_line":"            nic_driver\u003dnic_driver,"},{"line_number":401,"context_line":"            conn\u003dconn)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    if domain:"},{"line_number":404,"context_line":"        make_vbmc(args.dom_name, port)"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba5da102_1f7b398d","line":401,"range":{"start_line":392,"start_character":11,"end_line":401,"end_character":21},"updated":"2016-11-02 17:24:43.000000000","message":"Same here","commit_id":"1b10c10887f39dc41e89c1f852e45e7f33ac2883"}],"requirements.txt":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"28338c4118684092dcbbb0eba3a07f5d5c4dfe2b","unresolved":false,"context_lines":[{"line_number":32,"context_line":"oslo.serialization\u003e\u003d1.10.0 # Apache-2.0"},{"line_number":33,"context_line":"oslo.service\u003e\u003d1.10.0 # Apache-2.0"},{"line_number":34,"context_line":"oslo.utils\u003e\u003d3.15.0 # Apache-2.0"},{"line_number":35,"context_line":"pecan\u003e\u003d1.0.0 # BSD"},{"line_number":36,"context_line":"requests\u003e\u003d2.10.0 # Apache-2.0"},{"line_number":37,"context_line":"six\u003e\u003d1.9.0 # MIT"},{"line_number":38,"context_line":"jsonpatch\u003e\u003d1.1 # BSD"}],"source_content_type":"text/plain","patch_set":5,"id":"bacf61ea_2aa5dfb4","line":35,"updated":"2016-08-02 22:34:32.000000000","message":"I\u0027d prefer the new requirement to be put around here.","commit_id":"f25a381f4aba7d9fe78cd26cb1020bb004b353fe"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"2bc5478c3b1eb3e81a4ca44cc4c0c4492b9e5db8","unresolved":false,"context_lines":[{"line_number":32,"context_line":"oslo.serialization\u003e\u003d1.10.0 # Apache-2.0"},{"line_number":33,"context_line":"oslo.service\u003e\u003d1.10.0 # Apache-2.0"},{"line_number":34,"context_line":"oslo.utils\u003e\u003d3.15.0 # Apache-2.0"},{"line_number":35,"context_line":"pecan\u003e\u003d1.0.0 # BSD"},{"line_number":36,"context_line":"requests\u003e\u003d2.10.0 # Apache-2.0"},{"line_number":37,"context_line":"six\u003e\u003d1.9.0 # MIT"},{"line_number":38,"context_line":"jsonpatch\u003e\u003d1.1 # BSD"}],"source_content_type":"text/plain","patch_set":5,"id":"bacf61ea_2df21970","line":35,"in_reply_to":"bacf61ea_2aa5dfb4","updated":"2016-08-02 23:17:57.000000000","message":"Done","commit_id":"f25a381f4aba7d9fe78cd26cb1020bb004b353fe"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"a9562e238e9cbe202cbe24c543fe87a20cd40893","unresolved":false,"context_lines":[{"line_number":32,"context_line":"oslo.service\u003e\u003d1.10.0 # Apache-2.0"},{"line_number":33,"context_line":"oslo.utils\u003e\u003d3.15.0 # Apache-2.0"},{"line_number":34,"context_line":"pecan\u003e\u003d1.0.0 # BSD"},{"line_number":35,"context_line":"pyroute2\u003e\u003d0.4.3 # Apache-2.0"},{"line_number":36,"context_line":"requests\u003e\u003d2.10.0 # Apache-2.0"},{"line_number":37,"context_line":"six\u003e\u003d1.9.0 # MIT"},{"line_number":38,"context_line":"jsonpatch\u003e\u003d1.1 # BSD"}],"source_content_type":"text/plain","patch_set":8,"id":"bacf61ea_e61ab716","line":35,"updated":"2016-08-03 15:44:54.000000000","message":"Can we see if this can go into test-requirements.txt instead?\n\nIt probably should work based on:\n\nhttps://github.com/openstack-dev/devstack/blob/master/inc/python#L165-L176","commit_id":"9373b8a78471a6ac05553904e10968f9b0f8a00a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c752a6d0bc55a24b66b069e86438d85c1a86f3b0","unresolved":false,"context_lines":[{"line_number":30,"context_line":"oslo.policy\u003e\u003d1.9.0 # Apache-2.0"},{"line_number":31,"context_line":"oslo.serialization\u003e\u003d1.10.0 # Apache-2.0"},{"line_number":32,"context_line":"oslo.service\u003e\u003d1.10.0 # Apache-2.0"},{"line_number":33,"context_line":"oslo.utils\u003e\u003d3.16.0 # Apache-2.0"},{"line_number":34,"context_line":"pecan\u003e\u003d1.0.0 # BSD"},{"line_number":35,"context_line":"requests\u003e\u003d2.10.0 # Apache-2.0"},{"line_number":36,"context_line":"six\u003e\u003d1.9.0 # MIT"}],"source_content_type":"text/plain","patch_set":9,"id":"bacf61ea_562a4a91","line":33,"updated":"2016-08-03 19:44:10.000000000","message":"I don\u0027t think there should be any changes to this file.","commit_id":"829773f0cd78db736f8cda74c66e0f5c9d160ba5"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"c20fc5718e0a4847c2b2085175b47dfe97130364","unresolved":false,"context_lines":[{"line_number":30,"context_line":"oslo.policy\u003e\u003d1.9.0 # Apache-2.0"},{"line_number":31,"context_line":"oslo.serialization\u003e\u003d1.10.0 # Apache-2.0"},{"line_number":32,"context_line":"oslo.service\u003e\u003d1.10.0 # Apache-2.0"},{"line_number":33,"context_line":"oslo.utils\u003e\u003d3.16.0 # Apache-2.0"},{"line_number":34,"context_line":"pecan\u003e\u003d1.0.0 # BSD"},{"line_number":35,"context_line":"requests\u003e\u003d2.10.0 # Apache-2.0"},{"line_number":36,"context_line":"six\u003e\u003d1.9.0 # MIT"}],"source_content_type":"text/plain","patch_set":9,"id":"bacf61ea_42460122","line":33,"in_reply_to":"bacf61ea_562a4a91","updated":"2016-08-03 20:30:25.000000000","message":"I was playing around with merging master into this branch, then reverted, but somehow this stuck around.","commit_id":"829773f0cd78db736f8cda74c66e0f5c9d160ba5"}]}
