)]}'
{"contrib/vagrant/setup_ubuntu_devstack":[{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"3416fdcc67bb76ebcacc2a6d74ca3a785d57fd32","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"test -f Vagrantfile"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"if vagrant global-status | grep \u0027 ubuntu \u0027 | grep -q \u0027contrib/vagrant\u0027; then"},{"line_number":14,"context_line":"    echo \"A devstack VM seems to be already running, see vagrant global-status\""},{"line_number":15,"context_line":"    exit 1"},{"line_number":16,"context_line":"fi"}],"source_content_type":"application/x-shellscript","patch_set":5,"id":"dab17558_e8e64043","line":13,"updated":"2016-05-12 13:42:13.000000000","message":"If someone has multiple devstacks running, that might not be an error - they could be running in differet checkouts of designate","commit_id":"3ef38e435a3cef880c89593b7ff27cefead56bb6"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"b3f08a00d90159883c802f041f31c0a1e63b0ed3","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"test -f Vagrantfile"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"if vagrant global-status | grep \u0027 ubuntu \u0027 | grep -q \u0027contrib/vagrant\u0027; then"},{"line_number":14,"context_line":"    echo \"A devstack VM seems to be already running, see vagrant global-status\""},{"line_number":15,"context_line":"    exit 1"},{"line_number":16,"context_line":"fi"}],"source_content_type":"application/x-shellscript","patch_set":5,"id":"dab17558_7013520e","line":13,"in_reply_to":"dab17558_e8e64043","updated":"2016-05-12 16:40:46.000000000","message":"Is it common? We could run \"vagrant status\" instead or people could use a patched copy of this helper.","commit_id":"3ef38e435a3cef880c89593b7ff27cefead56bb6"}],"devstack/networking_test.py":[{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"3416fdcc67bb76ebcacc2a6d74ca3a785d57fd32","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    Usage:"},{"line_number":28,"context_line":"    cd \u003cdesignate_repo\u003e/contrib/vagrant"},{"line_number":29,"context_line":"    ./setup_ubuntu_devstack"},{"line_number":30,"context_line":"    vagrant ssh ubuntu"},{"line_number":31,"context_line":"    /opt/stack/designate/devstack/networking_test.py"},{"line_number":32,"context_line":"    Monitor the logfiles"},{"line_number":33,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_c8e37c32","line":30,"updated":"2016-05-12 13:42:13.000000000","message":"add source ~/devstack/openrc","commit_id":"3ef38e435a3cef880c89593b7ff27cefead56bb6"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"3416fdcc67bb76ebcacc2a6d74ca3a785d57fd32","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    return [line.rstrip() for line in out.splitlines()]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"class DesignateCLI(object):"},{"line_number":79,"context_line":"    \"\"\"Designate CLI runner"},{"line_number":80,"context_line":"    \"\"\""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_28cfa8b4","line":78,"updated":"2016-05-12 13:42:13.000000000","message":"Why not just use the native python bindings in the designateclient?","commit_id":"3ef38e435a3cef880c89593b7ff27cefead56bb6"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"b3f08a00d90159883c802f041f31c0a1e63b0ed3","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    return [line.rstrip() for line in out.splitlines()]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"class DesignateCLI(object):"},{"line_number":79,"context_line":"    \"\"\"Designate CLI runner"},{"line_number":80,"context_line":"    \"\"\""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_b0693a28","line":78,"in_reply_to":"dab17558_28cfa8b4","updated":"2016-05-12 16:40:46.000000000","message":"To generate commands that developers can paste in a shell for debugging failed tests (and, secondarily, to make sure that we are using the same code paths as the typical client use)","commit_id":"3ef38e435a3cef880c89593b7ff27cefead56bb6"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"a84dd244e9cc56992b223c5a2a6264646b1c91f1","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    return [line.rstrip() for line in out.splitlines()]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"class DesignateCLI(object):"},{"line_number":79,"context_line":"    \"\"\"Designate CLI runner"},{"line_number":80,"context_line":"    \"\"\""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_f3b58c31","line":78,"in_reply_to":"dab17558_b0693a28","updated":"2016-05-12 16:47:45.000000000","message":"OK, in that case it should be based on openstack client, not designate client\n\nWe can also check the status of the zones during the test that was as well.","commit_id":"3ef38e435a3cef880c89593b7ff27cefead56bb6"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"a91b9b587f84522c5096d5faebd33ca51225cf70","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    return [line.rstrip() for line in out.splitlines()]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"class DesignateCLI(object):"},{"line_number":79,"context_line":"    \"\"\"Designate CLI runner"},{"line_number":80,"context_line":"    \"\"\""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_9b745768","line":78,"in_reply_to":"dab17558_f3b58c31","updated":"2016-05-18 10:01:36.000000000","message":"Done","commit_id":"3ef38e435a3cef880c89593b7ff27cefead56bb6"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"3416fdcc67bb76ebcacc2a6d74ca3a785d57fd32","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        \"\"\"Setup CLI handler\"\"\""},{"line_number":84,"context_line":"        # Very ugly stuff: the openrc file is currently the only"},{"line_number":85,"context_line":"        # source of truth to set up the environment"},{"line_number":86,"context_line":"        openrc_path \u003d os.path.expanduser(\"~/devstack/openrc\")"},{"line_number":87,"context_line":"        if not os.path.isfile(openrc_path):"},{"line_number":88,"context_line":"            print(\"%s not found\" % openrc_path)"},{"line_number":89,"context_line":"            sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_08d46445","line":86,"updated":"2016-05-12 13:42:13.000000000","message":"have the user source this, and just read from their env vars","commit_id":"3ef38e435a3cef880c89593b7ff27cefead56bb6"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"b3f08a00d90159883c802f041f31c0a1e63b0ed3","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        \"\"\"Setup CLI handler\"\"\""},{"line_number":84,"context_line":"        # Very ugly stuff: the openrc file is currently the only"},{"line_number":85,"context_line":"        # source of truth to set up the environment"},{"line_number":86,"context_line":"        openrc_path \u003d os.path.expanduser(\"~/devstack/openrc\")"},{"line_number":87,"context_line":"        if not os.path.isfile(openrc_path):"},{"line_number":88,"context_line":"            print(\"%s not found\" % openrc_path)"},{"line_number":89,"context_line":"            sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_909eb605","line":86,"in_reply_to":"dab17558_08d46445","updated":"2016-05-12 16:40:46.000000000","message":"Using many env vars across nested scripts tends to be difficult to debug, hence I\u0027m trying to generate a tidier/self-contained environment.\n\nUnfortunately ~/devstack/openrc needs to be used. If we are confident there\u0027s never going to be a cleaner, parsable alternative to the openrc file I\u0027ll switch to sourcing that file","commit_id":"3ef38e435a3cef880c89593b7ff27cefead56bb6"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"a91b9b587f84522c5096d5faebd33ca51225cf70","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        \"\"\"Setup CLI handler\"\"\""},{"line_number":84,"context_line":"        # Very ugly stuff: the openrc file is currently the only"},{"line_number":85,"context_line":"        # source of truth to set up the environment"},{"line_number":86,"context_line":"        openrc_path \u003d os.path.expanduser(\"~/devstack/openrc\")"},{"line_number":87,"context_line":"        if not os.path.isfile(openrc_path):"},{"line_number":88,"context_line":"            print(\"%s not found\" % openrc_path)"},{"line_number":89,"context_line":"            sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_e8f2c96e","line":86,"in_reply_to":"dab17558_53fe1806","updated":"2016-05-18 10:01:36.000000000","message":"Done","commit_id":"3ef38e435a3cef880c89593b7ff27cefead56bb6"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"a84dd244e9cc56992b223c5a2a6264646b1c91f1","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        \"\"\"Setup CLI handler\"\"\""},{"line_number":84,"context_line":"        # Very ugly stuff: the openrc file is currently the only"},{"line_number":85,"context_line":"        # source of truth to set up the environment"},{"line_number":86,"context_line":"        openrc_path \u003d os.path.expanduser(\"~/devstack/openrc\")"},{"line_number":87,"context_line":"        if not os.path.isfile(openrc_path):"},{"line_number":88,"context_line":"            print(\"%s not found\" % openrc_path)"},{"line_number":89,"context_line":"            sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_53fe1806","line":86,"in_reply_to":"dab17558_909eb605","updated":"2016-05-12 16:47:45.000000000","message":"I think it is cleaner to tell the user to \"source ~/devstack/openrc\" first, then run \"/opt/stack/designate/networking_test.py\"\n\nMy __init__ looks like:\n\n    def __init__(self):\n        \"\"\"Setup CLI handler\"\"\"\n        ignored_env_vars \u003d (\u0027PS4\u0027, \u0027MAIL\u0027, \u0027_\u0027, \u0027LS_COLORS\u0027)\n        self._cli_env \u003d os.environ.copy()\n        for k in ignored_env_vars:\n            self._cli_env.pop(k, None)\n\n        env \u003d dict()\n        for k, v in env.iteritems():\n            if k in ignored_env_vars:\n                continue\n\n            if k not in self._cli_env:\n                self._cli_env[k] \u003d v\n                log.debug(\u0027    setting env %s %s\u0027, k, v)\n\n            elif self._cli_env[k] !\u003d v:\n                self._cli_env[k] \u003d v\n                log.debug(\u0027    updating env %s %s\u0027, k, v)\n\nand it works fine with out any weird bash errors","commit_id":"3ef38e435a3cef880c89593b7ff27cefead56bb6"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"a84dd244e9cc56992b223c5a2a6264646b1c91f1","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    def setup_quota(self, quota):"},{"line_number":112,"context_line":"        \"\"\"Setup quota"},{"line_number":113,"context_line":"        \"\"\""},{"line_number":114,"context_line":"        out \u003d run_shell(\"openstack token issue -f value\","},{"line_number":115,"context_line":"                        env\u003dself._cli_env)"},{"line_number":116,"context_line":"        user_id \u003d out[-1]"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        cmd \u003d \"\"\"quota-update"},{"line_number":119,"context_line":"        --domains %(quota)d"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_3378b48f","line":116,"range":{"start_line":114,"start_character":8,"end_line":116,"end_character":25},"updated":"2016-05-12 16:47:45.000000000","message":"You can specify the col you want with openstack client\n\n    out \u003d run_shell(\"openstack token issue -f value -c project_id\",\n                    env\u003dself._cli_env)\n    user_id \u003d out","commit_id":"3ef38e435a3cef880c89593b7ff27cefead56bb6"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"a91b9b587f84522c5096d5faebd33ca51225cf70","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    def setup_quota(self, quota):"},{"line_number":112,"context_line":"        \"\"\"Setup quota"},{"line_number":113,"context_line":"        \"\"\""},{"line_number":114,"context_line":"        out \u003d run_shell(\"openstack token issue -f value\","},{"line_number":115,"context_line":"                        env\u003dself._cli_env)"},{"line_number":116,"context_line":"        user_id \u003d out[-1]"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        cmd \u003d \"\"\"quota-update"},{"line_number":119,"context_line":"        --domains %(quota)d"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_68fff934","line":116,"range":{"start_line":114,"start_character":8,"end_line":116,"end_character":25},"in_reply_to":"dab17558_3378b48f","updated":"2016-05-18 10:01:36.000000000","message":"Done","commit_id":"3ef38e435a3cef880c89593b7ff27cefead56bb6"}]}
