)]}'
{"nova/tests/test_ovz.py":[{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"923f6bf3a0bafb51016e5e49774da7f8e6807e3b","unresolved":false,"context_lines":[{"line_number":1041,"context_line":"        self.assertRaises(exception.Error, ifaces._set_nameserver,"},{"line_number":1042,"context_line":"                          INTERFACEINFO[0][\u0027id\u0027], INTERFACEINFO[0][\u0027dns\u0027])"},{"line_number":1043,"context_line":""},{"line_number":1044,"context_line":"    # TODO (imsplitbit): make sure the order of these tests follows the driver"},{"line_number":1045,"context_line":"    def test_get_connection(self):"},{"line_number":1046,"context_line":"        ovz_conn \u003d openvz_conn.get_connection(False)"},{"line_number":1047,"context_line":"        self.assertTrue(isinstance(ovz_conn, openvz_conn.OpenVzConnection))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F9Zc%3D","line":1044,"updated":"2011-11-18 15:48:08.000000000","message":"For readability? Or something else?","commit_id":"8d556d953f9061a0889f996f07ff96deded68038"}],"nova/virt/openvz_conn.py":[{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"923f6bf3a0bafb51016e5e49774da7f8e6807e3b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2010 OpenStack LLC."},{"line_number":4,"context_line":"# All Rights Reserved."},{"line_number":5,"context_line":"#"},{"line_number":6,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F9ak%3D","line":3,"updated":"2011-11-18 15:48:08.000000000","message":"It\u0027s 2011. Quit living in the past, Daniel :)","commit_id":"8d556d953f9061a0889f996f07ff96deded68038"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"923f6bf3a0bafb51016e5e49774da7f8e6807e3b","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                  \u0027Allow over subscription of local disk\u0027)"},{"line_number":81,"context_line":"flags.DEFINE_float(\u0027ovz_disk_space_oversub_percent\u0027,"},{"line_number":82,"context_line":"                   1.10,"},{"line_number":83,"context_line":"                   \u0027Local disk over subscription percentage\u0027)"},{"line_number":84,"context_line":"flags.DEFINE_string(\u0027ovz_disk_space_increment\u0027,"},{"line_number":85,"context_line":"                    \u0027G\u0027,"},{"line_number":86,"context_line":"                    \u0027Disk subscription increment\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F9ag%3D","line":83,"updated":"2011-11-18 15:48:08.000000000","message":"What does this mean? Does 1.10 mean 10 percent oversubscription?","commit_id":"8d556d953f9061a0889f996f07ff96deded68038"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"923f6bf3a0bafb51016e5e49774da7f8e6807e3b","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                  \u0027Use veth devices rather than venet\u0027)"},{"line_number":96,"context_line":"flags.DEFINE_bool(\u0027ovz_use_dhcp\u0027,"},{"line_number":97,"context_line":"                  False,"},{"line_number":98,"context_line":"                  \u0027Use dhcp for network configuration\u0027)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"LOG \u003d logging.getLogger(\u0027nova.virt.openvz\u0027)"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F9ac%3D","line":98,"updated":"2011-11-18 15:48:08.000000000","message":"Does this imply that the OpenVZ driver doesn\u0027t use Nova\u0027s network manager infrastructure?\n\nAlso, why does it default to False?","commit_id":"8d556d953f9061a0889f996f07ff96deded68038"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"923f6bf3a0bafb51016e5e49774da7f8e6807e3b","unresolved":false,"context_lines":[{"line_number":107,"context_line":"class OpenVzConnection(driver.ComputeDriver):"},{"line_number":108,"context_line":"    def __init__(self, read_only):"},{"line_number":109,"context_line":"        \"\"\""},{"line_number":110,"context_line":"        I create an instance of the openvz connection."},{"line_number":111,"context_line":"        \"\"\""},{"line_number":112,"context_line":"        self.utility \u003d {"},{"line_number":113,"context_line":"                \u0027CTIDS\u0027: {},"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F9aY%3D","line":110,"updated":"2011-11-18 15:48:08.000000000","message":"Docstrings usually aren\u0027t written in the first person.\n\n(Same comment applies to many of your other docstrings)","commit_id":"8d556d953f9061a0889f996f07ff96deded68038"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"923f6bf3a0bafb51016e5e49774da7f8e6807e3b","unresolved":false,"context_lines":[{"line_number":207,"context_line":"                LOG.error(_(\u0027Stderr output from vzlist: %s\u0027) % err)"},{"line_number":208,"context_line":"        except ProcessExecutionError as err:"},{"line_number":209,"context_line":"            LOG.error(_(\u0027Stderr output from vzlist: %s\u0027) % err)"},{"line_number":210,"context_line":"            raise exception.Error(_(\u0027Problem listing Vzs\u0027))"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        for name in out.splitlines():"},{"line_number":213,"context_line":"            name \u003d name.split()[0]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F9aU%3D","line":210,"updated":"2011-11-18 15:48:08.000000000","message":"This seems to be a common pattern for calling external commands (i.e. call it, log stderr, if any,  and catch errors and reraise them as exceptionError). Can you put that into a separate method to avoid duplication?","commit_id":"8d556d953f9061a0889f996f07ff96deded68038"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"923f6bf3a0bafb51016e5e49774da7f8e6807e3b","unresolved":false,"context_lines":[{"line_number":323,"context_line":"        # of OS name, it is arbitrary so we will need to find a way to"},{"line_number":324,"context_line":"        # correlate this to what type of disto the image actually is because"},{"line_number":325,"context_line":"        # this is the clue for openvz\u0027s utility scripts.  For now we will have"},{"line_number":326,"context_line":"        # to set it to \u0027ubuntu\u0027"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        # This will actually drop the os from the local image cache"},{"line_number":329,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F9aM%3D","line":326,"updated":"2011-11-18 15:48:08.000000000","message":"I\u0027m not too familiar with OpenVZ. What is the significance of this template?","commit_id":"8d556d953f9061a0889f996f07ff96deded68038"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"923f6bf3a0bafb51016e5e49774da7f8e6807e3b","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        Currently ostemplate defaults to ubuntu.  This facilitates setting"},{"line_number":355,"context_line":"        the ostemplate setting in OpenVZ to allow the OpenVz helper scripts"},{"line_number":356,"context_line":"        to setup networking, nameserver and hostnames.  Because of this, the"},{"line_number":357,"context_line":"        openvz driver only works with debian based distros."},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        If I fail to run an exception is raised as this is a critical piece"},{"line_number":360,"context_line":"        in making openvz run a container."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F9aI%3D","line":357,"updated":"2011-11-18 15:48:08.000000000","message":"If we relied on DHCP, that could reliably set all of this. Why not just do that?","commit_id":"8d556d953f9061a0889f996f07ff96deded68038"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"923f6bf3a0bafb51016e5e49774da7f8e6807e3b","unresolved":false,"context_lines":[{"line_number":498,"context_line":"            raise exception.Error(_(\u0027Failed to update db for %s\u0027)"},{"line_number":499,"context_line":"                                  % instance[\u0027id\u0027])"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"    def _set_hostname(self, instance, hostname\u003dFalse):"},{"line_number":502,"context_line":"        \"\"\""},{"line_number":503,"context_line":"        I exist to set the hostname of a given container.  The option to pass"},{"line_number":504,"context_line":"        a hostname to the method was added with the intention to allow the"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F9aE%3D","line":501,"updated":"2011-11-18 15:48:08.000000000","message":"If hostname isn\u0027t supposed to be a bool when it\u0027s actually passed, you should use None as its default value.","commit_id":"8d556d953f9061a0889f996f07ff96deded68038"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"923f6bf3a0bafb51016e5e49774da7f8e6807e3b","unresolved":false,"context_lines":[{"line_number":644,"context_line":""},{"line_number":645,"context_line":"        # If out is empty, there is no instance known to OpenVz by that"},{"line_number":646,"context_line":"        # name and an exception should be raised"},{"line_number":647,"context_line":"        if len(out) \u003d\u003d 0:"},{"line_number":648,"context_line":"            raise exception.NotFound"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"        # Break the output into usable chunks"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F9Y8%3D","line":647,"updated":"2011-11-18 15:48:08.000000000","message":"\"If not out\" would be easier on my eyes.","commit_id":"8d556d953f9061a0889f996f07ff96deded68038"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"923f6bf3a0bafb51016e5e49774da7f8e6807e3b","unresolved":false,"context_lines":[{"line_number":695,"context_line":"        # TODO(tim.simpson) This hangs if the \"lock_path\" FLAG value refers to"},{"line_number":696,"context_line":"        #                   a directory which can\u0027t be locked.  It\u0027d be nice"},{"line_number":697,"context_line":"        #                   if we could somehow detect that and raise an error"},{"line_number":698,"context_line":"        #                   instead."},{"line_number":699,"context_line":""},{"line_number":700,"context_line":"        # Create our table instance and add our chains for the instance"},{"line_number":701,"context_line":"        table_ipv4 \u003d linux_net.iptables_manager.ipv4[\u0027filter\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F9Y4%3D","line":698,"updated":"2011-11-18 15:48:08.000000000","message":"This TODO seems to have gotten lost. What exactly hangs when this is the case?","commit_id":"8d556d953f9061a0889f996f07ff96deded68038"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"69d7a893fc120b97b60938bce510f3e6e8e60622","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            ctids.append(ctid)"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        return ctids"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def list_instances_detail(self):"},{"line_number":205,"context_line":"        \"\"\""},{"line_number":206,"context_line":"        Satisfy the requirement for this method in the manager codebase."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAADX%2F%2F%2Fu8%3D","line":203,"updated":"2012-01-06 14:30:46.000000000","message":"return [ line.split()[0] for line in out.splitlines() ]","commit_id":"3e71019e7d8bd9d1eb5285c78240b44b68a4800e"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"69d7a893fc120b97b60938bce510f3e6e8e60622","unresolved":false,"context_lines":[{"line_number":379,"context_line":""},{"line_number":380,"context_line":"        image_name \u003d \u0027%s.tar.gz\u0027 % instance[\u0027image_ref\u0027]"},{"line_number":381,"context_line":"        full_image_path \u003d \u0027%s/%s\u0027 % (FLAGS.ovz_image_template_dir, image_name)"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        if not os.path.exists(full_image_path):"},{"line_number":384,"context_line":"            # These objects are required to retrieve images from the object"},{"line_number":385,"context_line":"            # store. This is known only to work with glance so far but as I"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAADX%2F%2F%2Ft4%3D","line":382,"updated":"2012-01-06 14:30:46.000000000","message":"I don\u0027t like that. Are you assuming that the images are always be in .tar.gz format? Because that is likely not the case, AFAIU images provided by the image service can be any format. You\u0027d better check and raise an error I think.","commit_id":"3e71019e7d8bd9d1eb5285c78240b44b68a4800e"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"69d7a893fc120b97b60938bce510f3e6e8e60622","unresolved":false,"context_lines":[{"line_number":394,"context_line":"            return True"},{"line_number":395,"context_line":"        else:"},{"line_number":396,"context_line":"            return False"},{"line_number":397,"context_line":""},{"line_number":398,"context_line":"    def _configure_vz(self, instance, config\u003d\u0027basic\u0027):"},{"line_number":399,"context_line":"        \"\"\""},{"line_number":400,"context_line":"        This adds the container root into the vz meta data so that"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAADX%2F%2F%2Ft0%3D","line":397,"updated":"2012-01-06 14:30:46.000000000","message":"You can squeeze the else.","commit_id":"3e71019e7d8bd9d1eb5285c78240b44b68a4800e"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"69d7a893fc120b97b60938bce510f3e6e8e60622","unresolved":false,"context_lines":[{"line_number":781,"context_line":"                run_as_root\u003dTrue)"},{"line_number":782,"context_line":""},{"line_number":783,"context_line":"    def _set_diskspace(self, instance, soft\u003dNone, hard\u003dNone):"},{"line_number":784,"context_line":"        \"\"\""},{"line_number":785,"context_line":"        Implement OpenVz disk quotas for local disk space usage."},{"line_number":786,"context_line":"        This method takes a soft and hard limit.  This is also the amount"},{"line_number":787,"context_line":"        of diskspace that is reported by system tools such as du and df inside"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAADX%2F%2F%2Ftg%3D","line":784,"updated":"2012-01-06 14:30:46.000000000","message":"You do not seem to use soft and hard anywhere, do I\u0027d say you can simplify your code by removing this args and KISS.","commit_id":"3e71019e7d8bd9d1eb5285c78240b44b68a4800e"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"69d7a893fc120b97b60938bce510f3e6e8e60622","unresolved":false,"context_lines":[{"line_number":986,"context_line":"        device goes where."},{"line_number":987,"context_line":"        \"\"\""},{"line_number":988,"context_line":"        if instance[\u0027volumes\u0027]:"},{"line_number":989,"context_line":"            for volume in instance[\u0027volumes\u0027]:"},{"line_number":990,"context_line":"                if volume[\u0027uuid\u0027]:"},{"line_number":991,"context_line":"                    self.attach_volume(instance[\u0027name\u0027], None,"},{"line_number":992,"context_line":"                                       volume[\u0027mountpoint\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAADX%2F%2F%2Ftc%3D","line":989,"updated":"2012-01-06 14:30:46.000000000","message":"I\u0027d write\n\n  for volume in instance.get(\"volumes\", [])\n\nbut not a big problem though.","commit_id":"3e71019e7d8bd9d1eb5285c78240b44b68a4800e"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"69d7a893fc120b97b60938bce510f3e6e8e60622","unresolved":false,"context_lines":[{"line_number":1013,"context_line":"        # Set volumes to none to account for the case that no volume is found"},{"line_number":1014,"context_line":"        volumes \u003d None"},{"line_number":1015,"context_line":"        if instance[\u0027volumes\u0027]:"},{"line_number":1016,"context_line":"            for vol in instance[\u0027volumes\u0027]:"},{"line_number":1017,"context_line":"                if vol[\u0027mountpoint\u0027] \u003d\u003d mountpoint and vol[\u0027uuid\u0027]:"},{"line_number":1018,"context_line":"                    # Volume has a UUID so do all the mount magic using the"},{"line_number":1019,"context_line":"                    # UUID instead of the device name."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAADX%2F%2F%2FtY%3D","line":1016,"updated":"2012-01-06 14:30:46.000000000","message":"Same as above, but mainly because it will save you from an indent level. :)","commit_id":"3e71019e7d8bd9d1eb5285c78240b44b68a4800e"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"69d7a893fc120b97b60938bce510f3e6e8e60622","unresolved":false,"context_lines":[{"line_number":1157,"context_line":"        If this fails to run an exception is raised as the returned value of"},{"line_number":1158,"context_line":"        this method is required for all resource isolation to work correctly."},{"line_number":1159,"context_line":"        \"\"\""},{"line_number":1160,"context_line":"        out \u003d execute(\u0027cat\u0027, \u0027/proc/meminfo\u0027, run_as_root\u003dTrue)"},{"line_number":1161,"context_line":"        for line in out.splitlines():"},{"line_number":1162,"context_line":"            line \u003d line.split()"},{"line_number":1163,"context_line":"            if line[0] \u003d\u003d \u0027MemTotal:\u0027:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAADX%2F%2F%2Fs8%3D","line":1160,"updated":"2012-01-06 14:30:46.000000000","message":"There\u0027s no need to run this as root, so there\u0027s no need to use execute().","commit_id":"3e71019e7d8bd9d1eb5285c78240b44b68a4800e"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"69d7a893fc120b97b60938bce510f3e6e8e60622","unresolved":false,"context_lines":[{"line_number":1181,"context_line":"        available on the host to be carved up for the guests."},{"line_number":1182,"context_line":"        \"\"\""},{"line_number":1183,"context_line":"        proc_count \u003d 0"},{"line_number":1184,"context_line":"        out \u003d execute(\u0027cat\u0027, \u0027/proc/cpuinfo\u0027, run_as_root\u003dTrue)"},{"line_number":1185,"context_line":"        for line in out.splitlines():"},{"line_number":1186,"context_line":"            line \u003d line.split()"},{"line_number":1187,"context_line":"            if len(line) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAADX%2F%2F%2Fs4%3D","line":1184,"updated":"2012-01-06 14:30:46.000000000","message":"There\u0027s no need to run this as root, so there\u0027s no need to use execute().","commit_id":"3e71019e7d8bd9d1eb5285c78240b44b68a4800e"}]}
